7 #include <sys/socket.h>
14 #include <uservice/uservice.h>
34 #define IPADDR_STR_LEN 16
46 #define NETMGR_SSID_MAX_LEN (32)
47 #define NETMGR_PWD_MAX_LEN (64)
49 #define NETMGR_BSSID_MAX_LEN (ETH_ALEN)
51 #define NETMGR_BSSID_MAX_LEN (6)
60 #define MAX_AP_CONFIG_NUM (3)
169 #define NETMGR_WIFI_METHOD_MAX_LENGTH (32)
170 #define NETMGR_WIFI_STATUS_MAX_LENGTH (32)
171 #define NETMGR_WIFI_SSID_MAX_LENGTH (32)
172 #define NETMGR_WIFI_PASSWORD_MAX_LENGTH (64)
366 #ifdef AOS_NETWORK_WITH_WIFI
422 void netmgr_wifi_register_mgnt_monitor_cb(
netmgr_hdl_t hdl, monitor_data_cb_t fn);
433 int netmgr_wifi_send_80211_raw_frame(
netmgr_hdl_t hdl, uint8_t *buf,
int len);
netmgr_ssid_format_e
ssid string format
int netmgr_service_init(utask_t *task)
net manager init.
#define NETMGR_WIFI_PASSWORD_MAX_LENGTH
eth_mac_duplex_e
ethernet duplex type
int netmgr_add_dev(const char *name)
add netmgr dev
struct netmgr_ifconfig_info netmgr_ifconfig_info_t
this struct defines netmgr ifconfig info
int netmgr_connect(netmgr_hdl_t hdl, netmgr_connect_params_t *params)
netmgr connect network
void netmgr_service_deinit()
net manager deinit
netmgr_hdl_t netmgr_get_dev(const char *name)
get netmgr handler
#define NETMGR_WIFI_METHOD_MAX_LENGTH
struct netmgr_wifi_ap_config_t netmgr_wifi_config_t
int netmgr_save_config(netmgr_hdl_t hdl)
netmgr save config
void netmgr_set_auto_reconnect(netmgr_hdl_t hdl, bool enable)
set auto reconnect flag
netmgr_conn_state_t netmgr_get_state(netmgr_hdl_t hdl)
get state of hdl
netmgr_wifi_mode_t
netmgr wifi type
netmgr_msgid_t
netmgr message type
netmgr_conn_state
netmgr connection state
void(* netmgr_msg_cb_t)(netmgr_msg_t *msg)
this struct defines netmgr message callback function
#define NETMGR_PWD_MAX_LEN
int netmgr_disconnect(netmgr_hdl_t hdl)
netmgr disconnect network
enum netmgr_conn_state netmgr_conn_state_t
netmgr connection state
#define MAX_AP_CONFIG_NUM
struct netmgr_wifi_params netmgr_wifi_params_t
netmgr wifi params
int netmgr_set_ifconfig(netmgr_hdl_t hdl, netmgr_ifconfig_info_t *info)
set if config information
netmgr_type_t get_hdl_type(netmgr_hdl_t hdl)
get netmgr dev type
int netmgr_get_ifconfig(netmgr_hdl_t hdl, netmgr_ifconfig_info_t *info)
get if config information
int netmgr_del_msg_cb(netmgr_hdl_t hdl, netmgr_msg_cb_t cb)
netmgr delete message callback
int netmgr_get_config(netmgr_hdl_t hdl, netmgr_config_t *config)
get config information
int netmgr_del_config(netmgr_hdl_t, netmgr_del_config_t *config)
delete config information
struct netmgr_connect_params netmgr_connect_params_t
netmgr connect params
eth_mac_speed_e
ethernet speed type
#define NETMGR_BSSID_MAX_LEN
#define NETMGR_WIFI_SSID_MAX_LENGTH
netmgr_type_t
network type
int netmgr_set_msg_cb(netmgr_hdl_t hdl, netmgr_msg_cb_t cb)
netmgr set message callback
#define NETMGR_WIFI_STATUS_MAX_LENGTH
struct netmgr_del_config netmgr_del_config_t
netmgr delete config
struct netmgr_wifi_ap_params netmgr_wifi_ap_params_t
netmgr wifi ap params
struct netmgr_config netmgr_config_t
netmgr config struct
#define NETMGR_SSID_MAX_LEN
struct netmgr_wifi_sta_connect_params netmgr_wifi_sta_params_t
netmgr wifi sta connect params
@ NETMGR_SSID_FORMAT_UTF8
@ NETMGR_WIFI_MODE_UNKNOWN
@ NETMGR_MSGID_WIFI_STATUS_FROM_IMPL
@ NETMGR_MSGID_ETH_STATUS_FROM_IMPL
@ NETMGR_MSGID_WIFI_TRACE_FROM_IMPL
@ NETMGR_MSGID_WIFI_STATUS
@ NETMGR_MSGID_NETWORK_STATUS
@ CONN_STATE_OBTAINING_IP
@ CONN_STATE_DISCONNECTED
@ CONN_STATE_DISCONNECTING
@ CONN_STATE_NETWORK_CONNECTED
union netmgr_config::@0 config
netmgr_wifi_config_t wifi_config
netmgr_wifi_ap_params_t ap_params
netmgr_wifi_sta_params_t wifi_params
union netmgr_connect_params::@2 params
netmgr_wifi_params_t wlan_params
union netmgr_del_config::@1 config
char ssid[NETMGR_SSID_MAX_LEN+1]
this struct defines netmgr ifconfig info
char mask[IPADDR_STR_LEN]
char dns_server[IPADDR_STR_LEN]
char ip_addr[IPADDR_STR_LEN]
char mac[IPADDR_STR_LEN+1]
this struct defines netmgr message
void * network_status_change
this struct defines wifi ap config
this struct defines wifi ap info
netmgr_ssid_format_e ssid_format
this struct defines netmgr message callback function
char netmask_ip[IPADDR_STRLEN_MAX]
char pwd[NETMGR_PWD_MAX_LEN+1]
char ssid[NETMGR_SSID_MAX_LEN+1]
char gw_ip[IPADDR_STRLEN_MAX]
char svr_ip[IPADDR_STRLEN_MAX]
this struct defines netmgr wifi status change info
netmgr wifi sta connect params
char pwd[NETMGR_PWD_MAX_LEN+1]
char ssid[NETMGR_SSID_MAX_LEN+1]
char bssid[NETMGR_BSSID_MAX_LEN]