net_device.h
Overview
Related Modules:
Description:
Defines WLAN network device interfaces.
This module provides network device operations for driver development. The operations are as follows: Initializes, adds, obtains, and deletes a network device. Reports network data, informs the network layer of the data link layer status, sets IP addresses, and starts or stops Dynamic Host Configuration Protocol (DHCP).
Since:
1.0
Version:
1.0
Summary
Data Structures
Macros
NET_DEVICE_IFF_RUNNING IFF_RUNNING |
|
ETHER_TYPE_RARP 0x8035 |
|
ETHER_TYPE_PAE 0x888e |
|
ETHER_TYPE_IP 0x0800 |
|
ETHER_TYPE_AARP 0x80f3 |
|
ETHER_TYPE_IPX 0x8137 |
|
ETHER_TYPE_ARP 0x0806 |
|
ETHER_TYPE_IPV6 0x86dd |
|
ETHER_TYPE_TDLS 0x890d |
|
ETHER_TYPE_VLAN 0x8100 |
|
ETHER_TYPE_WAI 0x88b4 |
Indicates WLAN Authentication and Privacy Infrastructure (WAPI). |
ETHER_LLTD_TYPE 0x88D9 |
|
ETHER_ONE_X_TYPE 0x888E |
|
ETHER_TUNNEL_TYPE 0x88bd |
|
ETHER_TYPE_PPP_DISC 0x8863 |
|
ETHER_TYPE_PPP_SES 0x8864 |
|
ETHER_TYPE_6LO 0xa0ed |
Indicates IPv6 over Low Power Wireless Personal Area Networks (6LoWPANs). |
UDP_PROTOCAL 17 |
|
Typedefs
typedef struct NetDevice Defines a network device, including the network interface category and name, and network port type. |
Enumerations
NetIfCategory { LITE_OS, RICH_OS } |
Enumerates network interface categories, including lightweight OS and rich OS. |
Enumerates network interface states, including online and offline. |
|
Enumerates network link layer states, including online and offline. |
|
NetLinkType { ETHERNET_LINK = 1, WIFI_LINK = 801 } |
|
ProcessingResult { PROCESSING_CONTINUE, PROCESSING_COMPLETE, PROCESSING_ERROR } |
Enumerates data processing results, including continuing processing, processing completed, and error. |
NetDevTxResult { NETDEV_TX_OK = 0x00, NETDEV_TX_BUSY = 0x10, NETDEV_TX_LOCKED = 0x20 } |
Enumerates data sending results, including sending succeeded, other data being sent at the link layer, and data link layer being locked. |
Protocol80211IfType { PROTOCOL_80211_IFTYPE_UNSPECIFIED, PROTOCOL_80211_IFTYPE_ADHOC, PROTOCOL_80211_IFTYPE_STATION, PROTOCOL_80211_IFTYPE_AP, PROTOCOL_80211_IFTYPE_AP_VLAN, PROTOCOL_80211_IFTYPE_WDS, PROTOCOL_80211_IFTYPE_MONITOR, PROTOCOL_80211_IFTYPE_MESH_POINT, PROTOCOL_80211_IFTYPE_P2P_CLIENT, PROTOCOL_80211_IFTYPE_P2P_GO, PROTOCOL_80211_IFTYPE_P2P_DEVICE, PROTOCOL_80211_IFTYPE_NUM, PROTOCOL_80211_IFTYPE_MAX = PROTOCOL_80211_IFTYPE_NUM - 1 } |
Enumerates 802.11 network port types, including AP, STA, and P2P. |
NetdeviceError { COMMON_ERROR = 1, ADD_LWIP_ERROR } |
Enumerates network device errors, including common errors and errors in adding network devices to LwIP. |
Functions
NetDeviceInit (const char ifName, uint32_t len, NetIfCategory ifCategory) |
struct NetDevice |
NetDeviceDeInit (struct NetDevice netDevice) |
|
NetDeviceAdd (struct NetDevice netDevice, Protocol80211IfType ifType) |
|
NetDeviceDelete (struct NetDevice netDevice) |
|
NetDeviceGetInstByName (const char name) |
struct NetDevice Obtains the initialized network device instance by a specified device name. |
NetDeviceIsAnyInstRunning (void) |
Checks whether there are working devices among the added network devices. |
NetDeviceIsInstRunning (const struct NetDevice netDevice) |
|
NetDevGetRegisterCount (void) |
|
NetDeviceGetCap (void) |
Obtains the maximum number of network devices that can be registered with this system at the same time. |
NetDeviceGetInstByIndex (uint32_t index) |
struct NetDevice Obtains a network device instance based on the index number. |
NetIfSetAddr (const struct NetDevice netDevice, const IpV4Addr ipAddr, const IpV4Addr netMask, const IpV4Addr gw) |
|
NetIfSetStatus (const struct NetDevice netDevice, NetIfStatus status) |
|
NetIfSetLinkStatus (const struct NetDevice netDevice, NetIfLinkStatus status) |
|
NetIfRx (const struct NetDevice netDevice, struct NetBuf buff) |
Transfers the input data packets from the network side to a protocol stack. |
NetIfRxNi (const struct NetDevice netDevice, struct NetBuf buff) |
Transfers data packets from the network side to a protocol stack in an interrupt processing thread. |
NetIfDhcpsStart (const struct NetDevice netDevice, char ip, u16_t ipNum) |
|
NetIfDhcpsStop (const struct NetDevice netDevice) |
|
NetIfDhcpStart (const struct NetDevice netDevice) |
|
NetIfDhcpStop (const struct NetDevice netDevice) |
|
NetIfDhcpIsBound (const struct NetDevice *netDevice) |
Obtains the DHCP negotiation status of a specified network device. |