apps/netutils/netinit, apps/netutils/netlib/, and apps/include/netutils/netlib.h: Extend a few definitions to permit building netutils and netinit with only Netlink sockets enabled.
This commit is contained in:
parent
91b6ad6a0d
commit
1859f56380
@ -104,6 +104,8 @@
|
||||
# define NETLIB_SOCK_FAMILY AF_BLUETOOTH
|
||||
#elif defined(CONFIG_NET_USRSOCK)
|
||||
# define NETLIB_SOCK_FAMILY AF_INET
|
||||
#elif defined(CONFIG_NET_NETLINK)
|
||||
# define NETLIB_SOCK_FAMILY AF_NETLINK
|
||||
#else
|
||||
# define NETLIB_SOCK_FAMILY AF_UNSPEC
|
||||
#endif
|
||||
@ -152,6 +154,8 @@
|
||||
# define NETLIB_SOCK_TYPE SOCK_DGRAM
|
||||
#elif NETLIB_SOCK_FAMILY == AF_BLUETOOTH
|
||||
# define NETLIB_SOCK_TYPE SOCK_RAW
|
||||
#elif NETLIB_SOCK_FAMILY == AF_NETLINK
|
||||
# define NETLIB_SOCK_TYPE SOCK_DGRAM
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -164,6 +164,7 @@
|
||||
* not be the one that you want).
|
||||
*/
|
||||
|
||||
#undef NETINIT_HAVE_NETDEV
|
||||
#if defined(CONFIG_DRIVERS_IEEE80211) /* Usually also has CONFIG_NET_ETHERNET */
|
||||
# define NET_DEVNAME "wlan0"
|
||||
# define NETINIT_HAVE_NETDEV
|
||||
@ -188,14 +189,10 @@
|
||||
#elif defined(CONFIG_NET_LOCAL)
|
||||
# define NET_DEVNAME "lo"
|
||||
# define NETINIT_HAVE_NETDEV
|
||||
#elif defined(CONFIG_NET_USRSOCK)
|
||||
# undef NETINIT_HAVE_NETDEV
|
||||
#elif !defined(CONFIG_NET_LOOPBACK)
|
||||
# error ERROR: No link layer protocol defined
|
||||
#endif
|
||||
|
||||
/* If we have no network device (only only the local loopback device), then we
|
||||
* cannot support the network monitor.
|
||||
/* If we have no network device (perhaps only USRSOCK, local loopback, or
|
||||
* Netlink sockets), then we cannot support the network monitor.
|
||||
*/
|
||||
|
||||
#ifndef NETINIT_HAVE_NETDEV
|
||||
|
@ -76,6 +76,8 @@
|
||||
# define AF_FAMILY AF_BLUETOOTH
|
||||
#elif defined(CONFIG_NET_USRSOCK)
|
||||
# define AF_FAMILY AF_INET
|
||||
#elif defined(CONFIG_NET_NETLINK)
|
||||
# define AF_FAMILY AF_NETLINK
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -70,11 +70,13 @@
|
||||
#elif defined(CONFIG_NET_PKT)
|
||||
# define AF_FAMILY AF_PACKET
|
||||
#elif defined(CONFIG_NET_IEEE802154)
|
||||
# define AF_FAMILY AF_IEEE802154
|
||||
# define AF_FAMILY AF_IEEE802154
|
||||
#elif defined(CONFIG_NET_BLUETOOTH)
|
||||
# define AF_FAMILY AF_BLUETOOTH
|
||||
# define AF_FAMILY AF_BLUETOOTH
|
||||
#elif defined(CONFIG_NET_USRSOCK)
|
||||
# define AF_FAMILY AF_INET
|
||||
#elif defined(CONFIG_NET_NETLINK)
|
||||
# define AF_FAMILY AF_NETLINK
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user