Networking: Make a home for ICMPv6

This commit is contained in:
Gregory Nutt 2015-01-14 14:26:50 -06:00
parent 7d68c22d7f
commit fcd65e9d7d
7 changed files with 76 additions and 6 deletions

View File

@ -197,6 +197,7 @@ source "net/pkt/Kconfig"
source "net/tcp/Kconfig"
source "net/udp/Kconfig"
source "net/icmp/Kconfig"
source "net/icmpv6/Kconfig"
source "net/igmp/Kconfig"
source "net/arp/Kconfig"
source "net/iob/Kconfig"

View File

@ -1,7 +1,7 @@
############################################################################
# net/Makefile
#
# Copyright (C) 2007, 2008, 2011-2014 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008, 2011-2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -60,6 +60,7 @@ include netdev/Make.defs
include iob/Make.defs
include arp/Make.defs
include icmp/Make.defs
include icmpv6/Make.defs
include igmp/Make.defs
include tcp/Make.defs
include udp/Make.defs

View File

@ -10,7 +10,8 @@ Directory Structure
|
+- arp - Address resolution protocol
+- devif - Stack/device interface layer
+- icmp - Internet Control Message Protocol
+- icmp - Internet Control Message Protocol (IPv4)
+- icmpv6 - Internet Control Message Protocol (IPv6)
+- iob - I/O buffering logic
+- ipv6 - Logic unique to IPv6
+- netdev - Socket network device interface

View File

@ -1,7 +1,7 @@
############################################################################
# net/arp/Make.defs
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Copyright (C) 2014-2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -35,7 +35,7 @@
# ARP support is available for Ethernet only
ifeq ($(CONFIG_NET_ETHERNET),y)
ifeq ($(CONFIG_NET_ARP),y)
NET_CSRCS +=arp_arpin.c arp_out.c arp_format.c arp_table.c arp_timer.c
ifeq ($(CONFIG_NET_ARP_IPIN),y)
@ -55,4 +55,4 @@ endif
DEPPATH += --dep-path arp
VPATH += :arp
endif # CONFIG_NET_ETHERNET
endif # CONFIG_NET_ARP

View File

@ -3,12 +3,12 @@
# see misc/tools/kconfig-language.txt.
#
if NET_IPv4
menu "ICMP Networking Support"
config NET_ICMP
bool "Enable ICMP networking"
default n
depends on NET
---help---
Enable minimal ICMP support. Includes built-in support
for sending replies to received ECHO (ping) requests.
@ -30,3 +30,4 @@ config NET_PINGADDRCONF
endif # NET_ICMP
endmenu # ICMP Networking Support
endif # NET_IPv4

21
net/icmpv6/Kconfig Normal file
View File

@ -0,0 +1,21 @@
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
if NET_IPv6
menu "ICMPv6 Networking Support"
config NET_ICMPv6
bool "Enable ICMPv6 networking"
default n
depends on NET
---help---
Enable minimal ICMPv6 support. Includes built-in support
for sending replies to received ECHO (ping) requests.
if NET_ICMPv6
endif # NET_ICMPv6
endmenu # ICMPv6 Networking Support
endif # NET_IPv6

45
net/icmpv6/Make.defs Normal file
View File

@ -0,0 +1,45 @@
############################################################################
# net/icmpv6/Make.defs
#
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
ifeq ($(CONFIG_NET_ICMPv6),y)
# Support for ICMPv6
# Include ICMPv6 build support
DEPPATH += --dep-path icmpv6
VPATH += :icmpv6
endif