net/icmp: Correct some comments, typings, spacing problems from last big ICMP socket change.

This commit is contained in:
Gregory Nutt 2017-10-23 14:27:31 -06:00
parent 2c8708c332
commit bad3379bc4
4 changed files with 20 additions and 16 deletions

View File

@ -42,12 +42,11 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <queue.h>
#include <assert.h>
#include <sys/types.h>
#include <nuttx/mm/iob.h>
#include <nuttx/net/ip.h>
#include <nuttx/net/netdev.h>
@ -256,9 +255,13 @@ void icmp_poll(FAR struct net_driver_s *dev);
* Name: icmp_sendto
*
* Description:
* Implements the sendto() operation for the case of the raw packet socket.
* Implements the sendto() operation for the case of the IPPROTO_ICMP
* socket. The 'buf' parameter points to a block of memory that includes
* an ICMP request header, followed by any payload that accompanies the
* request. The 'len' parameter includes both the size of the ICMP header
* and the following payload.
*
* Parameters:
* Input Parameters:
* psock A pointer to a NuttX-specific, internal socket structure
* buf Data to send
* len Length of data to send
@ -284,7 +287,7 @@ ssize_t icmp_sendto(FAR struct socket *psock, FAR const void *buf, size_t len,
* Description:
* Implements the socket recvfrom interface for the case of the AF_INET
* data gram socket with the IPPROTO_ICMP protocol. icmp_recvfrom()
* receives ICMP ECHO replies for the a socket.
* receives ICMP ECHO replies for the a socket.
*
* If 'from' is not NULL, and the underlying protocol provides the source
* address, this source address is filled in. The argument 'fromlen' is

View File

@ -380,7 +380,7 @@ out:
* Description:
* Implements the socket recvfrom interface for the case of the AF_INET
* data gram socket with the IPPROTO_ICMP protocol. icmp_recvfrom()
* receives ICMP ECHO replies for the a socket.
* receives ICMP ECHO replies for the a socket.
*
* If 'from' is not NULL, and the underlying protocol provides the source
* address, this source address is filled in. The argument 'fromlen' is

View File

@ -349,13 +349,13 @@ end_wait:
* Name: icmp_sendto
*
* Description:
* Implements the sendto() operation for the case of the raw packet socket.
* The 'buf' parameter points to a block of memory that includes an ICMP
* request header, followed by any payload that accompanies the request.
* The 'len' parameter includes both the size of the ICMP header and the
* followign payload.
* Implements the sendto() operation for the case of the IPPROTO_ICMP
* socket. The 'buf' parameter points to a block of memory that includes
* an ICMP request header, followed by any payload that accompanies the
* request. The 'len' parameter includes both the size of the ICMP header
* and the following payload.
*
* Parameters:
* Input Parameters:
* psock A pointer to a NuttX-specific, internal socket structure
* buf Data to send
* len Length of data to send

View File

@ -69,8 +69,9 @@ static int icmp_getsockname(FAR struct socket *psock,
static int icmp_listen(FAR struct socket *psock, int backlog);
static int icmp_connect(FAR struct socket *psock,
FAR const struct sockaddr *addr, socklen_t addrlen);
static int icmp_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
FAR socklen_t *addrlen, FAR struct socket *newsock);
static int icmp_accept(FAR struct socket *psock,
FAR struct sockaddr *addr, FAR socklen_t *addrlen,
FAR struct socket *newsock);
#ifndef CONFIG_DISABLE_POLL
static int icmp_netpoll(FAR struct socket *psock,
FAR struct pollfd *fds, bool setup);
@ -134,7 +135,7 @@ static int icmp_setup(FAR struct socket *psock, int protocol)
if (psock->s_type == SOCK_DGRAM && protocol == IPPROTO_ICMP)
{
/* Allocate the IPPROTO_ICMP socket connection structure and save in\
/* Allocate the IPPROTO_ICMP socket connection structure and save in
* the new socket instance.
*/
@ -493,7 +494,7 @@ static int icmp_close(FAR struct socket *psock)
if (conn->crefs <= 1)
{
/* Yes... free an read-ahead data */
/* Yes... free any read-ahead data */
iob_free_queue(&conn->readahead);