Lines Matching refs:sd
297 struct socket_data *sd; in winc1500_get() local
316 sd = &w1500_data.socket_data[sock]; in winc1500_get()
318 k_sem_init(&sd->wait_sem, 0, 1); in winc1500_get()
320 sd->context = *context; in winc1500_get()
591 struct socket_data *sd = &w1500_data.socket_data[sock]; in winc1500_put() local
598 net_pkt_unref(sd->rx_pkt); in winc1500_put()
600 memset(sd, 0, sizeof(struct socket_data)); in winc1500_put()
780 static void handle_socket_msg_connect(struct socket_data *sd, void *pvMsg) in handle_socket_msg_connect() argument
788 net_context_set_state(sd->context, NET_CONTEXT_CONNECTED); in handle_socket_msg_connect()
791 if (sd->connect_cb) { in handle_socket_msg_connect()
792 sd->connect_cb(sd->context, in handle_socket_msg_connect()
794 sd->connect_user_data); in handle_socket_msg_connect()
797 sd->ret_code = strConnMsg->s8Error; in handle_socket_msg_connect()
802 struct socket_data *sd, void *pvMsg) in handle_socket_msg_recv() argument
807 net_buf_add(sd->pkt_buf, pstrRx->s16BufferSize); in handle_socket_msg_recv()
808 net_pkt_cursor_init(sd->rx_pkt); in handle_socket_msg_recv()
810 if (sd->recv_cb) { in handle_socket_msg_recv()
811 sd->recv_cb(sd->context, in handle_socket_msg_recv()
812 sd->rx_pkt, in handle_socket_msg_recv()
815 sd->recv_user_data); in handle_socket_msg_recv()
819 net_pkt_unref(sd->rx_pkt); in handle_socket_msg_recv()
826 static void handle_socket_msg_bind(struct socket_data *sd, void *pvMsg) in handle_socket_msg_bind() argument
838 sd->ret_code = bind_msg->status; in handle_socket_msg_bind()
842 static void handle_socket_msg_listen(struct socket_data *sd, void *pvMsg) in handle_socket_msg_listen() argument
854 sd->ret_code = listen_msg->status; in handle_socket_msg_listen()
858 static void handle_socket_msg_accept(struct socket_data *sd, void *pvMsg) in handle_socket_msg_accept() argument
880 sd->ret_code = accept_msg->sock; in handle_socket_msg_accept()
883 if (sd->accept_cb) { in handle_socket_msg_accept()
889 memcpy(a_sd, sd, sizeof(struct socket_data)); in handle_socket_msg_accept()
905 a_sd->context->iface = sd->context->iface; in handle_socket_msg_accept()
915 sd->accept_cb(a_sd->context, in handle_socket_msg_accept()
920 sd->accept_user_data); in handle_socket_msg_accept()
926 struct socket_data *sd = &w1500_data.socket_data[sock]; in winc1500_socket_cb() local
933 sd->ret_code = 0; in winc1500_socket_cb()
937 handle_socket_msg_connect(sd, pvMsg); in winc1500_socket_cb()
938 k_sem_give(&sd->wait_sem); in winc1500_socket_cb()
944 if (!handle_socket_msg_recv(sock, sd, pvMsg)) { in winc1500_socket_cb()
950 handle_socket_msg_bind(sd, pvMsg); in winc1500_socket_cb()
951 k_sem_give(&sd->wait_sem); in winc1500_socket_cb()
955 handle_socket_msg_listen(sd, pvMsg); in winc1500_socket_cb()
956 k_sem_give(&sd->wait_sem); in winc1500_socket_cb()
960 handle_socket_msg_accept(sd, pvMsg); in winc1500_socket_cb()