mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
net: nxstyle fixes
Nxstyle fixes to pass CI. Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
d0002b24c7
commit
7dc7ef45f1
+6
-4
@@ -86,7 +86,8 @@
|
||||
* Input Parameters:
|
||||
* psock Reference to the listening socket structure
|
||||
* addr Receives the address of the connecting client
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size
|
||||
* of 'addr'
|
||||
* newsock Location to return the accepted socket information.
|
||||
*
|
||||
* Returned Value:
|
||||
@@ -197,7 +198,8 @@ errout_with_lock:
|
||||
* Input Parameters:
|
||||
* sockfd The listening socket descriptor
|
||||
* addr Receives the address of the connecting client
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
|
||||
* addrlen Input: allocated size of 'addr',
|
||||
* Return: returned size of 'addr'
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns -1 on error. If it succeeds, it returns a non-negative integer
|
||||
@@ -252,8 +254,8 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen)
|
||||
if (psock == NULL || psock->s_crefs <= 0)
|
||||
{
|
||||
/* It is not a valid socket description. Distinguish between the cases
|
||||
* where sockfd is a just valid and when it is a valid file descriptor used
|
||||
* in the wrong context.
|
||||
* where sockfd is a just valid and when it is a valid file descriptor
|
||||
* used in the wrong context.
|
||||
*/
|
||||
|
||||
if ((unsigned int)sockfd < CONFIG_NFILE_DESCRIPTORS)
|
||||
|
||||
@@ -149,7 +149,8 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
|
||||
/* Let the address family's connect() method handle the operation */
|
||||
|
||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_connect != NULL);
|
||||
DEBUGASSERT(psock->s_sockif != NULL &&
|
||||
psock->s_sockif->si_connect != NULL);
|
||||
ret = psock->s_sockif->si_connect(psock, addr, addrlen);
|
||||
if (ret < 0)
|
||||
{
|
||||
@@ -172,9 +173,9 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
* Name: connect
|
||||
*
|
||||
* Description:
|
||||
* connect() connects the socket referred to by the file descriptor 'sockfd'
|
||||
* to the address specified by 'addr'. The addrlen argument specifies
|
||||
* the size of 'addr'. The format of the address in 'addr' is
|
||||
* connect() connects the socket referred to by the file descriptor
|
||||
* 'sockfd' to the address specified by 'addr'. The addrlen argument
|
||||
* specifies the size of 'addr'. The format of the address in 'addr' is
|
||||
* determined by the address space of the socket 'sockfd'.
|
||||
*
|
||||
* If the socket 'sockfd' is of type SOCK_DGRAM then 'addr' is the address
|
||||
|
||||
+4
-4
@@ -112,10 +112,10 @@ int psock_listen(FAR struct socket *psock, int backlog)
|
||||
*
|
||||
* Description:
|
||||
* To accept connections, a socket is first created with socket(), a
|
||||
* willingness to accept incoming connections and a queue limit for incoming
|
||||
* connections are specified with listen(), and then the connections are
|
||||
* accepted with accept(). The listen() call applies only to sockets of
|
||||
* type SOCK_STREAM or SOCK_SEQPACKET.
|
||||
* willingness to accept incoming connections and a queue limit for
|
||||
* incoming connections are specified with listen(), and then the
|
||||
* connections are accepted with accept(). The listen() call applies only
|
||||
* to sockets of type SOCK_STREAM or SOCK_SEQPACKET.
|
||||
*
|
||||
* Input Parameters:
|
||||
* sockfd Socket descriptor of the bound socket
|
||||
|
||||
@@ -124,7 +124,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
#if defined(NET_TCP_HAVE_STACK)
|
||||
case SOCK_STREAM:
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)psock->s_conn;
|
||||
FAR struct tcp_conn_s *conn =
|
||||
(FAR struct tcp_conn_s *)psock->s_conn;
|
||||
|
||||
/* For TCP, the MSS is a dynamic value that maintained in the
|
||||
* connection structure.
|
||||
@@ -138,7 +139,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
#if defined(NET_UDP_HAVE_STACK)
|
||||
case SOCK_DGRAM:
|
||||
{
|
||||
FAR struct udp_conn_s *conn = (FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct udp_conn_s *conn =
|
||||
(FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct net_driver_s *dev;
|
||||
uint16_t iplen;
|
||||
|
||||
@@ -146,8 +148,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
*
|
||||
* MSS = MTU - LL_HDRLEN - UDP_HDRLEN - IP_HDRLEN
|
||||
*
|
||||
* We need to have the device that services the connection in order
|
||||
* to get the MTU and LL_HDRLEN:
|
||||
* We need to have the device that services the connection in
|
||||
* order to get the MTU and LL_HDRLEN:
|
||||
*/
|
||||
|
||||
dev = udp_find_raddr_device(conn);
|
||||
|
||||
Reference in New Issue
Block a user