From 5d7915e5efd92c779fe546ae1985fd977f82d2bb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 Jun 2014 19:03:01 -0600 Subject: [PATCH] NET: Remove uip_stopped and uip_stop --- include/nuttx/net/net.h | 4 ++++ include/nuttx/net/netdev.h | 19 +++++++++++++------ include/nuttx/net/tcp.h | 14 -------------- include/nuttx/net/uip.h | 4 ---- net/devif/Make.defs | 2 +- net/devif/{devif_setipid.c => net_setipid.c} | 6 +++--- 6 files changed, 21 insertions(+), 28 deletions(-) rename net/devif/{devif_setipid.c => net_setipid.c} (97%) diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index a1f97f6b2d6..0cfbdbe40f8 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -144,6 +144,10 @@ extern "C" * Public Function Prototypes ****************************************************************************/ +/* This function may be used at boot time to set the initial ip_id.*/ + +void net_setipid(uint16_t id); + /* net_checksd.c *************************************************************/ /* Check if the socket descriptor is valid for the provided TCB and if it * supports the requested access. diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index 479ea3dcd42..896b0010295 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -206,7 +206,8 @@ typedef int (*devif_poll_callback_t)(struct net_driver_s *dev); * Public Function Prototypes ****************************************************************************/ -/* uIP device driver functions +/**************************************************************************** + * uIP device driver functions * * These functions are used by a network device driver for interacting * with uIP. @@ -263,11 +264,13 @@ typedef int (*devif_poll_callback_t)(struct net_driver_s *dev); * devicedriver_send(); * } * } - */ + * + ****************************************************************************/ int devif_input(struct net_driver_s *dev); -/* Polling of connections +/**************************************************************************** + * Polling of connections * * These functions will traverse each active uIP connection structure and * perform appropriate operations: devif_timer() will perform TCP timer @@ -315,18 +318,22 @@ int devif_input(struct net_driver_s *dev); * } * return 0; * } - */ + * + ****************************************************************************/ int devif_poll(struct net_driver_s *dev, devif_poll_callback_t callback); int devif_timer(struct net_driver_s *dev, devif_poll_callback_t callback, int hsec); -/* Carrier detection +/**************************************************************************** + * Carrier detection + * * Call netdev_carrier_on when the carrier has become available and the device * is ready to receive/transmit packets. * * Call detdev_carrier_off when the carrier disappeared and the device has moved * into non operational state. - */ + * + ****************************************************************************/ int netdev_carrier_on(FAR struct net_driver_s *dev); int netdev_carrier_off(FAR struct net_driver_s *dev); diff --git a/include/nuttx/net/tcp.h b/include/nuttx/net/tcp.h index 210588fdd06..3755ba7035b 100644 --- a/include/nuttx/net/tcp.h +++ b/include/nuttx/net/tcp.h @@ -472,20 +472,6 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn, # define tcp_backlogremove(conn) (NULL) #endif -/* Tell the sending host to stop sending data. - * - * This function will close our receiver's window so that we stop - * receiving data for the current connection. - */ - -#define uip_stop(conn) ((conn)->tcpstateflags |= UIP_STOPPED) - -/* Find out if the current connection has been previously stopped with - * uip_stop(). - */ - -#define uip_stopped(conn) ((conn)->tcpstateflags & UIP_STOPPED) - /* Restart the current connection, if is has previously been stopped * with uip_stop(). * diff --git a/include/nuttx/net/uip.h b/include/nuttx/net/uip.h index fd51967a2bf..5e2c60502e7 100644 --- a/include/nuttx/net/uip.h +++ b/include/nuttx/net/uip.h @@ -235,10 +235,6 @@ struct devif_callback_s * Public Function Prototypes ****************************************************************************/ -/* This function may be used at boot time to set the initial ip_id.*/ - -void uip_setipid(uint16_t id); - /* Critical section management. The NuttX configuration setting * CONFIG_NET_NOINT indicates that uIP not called from the interrupt level. * If CONFIG_NET_NOINTS is defined, then these will map to semaphore diff --git a/net/devif/Make.defs b/net/devif/Make.defs index 18271360218..19d5a8c11e3 100644 --- a/net/devif/Make.defs +++ b/net/devif/Make.defs @@ -35,7 +35,7 @@ # Network device interface source files -NET_CSRCS += devif_initialize.c devif_setipid.c devif_input.c devif_send.c +NET_CSRCS += devif_initialize.c net_setipid.c devif_input.c devif_send.c NET_CSRCS += devif_poll.c devif_callback.c # I/O buffer chain support required? diff --git a/net/devif/devif_setipid.c b/net/devif/net_setipid.c similarity index 97% rename from net/devif/devif_setipid.c rename to net/devif/net_setipid.c index 018ec914f12..11707f609a5 100644 --- a/net/devif/devif_setipid.c +++ b/net/devif/net_setipid.c @@ -1,5 +1,5 @@ /**************************************************************************** - * net/devif/devif_setipid.c + * net/devif/net_setipid.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -60,7 +60,7 @@ ****************************************************************************/ /**************************************************************************** - * Function: uip_setipid + * Function: net_setipid * * Description: * This function may be used at boot time to set the initial ip_id. @@ -69,7 +69,7 @@ * ****************************************************************************/ -void uip_setipid(uint16_t id) +void net_setipid(uint16_t id) { g_ipid = id; }