net/: Fix some new problems found by the current nxstyle with .c files in the net/ directory. (#92)
This commit is contained in:
parent
bd0fe25418
commit
3a3539f2be
@ -58,7 +58,7 @@
|
|||||||
#ifdef CONFIG_NET_IGMP
|
#ifdef CONFIG_NET_IGMP
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Buffer layout */
|
/* Buffer layout */
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#include "local/local.h"
|
#include "local/local.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define LOCAL_CS_SUFFIX "CS" /* Name of the client-to-server FIFO */
|
#define LOCAL_CS_SUFFIX "CS" /* Name of the client-to-server FIFO */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/pkt/pkt_conn.c
|
* net/pkt/pkt_conn.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014, 2016-2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2014, 2016-2017, 2020 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Large parts of this file were leveraged from uIP logic:
|
* Large parts of this file were leveraged from uIP logic:
|
||||||
@ -58,6 +58,15 @@
|
|||||||
#include "devif/devif.h"
|
#include "devif/devif.h"
|
||||||
#include "pkt/pkt.h"
|
#include "pkt/pkt.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define eth_addr_cmp(addr1, addr2) \
|
||||||
|
((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \
|
||||||
|
(addr1[2] == addr2[2]) && (addr1[3] == addr2[3]) && \
|
||||||
|
(addr1[4] == addr2[4]) && (addr1[5] == addr2[5]))
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -199,11 +208,6 @@ void pkt_free(FAR struct pkt_conn_s *conn)
|
|||||||
|
|
||||||
FAR struct pkt_conn_s *pkt_active(FAR struct eth_hdr_s *buf)
|
FAR struct pkt_conn_s *pkt_active(FAR struct eth_hdr_s *buf)
|
||||||
{
|
{
|
||||||
#define eth_addr_cmp(addr1, addr2) \
|
|
||||||
((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \
|
|
||||||
(addr1[2] == addr2[2]) && (addr1[3] == addr2[3]) && \
|
|
||||||
(addr1[4] == addr2[4]) && (addr1[5] == addr2[5]))
|
|
||||||
|
|
||||||
FAR struct pkt_conn_s *conn =
|
FAR struct pkt_conn_s *conn =
|
||||||
(FAR struct pkt_conn_s *)g_active_pkt_connections.head;
|
(FAR struct pkt_conn_s *)g_active_pkt_connections.head;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ROUTE_IPv4_CACHEROUTE
|
#ifdef CONFIG_ROUTE_IPv4_CACHEROUTE
|
||||||
@ -470,7 +470,7 @@ static void net_reset_ipv6_cache(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
|
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE
|
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#if defined(CONFIG_ROUTE_IPv4_RAMROUTE) || defined(CONFIG_ROUTE_IPv6_RAMROUTE)
|
#if defined(CONFIG_ROUTE_IPv4_RAMROUTE) || defined(CONFIG_ROUTE_IPv6_RAMROUTE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ROUTE_IPv4_RAMROUTE
|
#ifdef CONFIG_ROUTE_IPv4_RAMROUTE
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
|
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Defintions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Special "impossible" PID value used to indicate that there is no holder
|
/* Special "impossible" PID value used to indicate that there is no holder
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
|
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor defintions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
|
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
|
||||||
@ -70,7 +70,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv4
|
#ifdef CONFIG_NET_IPv4
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
|
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor defintions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
|
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
|
||||||
@ -69,7 +69,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv4
|
#ifdef CONFIG_NET_IPv4
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
#include "usrsock/usrsock.h"
|
#include "usrsock/usrsock.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_NET_USRSOCKDEV_NPOLLWAITERS
|
#ifndef CONFIG_NET_USRSOCKDEV_NPOLLWAITERS
|
||||||
|
Loading…
Reference in New Issue
Block a user