summaryrefslogtreecommitdiff
path: root/nuttx/include/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-04 18:54:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-04 18:54:04 +0000
commit08a0eae6371ad7d6af7c0d941381fa1e11370a86 (patch)
tree7a3a8ae8e2b29e3832a17a7def5b0531383172bb /nuttx/include/net
parent813efa266bb67269669e532b5ce6f00ee2097948 (diff)
downloadnuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.tar.gz
nuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.tar.bz2
nuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.zip
Add interfaces flags, extend ifconfig, add ifup and ifdown commands (Darcy Gong
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5308 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/net')
-rw-r--r--nuttx/include/net/if.h9
1 files changed, 9 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 */