1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef SOFTBUS_PROTOCOL_DEF_H
16 #define SOFTBUS_PROTOCOL_DEF_H
17 
18 #include <stdint.h>
19 
20 // protocol ability
21 #define PROTOCOL_ABILITY_MESSAGE 0x1
22 #define PROTOCOL_ABILITY_BYTES   (0x1 << 1)
23 #define PROTOCOL_ABILITY_STREAM  (0x1 << 2)
24 #define PROTOCOL_ABILITY_FILE    (0x1 << 3)
25 typedef uint32_t LnnProtocolAbility;
26 
27 // protocol type
28 #define LNN_PROTOCOL_BR    (0x1)
29 #define LNN_PROTOCOL_BLE   (1L << 1)
30 #define LNN_PROTOCOL_IP    (1L << 2)
31 #define LNN_PROTOCOL_DFILE (1L << 3)
32 #define LNN_PROTOCOL_COAP  (1L << 4)
33 #define LNN_PROTOCOL_DMSG  (1L << 5)
34 #define LNN_PROTOCOL_VTP   (1L << 6)
35 #define LNN_PROTOCOL_NIP   (1L << 7)
36 #define LNN_PROTOCOL_ALL   ((uint32_t)-1)
37 typedef uint32_t ProtocolType;
38 
39 #define BIND_ADDR_ALL "0"
40 
41 #endif
42