6loWPAN: More configurtion settings.

This commit is contained in:
Gregory Nutt 2017-03-28 11:16:28 -06:00
parent f32fe172d4
commit d9e32ee337
4 changed files with 33 additions and 17 deletions

View File

@ -223,6 +223,10 @@
(((a)->u16[6]) == 0) && \
(((a)->u8[14]) == 0))
/* Maximum size of an IEEE802.15.4 frame */
#define SIXLOWPAN_MAC_MAXFRAME 127
/****************************************************************************
* Public Types
****************************************************************************/

View File

@ -230,7 +230,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
#ifdef CONFIG_NET_6LOWPAN
case NET_LL_6LOWPAN: /* IEEE 802.15.4 */
dev->d_llhdrlen = 0; /* REVISIT */
dev->d_mtu = CONFIG_NET_6LOWPAN_MTU;
dev->d_mtu = SIXLOWPAN_MAC_MAXFRAME;
#ifdef CONFIG_NET_TCP
dev->d_recvwndo = CONFIG_NET_6LOWPAN_TCP_RECVWNDO;
#endif

View File

@ -43,6 +43,14 @@ config NET_6LOWPAN_COMPRESSION_HC06
endchoice # 6loWPAN Compression
config NET_6LOWPAN_COMPRESSION_THRESHOLD
int "Lower compression threshold"
default 63
depends on !NET_6LOWPAN_COMPRESSION_IPv6
---help---
CONFIG_NET_6LOWPAN_COMPRESSION_THRESHOLD sets a lower threshold for
when packets should not be compressed.
if NET_6LOWPAN_COMPRESSION_HC06
config NET_6LOWPAN_MAXADDRCONTEXT
@ -119,27 +127,31 @@ config NET_SIXLOWPAN_MAXAGE
---help---
Timeout for packet reassembly at the 6lowpan layer (should be < 60s)
config NET_6LOWPAN_MTU
int "6LoWPAN packet buffer size (MTU)"
default 1294
range 590 1518
config NET_6LOWPAN_MAX_MACTRANSMITS
int "Max MAC transmissions"
default 4
---help---
Packet buffer size. This size includes the TCP/UDP payload plus the
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).
CONFIG_NET_6LOWPAN_MAX_MACTRANSMITS specifies how many times the MAC
layer should resend packets if no link-layer ACK wasreceived. This
only makes sense with the csma_driver.
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 NET_SIXLOWPAN_MAXPAYLOAD
int "Max packet size"
default 102
---help---
CONFIG_NET_SIXLOWPAN_MAXPAYLOAD specifies the maximum size of packets
before they get fragmented. The default is 127 bytes (the maximum size
of a 802.15.4 frame) - 25 bytes (for the 802.15.4 MAClayer header). This
can be increased for systems with larger packet sizes.
config NET_6LOWPAN_TCP_RECVWNDO
int "6LoWPAN TCP receive window size"
default 1220
default 102
depends on NET_TCP
---help---
The size of the advertised receiver's window. Should be set low
(i.e., to the size of the MSS) if the application is slow to process
incoming data, or high (32768 bytes) if the application processes
data quickly. REVISIT!
(i.e., to the size of the IEEE802.15.4 frame payload) if the application
is slow to process incoming data, or high (32768 bytes) if the
application processes data quickly. REVISIT!
endif # NET_6LOWPAN

View File

@ -150,8 +150,8 @@ void sixlowpan_hc06_initialize(void)
g_hc06_addrcontexts[2].used = 1;
g_hc06_addrcontexts[2].number = 2;
g_hc06_addrcontexts[2].prefix[0] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_0;
g_hc06_addrcontexts[2].prefix[1] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_1;
g_hc06_addrcontexts[2].prefix[0] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_0;
g_hc06_addrcontexts[2].prefix[1] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_1;
}
else
#endif /* SIXLOWPAN_CONF_ADDR_CONTEXT_2 */