diff --git a/net/icmp/icmp.h b/net/icmp/icmp.h index 3ea753b9e35..a7c734caa8a 100644 --- a/net/icmp/icmp.h +++ b/net/icmp/icmp.h @@ -42,12 +42,11 @@ #include +#include #include #include #include -#include - #include #include #include @@ -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 diff --git a/net/icmp/icmp_recvfrom.c b/net/icmp/icmp_recvfrom.c index 381a764d656..0559f37cf48 100644 --- a/net/icmp/icmp_recvfrom.c +++ b/net/icmp/icmp_recvfrom.c @@ -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 diff --git a/net/icmp/icmp_sendto.c b/net/icmp/icmp_sendto.c index 11e10b26c10..951d7e66663 100644 --- a/net/icmp/icmp_sendto.c +++ b/net/icmp/icmp_sendto.c @@ -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 diff --git a/net/icmp/icmp_sockif.c b/net/icmp/icmp_sockif.c index 7182eb4d45b..61124919596 100644 --- a/net/icmp/icmp_sockif.c +++ b/net/icmp/icmp_sockif.c @@ -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);