Lines Matching refs:sd

33 #define SD_TO_OBJ(sd) ((void *)(sd + 1))  argument
250 int sd; in simplelink_socket() local
279 sd = sl_Socket(family, type, sl_proto); in simplelink_socket()
280 if (sd >= 0) { in simplelink_socket()
286 retval = sl_SetSockOpt(sd, SL_SOL_SOCKET, in simplelink_socket()
291 (void)sl_Close(sd); in simplelink_socket()
297 retval = sd; in simplelink_socket()
309 int sd = OBJ_TO_SD(obj); in simplelink_close() local
312 retval = sl_Close(sd); in simplelink_close()
419 int sd = OBJ_TO_SD(obj); in simplelink_accept() local
439 retval = sl_Accept(sd, sl_addr, &sl_addrlen); in simplelink_accept()
458 int sd = OBJ_TO_SD(obj); in simplelink_bind() local
479 retval = sl_Bind(sd, sl_addr, sl_addrlen); in simplelink_bind()
491 int sd = OBJ_TO_SD(obj); in simplelink_listen() local
494 retval = (int)sl_Listen(sd, backlog); in simplelink_listen()
506 int sd = OBJ_TO_SD(obj); in simplelink_connect() local
524 retval = sl_Connect(sd, sl_addr, sl_addrlen); in simplelink_connect()
565 int i, retval, sd; in simplelink_poll() local
597 sd = OBJ_TO_SD(obj); in simplelink_poll()
605 SL_SOCKET_FD_SET(sd, &rfds); in simplelink_poll()
608 SL_SOCKET_FD_SET(sd, &wfds); in simplelink_poll()
610 if (sd > max_sd) { in simplelink_poll()
611 max_sd = sd; in simplelink_poll()
625 sd = OBJ_TO_SD(obj); in simplelink_poll()
626 if (SL_SOCKET_FD_ISSET(sd, &rfds)) { in simplelink_poll()
629 if (SL_SOCKET_FD_ISSET(sd, &wfds)) { in simplelink_poll()
650 static int map_credentials(int sd, const void *optval, socklen_t optlen) in map_credentials() argument
691 retval = sl_SetSockOpt(sd, SL_SOL_SOCKET, opt, in map_credentials()
706 static int map_credentials(int sd, const void *optval, socklen_t optlen) in map_credentials() argument
718 int sd = OBJ_TO_SD(obj); in simplelink_setsockopt() local
726 retval = map_credentials(sd, optval, optlen); in simplelink_setsockopt()
733 retval = sl_SetSockOpt(sd, SL_SOL_SOCKET, in simplelink_setsockopt()
797 retval = sl_SetSockOpt(sd, SL_SOL_SOCKET, optname, optval, in simplelink_setsockopt()
812 int sd = OBJ_TO_SD(obj); in simplelink_getsockopt() local
853 retval = sl_GetSockOpt(sd, SL_SOL_SOCKET, optname, optval, in simplelink_getsockopt()
870 static int handle_recv_flags(int sd, int flags, bool set, int *nb_enabled) in handle_recv_flags() argument
881 sl_GetSockOpt(sd, SL_SOL_SOCKET, SL_SO_NONBLOCKING, in handle_recv_flags()
888 sl_SetSockOpt(sd, SL_SOL_SOCKET, in handle_recv_flags()
896 sl_SetSockOpt(sd, SL_SOL_SOCKET, SL_SO_NONBLOCKING, in handle_recv_flags()
908 int sd = OBJ_TO_SD(obj); in simplelink_recvfrom() local
916 retval = handle_recv_flags(sd, flags, TRUE, &nb_enabled); in simplelink_recvfrom()
925 retval = (ssize_t)sl_RecvFrom(sd, buf, len, 0, sl_addr, in simplelink_recvfrom()
928 retval = (ssize_t)sl_Recv(sd, buf, len, 0); in simplelink_recvfrom()
931 handle_recv_flags(sd, flags, FALSE, &nb_enabled); in simplelink_recvfrom()
955 int sd = OBJ_TO_SD(obj); in simplelink_sendto() local
972 retval = sl_SendTo(sd, buf, (uint16_t)len, flags, in simplelink_sendto()
975 retval = (ssize_t)sl_Send(sd, buf, len, flags); in simplelink_sendto()
1139 static int simplelink_fcntl(int sd, int cmd, va_list args) in simplelink_fcntl() argument
1147 retval = sl_GetSockOpt(sd, SL_SOL_SOCKET, SL_SO_NONBLOCKING, in simplelink_fcntl()
1161 retval = sl_SetSockOpt(sd, SL_SOL_SOCKET, SL_SO_NONBLOCKING, in simplelink_fcntl()
1180 int sd = OBJ_TO_SD(obj); in simplelink_ioctl() local
1205 return simplelink_fcntl(sd, request, args); in simplelink_ioctl()