Home
last modified time | relevance | path

Searched refs:bind_addr (Results 1 – 11 of 11) sorted by relevance

/Zephyr-latest/samples/net/sockets/dumb_http_server/src/
Dsocket_dumb_http.c61 struct sockaddr_in bind_addr; in main() local
68 bind_addr.sin_family = AF_INET; in main()
69 bind_addr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
70 bind_addr.sin_port = htons(BIND_PORT); in main()
71 CHECK(bind(serv, (struct sockaddr *)&bind_addr, sizeof(bind_addr))); in main()
/Zephyr-latest/samples/subsys/modbus/tcp_gateway/src/
Dmain.c94 struct sockaddr_in bind_addr; in main() local
109 bind_addr.sin_family = AF_INET; in main()
110 bind_addr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
111 bind_addr.sin_port = htons(MODBUS_TCP_PORT); in main()
113 if (bind(serv, (struct sockaddr *)&bind_addr, sizeof(bind_addr)) < 0) { in main()
/Zephyr-latest/samples/net/sockets/echo/src/
Dsocket_echo.c32 struct sockaddr_in6 bind_addr = { in main() local
61 if (bind(serv, (struct sockaddr *)&bind_addr, sizeof(bind_addr)) < 0) { in main()
/Zephyr-latest/samples/subsys/modbus/tcp_server/src/
Dmain.c267 struct sockaddr_in bind_addr; in main() local
287 bind_addr.sin_family = AF_INET; in main()
288 bind_addr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
289 bind_addr.sin_port = htons(MODBUS_TCP_PORT); in main()
291 if (bind(serv, (struct sockaddr *)&bind_addr, sizeof(bind_addr)) < 0) { in main()
/Zephyr-latest/samples/net/sockets/echo_server/src/
Dudp.c36 static int start_udp_proto(struct data *data, struct sockaddr *bind_addr, in start_udp_proto() argument
43 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, in start_udp_proto()
46 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, IPPROTO_UDP); in start_udp_proto()
81 if (bind_addr->sa_family == AF_INET6) { in start_udp_proto()
97 ret = bind(data->udp.sock, bind_addr, bind_addrlen); in start_udp_proto()
Dtcp.c68 struct sockaddr *bind_addr, in start_tcp_proto() argument
75 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto()
78 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto()
104 if (bind_addr->sa_family == AF_INET6) { in start_tcp_proto()
120 ret = bind(data->tcp.sock, bind_addr, bind_addrlen); in start_tcp_proto()
/Zephyr-latest/samples/net/sockets/dumb_http_server_mt/src/
Dmain.c151 static int setup(int *sock, struct sockaddr *bind_addr, in setup() argument
157 *sock = socket(bind_addr->sa_family, SOCK_STREAM, IPPROTO_TLS_1_2); in setup()
159 *sock = socket(bind_addr->sa_family, SOCK_STREAM, IPPROTO_TCP); in setup()
179 ret = bind(*sock, bind_addr, bind_addrlen); in setup()
/Zephyr-latest/tests/net/socket/reuseaddr_reuseport/src/
Dmain.c449 struct sockaddr bind_addr; in test_reuseaddr_tcp_tcp_time_wait_common() local
455 prepare_sock_tcp(family, first_ip, LOCAL_PORT, &server_sock, &bind_addr); in test_reuseaddr_tcp_tcp_time_wait_common()
459 test_bind_success(server_sock, (struct sockaddr *) &bind_addr, sizeof(bind_addr)); in test_reuseaddr_tcp_tcp_time_wait_common()
480 prepare_sock_tcp(family, first_ip, LOCAL_PORT, &server_sock, &bind_addr); in test_reuseaddr_tcp_tcp_time_wait_common()
483 test_bind_fail(server_sock, (struct sockaddr *) &bind_addr, sizeof(bind_addr)); in test_reuseaddr_tcp_tcp_time_wait_common()
489 test_bind_success(server_sock, (struct sockaddr *) &bind_addr, sizeof(bind_addr)); in test_reuseaddr_tcp_tcp_time_wait_common()
/Zephyr-latest/tests/net/socket/misc/src/
Dmain.c171 struct sockaddr *bind_addr, socklen_t bind_addrlen) in test_so_bindtodevice() argument
184 ret = zsock_bind(sock_s, bind_addr, bind_addrlen); in test_so_bindtodevice()
310 struct sockaddr_in bind_addr = { in test_ipv4_so_bindtodevice() local
323 (struct sockaddr *)&bind_addr, sizeof(bind_addr)); in test_ipv4_so_bindtodevice()
342 struct sockaddr_in6 bind_addr = { in test_ipv6_so_bindtodevice() local
355 (struct sockaddr *)&bind_addr, sizeof(bind_addr)); in test_ipv6_so_bindtodevice()
/Zephyr-latest/tests/net/lib/mqtt/v3_1_1/mqtt_client/src/
Dmain.c112 struct sockaddr_in6 bind_addr = { in broker_init() local
138 ret = zsock_bind(s_sock, (struct sockaddr *)&bind_addr, sizeof(bind_addr)); in broker_init()
/Zephyr-latest/tests/net/socket/udp/src/
Dmain.c293 struct sockaddr_in bind_addr, conn_addr; in ZTEST() local
297 prepare_sock_udp_v4(MY_IPV4_ADDR, 55555, &sock1, &bind_addr); in ZTEST()
300 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr, sizeof(bind_addr)); in ZTEST()