diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/net/if.h | 9 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/ioctl.h | 6 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/uip/uip-arch.h | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/include/net/if.h b/nuttx/include/net/if.h index e64b58563..1ff8ebc38 100644 --- a/nuttx/include/net/if.h +++ b/nuttx/include/net/if.h @@ -52,6 +52,10 @@ #define IF_NAMESIZE 6 /* Newer naming standard */ #define IFHWADDRLEN 6 +#define IFF_RUNNING (1 << 0) +#define IF_FLAG_IFUP (1 << 0) +#define IF_FLAG_IFDOWN (2 << 0) + /******************************************************************************************* * Public Type Definitions *******************************************************************************************/ @@ -72,6 +76,7 @@ struct lifreq struct sockaddr lifru_hwaddr; /* MAC address */ int lifru_count; /* Number of devices */ int lifru_mtu; /* MTU size */ + uint8_t lifru_flags; /* Interface flags */ } lifr_ifru; }; @@ -82,6 +87,7 @@ struct lifreq #define lifr_hwaddr lifr_ifru.lifru_hwaddr /* MAC address */ #define lifr_mtu lifr_ifru.lifru_mtu /* MTU */ #define lifr_count lifr_ifru.lifru_count /* Number of devices */ +#define lifr_flags lifr_ifru.lifru_flags /* interface flags */ /* This is the older I/F request that should only be used with IPv4. However, since * NuttX only supports IPv4 or 6 (not both), we can force the older structure to @@ -101,6 +107,7 @@ struct ifreq struct sockaddr ifru_hwaddr; /* MAC address */ int ifru_count; /* Number of devices */ int ifru_mtu; /* MTU size */ + uint8_t ifru_flags; /* Interface flags */ } ifr_ifru; }; @@ -111,6 +118,7 @@ struct ifreq #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ #define ifr_mtu ifr_ifru.ifru_mtu /* MTU */ #define ifr_count ifr_ifru.ifru_count /* Number of devices */ +#define ifr_flags ifr_ifru.ifru_flags /* interface flags */ #else /* CONFIG_NET_IPv6 */ @@ -123,6 +131,7 @@ struct ifreq #define ifr_hwaddr lifr_ifru.lifru_hwaddr /* MAC address */ #define ifr_mtu lifr_ifru.lifru_mtu /* MTU */ #define ifr_count lifr_ifru.lifru_count /* Number of devices */ +#define ifr_flags lifr_ifru.lifru_flags /* interface flags */ #endif /* CONFIG_NET_IPv6 */ diff --git a/nuttx/include/nuttx/net/ioctl.h b/nuttx/include/nuttx/net/ioctl.h index be3f597f4..d5d1a001c 100644 --- a/nuttx/include/nuttx/net/ioctl.h +++ b/nuttx/include/nuttx/net/ioctl.h @@ -146,9 +146,15 @@ #define SIOCSIWPMKSA _SIOC(0x0036) /* PMKSA cache operation */ +/* Interface flags */ + +#define SIOCSIFFLAGS _SIOC(0x0037) /* Sets the interface flags */ +#define SIOCGIFFLAGS _SIOC(0x0038) /* Gets the interface flags */ + /**************************************************************************** * Type Definitions ****************************************************************************/ + /* See include/net/if.h */ /**************************************************************************** diff --git a/nuttx/include/nuttx/net/uip/uip-arch.h b/nuttx/include/nuttx/net/uip/uip-arch.h index 9546de04e..73805c6fb 100644 --- a/nuttx/include/nuttx/net/uip/uip-arch.h +++ b/nuttx/include/nuttx/net/uip/uip-arch.h @@ -90,6 +90,10 @@ struct uip_driver_s char d_ifname[IFNAMSIZ]; #endif + /* Drivers interface flags. See IFF_* definitions in include/net/if.h */ + + uint8_t d_flags; + /* Ethernet device identity */ #ifdef CONFIG_NET_ETHERNET |