From 524b7bc36bf43cac89f27beb009a0bfce8c60a97 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 14 Feb 2010 16:00:46 +0000 Subject: [PATCH] Documented the use of netif flags --- src/include/lwip/netif.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 65c1dfc6..d0313715 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -60,25 +60,35 @@ extern "C" { across all types of interfaces in use */ #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 * 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 -/** 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 -/** 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 -/** 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 -/** if set, the interface has an active link - * (set by the network interface driver) */ +/** If set, the interface has an active link + * (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 -/** 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 -/** 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 /** Function prototype for netif init functions. Set up flags and output/linkoutput