mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/sockopt: move BINDTODEVICE to socket level
rename the UDP_BINDTODEVICE to SO_BINDTODEVICE to follow the linux style to be compatible with non-UDP protocol binding requirements Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
50177dbae1
commit
9cb17841d8
17 changed files with 76 additions and 185 deletions
|
|
@ -50,7 +50,6 @@
|
|||
#define IFF_UP (1 << 1) /* Interface is up */
|
||||
#define IFF_RUNNING (1 << 2) /* Carrier is available */
|
||||
#define IFF_IPv6 (1 << 3) /* Configured for IPv6 packet (vs ARP or IPv4) */
|
||||
#define IFF_BOUND (1 << 4) /* Bound to a socket */
|
||||
#define IFF_LOOPBACK (1 << 5) /* Is a loopback net */
|
||||
#define IFF_POINTOPOINT (1 << 6) /* Is point-to-point link */
|
||||
#define IFF_NOARP (1 << 7) /* ARP is not required for this packet */
|
||||
|
|
@ -61,7 +60,6 @@
|
|||
|
||||
#define IFF_SET_UP(f) do { (f) |= IFF_UP; } while (0)
|
||||
#define IFF_SET_RUNNING(f) do { (f) |= IFF_RUNNING; } while (0)
|
||||
#define IFF_SET_BOUND(f) do { (f) |= IFF_BOUND; } while (0)
|
||||
#define IFF_SET_NOARP(f) do { (f) |= IFF_NOARP; } while (0)
|
||||
#define IFF_SET_LOOPBACK(f) do { (f) |= IFF_LOOPBACK; } while (0)
|
||||
#define IFF_SET_POINTOPOINT(f) do { (f) |= IFF_POINTOPOINT; } while (0)
|
||||
|
|
@ -70,7 +68,6 @@
|
|||
|
||||
#define IFF_CLR_UP(f) do { (f) &= ~IFF_UP; } while (0)
|
||||
#define IFF_CLR_RUNNING(f) do { (f) &= ~IFF_RUNNING; } while (0)
|
||||
#define IFF_CLR_BOUND(f) do { (f) &= ~IFF_BOUND; } while (0)
|
||||
#define IFF_CLR_NOARP(f) do { (f) &= ~IFF_NOARP; } while (0)
|
||||
#define IFF_CLR_LOOPBACK(f) do { (f) &= ~IFF_LOOPBACK; } while (0)
|
||||
#define IFF_CLR_POINTOPOINT(f) do { (f) &= ~IFF_POINTOPOINT; } while (0)
|
||||
|
|
@ -79,7 +76,6 @@
|
|||
|
||||
#define IFF_IS_UP(f) (((f) & IFF_UP) != 0)
|
||||
#define IFF_IS_RUNNING(f) (((f) & IFF_RUNNING) != 0)
|
||||
#define IFF_IS_BOUND(f) (((f) & IFF_BOUND) != 0)
|
||||
#define IFF_IS_NOARP(f) (((f) & IFF_NOARP) != 0)
|
||||
#define IFF_IS_LOOPBACK(f) (((f) & IFF_LOOPBACK) != 0)
|
||||
#define IFF_IS_POINTOPOINT(f) (((f) & IFF_POINTOPOINT) != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue