Lines Matching refs:addr
19 static inline int prepare_listen_sock_udp_v4(struct sockaddr_in *addr) in prepare_listen_sock_udp_v4() argument
23 zassert_not_null(addr, "null sockaddr"); in prepare_listen_sock_udp_v4()
30 zassert_equal(addr->sin_family, AF_INET, "Invalid family"); in prepare_listen_sock_udp_v4()
32 ret = zsock_bind(sock, (struct sockaddr *)addr, sizeof(*addr)); in prepare_listen_sock_udp_v4()
38 static inline int prepare_listen_sock_udp_v6(struct sockaddr_in6 *addr) in prepare_listen_sock_udp_v6() argument
42 zassert_not_null(addr, "null sockaddr"); in prepare_listen_sock_udp_v6()
49 zassert_equal(addr->sin6_family, AF_INET6, "Invalid family"); in prepare_listen_sock_udp_v6()
51 ret = zsock_bind(sock, (struct sockaddr *)addr, sizeof(*addr)); in prepare_listen_sock_udp_v6()
57 static inline void prepare_sock_udp_v4(const char *addr, uint16_t port, in prepare_sock_udp_v4() argument
62 zassert_not_null(addr, "null addr"); in prepare_sock_udp_v4()
71 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_udp_v4()
75 static inline void prepare_sock_udp_v6(const char *addr, uint16_t port, in prepare_sock_udp_v6() argument
80 zassert_not_null(addr, "null addr"); in prepare_sock_udp_v6()
90 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_udp_v6()
94 static inline void prepare_sock_tcp_v4(const char *addr, uint16_t port, in prepare_sock_tcp_v4() argument
99 zassert_not_null(addr, "null addr"); in prepare_sock_tcp_v4()
108 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tcp_v4()
112 static inline void prepare_sock_tcp_v6(const char *addr, uint16_t port, in prepare_sock_tcp_v6() argument
117 zassert_not_null(addr, "null addr"); in prepare_sock_tcp_v6()
126 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_tcp_v6()
130 static inline void prepare_sock_tls_v4(const char *addr, uint16_t port, in prepare_sock_tls_v4() argument
136 zassert_not_null(addr, "null addr"); in prepare_sock_tls_v4()
145 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tls_v4()
149 static inline void prepare_sock_tls_v6(const char *addr, uint16_t port, in prepare_sock_tls_v6() argument
155 zassert_not_null(addr, "null addr"); in prepare_sock_tls_v6()
164 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_tls_v6()
168 static inline void prepare_sock_dtls_v4(const char *addr, uint16_t port, in prepare_sock_dtls_v4() argument
174 zassert_not_null(addr, "null addr"); in prepare_sock_dtls_v4()
183 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_dtls_v4()
187 static inline void prepare_sock_dtls_v6(const char *addr, uint16_t port, in prepare_sock_dtls_v6() argument
193 zassert_not_null(addr, "null addr"); in prepare_sock_dtls_v6()
202 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_dtls_v6()