diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 12:59:34 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 12:59:34 -0600 |
commit | 9b96b0fcb20eea5c4cb1a8958e6adc7606414dff (patch) | |
tree | 9da7cdd974cda208ec6495bcc577ac191f55d73b | |
parent | 5c4d51bb64d37019f2991fe2cc7615b5f64faf80 (diff) | |
download | px4-nuttx-9b96b0fcb20eea5c4cb1a8958e6adc7606414dff.tar.gz px4-nuttx-9b96b0fcb20eea5c4cb1a8958e6adc7606414dff.tar.bz2 px4-nuttx-9b96b0fcb20eea5c4cb1a8958e6adc7606414dff.zip |
NET: Rename uip_callback_s to devif_callback_s
-rw-r--r-- | nuttx/include/nuttx/net/net.h | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/pkt.h | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/tcp.h | 6 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/udp.h | 4 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/uip.h | 9 | ||||
-rw-r--r-- | nuttx/net/devif/devif.h | 10 | ||||
-rw-r--r-- | nuttx/net/devif/devif_callback.c | 22 | ||||
-rw-r--r-- | nuttx/net/icmp/icmp_input.c | 2 | ||||
-rw-r--r-- | nuttx/net/icmp/icmp_ping.c | 2 | ||||
-rw-r--r-- | nuttx/net/pkt/pkt_send.c | 12 | ||||
-rw-r--r-- | nuttx/net/socket/connect.c | 8 | ||||
-rw-r--r-- | nuttx/net/socket/net_close.c | 10 | ||||
-rw-r--r-- | nuttx/net/socket/net_poll.c | 8 | ||||
-rw-r--r-- | nuttx/net/socket/net_sendfile.c | 22 | ||||
-rw-r--r-- | nuttx/net/socket/recvfrom.c | 20 | ||||
-rw-r--r-- | nuttx/net/socket/sendto.c | 14 | ||||
-rw-r--r-- | nuttx/net/tcp/tcp_conn.c | 4 | ||||
-rw-r--r-- | nuttx/net/tcp/tcp_send_unbuffered.c | 20 |
18 files changed, 89 insertions, 88 deletions
diff --git a/nuttx/include/nuttx/net/net.h b/nuttx/include/nuttx/net/net.h index fb7ff9136..a1f97f6b2 100644 --- a/nuttx/include/nuttx/net/net.h +++ b/nuttx/include/nuttx/net/net.h @@ -109,7 +109,7 @@ struct socket #ifdef CONFIG_NET_TCP_WRITE_BUFFERS /* Callback instance for TCP send */ - FAR struct uip_callback_s *s_sndcb; + FAR struct devif_callback_s *s_sndcb; #endif }; diff --git a/nuttx/include/nuttx/net/pkt.h b/nuttx/include/nuttx/net/pkt.h index ea66fa3ff..05df97180 100644 --- a/nuttx/include/nuttx/net/pkt.h +++ b/nuttx/include/nuttx/net/pkt.h @@ -65,7 +65,7 @@ struct pkt_conn_s /* Defines the list of packet callbacks */ - struct uip_callback_s *list; + struct devif_callback_s *list; }; /**************************************************************************** diff --git a/nuttx/include/nuttx/net/tcp.h b/nuttx/include/nuttx/net/tcp.h index 7b196f186..210588fdd 100644 --- a/nuttx/include/nuttx/net/tcp.h +++ b/nuttx/include/nuttx/net/tcp.h @@ -162,7 +162,7 @@ */ struct net_driver_s; /* Forward reference */ -struct uip_callback_s; /* Forward reference */ +struct devif_callback_s; /* Forward reference */ struct tcp_backlog_s; /* Forward reference */ struct tcp_conn_s @@ -239,7 +239,7 @@ struct tcp_conn_s * * Data transfer events are retained in 'list'. Event handlers in 'list' * are called for events specified in the flags set within struct - * uip_callback_s + * devif_callback_s * * When an callback is executed from 'list', the input flags are normally * returned, however, the implementation may set one of the following: @@ -259,7 +259,7 @@ struct tcp_conn_s * dev->d_len should also be cleared). */ - FAR struct uip_callback_s *list; + FAR struct devif_callback_s *list; /* accept() is called when the TCP logic has created a connection */ diff --git a/nuttx/include/nuttx/net/udp.h b/nuttx/include/nuttx/net/udp.h index 03d221fd5..ec145a20e 100644 --- a/nuttx/include/nuttx/net/udp.h +++ b/nuttx/include/nuttx/net/udp.h @@ -70,7 +70,7 @@ /* Representation of a uIP UDP connection */ struct net_driver_s; /* Forward reference */ -struct uip_callback_s; /* Forward reference */ +struct devif_callback_s; /* Forward reference */ struct udp_conn_s { dq_entry_t node; /* Supports a doubly linked list */ @@ -82,7 +82,7 @@ struct udp_conn_s /* Defines the list of UDP callbacks */ - struct uip_callback_s *list; + struct devif_callback_s *list; }; /* The UDP and IP headers */ diff --git a/nuttx/include/nuttx/net/uip.h b/nuttx/include/nuttx/net/uip.h index c52561765..c2a8f9c64 100644 --- a/nuttx/include/nuttx/net/uip.h +++ b/nuttx/include/nuttx/net/uip.h @@ -218,11 +218,12 @@ struct net_iphdr_s */ struct net_driver_s; /* Forward reference */ -struct uip_callback_s +struct devif_callback_s { - FAR struct uip_callback_s *flink; - uint16_t (*event)(struct net_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags); - void *priv; + FAR struct devif_callback_s *flink; + uint16_t (*event)(FAR struct net_driver_s *dev, FAR void *pvconn, + FAR void *pvpriv, uint16_t flags); + FAR void *priv; uint16_t flags; }; diff --git a/nuttx/net/devif/devif.h b/nuttx/net/devif/devif.h index 6d81603d9..32d603b5f 100644 --- a/nuttx/net/devif/devif.h +++ b/nuttx/net/devif/devif.h @@ -82,7 +82,7 @@ extern uint8_t g_reassembly_timer; /* List of applications waiting for ICMP ECHO REPLY */ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) -extern struct uip_callback_s *g_echocallback; +extern struct devif_callback_s *g_echocallback; #endif /**************************************************************************** @@ -141,7 +141,7 @@ void devif_callback_init(void); * ****************************************************************************/ -FAR struct uip_callback_s *devif_callback_alloc(FAR struct uip_callback_s **list); +FAR struct devif_callback_s *devif_callback_alloc(FAR struct devif_callback_s **list); /**************************************************************************** * Function: devif_callback_free @@ -156,8 +156,8 @@ FAR struct uip_callback_s *devif_callback_alloc(FAR struct uip_callback_s **list * ****************************************************************************/ -void devif_callback_free(FAR struct uip_callback_s *cb, - FAR struct uip_callback_s **list); +void devif_callback_free(FAR struct devif_callback_s *cb, + FAR struct devif_callback_s **list); /**************************************************************************** * Function: devif_callback_execute @@ -173,7 +173,7 @@ void devif_callback_free(FAR struct uip_callback_s *cb, ****************************************************************************/ uint16_t devif_callback_execute(FAR struct net_driver_s *dev, FAR void *pvconn, - uint16_t flags, FAR struct uip_callback_s *list); + uint16_t flags, FAR struct devif_callback_s *list); /**************************************************************************** * Send data on the current connection. diff --git a/nuttx/net/devif/devif_callback.c b/nuttx/net/devif/devif_callback.c index 2cd6d1e58..5a66a33b7 100644 --- a/nuttx/net/devif/devif_callback.c +++ b/nuttx/net/devif/devif_callback.c @@ -54,8 +54,8 @@ * Private Data ****************************************************************************/ -static struct uip_callback_s g_cbprealloc[CONFIG_NET_NACTIVESOCKETS]; -static FAR struct uip_callback_s *g_cbfreelist = NULL; +static struct devif_callback_s g_cbprealloc[CONFIG_NET_NACTIVESOCKETS]; +static FAR struct devif_callback_s *g_cbfreelist = NULL; /**************************************************************************** * Private Functions @@ -101,9 +101,9 @@ void devif_callback_init(void) * ****************************************************************************/ -FAR struct uip_callback_s *devif_callback_alloc(FAR struct uip_callback_s **list) +FAR struct devif_callback_s *devif_callback_alloc(FAR struct devif_callback_s **list) { - struct uip_callback_s *ret; + FAR struct devif_callback_s *ret; net_lock_t save; /* Check the head of the free list */ @@ -115,7 +115,7 @@ FAR struct uip_callback_s *devif_callback_alloc(FAR struct uip_callback_s **list /* Remove the next instance from the head of the free list */ g_cbfreelist = ret->flink; - memset(ret, 0, sizeof(struct uip_callback_s)); + memset(ret, 0, sizeof(struct devif_callback_s)); /* Add the newly allocated instance to the head of the specified list */ @@ -153,11 +153,11 @@ FAR struct uip_callback_s *devif_callback_alloc(FAR struct uip_callback_s **list * ****************************************************************************/ -void devif_callback_free(FAR struct uip_callback_s *cb, - FAR struct uip_callback_s **list) +void devif_callback_free(FAR struct devif_callback_s *cb, + FAR struct devif_callback_s **list) { - FAR struct uip_callback_s *prev; - FAR struct uip_callback_s *curr; + FAR struct devif_callback_s *prev; + FAR struct devif_callback_s *curr; net_lock_t save; if (cb) @@ -221,9 +221,9 @@ void devif_callback_free(FAR struct uip_callback_s *cb, ****************************************************************************/ uint16_t devif_callback_execute(FAR struct net_driver_s *dev, void *pvconn, - uint16_t flags, FAR struct uip_callback_s *list) + uint16_t flags, FAR struct devif_callback_s *list) { - FAR struct uip_callback_s *next; + FAR struct devif_callback_s *next; net_lock_t save; /* Loop for each callback in the list and while there are still events diff --git a/nuttx/net/icmp/icmp_input.c b/nuttx/net/icmp/icmp_input.c index 4c065e81e..c52da2c95 100644 --- a/nuttx/net/icmp/icmp_input.c +++ b/nuttx/net/icmp/icmp_input.c @@ -75,7 +75,7 @@ ****************************************************************************/ #ifdef CONFIG_NET_ICMP_PING -FAR struct uip_callback_s *g_echocallback = NULL; +FAR struct devif_callback_s *g_echocallback = NULL; #endif /**************************************************************************** diff --git a/nuttx/net/icmp/icmp_ping.c b/nuttx/net/icmp/icmp_ping.c index 5e40d0a3a..5b05aefdb 100644 --- a/nuttx/net/icmp/icmp_ping.c +++ b/nuttx/net/icmp/icmp_ping.c @@ -76,7 +76,7 @@ struct icmp_ping_s { - FAR struct uip_callback_s *png_cb; /* Reference to callback instance */ + FAR struct devif_callback_s *png_cb; /* Reference to callback instance */ sem_t png_sem; /* Use to manage the wait for the response */ uint32_t png_time; /* Start time for determining timeouts */ diff --git a/nuttx/net/pkt/pkt_send.c b/nuttx/net/pkt/pkt_send.c index 0c7c4b81e..ffd0119e0 100644 --- a/nuttx/net/pkt/pkt_send.c +++ b/nuttx/net/pkt/pkt_send.c @@ -74,12 +74,12 @@ struct send_s { - FAR struct socket *snd_sock; /* Points to the parent socket structure */ - FAR struct uip_callback_s *snd_cb; /* Reference to callback instance */ - sem_t snd_sem; /* Used to wake up the waiting thread */ - FAR const uint8_t *snd_buffer; /* Points to the buffer of data to send */ - size_t snd_buflen; /* Number of bytes in the buffer to send */ - ssize_t snd_sent; /* The number of bytes sent */ + FAR struct socket *snd_sock; /* Points to the parent socket structure */ + FAR struct devif_callback_s *snd_cb; /* Reference to callback instance */ + sem_t snd_sem; /* Used to wake up the waiting thread */ + FAR const uint8_t *snd_buffer; /* Points to the buffer of data to send */ + size_t snd_buflen; /* Number of bytes in the buffer to send */ + ssize_t snd_sent; /* The number of bytes sent */ }; /**************************************************************************** diff --git a/nuttx/net/socket/connect.c b/nuttx/net/socket/connect.c index bc42ac398..e93838f93 100644 --- a/nuttx/net/socket/connect.c +++ b/nuttx/net/socket/connect.c @@ -64,10 +64,10 @@ #ifdef CONFIG_NET_TCP struct tcp_connect_s { - FAR struct tcp_conn_s *tc_conn; /* Reference to TCP connection structure */ - FAR struct uip_callback_s *tc_cb; /* Reference to callback instance */ - sem_t tc_sem; /* Semaphore signals recv completion */ - int tc_result; /* OK on success, otherwise a negated errno. */ + FAR struct tcp_conn_s *tc_conn; /* Reference to TCP connection structure */ + FAR struct devif_callback_s *tc_cb; /* Reference to callback instance */ + sem_t tc_sem; /* Semaphore signals recv completion */ + int tc_result; /* OK on success, otherwise a negated errno. */ }; #endif diff --git a/nuttx/net/socket/net_close.c b/nuttx/net/socket/net_close.c index 6b92f683a..515109b46 100644 --- a/nuttx/net/socket/net_close.c +++ b/nuttx/net/socket/net_close.c @@ -74,13 +74,13 @@ #ifdef CONFIG_NET_TCP struct tcp_close_s { - FAR struct uip_callback_s *cl_cb; /* Reference to TCP callback instance */ + FAR struct devif_callback_s *cl_cb; /* Reference to TCP callback instance */ #ifdef CONFIG_NET_SOLINGER - FAR struct socket *cl_psock; /* Reference to the TCP socket */ - sem_t cl_sem; /* Signals disconnect completion */ - int cl_result; /* The result of the close */ + FAR struct socket *cl_psock; /* Reference to the TCP socket */ + sem_t cl_sem; /* Signals disconnect completion */ + int cl_result; /* The result of the close */ #ifndef CONFIG_DISABLE_CLOCK - uint32_t cl_start; /* Time close started (in ticks) */ + uint32_t cl_start; /* Time close started (in ticks) */ #endif #endif }; diff --git a/nuttx/net/socket/net_poll.c b/nuttx/net/socket/net_poll.c index 681b6c5bc..5ce00931b 100644 --- a/nuttx/net/socket/net_poll.c +++ b/nuttx/net/socket/net_poll.c @@ -84,9 +84,9 @@ struct net_poll_s { - FAR struct socket *psock; /* Needed to handle loss of connection */ - struct pollfd *fds; /* Needed to handle poll events */ - FAR struct uip_callback_s *cb; /* Needed to teardown the poll */ + FAR struct socket *psock; /* Needed to handle loss of connection */ + struct pollfd *fds; /* Needed to handle poll events */ + FAR struct devif_callback_s *cb; /* Needed to teardown the poll */ }; /**************************************************************************** @@ -188,7 +188,7 @@ static inline int net_pollsetup(FAR struct socket *psock, { FAR struct tcp_conn_s *conn = psock->s_conn; FAR struct net_poll_s *info; - FAR struct uip_callback_s *cb; + FAR struct devif_callback_s *cb; net_lock_t flags; int ret; diff --git a/nuttx/net/socket/net_sendfile.c b/nuttx/net/socket/net_sendfile.c index bc4181ab4..41631c559 100644 --- a/nuttx/net/socket/net_sendfile.c +++ b/nuttx/net/socket/net_sendfile.c @@ -87,18 +87,18 @@ struct sendfile_s { - FAR struct socket *snd_sock; /* Points to the parent socket structure */ - FAR struct uip_callback_s *snd_datacb; /* Data callback */ - FAR struct uip_callback_s *snd_ackcb; /* ACK callback */ - FAR struct file *snd_file; /* File structure of the input file */ - sem_t snd_sem; /* Used to wake up the waiting thread */ - off_t snd_foffset; /* Input file offset */ - size_t snd_flen; /* File length */ - ssize_t snd_sent; /* The number of bytes sent */ - uint32_t snd_isn; /* Initial sequence number */ - uint32_t snd_acked; /* The number of bytes acked */ + FAR struct socket *snd_sock; /* Points to the parent socket structure */ + FAR struct devif_callback_s *snd_datacb; /* Data callback */ + FAR struct devif_callback_s *snd_ackcb; /* ACK callback */ + FAR struct file *snd_file; /* File structure of the input file */ + sem_t snd_sem; /* Used to wake up the waiting thread */ + off_t snd_foffset; /* Input file offset */ + size_t snd_flen; /* File length */ + ssize_t snd_sent; /* The number of bytes sent */ + uint32_t snd_isn; /* Initial sequence number */ + uint32_t snd_acked; /* The number of bytes acked */ #if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) - uint32_t snd_time; /* Last send time for determining timeout */ + uint32_t snd_time; /* Last send time for determining timeout */ #endif }; diff --git a/nuttx/net/socket/recvfrom.c b/nuttx/net/socket/recvfrom.c index 709c9fe54..75b44d3ad 100644 --- a/nuttx/net/socket/recvfrom.c +++ b/nuttx/net/socket/recvfrom.c @@ -81,21 +81,21 @@ #if defined(CONFIG_NET_UDP) || defined(CONFIG_NET_TCP) struct recvfrom_s { - FAR struct socket *rf_sock; /* The parent socket structure */ + FAR struct socket *rf_sock; /* The parent socket structure */ #if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) - uint32_t rf_starttime; /* rcv start time for determining timeout */ + uint32_t rf_starttime; /* rcv start time for determining timeout */ #endif - FAR struct uip_callback_s *rf_cb; /* Reference to callback instance */ - sem_t rf_sem; /* Semaphore signals recv completion */ - size_t rf_buflen; /* Length of receive buffer */ - uint8_t *rf_buffer; /* Pointer to receive buffer */ + FAR struct devif_callback_s *rf_cb; /* Reference to callback instance */ + sem_t rf_sem; /* Semaphore signals recv completion */ + size_t rf_buflen; /* Length of receive buffer */ + uint8_t *rf_buffer; /* Pointer to receive buffer */ #ifdef CONFIG_NET_IPv6 - FAR struct sockaddr_in6 *rf_from; /* Address of sender */ + FAR struct sockaddr_in6 *rf_from; /* Address of sender */ #else - FAR struct sockaddr_in *rf_from; /* Address of sender */ + FAR struct sockaddr_in *rf_from; /* Address of sender */ #endif - size_t rf_recvlen; /* The received length */ - int rf_result; /* Success:OK, failure:negated errno */ + size_t rf_recvlen; /* The received length */ + int rf_result; /* Success:OK, failure:negated errno */ }; #endif /* CONFIG_NET_UDP || CONFIG_NET_TCP */ diff --git a/nuttx/net/socket/sendto.c b/nuttx/net/socket/sendto.c index 91e7ed544..e8f46afe8 100644 --- a/nuttx/net/socket/sendto.c +++ b/nuttx/net/socket/sendto.c @@ -87,14 +87,14 @@ struct sendto_s { #ifdef CONFIG_NET_SENDTO_TIMEOUT - FAR struct socket *st_sock; /* Points to the parent socket structure */ - uint32_t st_time; /* Last send time for determining timeout */ + FAR struct socket *st_sock; /* Points to the parent socket structure */ + uint32_t st_time; /* Last send time for determining timeout */ #endif - FAR struct uip_callback_s *st_cb; /* Reference to callback instance */ - sem_t st_sem; /* Semaphore signals sendto completion */ - uint16_t st_buflen; /* Length of send buffer (error if <0) */ - const char *st_buffer; /* Pointer to send buffer */ - int st_sndlen; /* Result of the send (length sent or negated errno) */ + FAR struct devif_callback_s *st_cb; /* Reference to callback instance */ + sem_t st_sem; /* Semaphore signals sendto completion */ + uint16_t st_buflen; /* Length of send buffer (error if <0) */ + const char *st_buffer; /* Pointer to send buffer */ + int st_sndlen; /* Result of the send (length sent or negated errno) */ }; /**************************************************************************** diff --git a/nuttx/net/tcp/tcp_conn.c b/nuttx/net/tcp/tcp_conn.c index 8f7951a25..235af87d5 100644 --- a/nuttx/net/tcp/tcp_conn.c +++ b/nuttx/net/tcp/tcp_conn.c @@ -316,8 +316,8 @@ FAR struct tcp_conn_s *tcp_alloc(void) void tcp_free(FAR struct tcp_conn_s *conn) { - FAR struct uip_callback_s *cb; - FAR struct uip_callback_s *next; + FAR struct devif_callback_s *cb; + FAR struct devif_callback_s *next; #ifdef CONFIG_NET_TCP_WRITE_BUFFERS FAR struct tcp_wrbuffer_s *wrbuffer; #endif diff --git a/nuttx/net/tcp/tcp_send_unbuffered.c b/nuttx/net/tcp/tcp_send_unbuffered.c index 8ea48b60c..2b2a6e16f 100644 --- a/nuttx/net/tcp/tcp_send_unbuffered.c +++ b/nuttx/net/tcp/tcp_send_unbuffered.c @@ -81,19 +81,19 @@ struct send_s { - FAR struct socket *snd_sock; /* Points to the parent socket structure */ - FAR struct uip_callback_s *snd_cb; /* Reference to callback instance */ - sem_t snd_sem; /* Used to wake up the waiting thread */ - FAR const uint8_t *snd_buffer; /* Points to the buffer of data to send */ - size_t snd_buflen; /* Number of bytes in the buffer to send */ - ssize_t snd_sent; /* The number of bytes sent */ - uint32_t snd_isn; /* Initial sequence number */ - uint32_t snd_acked; /* The number of bytes acked */ + FAR struct socket *snd_sock; /* Points to the parent socket structure */ + FAR struct devif_callback_s *snd_cb; /* Reference to callback instance */ + sem_t snd_sem; /* Used to wake up the waiting thread */ + FAR const uint8_t *snd_buffer; /* Points to the buffer of data to send */ + size_t snd_buflen; /* Number of bytes in the buffer to send */ + ssize_t snd_sent; /* The number of bytes sent */ + uint32_t snd_isn; /* Initial sequence number */ + uint32_t snd_acked; /* The number of bytes acked */ #if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) - uint32_t snd_time; /* Last send time for determining timeout */ + uint32_t snd_time; /* Last send time for determining timeout */ #endif #if defined(CONFIG_NET_TCP_SPLIT) - bool snd_odd; /* True: Odd packet in pair transaction */ + bool snd_odd; /* True: Odd packet in pair transaction */ #endif }; |