diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-28 18:36:09 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-28 18:36:09 -0600 |
commit | 0f6f5040d16fe89889179941f6ee0ea3762b0eb3 (patch) | |
tree | d8b1a6b01f2ef51dececea93ae8ea2d388079e78 /nuttx/net/socket | |
parent | 61d1e30028f08cacd7cd81dc66ce736e39c6620b (diff) | |
download | px4-nuttx-0f6f5040d16fe89889179941f6ee0ea3762b0eb3.tar.gz px4-nuttx-0f6f5040d16fe89889179941f6ee0ea3762b0eb3.tar.bz2 px4-nuttx-0f6f5040d16fe89889179941f6ee0ea3762b0eb3.zip |
Rename many functions in net/devif from uip_* to devif_*
Diffstat (limited to 'nuttx/net/socket')
-rw-r--r-- | nuttx/net/socket/connect.c | 4 | ||||
-rw-r--r-- | nuttx/net/socket/net_close.c | 7 | ||||
-rw-r--r-- | nuttx/net/socket/net_poll.c | 5 | ||||
-rw-r--r-- | nuttx/net/socket/net_sendfile.c | 8 | ||||
-rw-r--r-- | nuttx/net/socket/recvfrom.c | 12 | ||||
-rw-r--r-- | nuttx/net/socket/sendto.c | 6 |
6 files changed, 22 insertions, 20 deletions
diff --git a/nuttx/net/socket/connect.c b/nuttx/net/socket/connect.c index 29fbd744f..bc42ac398 100644 --- a/nuttx/net/socket/connect.c +++ b/nuttx/net/socket/connect.c @@ -113,7 +113,7 @@ static inline int psock_setup_callbacks(FAR struct socket *psock, /* Set up the callbacks in the connection */ - pstate->tc_cb = tcp_callbackalloc(conn); + pstate->tc_cb = tcp_callback_alloc(conn); if (pstate->tc_cb) { /* Set up the connection "interrupt" handler */ @@ -143,7 +143,7 @@ static inline void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate, /* Make sure that no further interrupts are processed */ - tcp_callbackfree(conn, pstate->tc_cb); + tcp_callback_free(conn, pstate->tc_cb); pstate->tc_cb = NULL; diff --git a/nuttx/net/socket/net_close.c b/nuttx/net/socket/net_close.c index e6738e064..6b92f683a 100644 --- a/nuttx/net/socket/net_close.c +++ b/nuttx/net/socket/net_close.c @@ -60,6 +60,7 @@ #include "socket/socket.h" #include "netdev/netdev.h" #include "devif/devif.h" +#include "tcp/tcp.h" #include "pkt/pkt.h" /**************************************************************************** @@ -297,7 +298,7 @@ static inline int netclose_disconnect(FAR struct socket *psock) #ifdef CONFIG_NET_TCP_WRITE_BUFFERS if (psock->s_sndcb) { - tcp_callbackfree(conn, psock->s_sndcb); + tcp_callback_free(conn, psock->s_sndcb); psock->s_sndcb = NULL; } #endif @@ -309,7 +310,7 @@ static inline int netclose_disconnect(FAR struct socket *psock) /* Check for the case where the host beat us and disconnected first */ if (conn->tcpstateflags == UIP_ESTABLISHED && - (state.cl_cb = tcp_callbackalloc(conn)) != NULL) + (state.cl_cb = tcp_callback_alloc(conn)) != NULL) { /* Set up to receive TCP data event callbacks */ @@ -373,7 +374,7 @@ static inline int netclose_disconnect(FAR struct socket *psock) /* We are now disconnected */ sem_destroy(&state.cl_sem); - tcp_callbackfree(conn, state.cl_cb); + tcp_callback_free(conn, state.cl_cb); /* Free the connection */ diff --git a/nuttx/net/socket/net_poll.c b/nuttx/net/socket/net_poll.c index dcce077f8..681b6c5bc 100644 --- a/nuttx/net/socket/net_poll.c +++ b/nuttx/net/socket/net_poll.c @@ -58,6 +58,7 @@ #include <devif/devif.h> +#include "tcp/tcp.h" #include "socket/socket.h" /**************************************************************************** @@ -214,7 +215,7 @@ static inline int net_pollsetup(FAR struct socket *psock, /* Allocate a TCP/IP callback structure */ - cb = tcp_callbackalloc(conn); + cb = tcp_callback_alloc(conn); if (!cb) { ret = -EBUSY; @@ -366,7 +367,7 @@ static inline int net_pollteardown(FAR struct socket *psock, /* Release the callback */ flags = net_lock(); - tcp_callbackfree(conn, info->cb); + tcp_callback_free(conn, info->cb); net_unlock(flags); /* Release the poll/select data slot */ diff --git a/nuttx/net/socket/net_sendfile.c b/nuttx/net/socket/net_sendfile.c index 6f657ee6a..5b43f297d 100644 --- a/nuttx/net/socket/net_sendfile.c +++ b/nuttx/net/socket/net_sendfile.c @@ -491,7 +491,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, /* Allocate resources to receive a callback */ - state.snd_datacb = tcp_callbackalloc(conn); + state.snd_datacb = tcp_callback_alloc(conn); if (state.snd_datacb == NULL) { @@ -500,7 +500,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, goto errout_locked; } - state.snd_ackcb = tcp_callbackalloc(conn); + state.snd_ackcb = tcp_callback_alloc(conn); if (state.snd_ackcb == NULL) { @@ -551,10 +551,10 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, psock->s_flags = _SS_SETSTATE(psock->s_flags, _SF_IDLE); - tcp_callbackfree(conn, state.snd_ackcb); + tcp_callback_free(conn, state.snd_ackcb); errout_datacb: - tcp_callbackfree(conn, state.snd_datacb); + tcp_callback_free(conn, state.snd_datacb); errout_locked: diff --git a/nuttx/net/socket/recvfrom.c b/nuttx/net/socket/recvfrom.c index 16ce70b1b..709c9fe54 100644 --- a/nuttx/net/socket/recvfrom.c +++ b/nuttx/net/socket/recvfrom.c @@ -1075,7 +1075,7 @@ static ssize_t pkt_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Set up the callback in the connection */ - state.rf_cb = pkt_callbackalloc(conn); + state.rf_cb = pkt_callback_alloc(conn); if (state.rf_cb) { state.rf_cb->flags = UIP_NEWDATA|UIP_POLL; @@ -1096,7 +1096,7 @@ static ssize_t pkt_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Make sure that no further interrupts are processed */ - pkt_callbackfree(conn, state.rf_cb); + pkt_callback_free(conn, state.rf_cb); ret = recvfrom_result(ret, &state); } else @@ -1167,7 +1167,7 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Set up the callback in the connection */ - state.rf_cb = udp_callbackalloc(conn); + state.rf_cb = udp_callback_alloc(conn); if (state.rf_cb) { /* Set up the callback in the connection */ @@ -1190,7 +1190,7 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Make sure that no further interrupts are processed */ - udp_callbackfree(conn, state.rf_cb); + udp_callback_free(conn, state.rf_cb); ret = recvfrom_result(ret, &state); } else @@ -1354,7 +1354,7 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Set up the callback in the connection */ - state.rf_cb = tcp_callbackalloc(conn); + state.rf_cb = tcp_callback_alloc(conn); if (state.rf_cb) { state.rf_cb->flags = UIP_NEWDATA|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; @@ -1371,7 +1371,7 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Make sure that no further interrupts are processed */ - tcp_callbackfree(conn, state.rf_cb); + tcp_callback_free(conn, state.rf_cb); ret = recvfrom_result(ret, &state); } else diff --git a/nuttx/net/socket/sendto.c b/nuttx/net/socket/sendto.c index 4b943b298..91e7ed544 100644 --- a/nuttx/net/socket/sendto.c +++ b/nuttx/net/socket/sendto.c @@ -207,7 +207,7 @@ static uint16_t sendto_interrupt(struct net_driver_s *dev, void *conn, { /* Copy the user data into d_snddata and send it */ - uip_send(dev, pstate->st_buffer, pstate->st_buflen); + devif_send(dev, pstate->st_buffer, pstate->st_buflen); pstate->st_sndlen = pstate->st_buflen; } @@ -392,7 +392,7 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, /* Set up the callback in the connection */ - state.st_cb = udp_callbackalloc(conn); + state.st_cb = udp_callback_alloc(conn); if (state.st_cb) { state.st_cb->flags = UIP_POLL; @@ -413,7 +413,7 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, /* Make sure that no further interrupts are processed */ - udp_callbackfree(conn, state.st_cb); + udp_callback_free(conn, state.st_cb); } net_unlock(save); |