Rename net/uip to net/devif. Rename uip/uip.h to devif/devif.h

This commit is contained in:
Gregory Nutt 2014-06-28 18:07:02 -06:00
parent 3451ce2996
commit 5790c94ba3
56 changed files with 101 additions and 94 deletions

View File

@ -234,16 +234,6 @@ struct uip_callback_s
* Public Function Prototypes
****************************************************************************/
/* uIP initialization functions
*
* The uIP initialization functions are used for booting uIP.
*
* This function should be called at boot up to initialize the uIP
* TCP/IP stack.
*/
void uip_initialize(void);
/* This function may be used at boot time to set the initial ip_id.*/
void uip_setipid(uint16_t id);

View File

@ -64,7 +64,7 @@ include igmp/Make.defs
include tcp/Make.defs
include udp/Make.defs
include pkt/Make.defs
include uip/Make.defs
include devif/Make.defs
include route/Make.defs
include utils/Make.defs
endif

View File

@ -1,5 +1,5 @@
############################################################################
# net/uip/Make.defs
# net/devif/Make.defs
#
# Copyright (C) 2007, 2009-2010, 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,24 +33,24 @@
#
############################################################################
# Common IP source files
# Network device interface source files
NET_CSRCS += uip_initialize.c uip_setipid.c uip_input.c uip_send.c
NET_CSRCS += uip_poll.c uip_callback.c
NET_CSRCS += devif_initialize.c devif_setipid.c devif_input.c devif_send.c
NET_CSRCS += devif_poll.c devif_callback.c
# I/O buffer chain support required?
ifeq ($(CONFIG_NET_IOB),y)
NET_CSRCS += uip_iobsend.c
NET_CSRCS += devif_iobsend.c
endif
# Raw packet socket support
ifeq ($(CONFIG_NET_PKT),y)
NET_CSRCS += uip_pktsend.c
NET_CSRCS += devif_pktsend.c
endif
# Include uip build support
# Include network device interface build support
DEPPATH += --dep-path uip
VPATH += :uip
DEPPATH += --dep-path devif
VPATH += :devif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip.h
* net/devif/devif.h
*
* Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -36,8 +36,8 @@
*
****************************************************************************/
#ifndef _NET_UIP_UIP_H
#define _NET_UIP_UIP_H
#ifndef _NET_DEVIF_DEVIF_H
#define _NET_DEVIF_DEVIF_H
/****************************************************************************
* Included Files
@ -76,7 +76,7 @@ extern uint16_t g_ipid;
/* Reassembly timer (units: deci-seconds) */
#if UIP_REASSEMBLY && !defined(CONFIG_NET_IPv6)
extern uint8_t uip_reasstmr;
extern uint8_t g_reassembly_timer;
#endif
/* List of applications waiting for ICMP ECHO REPLY */
@ -97,6 +97,22 @@ extern "C"
#define EXTERN extern
#endif
/****************************************************************************
* Name: devif_initialize
*
* Description:
* Perform initialization of the network device interface layer
*
* Parameters:
* None
*
* Return:
* None
*
****************************************************************************/
void devif_initialize(void);
/****************************************************************************
* Function: uip_callbackinit
*
@ -202,4 +218,4 @@ void uip_pktsend(FAR struct net_driver_s *dev, FAR const void *buf,
#endif
#endif /* CONFIG_NET */
#endif /* _NET_UIP_UIP_H */
#endif /* _NET_DEVIF_DEVIF_H */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_callback.c
* net/devif/devif_callback.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -48,7 +48,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/netdev.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Private Data

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_initialize.c
* net/devif/devif_initialize.c
*
* Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -48,7 +48,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Pre-processor Definitions
@ -85,7 +85,7 @@ const uip_ipaddr_t g_allzeroaddr =
/* Reassembly timer (units: deci-seconds) */
#if UIP_REASSEMBLY && !defined(CONFIG_NET_IPv6)
uint8_t uip_reasstmr;
uint8_t g_reassembly_timer;
#endif
/****************************************************************************
@ -101,10 +101,10 @@ uint8_t uip_reasstmr;
****************************************************************************/
/****************************************************************************
* Name: uip_initialize
* Name: devif_initialize
*
* Description:
* Perform initialization of the uIP layer
* Perform initialization of the network device interface layer
*
* Parameters:
* None
@ -114,7 +114,7 @@ uint8_t uip_reasstmr;
*
****************************************************************************/
void uip_initialize(void)
void devif_initialize(void)
{
/* Initialize callback support */

View File

@ -94,7 +94,7 @@
# include "net_neighbor.h"
#endif /* CONFIG_NET_IPv6 */
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
#include "udp/udp.h"
#include "pkt/pkt.h"
@ -155,15 +155,15 @@ static uint8_t uip_reass(void)
uint16_t len;
uint16_t i;
/* If uip_reasstmr is zero, no packet is present in the buffer, so we
* write the IP header of the fragment into the reassembly
* buffer. The timer is updated with the maximum age.
/* If g_reassembly_timer is zero, no packet is present in the buffer, so
* we write the IP header of the fragment into the reassembly buffer. The
* timer is updated with the maximum age.
*/
if (!uip_reasstmr)
if (!g_reassembly_timer)
{
memcpy(uip_reassbuf, &pbuf->vhl, UIP_IPH_LEN);
uip_reasstmr = UIP_REASS_MAXAGE;
g_reassembly_timer = UIP_REASS_MAXAGE;
uip_reassflags = 0;
/* Clear the bitmap. */
@ -189,7 +189,7 @@ static uint8_t uip_reass(void)
if (offset > UIP_REASS_BUFSIZE || offset + len > UIP_REASS_BUFSIZE)
{
uip_reasstmr = 0;
g_reassembly_timer = 0;
goto nullreturn;
}
@ -266,7 +266,7 @@ static uint8_t uip_reass(void)
* the timer.
*/
uip_reasstmr = 0;
g_reassembly_timer = 0;
memcpy(pbuf, pfbuf, uip_reasslen);
/* Pretend to be a "normal" (i.e., not fragmented) IP packet from

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_iobsend.c
* net/devif/devif_iobsend.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_pktsend.c
* net/devif/devif_pktsend.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_poll.c
* net/devif/devif_poll.c
*
* Copyright (C) 2007-2010, 2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -46,7 +46,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/netdev.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
#include "udp/udp.h"
#include "pkt/pkt.h"
@ -374,9 +374,9 @@ int uip_timer(FAR struct net_driver_s *dev, uip_poll_callback_t callback,
/* Increment the timer used by the IP reassembly logic */
#if UIP_REASSEMBLY
if (uip_reasstmr != 0 && uip_reasstmr < UIP_REASS_MAXAGE)
if (g_reassembly_timer != 0 && g_reassembly_timer < UIP_REASS_MAXAGE)
{
uip_reasstmr += hsec;
g_reassembly_timer += hsec;
}
#endif /* UIP_REASSEMBLY */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_send.c
* net/devif/devif_send.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/uip/uip_setipid.c
* net/devif/devif_setipid.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -45,7 +45,7 @@
#include <nuttx/net/uip.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Private Data

View File

@ -54,7 +54,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "icmp/icmp.h"
#include "utils/utils.h"

View File

@ -55,7 +55,7 @@
#include <nuttx/net/icmp.h>
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "icmp/icmp.h"
/****************************************************************************

View File

@ -47,7 +47,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/icmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -47,7 +47,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "utils/utils.h"
#include "icmp/icmp.h"

View File

@ -58,7 +58,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -50,7 +50,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -52,7 +52,7 @@
#include <nuttx/net/igmp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -51,7 +51,7 @@
#include <nuttx/net/netstats.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -52,7 +52,7 @@
#include <nuttx/net/netstats.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -50,7 +50,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -50,7 +50,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -51,7 +51,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -49,7 +49,7 @@
#include <nuttx/net/ip.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -53,7 +53,7 @@
#include <nuttx/net/netstats.h>
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP

View File

@ -47,6 +47,7 @@
#include <nuttx/net/arp.h>
#include "socket/socket.h"
#include "devif/devif.h"
#include "netdev/netdev.h"
#include "tcp/tcp.h"
#include "udp/udp.h"
@ -94,7 +95,7 @@ void net_initialize(void)
/* Initialize the device interface layer */
uip_initialize();
devif_initialize();
#ifdef CONFIG_NET_PKT
/* Initialize packet socket support */

View File

@ -48,7 +48,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/pkt.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -56,7 +56,7 @@
#include <nuttx/net/arp.h>
#include <nuttx/net/pkt.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/arp.h>
#include <nuttx/net/pkt.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/udp.h>
#include <nuttx/net/pkt.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -57,7 +57,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/udp.h>
#include "socket/socket.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
#include "udp/udp.h"

View File

@ -59,7 +59,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************

View File

@ -47,7 +47,7 @@
#include <nuttx/net/tcp.h>
#include "socket/socket.h"
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Private Types

View File

@ -56,7 +56,7 @@
#include <nuttx/net/net.h>
#include <nuttx/net/tcp.h>
#include <uip/uip.h>
#include <devif/devif.h>
#include "socket/socket.h"

View File

@ -63,7 +63,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Definitions

View File

@ -62,7 +62,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
#include "udp/udp.h"
#include "pkt/pkt.h"

View File

@ -54,7 +54,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "udp/udp.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/tcp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -50,7 +50,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/tcp.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Private Data

View File

@ -51,7 +51,7 @@
#include <nuttx/net/tcp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -57,7 +57,7 @@
#include <nuttx/net/tcp.h>
#include "tcp/tcp.h"
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Public Data

View File

@ -56,7 +56,7 @@
#include <nuttx/net/tcp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "utils/utils.h"
#include "tcp/tcp.h"

View File

@ -51,7 +51,7 @@
#include <nuttx/net/netconfig.h>
#include <nuttx/net/tcp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/tcp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "utils/utils.h"
/****************************************************************************

View File

@ -71,7 +71,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "tcp/tcp.h"
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -58,7 +58,7 @@
#include "socket/socket.h"
#include "netdev/netdev.h"
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -54,7 +54,7 @@
#include <nuttx/net/uip.h>
#include <nuttx/net/netdev.h>
#include "uip/uip.h"
#include "devif/devif.h"
/****************************************************************************
* Public Data

View File

@ -54,7 +54,7 @@
#include <nuttx/net/tcp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "tcp/tcp.h"
/****************************************************************************

View File

@ -48,7 +48,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/udp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "udp/udp.h"
/****************************************************************************

View File

@ -61,7 +61,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/udp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "udp/udp.h"
/****************************************************************************

View File

@ -53,7 +53,7 @@
#include <nuttx/net/udp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "utils/utils.h"
#include "udp/udp.h"

View File

@ -52,7 +52,7 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/udp.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "udp/udp.h"
/****************************************************************************

View File

@ -52,7 +52,7 @@
#include <nuttx/net/udp.h>
#include <nuttx/net/netstats.h>
#include "uip/uip.h"
#include "devif/devif.h"
#include "utils/utils.h"
#include "udp/udp.h"