![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs for Network Interface. More...
This section describes the M2MB APIs for Network Interface.
NWIF is used to configure IPv4 and IPv6 on specified WLAN. once the WLAN gets connected, IP can be configured on specified WLAN.
#define M2MB_NWIF_HOSTNAME_SIZE (32) |
Macro for Host name maximum size in bytes
Definition at line 49 of file m2mb_nwif.h.
typedef struct M2MB_NWIF_DHCPV4_CLIENT M2MB_NWIF_DHCPV4_CLIENT_T |
DHCP client configuration in case of DHCP server.
typedef struct M2MB_NWIF_DNS_SERVER_LIST M2MB_NWIF_DNS_SERVER_LIST_T |
For use with m2mb_nwif_cfgget() to get IP addresses of DNS servers.
typedef VOID(* M2MB_NWIF_IPCONFIG_CB) (UINT8 deviceId, VOID *cbctx, M2MB_NWIF_EVENT_E eventid, M2MB_NWIF_CFG_T *data) |
NWIF call back prototype.
Type definition of the user callback to receive asynchronous events from NWIF. cbctx represents user context registered in 'm2mb_nwif_init', eventid is asynchronous events from NWIF. data is data from NWIF of IP configuration.
Definition at line 161 of file m2mb_nwif.h.
typedef struct M2MB_NWIF_IPV4_CONFIG M2MB_NWIF_IPV4_CONFIG_T |
IPV4 configuration.
typedef struct M2MB_NWIF_IPV6_CONFIG M2MB_NWIF_IPV6_CONFIG_T |
IPV6 configuration.
typedef enum M2MB_NWIF_STATUS M2MB_NWIF_STATUS_E |
NWIF status enumeration.
This enum defines macros for various Network Interface status. These status signify present state of the Interface.
enum M2MB_NWIF_EVENT_E |
Commands for NWIF API's.
Definition at line 56 of file m2mb_nwif.h.
enum M2MB_NWIF_STATUS |
NWIF status enumeration.
This enum defines macros for various Network Interface status. These status signify present state of the Interface.
Definition at line 103 of file m2mb_nwif.h.
INT32 m2mb_nwif_cfgget | ( | UINT8 | deviceId, |
M2MB_NWIF_EVENT_E | cfgflag, | ||
M2MB_NWIF_CFG_T * | pCfg | ||
) |
Network interface configuration.
Network Interface configuration for static IP.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
[in] | cfgflag | Configuration flag, this is anyone of the NWIF_EVENT_T events to get. |
[in] | pCfg | User buffer to get the configuration values. |
INT32 m2mb_nwif_cfgset | ( | UINT8 | deviceId, |
M2MB_NWIF_EVENT_E | cfgflag, | ||
M2MB_NWIF_CFG_T * | pCfg | ||
) |
Network interface configuration.
Network Interface configuration for static IP.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
[in] | cfgflag | Configuration flag, this is anyone of the NWIF_EVENT_T events to set. |
[in] | pCfg | User buffer to get the configuration values. |
Network interface close.
it closes the network interface of corresponding WLAN interface.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
Network interface de-initialization.
De-initializing user callback and de-initializing network interface.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
INT32 m2mb_nwif_dhcpv4s | ( | UINT8 | deviceId, |
char * | start_ip_addr_string, | ||
char * | end_ip_addr_string, | ||
int | leasetime | ||
) |
Network interface close.
It closes the network interface of the corresponding WLAN interface.
[in] | deviceId | WLAN deviceID, it should be greater than or equal to 0" |
[in] | start_ip_addr_string | Start IP address of DHCP range. |
[in] | end_ip_addr_string | End IP address of DHCP range. |
[in] | leasetime | Reservation time for an IP address on the network. |
INT32 m2mb_nwif_init | ( | UINT8 | deviceId, |
M2MB_NWIF_IPCONFIG_CB | cb, | ||
VOID * | cbctx | ||
) |
Network interface initialization.
Initializing user callback and initializing network interface.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
[in] | cb | user call back of type M2MB_NWIF_IPCONFIG_CB. |
[in] | cbctx | user call back context. |
INT32 m2mb_nwif_open | ( | UINT8 | deviceId, |
M2MB_NWIF_EVENT_E | ip_flag | ||
) |
Network interface open.
It configures the IP address for an active WLAN interface.
[in] | deviceId | WLAN deviceId, it should be greater than or equal to 0" |
[in] | ip_flag | It is an IP address type required to configure IP address on a given device. M2MB_NWIF_IPV4CFG_STATIC_IP_E M2MB_NWIF_IPV4CFG_DHCPC_IP M2MB_NWIF_IPV4CFG_AUTO_IP_E M2MB_NWIF_IPV6CFG_DHCP_IP_E M2MB_NWIF_IPV6CFG_AUTO_IP_E |
INT32 m2mb_nwif_Set_Hostname | ( | const char * | hostname | ) |
Set hostname.
it sets the host name.
[in] | hostname | Host name, it should be a maximum length of M2MB_NWIF_HOSTNAME_SIZE. |
M2MB_BOOL_T m2mb_nwif_wlan_devname_get | ( | UINT8 | deviceId, |
CHAR ** | pWifname | ||
) |
WLAN device name.
This API provides the WLAN device name for the corresponding device ID.
[in] | deviceId | WLAN deviceId, it should be either 0 or 1. |
[out] | pWifname | Pointer to the device name. |