diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-28 13:41:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-28 13:41:24 -0600 |
commit | 5655638bf3980fbab2163a8da2a612e850d28b3f (patch) | |
tree | c25aacb8b6a23688cbd3a0465db706341ad50ebb /nuttx/net/local | |
parent | 6615beabb799e4496daf19b1fd9a7af2325fdda2 (diff) | |
download | px4-nuttx-5655638bf3980fbab2163a8da2a612e850d28b3f.tar.gz px4-nuttx-5655638bf3980fbab2163a8da2a612e850d28b3f.tar.bz2 px4-nuttx-5655638bf3980fbab2163a8da2a612e850d28b3f.zip |
Networking: Move UDP-specifc parts of sendto() out of socket/sendto.c and into udp/udp_sendto.c. Hook in Unix domain sokcet sendto() logic (still just a stub for the moment)
Diffstat (limited to 'nuttx/net/local')
-rw-r--r-- | nuttx/net/local/local.h | 16 | ||||
-rw-r--r-- | nuttx/net/local/local_sendto.c | 14 |
2 files changed, 19 insertions, 11 deletions
diff --git a/nuttx/net/local/local.h b/nuttx/net/local/local.h index 23a4ed8fe..668bca66b 100644 --- a/nuttx/net/local/local.h +++ b/nuttx/net/local/local.h @@ -346,23 +346,27 @@ ssize_t psock_local_send(FAR struct socket *psock, FAR const void *buf, size_t len, int flags); /**************************************************************************** - * Function: psock_sendto + * Function: psock_local_sendto * * Description: - * Send a local packet as a datagram. + * This function implements the Unix domain-specific logic of the + * standard sendto() socket operation. * - * Parameters: + * Input Parameters: * psock A pointer to a NuttX-specific, internal socket structure * buf Data to send * len Length of data to send - * flags Send flags (ignored for now) + * flags Send flags * to Address of recipient * tolen The length of the address structure * + * NOTE: All input parameters were verified by sendto() before this + * function was called. + * * Returned Value: * On success, returns the number of characters sent. On error, - * -1 is returned, and errno is set appropriately (see sendto() for the - * list of errno numbers). + * a negated errno value is returned. See the description in + * net/socket/sendto.c for the list of appropriate return value. * ****************************************************************************/ diff --git a/nuttx/net/local/local_sendto.c b/nuttx/net/local/local_sendto.c index a44333d6f..625ccb8be 100644 --- a/nuttx/net/local/local_sendto.c +++ b/nuttx/net/local/local_sendto.c @@ -53,12 +53,13 @@ ****************************************************************************/ /**************************************************************************** - * Function: psock_sendto + * Function: psock_local_sendto * * Description: - * Send a local packet as a datagram. + * This function implements the Unix domain-specific logic of the + * standard sendto() socket operation. * - * Parameters: + * Input Parameters: * psock A pointer to a NuttX-specific, internal socket structure * buf Data to send * len Length of data to send @@ -66,10 +67,13 @@ * to Address of recipient * tolen The length of the address structure * + * NOTE: All input parameters were verified by sendto() before this + * function was called. + * * Returned Value: * On success, returns the number of characters sent. On error, - * -1 is returned, and errno is set appropriately (see sendto() for the - * list of errno numbers). + * a negated errno value is returned. See the description in + * net/socket/sendto.c for the list of appropriate return value. * ****************************************************************************/ |