Lines Matching full:socket
216 /* Define the number of IPv4 multicast memberships, default is one per socket */
223 a socket is closed */
225 /** the socket */
242 a socket is closed */
244 /** the socket */
344 /* prevent new usage of this socket if free is pending */ in sock_inc_used()
371 /* In full-duplex mode,sock->fd_used != 0 prevents a socket descriptor from being
390 /* free the socket */ in done_socket()
409 /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
427 /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
456 * @param fd externally used socket index
457 * @return struct lwip_sock for the socket or NULL if not found
475 * @param fd externally used socket index
476 * @return struct lwip_sock for the socket or NULL if not found
492 * Map a externally used socket index to the internal socket representation.
494 * @param fd externally used socket index
495 * @return struct lwip_sock for the socket or NULL if not found
512 * Allocate a new socket for a given netconn.
514 * @param newconn the netconn for which to allocate a socket
515 * @param accepted 1 if socket has been created by accept(),
516 * 0 if socket has been created by socket()
517 * @return the index of the new socket; -1 on error
526 /* allocate a new socket identifier */ in alloc_socket()
528 /* Protect socket array */ in alloc_socket()
540 /* The socket is not yet known to anyone, so no need to protect in alloc_socket()
547 /* TCP sendbuf is empty, but the socket is not yet writable until connected in alloc_socket()
562 /** Free a socket (under lock)
564 * @param sock the socket to free
591 /** Free a socket's leftover members.
609 /** Free a socket. The socket's netconn must have been
612 * @param sock the socket to free
623 /* Protect socket array */ in free_socket()
635 /* Below this, the well-known socket functions are implemented.
682 …LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LW… in lwip_accept()
686 * though the server task might not have created a new socket yet. in lwip_accept()
687 * In that case, newconn->socket is counted down (newconn->socket--), in lwip_accept()
691 recvevent = (s16_t)(-1 - newconn->socket); in lwip_accept()
692 newconn->socket = newsock; in lwip_accept()
753 /* sockaddr does not match socket type (IPv4/IPv6) */ in lwip_bind()
846 /* sockaddr does not match socket type (IPv4/IPv6) */ in lwip_connect()
895 * Set a socket into listen mode.
896 * The socket may not have been used for another connection previously.
898 * @param s the socket to set to listening mode
948 LWIP_ASSERT("no socket given", sock != NULL); in lwip_recv_tcp()
1076 /* Helper function to get a tcp socket's remote address info */
1363 /* reset socket error since we have received something */ in lwip_recvmsg()
1366 /* " If the socket is connected, the msg_name and msg_namelen members shall be ignored." */ in lwip_recvmsg()
1760 conn->socket = i; in lwip_socket()
1843 * Go through the readset and writeset lists and see which socket of the sockets
1847 * @param maxfdp1 the highest socket index in the sets
1869 /* Go through each socket in each list to count number of sockets which in lwip_selscan()
1878 /* First get the socket's status (protected)... */ in lwip_selscan()
1889 /* See if netconn of this socket is ready for read */ in lwip_selscan()
1895 /* See if netconn of this socket is ready for write */ in lwip_selscan()
1901 /* See if netconn of this socket had an error */ in lwip_selscan()
1910 /* no a valid open socket */ in lwip_selscan()
1941 /* leave the socket used until released by lwip_select_dec_sockets_used */ in lwip_select_inc_sockets_used_set()
1973 LWIP_ASSERT("socket gone at the end of select", sock != NULL); in lwip_select_dec_sockets_used()
2015 /* Go through each socket in each list to count number of sockets which in lwip_select()
2060 /* Increase select_waiting for each socket we are interested in */ in lwip_select()
2084 /* Not a valid socket */ in lwip_select()
2120 /* Decrease select_waiting for each socket we are interested in */ in lwip_select()
2138 /* Not a valid socket */ in lwip_select()
2158 /* This happens when a socket got closed while waiting */ in lwip_select()
2230 if another thread has since opened a new socket with that fd, in lwip_pollscan()
2231 we must not use that socket. */ in lwip_pollscan()
2233 /* First get the socket's status (protected)... */ in lwip_pollscan()
2263 /* See if netconn of this socket is ready for read */ in lwip_pollscan()
2268 /* See if netconn of this socket is ready for write */ in lwip_pollscan()
2273 /* See if netconn of this socket had an error */ in lwip_pollscan()
2280 /* Not a valid socket */ in lwip_pollscan()
2329 LWIP_ASSERT("socket gone at the end of select", sock != NULL); in lwip_poll_dec_sockets_used()
2399 /* Increase select_waiting for each socket we are interested in. in lwip_poll()
2420 /* Decrease select_waiting for each socket we are interested in, in lwip_poll()
2437 /* This happens when a socket got closed while waiting */ in lwip_poll()
2488 * Callback registered in the netconn layer for each socket-netconn.
2508 /* Get socket */ in event_callback()
2510 s = conn->socket; in event_callback()
2513 * the server task might not have created a new socket yet. in event_callback()
2516 * can happen before the new socket is set up. */ in event_callback()
2518 if (conn->socket < 0) { in event_callback()
2520 /* conn->socket is -1 on initialization in event_callback()
2521 lwip_accept adjusts sock->recvevent if conn->socket < -1 */ in event_callback()
2522 conn->socket--; in event_callback()
2527 s = conn->socket; in event_callback()
2578 /* Check any select calls waiting on this socket */ in event_callback()
2587 * Check if any select waiters are waiting on this socket and its events
2629 /* Test this select call for our socket */ in select_check_waiters()
2885 * We should not rely on #defines in socket.h in lwip_sockopt_to_ipopt()
2896 LWIP_ASSERT("Unknown socket option", 0); in lwip_sockopt_to_ipopt()
2972 default: /* unrecognized socket type */ in lwip_getsockopt_impl()
2975 … ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", in lwip_getsockopt_impl()
3170 /* If this is no UDP lite socket, ignore any options. */ in lwip_getsockopt_impl()
3538 /* If this is a TCP or a RAW socket, ignore these options. */ in lwip_setsockopt_impl()
3640 /* If this is a TCP or a RAW socket, ignore these options. */ in lwip_setsockopt_impl()
3686 /* If this is no UDP lite socket, ignore any options. */ in lwip_setsockopt_impl()
3808 /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ in lwip_ioctl()
4005 /** Register a new IGMP membership. On socket close, the membership is dropped automatically.
4035 * on socket close.
4062 /** Drop all memberships of a socket that were not dropped explicitly via setsockopt.
4093 /** Register a new MLD6 membership. On socket close, the membership is dropped automatically.
4123 * on socket close.
4150 /** Drop all MLD6 memberships of a socket that were not dropped explicitly via setsockopt.