Skip to content

Commit

Permalink
Networking: Make a home for ICMPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Jan 14, 2015
1 parent 7d68c22 commit fcd65e9
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 6 deletions.
1 change: 1 addition & 0 deletions net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion net/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion net/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions net/arp/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -55,4 +55,4 @@ endif
DEPPATH += --dep-path arp
VPATH += :arp

endif # CONFIG_NET_ETHERNET
endif # CONFIG_NET_ARP
3 changes: 2 additions & 1 deletion net/icmp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -30,3 +30,4 @@ config NET_PINGADDRCONF

endif # NET_ICMP
endmenu # ICMP Networking Support
endif # NET_IPv4
21 changes: 21 additions & 0 deletions net/icmpv6/Kconfig
Original file line number Diff line number Diff line change
@@ -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 changes: 45 additions & 0 deletions net/icmpv6/Make.defs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fcd65e9

Please sign in to comment.