summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-16 16:49:48 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-16 16:49:48 -0600
commitf61f6b64e923a03764d3e2c8d8f5c9bcec6862a5 (patch)
tree757dcaf03bfd3a5501d67eff4f8a8b2347f64427 /nuttx
parenta857d10cb34e9aff1bc25d30cf3ab25e952a12e9 (diff)
downloadpx4-nuttx-f61f6b64e923a03764d3e2c8d8f5c9bcec6862a5.tar.gz
px4-nuttx-f61f6b64e923a03764d3e2c8d8f5c9bcec6862a5.tar.bz2
px4-nuttx-f61f6b64e923a03764d3e2c8d8f5c9bcec6862a5.zip
Networking: Move net/ipv6 to net/neighbor
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/net/Kconfig18
-rw-r--r--nuttx/net/README.txt4
-rw-r--r--nuttx/net/devif/devif_poll.c2
-rw-r--r--nuttx/net/neighbor/Kconfig (renamed from nuttx/net/ipv6/Kconfig)9
-rw-r--r--nuttx/net/neighbor/Make.defs (renamed from nuttx/net/ipv6/Make.defs)10
-rw-r--r--nuttx/net/neighbor/neighbor.c (renamed from nuttx/net/ipv6/ipv6_neighbor.c)8
-rw-r--r--nuttx/net/neighbor/neighbor.h (renamed from nuttx/net/ipv6/ipv6.h)8
7 files changed, 32 insertions, 27 deletions
diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig
index 524a0a6b2..bb039d30f 100644
--- a/nuttx/net/Kconfig
+++ b/nuttx/net/Kconfig
@@ -181,18 +181,30 @@ config SLIP_DEFPRIO
endif # NET_SLIP
endmenu # Data link support
-source "net/socket/Kconfig"
source "net/netdev/Kconfig"
-# source "net/ipv4/Kconfig"
# Currently cannot select both IPv4 and IPv6
config NET_IPv4
bool
default y if !NET_IPv6
default n if NET_IPv6
+ ---help---
+ Build in support for IPv4.
+
+menu "Internet Protocol Selection"
+ depends on EXPERIMENTAL
+
+config NET_IPv6
+ bool "IPv6"
+ default n
+ ---help---
+ Build in support for IPv6. Not fully implemented.
-source "net/ipv6/Kconfig"
+source "net/neighbor/Kconfig"
+endmenu # Internet Protocol Selection
+
+source "net/socket/Kconfig"
source "net/pkt/Kconfig"
source "net/tcp/Kconfig"
source "net/udp/Kconfig"
diff --git a/nuttx/net/README.txt b/nuttx/net/README.txt
index d0c75f024..bbbccc0db 100644
--- a/nuttx/net/README.txt
+++ b/nuttx/net/README.txt
@@ -8,12 +8,12 @@ Directory Structure
|
`- net/
|
- +- arp - Address resolution protocol
+ +- arp - Address resolution protocol (IPv4)
+- devif - Stack/device interface layer
+- icmp - Internet Control Message Protocol (IPv4)
+- icmpv6 - Internet Control Message Protocol (IPv6)
+- iob - I/O buffering logic
- +- ipv6 - Logic unique to IPv6
+ +- neighbor - Neighbor Discovery Protocol (IPv6)
+- netdev - Socket network device interface
+- pkt - "Raw" packet socket support
+- socket - BSD socket interface
diff --git a/nuttx/net/devif/devif_poll.c b/nuttx/net/devif/devif_poll.c
index 26fc80f65..4d365a2da 100644
--- a/nuttx/net/devif/devif_poll.c
+++ b/nuttx/net/devif/devif_poll.c
@@ -392,7 +392,7 @@ int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback,
/* Increment the timer used by the IP reassembly logic */
-#if defined(CONFIG_NET_TCP_REASSEMBLY) && !defined(CONFIG_NET_IPv6)
+#if defined(CONFIG_NET_TCP_REASSEMBLY) && defined(CONFIG_NET_IPv4)
if (g_reassembly_timer != 0 &&
g_reassembly_timer < CONFIG_NET_TCP_REASS_MAXAGE)
{
diff --git a/nuttx/net/ipv6/Kconfig b/nuttx/net/neighbor/Kconfig
index 075622bb7..148438fbe 100644
--- a/nuttx/net/ipv6/Kconfig
+++ b/nuttx/net/neighbor/Kconfig
@@ -3,17 +3,10 @@
# see misc/tools/kconfig-language.txt.
#
-config NET_IPv6
- bool "IPv6"
- default n
- depends on EXPERIMENTAL
- ---help---
- Build in support for IPv6. Not fully implemented.
-
if NET_IPv6
config NET_IPV6_NCONF_ENTRIES
- int "Number of neighbors"
+ int "Number of IPv6 neighbors"
default 8
#config NET_IPV6_NEIGHBOR_ADDRTYPE
diff --git a/nuttx/net/ipv6/Make.defs b/nuttx/net/neighbor/Make.defs
index 1636db59c..ee77ad29d 100644
--- a/nuttx/net/ipv6/Make.defs
+++ b/nuttx/net/neighbor/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# net/utils/Make.defs
+# net/neighbor/Make.defs
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,14 +33,14 @@
#
############################################################################
-# IPv6-specific logic
+# Logic specific to IPv6 Neighbor Discovery Protocol
ifeq ($(CONFIG_NET_IPv6),y)
-NET_CSRCS += ipv6_neighbor.c
+NET_CSRCS += neighbor.c
# Include utility build support
-DEPPATH += --dep-path ipv6
-VPATH += :ipv6
+DEPPATH += --dep-path neighbor
+VPATH += :neighbor
endif
diff --git a/nuttx/net/ipv6/ipv6_neighbor.c b/nuttx/net/neighbor/neighbor.c
index 3be02e4c6..37a2460a1 100644
--- a/nuttx/net/ipv6/ipv6_neighbor.c
+++ b/nuttx/net/neighbor/neighbor.c
@@ -1,11 +1,11 @@
/****************************************************************************
- * net/ipv6/ipv6_neighbor.c
+ * net/neighbor/neighbor.c
* Database of link-local neighbors, used by IPv6 code and to be used by
* a future ARP code rewrite.
*
+ * Copyright (c) 2006, Swedish Institute of Computer Science. All rights
+ * reserved.
* Author: Adam Dunkels <adam@sics.se>
- * Copyright (c) 2006, Swedish Institute of Computer Science.
- * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
#include <nuttx/net/ip.h>
-#include "ipv6/ipv6.h"
+#include "neighbor/neighbor.h"
/****************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/net/ipv6/ipv6.h b/nuttx/net/neighbor/neighbor.h
index 9ea1f0d5e..db43fecfa 100644
--- a/nuttx/net/ipv6/ipv6.h
+++ b/nuttx/net/neighbor/neighbor.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * net/ipv6/ipv6.h
+ * net/neighbor/neighbor.h
* Header file for database of link-local neighbors, used by IPv6 code and
* to be used by future ARP code.
*
@@ -38,8 +38,8 @@
*
****************************************************************************/
-#ifndef __NET_IPV6_IPV6_H
-#define __NET_IPV6_IPV6_H
+#ifndef __NET_NEIGHBOR_NEIGHBOR_H
+#define __NET_NEIGHBOR_NEIGHBOR_H
/****************************************************************************
* Included Files
@@ -81,5 +81,5 @@ struct net_neighbor_addr_s *net_neighbor_lookup(net_ipv6addr_t ipaddr);
void net_neighbor_periodic(void);
#endif /* CONFIG_NET_IPv6 */
-#endif /* __NET_IPV6_IPV6_H */
+#endif /* __NET_NEIGHBOR_NEIGHBOR_H */