Skip to content

Commit

Permalink
Networking: Move net/ipv6 to net/neighbor
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Jan 16, 2015
1 parent 1be7285 commit 0f364f6
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 27 deletions.
18 changes: 15 additions & 3 deletions net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions net/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion net/devif/devif_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
9 changes: 1 addition & 8 deletions net/ipv6/Kconfig → net/neighbor/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions net/ipv6/Make.defs → net/neighbor/Make.defs
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions net/ipv6/ipv6_neighbor.c → net/neighbor/neighbor.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -45,7 +45,7 @@

#include <nuttx/net/ip.h>

#include "ipv6/ipv6.h"
#include "neighbor/neighbor.h"

/****************************************************************************
* Pre-processor Definitions
Expand Down
8 changes: 4 additions & 4 deletions net/ipv6/ipv6.h → net/neighbor/neighbor.h
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 */

0 comments on commit 0f364f6

Please sign in to comment.