diff --git a/net/devif/devif_forward.c b/net/devif/devif_forward.c index a1471d4196c..00bf2e3690b 100644 --- a/net/devif/devif_forward.c +++ b/net/devif/devif_forward.c @@ -43,7 +43,7 @@ #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #if defined(CONFIG_NET_IPFORWARD) && defined(CONFIG_NETDEV_MULTINIC) diff --git a/net/devif/ipv4_input.c b/net/devif/ipv4_input.c index b86918516c5..82acb0544a4 100644 --- a/net/devif/ipv4_input.c +++ b/net/devif/ipv4_input.c @@ -99,7 +99,7 @@ #include "icmp/icmp.h" #include "igmp/igmp.h" -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" /**************************************************************************** diff --git a/net/devif/ipv6_input.c b/net/devif/ipv6_input.c index ce8d4f3ea14..d8bb34b7933 100644 --- a/net/devif/ipv6_input.c +++ b/net/devif/ipv6_input.c @@ -100,7 +100,7 @@ #include "icmpv6/icmpv6.h" #include "netdev/netdev.h" -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" /**************************************************************************** diff --git a/net/icmp/icmp_foward.c b/net/icmp/icmp_foward.c index 12591646e7e..2730e355404 100644 --- a/net/icmp/icmp_foward.c +++ b/net/icmp/icmp_foward.c @@ -49,7 +49,7 @@ #include #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #include "netdev/netdev.h" #include "arp/arp.h" @@ -246,7 +246,7 @@ static uint16_t icmp_forward_interrupt(FAR struct net_driver_s *dev, /* And release the forwarding state structure */ - ip_forward_free(fwd); + ipfwd_free(fwd); } return flags; diff --git a/net/icmpv6/icmpv6_forward.c b/net/icmpv6/icmpv6_forward.c index d4c1a671860..866a67d6a06 100644 --- a/net/icmpv6/icmpv6_forward.c +++ b/net/icmpv6/icmpv6_forward.c @@ -49,7 +49,7 @@ #include #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #include "netdev/netdev.h" #include "arp/arp.h" @@ -242,7 +242,7 @@ static uint16_t icmpv6_forward_interrupt(FAR struct net_driver_s *dev, /* And release the forwarding state structure */ - ip_forward_free(fwd); + ipfwd_free(fwd); } return flags; diff --git a/net/ipforward/Make.defs b/net/ipforward/Make.defs index b2f661e2d26..56789ceb57e 100644 --- a/net/ipforward/Make.defs +++ b/net/ipforward/Make.defs @@ -46,7 +46,7 @@ NET_CSRCS += ipv6_forward.c endif ifeq ($(CONFIG_NETDEV_MULTINIC),y) -NET_CSRCS += ip_forward.c +NET_CSRCS += ipfwd_alloc.c endif # Include IP forwaring build support diff --git a/net/ipforward/ip_forward.h b/net/ipforward/ipforward.h similarity index 96% rename from net/ipforward/ip_forward.h rename to net/ipforward/ipforward.h index 3a99ce30c86..ee27f464479 100644 --- a/net/ipforward/ip_forward.h +++ b/net/ipforward/ipforward.h @@ -1,5 +1,5 @@ /**************************************************************************** - * net/ipforward/ip_forward.h + * net/ipforward/ipforward.h * * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NET_IPFORWARD_IP_FORWARD_H -#define __NET_IPFORWARD_IP_FORWARD_H +#ifndef __NET_IPFORWARD_IPFORWARD_H +#define __NET_IPFORWARD_IPFORWARD_H /**************************************************************************** * Included Files @@ -173,7 +173,7 @@ struct forward_s ****************************************************************************/ /**************************************************************************** - * Name: ip_forward_initialize + * Name: ipfwd_initialize * * Description: * Initialize the struct forward_s allocator. @@ -183,10 +183,10 @@ struct forward_s * ****************************************************************************/ -void ip_forward_initialize(void); +void ipfwd_initialize(void); /**************************************************************************** - * Name: ip_forward_alloc + * Name: ipfwd_alloc * * Description: * Allocate a forwarding structure by removing a pre-allocated entry from @@ -198,10 +198,10 @@ void ip_forward_initialize(void); * ****************************************************************************/ -FAR struct forward_s *ip_forward_alloc(void); +FAR struct forward_s *ipfwd_alloc(void); /**************************************************************************** - * Name: ip_forward_free + * Name: ipfwd_free * * Description: * Free a forwarding structure by adding it to a free list. @@ -212,7 +212,7 @@ FAR struct forward_s *ip_forward_alloc(void); * ****************************************************************************/ -void ip_forward_free(FAR struct forward_s *fwd); +void ipfwd_free(FAR struct forward_s *fwd); /**************************************************************************** * Name: ipv4_forward_broadcast @@ -359,4 +359,4 @@ int ipv6_forward(FAR struct net_driver_s *dev, FAR struct ipv6_hdr_s *ipv6); #endif #endif /* CONFIG_NET_IPFORWARD */ -#endif /* __NET_IPFORWARD_IP_FORWARD_H */ +#endif /* __NET_IPFORWARD_IPFORWARD_H */ diff --git a/net/ipforward/ip_forward.c b/net/ipforward/ipfwd_alloc.c similarity index 94% rename from net/ipforward/ip_forward.c rename to net/ipforward/ipfwd_alloc.c index baa9ebfe35b..01e34099e47 100644 --- a/net/ipforward/ip_forward.c +++ b/net/ipforward/ipfwd_alloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * net/ipforward/ip_forward.c + * net/ipforward/ipfwd_alloc.c * * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,7 +44,7 @@ #include #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #if defined(CONFIG_NET_IPFORWARD) && defined(CONFIG_NETDEV_MULTINIC) @@ -65,7 +65,7 @@ static FAR struct forward_s *g_fwdfree; ****************************************************************************/ /**************************************************************************** - * Name: ip_forward_initialize + * Name: ipfwd_initialize * * Description: * Initialize the struct forward_s allocator. @@ -75,7 +75,7 @@ static FAR struct forward_s *g_fwdfree; * ****************************************************************************/ -void ip_forward_initialize(void) +void ipfwd_initialize(void) { FAR struct forward_s *fwd; int i; @@ -99,7 +99,7 @@ void ip_forward_initialize(void) } /**************************************************************************** - * Name: ip_forward_alloc + * Name: ipfwd_alloc * * Description: * Allocate a forwarding structure by removing a pre-allocated entry from @@ -111,7 +111,7 @@ void ip_forward_initialize(void) * ****************************************************************************/ -FAR struct forward_s *ip_forward_alloc(void) +FAR struct forward_s *ipfwd_alloc(void) { FAR struct forward_s *fwd; @@ -126,7 +126,7 @@ FAR struct forward_s *ip_forward_alloc(void) } /**************************************************************************** - * Name: ip_forward_free + * Name: ipfwd_free * * Description: * Free a forwarding structure by adding it to a free list. @@ -137,7 +137,7 @@ FAR struct forward_s *ip_forward_alloc(void) * ****************************************************************************/ -void ip_forward_free(FAR struct forward_s *fwd) +void ipfwd_free(FAR struct forward_s *fwd) { fwd->f_flink = g_fwdfree; g_fwdfree = fwd; diff --git a/net/ipforward/ipv4_forward.c b/net/ipforward/ipv4_forward.c index 303815553ca..63dd5aae5bf 100644 --- a/net/ipforward/ipv4_forward.c +++ b/net/ipforward/ipv4_forward.c @@ -54,7 +54,7 @@ #include "udp/udp.h" #include "tcp/tcp.h" #include "icmp/icmp.h" -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #if defined(CONFIG_NET_IPFORWARD) && defined(CONFIG_NET_IPv4) @@ -287,7 +287,7 @@ static int ipv4_dev_forward(FAR struct net_driver_s *dev, * completely zeroed when we receive it. */ - fwd = ip_forward_alloc(); + fwd = ipfwd_alloc(); if (fwd == NULL) { nwarn("WARNING: Failed to allocate forwarding structure\n"); @@ -426,7 +426,7 @@ errout_with_iobchain: errout_with_fwd: if (fwd != NULL) { - ip_forward_free(fwd); + ipfwd_free(fwd); } errout: diff --git a/net/ipforward/ipv6_forward.c b/net/ipforward/ipv6_forward.c index 6fb33d56338..e50fe7c2b0f 100644 --- a/net/ipforward/ipv6_forward.c +++ b/net/ipforward/ipv6_forward.c @@ -53,7 +53,7 @@ #include "udp/udp.h" #include "tcp/tcp.h" #include "icmpv6/icmpv6.h" -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #if defined(CONFIG_NET_IPFORWARD) && defined(CONFIG_NET_IPv6) @@ -398,7 +398,7 @@ static int ipv6_dev_forward(FAR struct net_driver_s *dev, * completely zeroed when we receive it. */ - fwd = ip_forward_alloc(); + fwd = ipfwd_alloc(); if (fwd == NULL) { nwarn("WARNING: Failed to allocate forwarding structure\n"); @@ -538,7 +538,7 @@ errout_with_iobchain: errout_with_fwd: if (fwd != NULL) { - ip_forward_free(fwd); + ipfwd_free(fwd); } errout: diff --git a/net/net_initialize.c b/net/net_initialize.c index ae8e1d25bc7..597aaeb717c 100644 --- a/net/net_initialize.c +++ b/net/net_initialize.c @@ -47,7 +47,7 @@ #include "socket/socket.h" #include "devif/devif.h" #include "netdev/netdev.h" -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "arp/arp.h" #include "sixlowpan/sixlowpan.h" #include "neighbor/neighbor.h" @@ -116,7 +116,7 @@ void net_setup(void) #ifdef HAVE_FWDALLOC /* Initialize IP forwarding support */ - ip_forward_initialize(); + ipfwd_initialize(); #endif #ifdef CONFIG_NET_PKT diff --git a/net/tcp/tcp_forward.c b/net/tcp/tcp_forward.c index d7c8ba01e5d..542b0e8e1cb 100644 --- a/net/tcp/tcp_forward.c +++ b/net/tcp/tcp_forward.c @@ -50,7 +50,7 @@ #include #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #include "netdev/netdev.h" #include "arp/arp.h" @@ -340,7 +340,7 @@ static uint16_t tcp_forward_interrupt(FAR struct net_driver_s *dev, /* And release the forwarding state structure */ - ip_forward_free(fwd); + ipfwd_free(fwd); } return flags; diff --git a/net/udp/udp_forward.c b/net/udp/udp_forward.c index 86264637f30..e65cbe6ea17 100644 --- a/net/udp/udp_forward.c +++ b/net/udp/udp_forward.c @@ -49,7 +49,7 @@ #include #include -#include "ipforward/ip_forward.h" +#include "ipforward/ipforward.h" #include "devif/devif.h" #include "netdev/netdev.h" #include "arp/arp.h" @@ -334,7 +334,7 @@ static uint16_t udp_forward_interrupt(FAR struct net_driver_s *dev, /* And release the forwarding state structure */ - ip_forward_free(fwd); + ipfwd_free(fwd); } return flags;