From 6df0ca59235aa4d7bc54b89e51514ebb84c430e7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 10 Jul 2017 11:37:06 -0600 Subject: [PATCH] Fix some errors in ipforward.h when CONFIG_NET_STATISTICS is enabled, but CONFIG_NETDEV_MULTINIC is not --- net/ipforward/ipforward.h | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/net/ipforward/ipforward.h b/net/ipforward/ipforward.h index e88c23a659..ff93f08aee 100644 --- a/net/ipforward/ipforward.h +++ b/net/ipforward/ipforward.h @@ -259,6 +259,26 @@ int ipfwd_forward(FAR struct forward_s *fwd); void ipfwd_poll(FAR struct net_driver_s *dev); +/**************************************************************************** + * Name: ipfwd_dropstats + * + * Description: + * Update statistics for a dropped packet. + * + * Input Parameters: + * fwd - The forwarding state structure + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_NET_STATISTICS +void ipfwd_dropstats(FAR struct forward_s *fwd); +#else +# define ipfwd_dropstats(fwd) +#endif + #endif /* CONFIG_NETDEV_MULTINIC */ /**************************************************************************** @@ -363,25 +383,5 @@ void ipv4_dropstats(FAR struct ipv4_hdr_s *ipv4); # define ipv4_dropstats(ipv4) #endif -/**************************************************************************** - * Name: ipfwd_dropstats - * - * Description: - * Update statistics for a dropped packet. - * - * Input Parameters: - * fwd - The forwarding state structure - * - * Returned Value: - * None - * - ****************************************************************************/ - -#ifdef CONFIG_NET_STATISTICS -void ipfwd_dropstats(FAR struct forward_s *fwd) -#else -# define ipfwd_dropstats(fwd) -#endif - #endif /* CONFIG_NET_IPFORWARD */ #endif /* __NET_IPFORWARD_IPFORWARD_H */