• Home
  • Raw
  • Download

Lines Matching refs:sock

67      struct lwip_sock *sock = get_socket_without_errno(s);
69 - if (!!sock && !!sock->epoll_data) {
73 - posix_api->epoll_ctl_fn(sock->epoll_data->fd, EPOLL_CTL_DEL, s, &ee);
74 + if (!!sock) {
124 @@ -714,13 +704,6 @@ free_socket(struct lwip_sock *sock, int is_tcp)
129 - sock->epoll = LIBOS_EPOLLNONE;
130 - sock->events = 0;
131 - sock->epoll_data = NULL;
132 - list_del_node_null(&sock->list);
135 freed = free_socket_locked(sock, is_tcp, &conn, &lastdata);
137 /* don't use 'sock' after this line, as another task might have allocated it */
145 - sock = posix_api->get_socket(s);
147 - if (!sock) {
152 - if (!CONN_TYPE_HAS_LIBOS_AND_HOST(sock->conn)) {
166 sock = get_socket(s);
167 if (!sock) {
173 err = netconn_accept(sock->conn, &newconn);
175 sock_set_errno(sock, err_to_errno(err));
177 done_socket(sock);
189 - sock = posix_api->get_socket(s);
191 - if (!sock) {
195 - if (!CONN_TYPE_HAS_LIBOS_AND_HOST(sock->conn)) {
202 sock = get_socket(s);
203 if (!sock) {
208 if (!SOCK_ADDR_TYPE_MATCH(name, sock)) {
230 struct lwip_sock *sock;
248 - sock = posix_api->get_socket(s);
250 - if (!sock) {
254 sock = get_socket(s);
255 if (!sock) {
260 if (sock->conn != NULL) {
261 is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP;
264 free_socket(sock, is_tcp);
272 struct lwip_sock *sock;
278 - sock = posix_api->get_socket(s);
279 - if (!sock) {
284 - ADD_CONN_TYPE_INPRG(sock->conn);
287 - SET_CONN_TYPE_HOST(sock->conn);
292 sock = get_socket(s);
293 if (!sock) {
298 if (!SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock)) {
307 - sock = posix_api->get_socket(s);
309 - if (!sock) {
313 - if (!CONN_TYPE_HAS_LIBOS_AND_HOST(sock->conn)) {
322 sock = get_socket(s);
323 if (!sock) {
331 lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags)
343 LWIP_ASSERT("no socket given", sock != NULL);
344 …LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NE…
345 @@ -1173,6 +1050,7 @@ lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags)
353 @@ -1182,13 +1060,6 @@ lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags)
355 if (sock->lastdata.pbuf) {
356 p = sock->lastdata.pbuf;
358 - if (((flags & MSG_PEEK) == 0) && ((sock->epoll & EPOLLET) == 0)) {
359 - if ((NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP)) {
360 - del_epoll_event(sock->conn, EPOLLIN);
367 @@ -1258,23 +1129,21 @@ lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags)
378 + recvd = read_lwip_data(sock, flags, apiflags);
386 netconn_tcp_recvd(sock->conn, (size_t)recvd);
391 - if (((NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP)) && sock->lastdata.pbuf) {
392 - add_epoll_event(sock->conn, EPOLLIN);
397 sock_set_errno(sock, 0);
400 @@ -1461,37 +1330,6 @@ lwip_recvfrom_udp_raw(struct lwip_sock *sock, int flags, struct msghdr *msg,…
407 - struct lwip_sock *sock;
409 - sock = posix_api->get_socket(s);
411 - if (!sock) {
415 - if (CONN_TYPE_HAS_INPRG(sock->conn)) {
421 - if (CONN_TYPE_IS_HOST(sock->conn)) {
425 - if (!CONN_TYPE_IS_LIBOS(sock->conn)) {
426 - LWIP_DEBUGF(SOCKETS_DEBUG, ("conn->type is not libos bit type=%x", netconn_type(sock->conn)));
439 struct lwip_sock *sock;
452 sock = get_socket(s);
453 if (!sock) {
498 sock = get_socket(s);
499 if (!sock) {
514 sock = get_socket(s);
515 if (!sock) {
548 - if (sock->epoll & EPOLLET) {
549 - list_del_node_null(&sock->list);
559 sock->rcvevent--;
562 - if ((sock->epoll & EPOLLET) == 0) {
568 if (sock->sendevent) {
571 sock->sendevent = 1;
573 - if (sock->epoll & EPOLLET) {
574 - list_del_node_null(&sock->list);
580 sock->sendevent = 0;
583 - if ((sock->epoll & EPOLLET) == 0) {
589 sock->errevent = 1;
591 - if (sock->epoll & EPOLLET) {
592 - list_del_node_null(&sock->list);
602 - struct lwip_sock *sock;
604 - sock = posix_api->get_socket(s);
605 - if (!sock) {
611 - if (CONN_TYPE_HAS_HOST(sock->conn)) {
623 - struct lwip_sock *sock;
625 - sock = posix_api->get_socket(s);
626 - if (!sock) {
631 - if (CONN_TYPE_HAS_HOST(sock->conn)) {
644 - struct lwip_sock *sock = posix_api->get_socket(s);
646 - if (!sock) {
650 - if (CONN_TYPE_HAS_HOST(sock->conn)) {
654 struct lwip_sock *sock = get_socket(s);
656 if (!sock) {
662 sock_set_errno(sock, EFAULT);
668 - struct lwip_sock *sock = posix_api->get_socket(s);
670 - if (!sock) {
674 - if (CONN_TYPE_HAS_HOST(sock->conn)) {
680 struct lwip_sock *sock = get_socket(s);
682 if (!sock) {
688 sock_set_errno(sock, EFAULT);
696 - struct lwip_sock *sock = posix_api->get_socket(s);
705 - if (!sock) {
708 - if (CONN_TYPE_HAS_HOST(sock->conn)) {
715 struct lwip_sock *sock = get_socket(s);
717 if (!sock) {
885 return sock;
889 +extern ssize_t read_lwip_data(struct lwip_sock *sock, int32_t flags, u8_t apiflags);