diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-25 10:34:52 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-25 10:34:52 -0600 |
commit | 86a37059e98e46294dff804ed9265bfc112d675b (patch) | |
tree | 629492c7c7af23a999bda24e9fdcde75e04ea4cb /nuttx/net/uip/uip.h | |
parent | f1994c5a179ba323f3dc29de7bc4cbaadeb4a831 (diff) | |
download | nuttx-86a37059e98e46294dff804ed9265bfc112d675b.tar.gz nuttx-86a37059e98e46294dff804ed9265bfc112d675b.tar.bz2 nuttx-86a37059e98e46294dff804ed9265bfc112d675b.zip |
Clean-up packet socket naming
Diffstat (limited to 'nuttx/net/uip/uip.h')
-rw-r--r-- | nuttx/net/uip/uip.h | 107 |
1 files changed, 88 insertions, 19 deletions
diff --git a/nuttx/net/uip/uip.h b/nuttx/net/uip/uip.h index ad612d186..7a11dab26 100644 --- a/nuttx/net/uip/uip.h +++ b/nuttx/net/uip/uip.h @@ -96,35 +96,104 @@ extern "C" #define EXTERN extern #endif -/* Defined in uip_callback.c ************************************************/ +/**************************************************************************** + * Function: uip_callbackinit + * + * Description: + * Configure the pre-allocated callback structures into a free list. + * This is called internally as part of uIP initialization and should not + * be accessed from the application or socket layer. + * + * Assumptions: + * This function is called with interrupts disabled. + * + ****************************************************************************/ void uip_callbackinit(void); -FAR struct uip_callback_s *uip_callbackalloc(struct uip_callback_s **list); -void uip_callbackfree(FAR struct uip_callback_s *cb, struct uip_callback_s **list); -uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn, - uint16_t flags, FAR struct uip_callback_s *list); -#ifdef CONFIG_NET_PKT -/* Defined in uip_pktconn.c *************************************************/ +/**************************************************************************** + * Function: uip_callbackalloc + * + * Description: + * Allocate a callback container from the free list. + * This is called internally as part of uIP initialization and should not + * be accessed from the application or socket layer. + * + * Assumptions: + * This function is called with interrupts disabled. + * + ****************************************************************************/ + +FAR struct uip_callback_s *uip_callbackalloc(FAR struct uip_callback_s **list); + +/**************************************************************************** + * Function: uip_callbackfree + * + * Description: + * Return a callback container to the free list. + * This is called internally as part of uIP initialization and should not + * be accessed from the application or socket layer. + * + * Assumptions: + * This function is called with interrupts disabled. + * + ****************************************************************************/ -void uip_pktinit(void); -struct uip_pkt_conn *uip_pktalloc(void); -void uip_pktfree(struct uip_pkt_conn *conn); -struct uip_pkt_conn *uip_pktactive(struct eth_hdr_s *buf); -struct uip_pkt_conn *uip_nextpktconn(struct uip_pkt_conn *conn); +void uip_callbackfree(FAR struct uip_callback_s *cb, + FAR struct uip_callback_s **list); -/* Defined in uip_pktcallback.c *********************************************/ +/**************************************************************************** + * Function: uip_callbackexecute + * + * Description: + * Execute a list of callbacks. + * This is called internally as part of uIP initialization and should not + * be accessed from the application or socket layer. + * + * Assumptions: + * This function is called with interrupts disabled. + * + ****************************************************************************/ -uint16_t uip_pktcallback(struct uip_driver_s *dev, struct uip_pkt_conn *conn, - uint16_t flags); +uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn, + uint16_t flags, FAR struct uip_callback_s *list); -/* Defined in uip_pktinput.c ************************************************/ +/**************************************************************************** + * Send data on the current connection. + * + * This function is used to send out a single segment of TCP + * data. Only applications that have been invoked by uIP for event + * processing can send data. + * + * The amount of data that actually is sent out after a call to this + * function is determined by the maximum amount of data TCP allows. uIP + * will automatically crop the data so that only the appropriate + * amount of data is sent. The function uip_mss() can be used to query + * uIP for the amount of data that actually will be sent. + * + * Note: This function does not guarantee that the sent data will + * arrive at the destination. If the data is lost in the network, the + * application will be invoked with the UIP_REXMIT flag set. The + * application will then have to resend the data using this function. + * + * data A pointer to the data which is to be sent. + * + * len The maximum amount of data bytes to be sent. + * + ****************************************************************************/ -/* Defined in uip_pktpoll.c *************************************************/ +void uip_send(FAR struct uip_driver_s *dev, FAR const void *buf, int len); -void uip_pktpoll(struct uip_driver_s *dev, struct uip_pkt_conn *conn); +#ifdef CONFIG_NET_IOB +struct iob_s; +void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *buf, + unsigned int len, unsigned int offset); +#endif -#endif /* CONFIG_NET_PKT */ +#ifdef CONFIG_NET_PKT +void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf, + unsigned int len); +#endif #undef EXTERN #ifdef __cplusplus |