mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +08:00
netlib: Remove AF_FAMILY and PF_FAMILY definition
use the common one(NETLIB_SOCK_FAMILY) Change-Id: Ifc255f82f169d3bb37604c49006361a40c9933d1 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -55,29 +55,6 @@
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The address family that we used to create the socket and in the IOCTL
|
||||
* data really does not matter. It should, however, be valid in the current
|
||||
* configuration.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_NET_IPv4)
|
||||
# define PF_FAMILY PF_INET
|
||||
# define AF_FAMILY AF_INET
|
||||
#elif defined(CONFIG_NET_IPv6)
|
||||
# define PF_FAMILY PF_INET6
|
||||
# define AF_FAMILY AF_INET6
|
||||
#elif defined(CONFIG_NET_IEEE802154)
|
||||
# define PF_FAMILY PF_IEEE802154
|
||||
# define AF_FAMILY AF_IEEE802154
|
||||
#elif defined(CONFIG_NET_BLUETOOTH)
|
||||
# define PF_FAMILY PF_BLUETOOTH
|
||||
# define AF_FAMILY AF_BLUETOOTH
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -106,7 +83,8 @@ int netlib_setessid(FAR const char *ifname, FAR const char *essid)
|
||||
{
|
||||
/* Get a socket (only so that we get access to the INET subsystem) */
|
||||
|
||||
int sockfd = socket(PF_FAMILY, NETLIB_SOCK_TYPE, 0);
|
||||
int sockfd = socket(NETLIB_SOCK_FAMILY,
|
||||
NETLIB_SOCK_TYPE, NETLIB_SOCK_PROTOCOL);
|
||||
if (sockfd >= 0)
|
||||
{
|
||||
struct iwreq req;
|
||||
|
Reference in New Issue
Block a user