Documented the use of netif flags

This commit is contained in:
goldsimon 2010-02-14 16:00:46 +00:00
parent 8908055b63
commit 524b7bc36b

View File

@ -60,25 +60,35 @@ extern "C" {
across all types of interfaces in use */ across all types of interfaces in use */
#define NETIF_MAX_HWADDR_LEN 6U #define NETIF_MAX_HWADDR_LEN 6U
/** TODO: define the use (where, when, whom) of netif flags */ /** Whether the network interface is 'up'. This is
/** whether the network interface is 'up'. this is
* a software flag used to control whether this network * a software flag used to control whether this network
* interface is enabled and processes traffic. * interface is enabled and processes traffic.
* It is set by the startup code (for static IP configuration) or
* by dhcp/autoip when an address has been assigned.
*/ */
#define NETIF_FLAG_UP 0x01U #define NETIF_FLAG_UP 0x01U
/** if set, the netif has broadcast capability */ /** If set, the netif has broadcast capability.
* Set by the netif driver in its init function. */
#define NETIF_FLAG_BROADCAST 0x02U #define NETIF_FLAG_BROADCAST 0x02U
/** if set, the netif is one end of a point-to-point connection */ /** If set, the netif is one end of a point-to-point connection.
* Set by the netif driver in its init function. */
#define NETIF_FLAG_POINTTOPOINT 0x04U #define NETIF_FLAG_POINTTOPOINT 0x04U
/** if set, the interface is configured using DHCP */ /** If set, the interface is configured using DHCP.
* Set by the DHCP code when starting or stopping DHCP. */
#define NETIF_FLAG_DHCP 0x08U #define NETIF_FLAG_DHCP 0x08U
/** if set, the interface has an active link /** If set, the interface has an active link
* (set by the network interface driver) */ * (set by the network interface driver).
* Either set by the netif driver in its init function (if the link
* is up at that time) or at a later point once the link comes up
* (if link detection is supported by the hardware).
* Only really used with LWIP_NETIF_LINK_CALLBACK. */
#define NETIF_FLAG_LINK_UP 0x10U #define NETIF_FLAG_LINK_UP 0x10U
/** if set, the netif is an device using ARP */ /** If set, the netif is an ethernet device using ARP.
* Set by the netif driver in its init function.
* Used to check input packet types and use of DHCP. */
#define NETIF_FLAG_ETHARP 0x20U #define NETIF_FLAG_ETHARP 0x20U
/** if set, the netif has IGMP capability */ /** If set, the netif has IGMP capability.
* Set by the netif driver in its init function. */
#define NETIF_FLAG_IGMP 0x40U #define NETIF_FLAG_IGMP 0x40U
/** Function prototype for netif init functions. Set up flags and output/linkoutput /** Function prototype for netif init functions. Set up flags and output/linkoutput