Lines Matching refs:ret

89 	int ret;  in get_context()  local
95 ret = net_context_get(AF_INET6, SOCK_DGRAM, IPPROTO_UDP, udp_recv6); in get_context()
96 if (ret < 0) { in get_context()
97 LOG_ERR("Cannot get network context for IPv6 UDP (%d)", ret); in get_context()
101 ret = net_context_bind(*udp_recv6, (struct sockaddr *)&my_addr6, in get_context()
103 if (ret < 0) { in get_context()
105 ntohs(my_addr6.sin6_port), ret); in get_context()
109 ret = net_context_get(AF_INET6, SOCK_STREAM, IPPROTO_TCP, tcp_recv6); in get_context()
110 if (ret < 0) { in get_context()
111 LOG_ERR("Cannot get network context for IPv6 TCP (%d)", ret); in get_context()
117 ret = net_context_bind(*tcp_recv6, (struct sockaddr *)&my_addr6, in get_context()
119 if (ret < 0) { in get_context()
121 ntohs(my_addr6.sin6_port), ret); in get_context()
125 ret = net_context_listen(*tcp_recv6, 0); in get_context()
126 if (ret < 0) { in get_context()
127 LOG_ERR("Cannot listen IPv6 TCP (%d)", ret); in get_context()
139 int ret; in build_reply() local
143 ret = net_pkt_read(pkt, buf, reply_len); in build_reply()
144 if (ret < 0) { in build_reply()
145 LOG_ERR("cannot read packet: %d", ret); in build_reply()
146 return ret; in build_reply()
185 int ret; in udp_received() local
192 ret = build_reply(dbg, pkt, buf_tx); in udp_received()
193 if (ret < 0) { in udp_received()
194 LOG_ERR("Cannot send data to peer (%d)", ret); in udp_received()
200 ret = net_context_sendto(context, buf_tx, ret, &dst_addr, in udp_received()
205 if (ret < 0) { in udp_received()
206 LOG_ERR("Cannot send data to peer (%d)", ret); in udp_received()
212 int ret; in setup_udp_recv() local
214 ret = net_context_recv(udp_recv6, udp_received, K_NO_WAIT, NULL); in setup_udp_recv()
215 if (ret < 0) { in setup_udp_recv()
229 int ret; in tcp_received() local
241 ret = build_reply(dbg, pkt, buf_tx); in tcp_received()
242 if (ret < 0) { in tcp_received()
243 LOG_ERR("Cannot send data to peer (%d)", ret); in tcp_received()
249 ret = net_context_send(context, buf_tx, ret, pkt_sent, in tcp_received()
251 if (ret < 0) { in tcp_received()
252 LOG_ERR("Cannot send data to peer (%d)", ret); in tcp_received()
263 int ret; in tcp_accepted() local
269 ret = net_context_recv(context, tcp_received, K_NO_WAIT, NULL); in tcp_accepted()
270 if (ret < 0) { in tcp_accepted()
278 int ret; in setup_tcp_accept() local
280 ret = net_context_accept(tcp_recv6, tcp_accepted, K_NO_WAIT, NULL); in setup_tcp_accept()
281 if (ret < 0) { in setup_tcp_accept()
282 LOG_ERR("Cannot receive IPv6 TCP packets (%d)", ret); in setup_tcp_accept()