liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Data : 2022/11/1 18:27:39 |
| 4 | * Author : LiuBin |
| 5 | */ |
| 6 | #ifndef _info_data_H |
| 7 | #define _info_data_H |
| 8 | #include "mbtk_type.h" |
| 9 | #include "mbtk_list.h" |
| 10 | #include "mbtk_log.h" |
| 11 | #include "mbtk_utils.h" |
| 12 | |
| 13 | #define SOCK_CLIENT_MAX 100 |
| 14 | #define EPOLL_LISTEN_MAX 100 |
| 15 | #define IND_REGISTER_MAX 10 |
| 16 | #define PACK_PROCESS_QUEUE_MAX 20 |
| 17 | |
| 18 | #define MBTK_APN_PROP "persist.mbtk.apn" |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 19 | |
| 20 | typedef struct |
| 21 | { |
| 22 | int fd; |
| 23 | |
| 24 | uint32 ind_num; |
| 25 | uint16 ind_register[IND_REGISTER_MAX]; |
| 26 | } sock_client_info_t; |
| 27 | |
| 28 | typedef struct |
| 29 | { |
| 30 | sock_client_info_t *cli_info; |
| 31 | void* pack; |
| 32 | } info_queue_item_t; |
| 33 | |
| 34 | typedef struct |
| 35 | { |
| 36 | int cid; |
| 37 | |
| 38 | bool ipv4_valid; |
| 39 | uint8 ipv4[20]; |
| 40 | bool ipv6_valid; |
| 41 | uint8 ipv6[50]; |
| 42 | } info_apn_ip_t; |
| 43 | |
| 44 | typedef enum { |
| 45 | INFO_URC_MSG_RADIO_STATE, |
| 46 | INFO_URC_MSG_CGEV, |
| 47 | INFO_URC_MSG_NET_CS_REG_STATE, |
| 48 | INFO_URC_MSG_NET_PS_REG_STATE, |
| 49 | INFO_URC_MSG_CALL_STATE, |
| 50 | INFO_URC_MSG_SIM_STATE, |
| 51 | INFO_URC_MSG_PDP_STATE, |
| 52 | INFO_URC_MSG_SMS_STATE, |
b.liu | f37bd33 | 2024-03-18 13:51:24 +0800 | [diff] [blame] | 53 | INFO_URC_MSG_SET_BAND, |
wangyouqiang | ce45a10 | 2024-04-18 18:08:29 +0800 | [diff] [blame] | 54 | INFO_URC_MSG_GET_SIM_STATE, //check sim status |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 55 | INFO_URC_MSG_NET_STATE_LOG // Save Network state into file. |
| 56 | } info_urc_msg_id_enum; |
| 57 | |
| 58 | typedef struct { |
| 59 | info_urc_msg_id_enum msg; |
| 60 | |
| 61 | void *data; |
| 62 | int data_len; |
| 63 | } info_urc_msg_t; |
| 64 | |
wangyouqiang | 80487e4 | 2024-05-24 15:06:20 +0800 | [diff] [blame] | 65 | int mbtk_get_apn_send_pack(void); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 66 | #endif /* _info_data_H */ |