forked from nuttx/nuttx-update
net/: Finish IEEE802154->6LOWPAN renaming; remove PF_IEEE804154; Move 6LoWPAN menu to inside Internet Protocol Menu
This commit is contained in:
parent
dc7adfa817
commit
fdddebbffd
8 changed files with 38 additions and 44 deletions
|
@ -79,7 +79,7 @@ enum net_lltype_e
|
|||
NET_LL_LOOPBACK, /* Local loopback */
|
||||
NET_LL_SLIP, /* Serial Line Internet Protocol (SLIP) */
|
||||
NET_LL_TUN, /* TUN Virtual Network Device */
|
||||
NET_LL_IEEE802154 /* IEEE 802.15.4 */
|
||||
NET_LL_6LOWPAN /* IEEE 802.15.4 6LoWPAN*/
|
||||
};
|
||||
|
||||
/* This defines a bitmap big enough for one bit for each socket option */
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_NET_IEEE802154_H
|
||||
#define __INCLUDE_NUTTX_NET_IEEE802154_H
|
||||
#ifndef __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_H
|
||||
#define __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
@ -59,4 +59,4 @@
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_NET_IEEE802154_H */
|
||||
#endif /* __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* include/sys/socket.h
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2011, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009, 2011, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -64,7 +64,6 @@
|
|||
#define PF_ATMPVC 8 /* Access to raw ATM PVCs */
|
||||
#define PF_APPLETALK 9 /* Appletalk */
|
||||
#define PF_PACKET 10 /* Low level packet interface */
|
||||
#define PF_IEEE802154 11 /* IEEE 802.15.4 sockets */
|
||||
|
||||
/* Address families */
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __NET_IEEE802_15_4_IEEE802154_H
|
||||
#define __NET_IEEE802_15_4_IEEE802154_H
|
||||
#ifndef __NET_6LOWPAN_6LOWPAN_H
|
||||
#define __NET_6LOWPAN_6LOWPAN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef CONFIG_NET_IEEE802154
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -52,5 +52,5 @@
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* CONFIG_NET_IEEE802154 */
|
||||
#endif /* __NET_IEEE802_15_4_IEEE802154_H */
|
||||
#endif /* CONFIG_NET_6LOWPAN */
|
||||
#endif /* __NET_6LOWPAN_6LOWPAN_H */
|
||||
|
|
|
@ -3,36 +3,31 @@
|
|||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
menu "IEEE 802.15.4 Configuration"
|
||||
|
||||
config NET_IEEE802154
|
||||
bool "IEEE 802.15.4 support"
|
||||
menuconfig NET_6LOWPAN
|
||||
bool "IEEE 802.15.4 6LoWPAN support"
|
||||
default n
|
||||
depends on EXPERIMENTAL && NET_IPv6
|
||||
---help---
|
||||
Enable IEEE 802.15.4 protocol socket support
|
||||
Enable support for IEEE 802.15.4 Low power Wireless Personal Area
|
||||
Networking (6LoWPAN).
|
||||
|
||||
if NET_IEEE802154
|
||||
if NET_6LOWPAN
|
||||
|
||||
config NET_IEEE802154_MTU
|
||||
int "IEEE 802.15.4 packet buffer size (MTU)"
|
||||
config NET_6LOWPAN_MTU
|
||||
int "6LoWPAN packet buffer size (MTU)"
|
||||
default 1294
|
||||
range 590 1518
|
||||
---help---
|
||||
Packet buffer size. This size includes the TCP/UDP payload plus the
|
||||
size of TCP/UDP header, the IP header, and the IEEE 802.15.4 header.
|
||||
size of TCP/UDP header, the IP header, and data link layer headers.
|
||||
This value is normally referred to as the MTU (Maximum Transmission
|
||||
Unit); the payload is the MSS (Maximum Segment Size).
|
||||
|
||||
IPv4 hosts are required to be able to handle an MSS of at least
|
||||
536 octets, resulting in a minimum buffer size of 536+20+20+xx =
|
||||
xx. REVISIT!
|
||||
|
||||
IPv6 hosts are required to be able to handle an MSS of 1220 octets,
|
||||
resulting in a minimum buffer size of of 1220+20+40+xx = xx. REVISIT!
|
||||
|
||||
config IEEE802154_TCP_RECVWNDO
|
||||
int "IEEE 802.15.4 TCP receive window size"
|
||||
config NET_6LOWPAN_TCP_RECVWNDO
|
||||
int "6LoWPAN TCP receive window size"
|
||||
default 1220
|
||||
depends on NET_TCP
|
||||
---help---
|
||||
|
@ -41,5 +36,4 @@ config IEEE802154_TCP_RECVWNDO
|
|||
incoming data, or high (32768 bytes) if the application processes
|
||||
data quickly. REVISIT!
|
||||
|
||||
endif # NET_IEEE802154
|
||||
endmenu # IEEE 802.15.4 Configuration
|
||||
endif # NET_6LOWPAN
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
# IEEE 802.15.4 support
|
||||
|
||||
ifeq ($(CONFIG_NET_IEEE802154),y)
|
||||
ifeq ($(CONFIG_NET_6LOWPAN),y)
|
||||
|
||||
# Include IEEE 802.15.4 file in the build
|
||||
|
||||
|
@ -46,4 +46,4 @@ ifeq ($(CONFIG_NET_IEEE802154),y)
|
|||
DEPPATH += --dep-path 6lowpan
|
||||
VPATH += :6lowpan
|
||||
|
||||
endif # CONFIG_NET_IEEE802154
|
||||
endif # CONFIG_NET_6LOWPAN
|
||||
|
|
|
@ -255,13 +255,15 @@ config NET_IPv4
|
|||
---help---
|
||||
Build in support for IPv4.
|
||||
|
||||
config NET_IPv6
|
||||
menuconfig NET_IPv6
|
||||
bool "IPv6"
|
||||
default n
|
||||
---help---
|
||||
Build in support for IPv6.
|
||||
|
||||
source "net/neighbor/Kconfig"
|
||||
source "net/6lowpan/Kconfig"
|
||||
|
||||
endmenu # Internet Protocol Selection
|
||||
|
||||
source "net/socket/Kconfig"
|
||||
|
@ -269,7 +271,6 @@ source "net/pkt/Kconfig"
|
|||
source "net/local/Kconfig"
|
||||
source "net/tcp/Kconfig"
|
||||
source "net/udp/Kconfig"
|
||||
source "net/6lowpan/Kconfig"
|
||||
source "net/icmp/Kconfig"
|
||||
source "net/icmpv6/Kconfig"
|
||||
source "net/igmp/Kconfig"
|
||||
|
|
|
@ -61,18 +61,18 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define NETDEV_ETH_FORMAT "eth%d"
|
||||
#define NETDEV_LO_FORMAT "lo"
|
||||
#define NETDEV_IEEE802154_FORMAT "wpan%d"
|
||||
#define NETDEV_SLIP_FORMAT "sl%d"
|
||||
#define NETDEV_TUN_FORMAT "tun%d"
|
||||
#define NETDEV_ETH_FORMAT "eth%d"
|
||||
#define NETDEV_LO_FORMAT "lo"
|
||||
#define NETDEV_WPAN_FORMAT "wpan%d"
|
||||
#define NETDEV_SLIP_FORMAT "sl%d"
|
||||
#define NETDEV_TUN_FORMAT "tun%d"
|
||||
|
||||
#if defined(CONFIG_NET_SLIP)
|
||||
# define NETDEV_DEFAULT_FORMAT NETDEV_SLIP_FORMAT
|
||||
#elif defined(CONFIG_NET_ETHERNET)
|
||||
# define NETDEV_DEFAULT_FORMAT NETDEV_ETH_FORMAT
|
||||
#elif defined(CONFIG_NET_IEEE802154)
|
||||
# define NETDEV_DEFAULT_FORMAT NETDEV_IEEE802154_FORMAT
|
||||
#elif defined(CONFIG_NET_6LOWPAN)
|
||||
# define NETDEV_DEFAULT_FORMAT NETDEV_WPAN_FORMAT
|
||||
#else /* if defined(CONFIG_NET_LOOPBACK) */
|
||||
# define NETDEV_DEFAULT_FORMAT NETDEV_LO_FORMAT
|
||||
#endif
|
||||
|
@ -214,14 +214,14 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IEEE802154
|
||||
case NET_LL_IEEE802154: /* IEEE 802.15.4 */
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
case NET_LL_6LOWPAN: /* IEEE 802.15.4 */
|
||||
dev->d_llhdrlen = 0; /* REVISIT */
|
||||
dev->d_mtu = CONFIG_NET_IEEE802154_MTU;
|
||||
dev->d_mtu = CONFIG_NET_6LOWPAN_MTU;
|
||||
#ifdef CONFIG_NET_TCP
|
||||
dev->d_recvwndo = CONFIG_NET_IEEE802154_TCP_RECVWNDO;
|
||||
dev->d_recvwndo = CONFIG_NET_6LOWPAN_TCP_RECVWNDO;
|
||||
#endif
|
||||
devfmt = NETDEV_IEEE802154_FORMAT;
|
||||
devfmt = NETDEV_WPAN_FORMAT;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue