mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
NET: Move net/netdev*.c to net/netdev/netdev*.c
This commit is contained in:
+2
-8
@@ -82,15 +82,9 @@ endif
|
||||
# Support for operations on network devices
|
||||
|
||||
NETDEV_ASRCS =
|
||||
NETDEV_CSRCS = netdev_register.c netdev_ioctl.c net_poll.c netdev_txnotify.c \
|
||||
netdev_findbyname.c netdev_findbyaddr.c netdev_count.c \
|
||||
netdev_foreach.c netdev_unregister.c netdev_sem.c \
|
||||
netdev_carrier.c
|
||||
|
||||
ifeq ($(CONFIG_NET_RXAVAIL),y)
|
||||
NETDEV_CSRCS += netdev_rxnotify.c
|
||||
endif
|
||||
NETDEV_CSRCS =
|
||||
|
||||
include netdev/Make.defs
|
||||
include iob/Make.defs
|
||||
include arp/Make.defs
|
||||
include icmp/Make.defs
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
#include <nuttx/net/arp.h>
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "route/route.h"
|
||||
|
||||
#ifdef CONFIG_NET_ARP
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <nuttx/net/pkt.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "tcp/tcp.h"
|
||||
#include "udp/udp.h"
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <nuttx/net/udp.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
#include <nuttx/net/icmp.h>
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "icmp/icmp.h"
|
||||
|
||||
|
||||
@@ -148,12 +148,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/* List of registered ethernet device drivers */
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
EXTERN struct uip_driver_s *g_netdevices;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
@@ -186,46 +180,6 @@ int net_timeo(uint32_t start_time, socktimeo_t timeo);
|
||||
socktimeo_t net_timeval2dsec(FAR struct timeval *tv);
|
||||
#endif
|
||||
|
||||
/* net_register.c ************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
void netdev_seminit(void);
|
||||
void netdev_semtake(void);
|
||||
void netdev_semgive(void);
|
||||
#endif
|
||||
|
||||
/* net_findbyname.c **********************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
FAR struct uip_driver_s *netdev_findbyname(FAR const char *ifname);
|
||||
#endif
|
||||
|
||||
/* net_findbyaddr.c **********************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
FAR struct uip_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr);
|
||||
#endif
|
||||
|
||||
/* net_txnotify.c ************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
void netdev_txnotify(const uip_ipaddr_t addr);
|
||||
#endif
|
||||
|
||||
/* net_rxnotify.c ************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET_RXAVAIL)
|
||||
void netdev_rxnotify(const uip_ipaddr_t addr);
|
||||
#else
|
||||
# define netdev_rxnotify(addr)
|
||||
#endif
|
||||
|
||||
/* net_count.c ***************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
int netdev_count(void);
|
||||
#endif
|
||||
|
||||
/* send.c ********************************************************************/
|
||||
|
||||
ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#endif
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "pkt/pkt.h"
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <nuttx/net/arp.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "tcp/tcp.h"
|
||||
#include "udp/udp.h"
|
||||
#include "pkt/pkt.h"
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_carrier.c
|
||||
* net/netdev/netdev_carrier.c
|
||||
*
|
||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Max Holtzberg <mh@uvc.de>
|
||||
@@ -53,9 +53,10 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_count.c
|
||||
* net/netdev/netdev_count.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -46,13 +46,14 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_findbyaddr.c
|
||||
* net/netdev/netdev_findbyaddr.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "route/route.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_findbyname.c
|
||||
* net/netdev/netdev_findbyname.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -46,13 +46,14 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_foreach.c
|
||||
* net/netdev/netdev_foreach.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -45,13 +45,14 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_ioctl.c
|
||||
* net/netdev/netdev_ioctl.c
|
||||
*
|
||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -64,6 +64,7 @@
|
||||
#endif
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "route/route.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_register.c
|
||||
* net/netdev/netdev_register.c
|
||||
*
|
||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -53,9 +53,10 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_SLIP
|
||||
@@ -65,7 +66,7 @@
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_rxnotify.c
|
||||
* net/netdev/netdev_rxnotify.c
|
||||
*
|
||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -48,13 +48,14 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Priviate Types
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_sem.c
|
||||
* net/netdev/netdev_sem.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_txnotify.c
|
||||
* net/netdev/netdev_txnotify.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_unregister.c
|
||||
* net/netdev/netdev_unregister.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -56,6 +56,7 @@
|
||||
#include <nuttx/net/pkt.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "pkt/pkt.h"
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <nuttx/net/pkt.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "tcp/tcp.h"
|
||||
#include "udp/udp.h"
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "route/route.h"
|
||||
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <nuttx/net/udp.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "udp/udp.h"
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include <nuttx/net/tcp.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "tcp/tcp.h"
|
||||
#include "uip/uip.h"
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <nuttx/net/tcp.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "uip/uip.h"
|
||||
#include "tcp/tcp.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user