net/: Correct some comments.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
parent
154949403c
commit
6385408483
@ -177,8 +177,8 @@ static int bluetooth_sockif_alloc(FAR struct socket *psock)
|
||||
static int bluetooth_setup(FAR struct socket *psock, int protocol)
|
||||
{
|
||||
/* Allocate the appropriate connection structure. This reserves the
|
||||
* the connection structure is is unallocated at this point. It will
|
||||
* not actually be initialized until the socket is connected.
|
||||
* connection structure, it is unallocated at this point. It will not
|
||||
* actually be initialized until the socket is connected.
|
||||
*
|
||||
* Only SOCK_RAW is supported
|
||||
*/
|
||||
|
@ -189,7 +189,7 @@ static uint16_t can_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
* Input Parameters:
|
||||
* psock - A pointer to a user allocated socket structure to be
|
||||
* initialized.
|
||||
* protocol - NetLink socket protocol (see sys/socket.h)
|
||||
* protocol - CAN socket protocol (see sys/socket.h)
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. Otherwise, a negated errno value is
|
||||
@ -226,7 +226,7 @@ static int can_setup(FAR struct socket *psock, int protocol)
|
||||
|
||||
if (domain == PF_CAN && (type == SOCK_RAW || type == SOCK_DGRAM))
|
||||
{
|
||||
/* Allocate the NetLink socket connection structure and save it in the
|
||||
/* Allocate the CAN socket connection structure and save it in the
|
||||
* new socket instance.
|
||||
*/
|
||||
|
||||
@ -322,7 +322,7 @@ static void can_addref(FAR struct socket *psock)
|
||||
* space (address family) but has no name assigned.
|
||||
*
|
||||
* Input Parameters:
|
||||
* conn NetLink socket connection structure
|
||||
* conn CAN socket connection structure
|
||||
* addr Socket local address
|
||||
* addrlen Length of 'addr'
|
||||
*
|
||||
@ -384,7 +384,7 @@ static int can_bind(FAR struct socket *psock,
|
||||
* the object pointed to by address is unspecified.
|
||||
*
|
||||
* Input Parameters:
|
||||
* conn NetLink socket connection structure
|
||||
* conn CAN socket connection structure
|
||||
* addr sockaddr structure to receive data [out]
|
||||
* addrlen Length of sockaddr structure [in/out]
|
||||
*
|
||||
@ -801,7 +801,7 @@ static ssize_t can_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
* Name: can_close
|
||||
*
|
||||
* Description:
|
||||
* Performs the close operation on a NetLink socket instance
|
||||
* Performs the close operation on a CAN socket instance
|
||||
*
|
||||
* Input Parameters:
|
||||
* psock Socket instance
|
||||
|
@ -240,7 +240,7 @@ static int devif_poll_pkt_connections(FAR struct net_driver_s *dev,
|
||||
#endif /* CONFIG_NET_PKT */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_poll_pkt_connections
|
||||
* Name: devif_poll_can_connections
|
||||
*
|
||||
* Description:
|
||||
* Poll all packet connections for available packets to send.
|
||||
@ -705,7 +705,7 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
|
||||
#endif
|
||||
#ifdef CONFIG_NET_CAN
|
||||
{
|
||||
/* Check for pending packet socket transfer */
|
||||
/* Check for pending CAN socket transfer */
|
||||
|
||||
bstop = devif_poll_can_connections(dev, callback);
|
||||
}
|
||||
|
@ -178,8 +178,8 @@ static int ieee802154_sockif_alloc(FAR struct socket *psock)
|
||||
static int ieee802154_setup(FAR struct socket *psock, int protocol)
|
||||
{
|
||||
/* Allocate the appropriate connection structure. This reserves the
|
||||
* the connection structure is is unallocated at this point. It will
|
||||
* not actually be initialized until the socket is connected.
|
||||
* connection structure, it is unallocated at this point. It will not
|
||||
* actually be initialized until the socket is connected.
|
||||
*
|
||||
* Only SOCK_DGRAM is supported (since the MAC header is stripped)
|
||||
*/
|
||||
|
@ -178,8 +178,8 @@ static int local_sockif_alloc(FAR struct socket *psock)
|
||||
static int local_setup(FAR struct socket *psock, int protocol)
|
||||
{
|
||||
/* Allocate the appropriate connection structure. This reserves the
|
||||
* the connection structure is is unallocated at this point. It will
|
||||
* not actually be initialized until the socket is connected.
|
||||
* connection structure, it is unallocated at this point. It will not
|
||||
* actually be initialized until the socket is connected.
|
||||
*
|
||||
* REVIST: Only SOCK_STREAM and SOCK_DGRAM are supported. Should also
|
||||
* support SOCK_RAW.
|
||||
|
@ -163,7 +163,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
*
|
||||
* Returned Value:
|
||||
* On success, returns the number of characters sent. On error,
|
||||
* a negated errno value is retruend. See send() for the complete list
|
||||
* a negated errno value is returned. See send() for the complete list
|
||||
* of return values.
|
||||
*
|
||||
****************************************************************************/
|
||||
@ -192,7 +192,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf,
|
||||
|
||||
/* Perform the send operation */
|
||||
|
||||
/* Initialize the state structure. This is done with the network locked
|
||||
/* Initialize the state structure. This is done with the network locked
|
||||
* because we don't want anything to happen until we are ready.
|
||||
*/
|
||||
|
||||
@ -244,7 +244,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf,
|
||||
nxsem_destroy(&state.snd_sem);
|
||||
net_unlock();
|
||||
|
||||
/* Check for a errors, Errors are signalled by negative errno values
|
||||
/* Check for errors. Errors are signalled by negative errno values
|
||||
* for the send length
|
||||
*/
|
||||
|
||||
|
@ -176,8 +176,8 @@ static int pkt_sockif_alloc(FAR struct socket *psock)
|
||||
static int pkt_setup(FAR struct socket *psock, int protocol)
|
||||
{
|
||||
/* Allocate the appropriate connection structure. This reserves the
|
||||
* the connection structure is is unallocated at this point. It will
|
||||
* not actually be initialized until the socket is connected.
|
||||
* connection structure, it is unallocated at this point. It will not
|
||||
* actually be initialized until the socket is connected.
|
||||
*
|
||||
* Only SOCK_RAW is supported.
|
||||
*/
|
||||
@ -361,14 +361,14 @@ static int pkt_bind(FAR struct socket *psock,
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
/* Bind a raw socket to an network device. */
|
||||
/* Bind a raw socket to a network device. */
|
||||
|
||||
if (psock->s_type == SOCK_RAW)
|
||||
{
|
||||
FAR struct pkt_conn_s *conn = (FAR struct pkt_conn_s *)psock->s_conn;
|
||||
FAR struct net_driver_s *dev;
|
||||
|
||||
/* Look at the addr and identify network interface */
|
||||
/* Look at the addr and identify the network interface */
|
||||
|
||||
ifindex = ((FAR struct sockaddr_ll *)addr)->sll_ifindex;
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
* Name: chksum
|
||||
*
|
||||
* Description:
|
||||
* Calculate the raw change some over the memory region described by
|
||||
* Calculate the raw change sum over the memory region described by
|
||||
* data and len.
|
||||
*
|
||||
* Input Parameters:
|
||||
@ -124,7 +124,8 @@ uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len)
|
||||
*
|
||||
* buf - A pointer to the buffer over which the checksum is to be computed.
|
||||
*
|
||||
* len - The length of the buffer over which the checksum is to be computed.
|
||||
* len - The length of the buffer over which the checksum is to be
|
||||
* computed.
|
||||
*
|
||||
* Returned Value:
|
||||
* The Internet checksum of the buffer.
|
||||
|
@ -394,11 +394,11 @@ int net_restorelock(unsigned int count)
|
||||
* Name: net_timedwait
|
||||
*
|
||||
* Description:
|
||||
* Atomically wait for sem (or a timeout( while temporarily releasing
|
||||
* Atomically wait for sem (or a timeout) while temporarily releasing
|
||||
* the lock on the network.
|
||||
*
|
||||
* Caution should be utilized. Because the network lock is relinquished
|
||||
* during the wait, there could changes in the network state that occur
|
||||
* during the wait, there could be changes in the network state that occur
|
||||
* before the lock is recovered. Your design should account for this
|
||||
* possibility.
|
||||
*
|
||||
@ -424,7 +424,7 @@ int net_timedwait(sem_t *sem, unsigned int timeout)
|
||||
* Atomically wait for sem while temporarily releasing the network lock.
|
||||
*
|
||||
* Caution should be utilized. Because the network lock is relinquished
|
||||
* during the wait, there could changes in the network state that occur
|
||||
* during the wait, there could be changes in the network state that occur
|
||||
* before the lock is recovered. Your design should account for this
|
||||
* possibility.
|
||||
*
|
||||
@ -493,7 +493,7 @@ int net_lockedwait_uninterruptible(sem_t *sem)
|
||||
* for the IOB while temporarily releasing the lock on the network.
|
||||
*
|
||||
* Caution should be utilized. Because the network lock is relinquished
|
||||
* during the wait, there could changes in the network state that occur
|
||||
* during the wait, there could be changes in the network state that occur
|
||||
* before the lock is recovered. Your design should account for this
|
||||
* possibility.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user