/Zephyr-latest/samples/net/sockets/dumb_http_server/src/ |
D | socket_dumb_http.c | 61 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/ |
D | main.c | 94 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/ |
D | socket_echo.c | 32 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/ |
D | main.c | 267 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/ |
D | udp.c | 36 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()
|
D | tcp.c | 68 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/ |
D | main.c | 151 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/ |
D | main.c | 449 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/ |
D | main.c | 171 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/ |
D | main.c | 112 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/ |
D | main.c | 293 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()
|