Lines Matching refs:sockaddr

125 	return zsock_bind(sock, (struct sockaddr *)&addr, sizeof(addr));  in bind_socket()
175 static int prepare_udp_socket(struct sockaddr_in *sockaddr, uint16_t local_port) in prepare_udp_socket() argument
182 sockaddr->sin_family = AF_INET; in prepare_udp_socket()
183 sockaddr->sin_port = htons(local_port); in prepare_udp_socket()
184 ret = zsock_inet_pton(AF_INET, IPV4_ADDR, &sockaddr->sin_addr); in prepare_udp_socket()
188 ret = zsock_bind(sock, (struct sockaddr *) sockaddr, sizeof(*sockaddr)); in prepare_udp_socket()
225 struct sockaddr_in sockaddr; in ZTEST() local
233 sock3 = prepare_udp_socket(&sockaddr, DST_PORT); in ZTEST()
236 sock4 = prepare_udp_socket(&sockaddr, SRC_PORT); in ZTEST()
238 sockaddr.sin_port = htons(DST_PORT); in ZTEST()
245 0, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); in ZTEST()
255 addrlen = sizeof(sockaddr); in ZTEST()
257 0, (struct sockaddr *)&sockaddr, &addrlen); in ZTEST()
275 (struct sockaddr *)&src, &addrlen); in ZTEST()
335 (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); in ZTEST()
346 0, (struct sockaddr *)&src, &addrlen); in ZTEST()
364 (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); in ZTEST()
372 (struct sockaddr *)&src, &addrlen); in ZTEST()
382 0, (struct sockaddr *)&src, &addrlen); in ZTEST()
447 (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); in ZTEST()
458 0, (struct sockaddr *)&src, &addrlen); in ZTEST()
477 (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); in ZTEST()
488 0, (struct sockaddr *)&src, &addrlen); in ZTEST()
551 (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); in ZTEST()
564 0, (struct sockaddr *)&src, &addrlen); in ZTEST()
582 0, (struct sockaddr *)&src, &addrlen); in ZTEST()