• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 
16 #ifndef LNN_LANE_LINK_CONFLICT_STRUCT_H
17 #define LNN_LANE_LINK_CONFLICT_STRUCT_H
18 
19 #include "lnn_lane_interface_struct.h"
20 #include "softbus_common.h"
21 #include "softbus_def.h"
22 
23 #define CONFLICT_DEV_IP_LEN 32
24 #define CONFLICT_UDIDHASH_STR_LEN 16
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 typedef enum {
31     CONFLICT_THREE_VAP = 0,
32     CONFLICT_ROLE,
33     CONFLICT_LINK_NUM_LIMITED,
34     CONFLICT_SOFTAP,
35     CONFLICT_ILLEGAL,
36     CONFLICT_BUTT,
37 } LinkConflictType;
38 
39 typedef enum {
40     IDENTIFY_TYPE_DEV_ID = 0,
41     IDENTIFY_TYPE_UDID_HASH,
42     IDENTIFY_TYPE_BUTT,
43 } DevIdentifyType;
44 
45 typedef struct {
46     DevIdentifyType type;
47     union {
48         char peerDevId[NETWORK_ID_BUF_LEN];
49         char udidHash[CONFLICT_UDIDHASH_STR_LEN + 1];
50     } devInfo;
51 } DevIdentifyInfo;
52 
53 typedef struct {
54     uint8_t devIdCnt;
55     uint8_t devIpCnt;
56     LaneLinkType releaseLink;
57     LinkConflictType conflictType;
58     DevIdentifyInfo identifyInfo;
59     char (*devIdList)[NETWORK_ID_BUF_LEN];
60     char (*devIpList)[CONFLICT_DEV_IP_LEN];
61     ListNode node;
62 } LinkConflictInfo;
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 #endif // LNN_LANE_LINK_CONFLICT_STRUCT_H
68