mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
Networking: Move net/ipv6 to net/neighbor
This commit is contained in:
+15
-3
@@ -181,18 +181,30 @@ config SLIP_DEFPRIO
|
|||||||
endif # NET_SLIP
|
endif # NET_SLIP
|
||||||
endmenu # Data link support
|
endmenu # Data link support
|
||||||
|
|
||||||
source "net/socket/Kconfig"
|
|
||||||
source "net/netdev/Kconfig"
|
source "net/netdev/Kconfig"
|
||||||
|
|
||||||
# source "net/ipv4/Kconfig"
|
|
||||||
# Currently cannot select both IPv4 and IPv6
|
# Currently cannot select both IPv4 and IPv6
|
||||||
|
|
||||||
config NET_IPv4
|
config NET_IPv4
|
||||||
bool
|
bool
|
||||||
default y if !NET_IPv6
|
default y if !NET_IPv6
|
||||||
default n if NET_IPv6
|
default n if NET_IPv6
|
||||||
|
---help---
|
||||||
|
Build in support for IPv4.
|
||||||
|
|
||||||
source "net/ipv6/Kconfig"
|
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/neighbor/Kconfig"
|
||||||
|
endmenu # Internet Protocol Selection
|
||||||
|
|
||||||
|
source "net/socket/Kconfig"
|
||||||
source "net/pkt/Kconfig"
|
source "net/pkt/Kconfig"
|
||||||
source "net/tcp/Kconfig"
|
source "net/tcp/Kconfig"
|
||||||
source "net/udp/Kconfig"
|
source "net/udp/Kconfig"
|
||||||
|
|||||||
+2
-2
@@ -8,12 +8,12 @@ Directory Structure
|
|||||||
|
|
|
|
||||||
`- net/
|
`- net/
|
||||||
|
|
|
|
||||||
+- arp - Address resolution protocol
|
+- arp - Address resolution protocol (IPv4)
|
||||||
+- devif - Stack/device interface layer
|
+- devif - Stack/device interface layer
|
||||||
+- icmp - Internet Control Message Protocol (IPv4)
|
+- icmp - Internet Control Message Protocol (IPv4)
|
||||||
+- icmpv6 - Internet Control Message Protocol (IPv6)
|
+- icmpv6 - Internet Control Message Protocol (IPv6)
|
||||||
+- iob - I/O buffering logic
|
+- iob - I/O buffering logic
|
||||||
+- ipv6 - Logic unique to IPv6
|
+- neighbor - Neighbor Discovery Protocol (IPv6)
|
||||||
+- netdev - Socket network device interface
|
+- netdev - Socket network device interface
|
||||||
+- pkt - "Raw" packet socket support
|
+- pkt - "Raw" packet socket support
|
||||||
+- socket - BSD socket interface
|
+- socket - BSD socket interface
|
||||||
|
|||||||
@@ -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 */
|
/* 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 &&
|
if (g_reassembly_timer != 0 &&
|
||||||
g_reassembly_timer < CONFIG_NET_TCP_REASS_MAXAGE)
|
g_reassembly_timer < CONFIG_NET_TCP_REASS_MAXAGE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,17 +3,10 @@
|
|||||||
# see misc/tools/kconfig-language.txt.
|
# 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
|
if NET_IPv6
|
||||||
|
|
||||||
config NET_IPV6_NCONF_ENTRIES
|
config NET_IPV6_NCONF_ENTRIES
|
||||||
int "Number of neighbors"
|
int "Number of IPv6 neighbors"
|
||||||
default 8
|
default 8
|
||||||
|
|
||||||
#config NET_IPV6_NEIGHBOR_ADDRTYPE
|
#config NET_IPV6_NEIGHBOR_ADDRTYPE
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# net/utils/Make.defs
|
# net/neighbor/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# 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)
|
ifeq ($(CONFIG_NET_IPv6),y)
|
||||||
|
|
||||||
NET_CSRCS += ipv6_neighbor.c
|
NET_CSRCS += neighbor.c
|
||||||
|
|
||||||
# Include utility build support
|
# Include utility build support
|
||||||
|
|
||||||
DEPPATH += --dep-path ipv6
|
DEPPATH += --dep-path neighbor
|
||||||
VPATH += :ipv6
|
VPATH += :neighbor
|
||||||
endif
|
endif
|
||||||
@@ -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
|
* Database of link-local neighbors, used by IPv6 code and to be used by
|
||||||
* a future ARP code rewrite.
|
* a future ARP code rewrite.
|
||||||
*
|
*
|
||||||
|
* Copyright (c) 2006, Swedish Institute of Computer Science. All rights
|
||||||
|
* reserved.
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include <nuttx/net/ip.h>
|
#include <nuttx/net/ip.h>
|
||||||
|
|
||||||
#include "ipv6/ipv6.h"
|
#include "neighbor/neighbor.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -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
|
* Header file for database of link-local neighbors, used by IPv6 code and
|
||||||
* to be used by future ARP code.
|
* to be used by future ARP code.
|
||||||
*
|
*
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __NET_IPV6_IPV6_H
|
#ifndef __NET_NEIGHBOR_NEIGHBOR_H
|
||||||
#define __NET_IPV6_IPV6_H
|
#define __NET_NEIGHBOR_NEIGHBOR_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -81,5 +81,5 @@ struct net_neighbor_addr_s *net_neighbor_lookup(net_ipv6addr_t ipaddr);
|
|||||||
void net_neighbor_periodic(void);
|
void net_neighbor_periodic(void);
|
||||||
|
|
||||||
#endif /* CONFIG_NET_IPv6 */
|
#endif /* CONFIG_NET_IPv6 */
|
||||||
#endif /* __NET_IPV6_IPV6_H */
|
#endif /* __NET_NEIGHBOR_NEIGHBOR_H */
|
||||||
|
|
||||||
Reference in New Issue
Block a user