From 913daa908a3b76fab05537d3d2cbde6ecfa44662 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 28 Mar 2017 09:00:25 -0600 Subject: [PATCH] 6loWPAN: Add some more configuration settings that will be needed. --- include/nuttx/net/sixlowpan.h | 6 ----- net/sixlowpan/Kconfig | 36 ++++++++++++++++++++++++++++ net/sixlowpan/sixlowpan_compressor.c | 2 +- net/sixlowpan/sixlowpan_sniffer.c | 2 +- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/include/nuttx/net/sixlowpan.h b/include/nuttx/net/sixlowpan.h index 4b956db8aa..5c94bb02b9 100644 --- a/include/nuttx/net/sixlowpan.h +++ b/include/nuttx/net/sixlowpan.h @@ -63,12 +63,6 @@ #define SIXLOWPAN_UDP_8_BIT_PORT_MIN 0xF000 #define SIXLOWPAN_UDP_8_BIT_PORT_MAX 0xf0ff /* F000 + 255 */ -/* 6lowpan compressions */ - -#define SIXLOWPAN_COMPRESSION_IPV6 0 -#define SIXLOWPAN_COMPRESSION_HC1 1 -#define SIXLOWPAN_COMPRESSION_HC06 2 - /* 6lowpan dispatches */ #define SIXLOWPAN_DISPATCH_IPV6 0x41 /* 01000001 = 65 */ diff --git a/net/sixlowpan/Kconfig b/net/sixlowpan/Kconfig index e72e42268b..cf29ed9abf 100644 --- a/net/sixlowpan/Kconfig +++ b/net/sixlowpan/Kconfig @@ -13,6 +13,42 @@ menuconfig NET_6LOWPAN if NET_6LOWPAN +config NET_6LOWPAN_FRAG + bool "6loWPAN Fragmentation" + default y + ---help--- + CONFIG_NET_6LOWPAN_FRAG specifies if 6lowpan fragmentation should be + used or not. Fragmentation is on by default. + +choice + prompt "6loWPAN Compression" + default NET_6LOWPAN_COMPRESSION_HC06 + +config NET_6LOWPAN_COMPRESSION_IPv6 + bool "IPv6 Dispatch" + ---help--- + Packets compression when only IPv6 dispatch is used. There is no + compression in this case, all fields are sent inline. We just add + the IPv6 dispatch byte before the packet. + +config NET_6LOWPAN_COMPRESSION_HC1 + bool "6loWPAN HC1" + ---help--- + Compress IP/UDP header using HC1 and HC_UDP + +config NET_6LOWPAN_COMPRESSION_HC06 + bool "6loWPAN HC06" + ---help--- + Compress IP/UDP header using HC06 compression + +endchoice # 6loWPAN Compression + +config NET_6LOWPAN_MAXADDRCONTEXT + int "Maximum address contexts" + default 1 + ---help--- + If we use IPHC compression, how many address contexts do we support? + config NET_6LOWPAN_MTU int "6LoWPAN packet buffer size (MTU)" default 1294 diff --git a/net/sixlowpan/sixlowpan_compressor.c b/net/sixlowpan/sixlowpan_compressor.c index 0f78113802..ffaa64ae2e 100644 --- a/net/sixlowpan/sixlowpan_compressor.c +++ b/net/sixlowpan/sixlowpan_compressor.c @@ -42,7 +42,7 @@ #include "nuttx/net/net.h" #include "nuttx/net/sixlowpan.h" -#include "sixlowpan/sixlopan.h" +#include "sixlowpan/sixlowpan.h" #ifdef CONFIG_NET_6LOWPAN diff --git a/net/sixlowpan/sixlowpan_sniffer.c b/net/sixlowpan/sixlowpan_sniffer.c index 9f00efe62a..d9ffadc973 100644 --- a/net/sixlowpan/sixlowpan_sniffer.c +++ b/net/sixlowpan/sixlowpan_sniffer.c @@ -42,7 +42,7 @@ #include "nuttx/net/net.h" #include "nuttx/net/sixlowpan.h" -#include "sixlowpan/sixlopan.h" +#include "sixlowpan/sixlowpan.h" #ifdef CONFIG_NET_6LOWPAN