1 /*
2  * Copyright (C) 2022 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 OHOS_WIFI_COMMON_DEF_H
17 #define OHOS_WIFI_COMMON_DEF_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #ifdef OHOS_EUPDATER
24 #define CONFIG_ROOR_DIR "/tmp/service/el1/public/wifi"
25 #define P2P_CONFIG_DIR  "/tmp/service/el1/public/wifi/wpa_supplicant/"
26 #define P2P_WPA_CONFIG_FILE "/tmp/service/el1/public/wifi/wpa_supplicant/p2p_supplicant.conf"
27 #else
28 #define CONFIG_ROOR_DIR "/data/service/el1/public/wifi"
29 #define P2P_CONFIG_DIR  "/data/service/el1/public/wifi/wpa_supplicant/"
30 #define P2P_WPA_CONFIG_FILE "/data/service/el1/public/wifi/wpa_supplicant/p2p_supplicant.conf"
31 #endif // OHOS_EUPDATER
32 
33 #define WIFI_MANAGGER_PID_NAME "wifi_mgr_pid"
34 #define DIR_MAX_LENGTH          256
35 #define PID_MAX_LENGTH          32
36 #define DEFAULT_UMASK_VALUE     027
37 #define MAX_READ_EVENT_SIZE     512
38 
39 #ifndef MAC2STR
40 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
41 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
42 #endif
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif
49