Lines Matching refs:sockaddr
32 ret = zsock_bind(sock, (struct sockaddr *)addr, sizeof(*addr)); in prepare_listen_sock_udp_v4()
51 ret = zsock_bind(sock, (struct sockaddr *)addr, sizeof(*addr)); in prepare_listen_sock_udp_v6()
58 int *sock, struct sockaddr_in *sockaddr) in prepare_sock_udp_v4() argument
64 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_udp_v4()
69 sockaddr->sin_family = AF_INET; in prepare_sock_udp_v4()
70 sockaddr->sin_port = htons(port); in prepare_sock_udp_v4()
71 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_udp_v4()
76 int *sock, struct sockaddr_in6 *sockaddr) in prepare_sock_udp_v6() argument
82 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_udp_v6()
87 (void)memset(sockaddr, 0, sizeof(*sockaddr)); in prepare_sock_udp_v6()
88 sockaddr->sin6_family = AF_INET6; in prepare_sock_udp_v6()
89 sockaddr->sin6_port = htons(port); in prepare_sock_udp_v6()
90 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_udp_v6()
95 int *sock, struct sockaddr_in *sockaddr) in prepare_sock_tcp_v4() argument
101 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_tcp_v4()
106 sockaddr->sin_family = AF_INET; in prepare_sock_tcp_v4()
107 sockaddr->sin_port = htons(port); in prepare_sock_tcp_v4()
108 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tcp_v4()
113 int *sock, struct sockaddr_in6 *sockaddr) in prepare_sock_tcp_v6() argument
119 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_tcp_v6()
124 sockaddr->sin6_family = AF_INET6; in prepare_sock_tcp_v6()
125 sockaddr->sin6_port = htons(port); in prepare_sock_tcp_v6()
126 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_tcp_v6()
131 int *sock, struct sockaddr_in *sockaddr, in prepare_sock_tls_v4() argument
138 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_tls_v4()
143 sockaddr->sin_family = AF_INET; in prepare_sock_tls_v4()
144 sockaddr->sin_port = htons(port); in prepare_sock_tls_v4()
145 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tls_v4()
150 int *sock, struct sockaddr_in6 *sockaddr, in prepare_sock_tls_v6() argument
157 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_tls_v6()
162 sockaddr->sin6_family = AF_INET6; in prepare_sock_tls_v6()
163 sockaddr->sin6_port = htons(port); in prepare_sock_tls_v6()
164 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_tls_v6()
169 int *sock, struct sockaddr_in *sockaddr, in prepare_sock_dtls_v4() argument
176 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_dtls_v4()
181 sockaddr->sin_family = AF_INET; in prepare_sock_dtls_v4()
182 sockaddr->sin_port = htons(port); in prepare_sock_dtls_v4()
183 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_dtls_v4()
188 int *sock, struct sockaddr_in6 *sockaddr, in prepare_sock_dtls_v6() argument
195 zassert_not_null(sockaddr, "null sockaddr"); in prepare_sock_dtls_v6()
200 sockaddr->sin6_family = AF_INET6; in prepare_sock_dtls_v6()
201 sockaddr->sin6_port = htons(port); in prepare_sock_dtls_v6()
202 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_dtls_v6()