/Zephyr-latest/tests/net/socket/ |
D | socket_helpers.h | 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() [all …]
|
/Zephyr-latest/samples/net/sockets/net_mgmt/src/ |
D | main.c | 91 struct sockaddr_nm sockaddr; in listener() local 104 memset(&sockaddr, 0, sizeof(sockaddr)); in listener() 106 sockaddr.nm_family = AF_NET_MGMT; in listener() 107 sockaddr.nm_ifindex = 0; /* Any network interface */ in listener() 108 sockaddr.nm_pid = (uintptr_t)k_current_get(); in listener() 109 sockaddr.nm_mask = NET_EVENT_IPV6_DAD_SUCCEED | in listener() 113 ret = bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); in listener() 126 (struct sockaddr *)&event_addr, in listener()
|
/Zephyr-latest/tests/net/pmtu/src/ |
D | main.c | 61 extern uint16_t net_tcp_get_mtu(struct sockaddr *dst); 218 entry = net_pmtu_get_entry((struct sockaddr *)&dest_ipv4); in ZTEST() 236 entry = net_pmtu_get_entry((struct sockaddr *)&dest_ipv6); in ZTEST() 254 ret = net_pmtu_update_mtu((struct sockaddr *)&dest_ipv4, 1300); in ZTEST() 272 ret = net_pmtu_update_mtu((struct sockaddr *)&dest_ipv6, 1600); in ZTEST() 292 ret = net_pmtu_update_mtu((struct sockaddr *)&dest_ipv4, 1300); in ZTEST() 294 entry = net_pmtu_get_entry((struct sockaddr *)&dest_ipv4); in ZTEST() 301 ret = net_pmtu_update_mtu((struct sockaddr *)&dest_ipv4, 1400); in ZTEST() 303 mtu = net_pmtu_get_mtu((struct sockaddr *)&dest_ipv4); in ZTEST() 309 ret = net_pmtu_update_mtu((struct sockaddr *)&dest_ipv4, 1500); in ZTEST() [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | pmtu.h | 38 struct net_pmtu_entry *net_pmtu_get_entry(const struct sockaddr *dst); 40 static inline struct net_pmtu_entry *net_pmtu_get_entry(const struct sockaddr *dst) in net_pmtu_get_entry() 55 int net_pmtu_get_mtu(const struct sockaddr *dst); 57 static inline int net_pmtu_get_mtu(const struct sockaddr *dst) in net_pmtu_get_mtu() 73 int net_pmtu_update_mtu(const struct sockaddr *dst, uint16_t mtu); 75 static inline int net_pmtu_update_mtu(const struct sockaddr *dst, uint16_t mtu) in net_pmtu_update_mtu()
|
D | connection.h | 58 struct sockaddr remote_addr; 61 struct sockaddr local_addr; 107 const struct sockaddr *remote_addr, 108 const struct sockaddr *local_addr, 117 const struct sockaddr *remote_addr, in net_conn_register() 118 const struct sockaddr *local_addr, in net_conn_register() 174 const struct sockaddr *remote_addr,
|
D | tcp_internal.h | 129 const struct sockaddr *addr, 130 struct sockaddr *laddr, 138 const struct sockaddr *addr, in net_tcp_connect() 139 struct sockaddr *laddr, in net_tcp_connect() 462 struct sockaddr *local, 463 struct sockaddr *peer,
|
/Zephyr-latest/include/zephyr/posix/sys/ |
D | socket.h | 30 int accept(int sock, struct sockaddr *addr, socklen_t *addrlen); 31 int bind(int sock, const struct sockaddr *addr, socklen_t addrlen); 32 int connect(int sock, const struct sockaddr *addr, socklen_t addrlen); 33 int getpeername(int sock, struct sockaddr *addr, socklen_t *addrlen); 34 int getsockname(int sock, struct sockaddr *addr, socklen_t *addrlen); 38 ssize_t recvfrom(int sock, void *buf, size_t max_len, int flags, struct sockaddr *src_addr, 43 ssize_t sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr,
|
/Zephyr-latest/tests/net/socket/af_packet/src/ |
D | main.c | 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() [all …]
|
/Zephyr-latest/tests/net/socket/reuseaddr_reuseport/src/ |
D | main.c | 75 int *sock, struct sockaddr *addr) in prepare_sock_tcp() 91 int *sock, struct sockaddr *addr) in prepare_sock_udp() 152 static void test_bind_success(int sock, const struct sockaddr *addr, socklen_t addrlen) in test_bind_success() 160 static void test_bind_fail(int sock, const struct sockaddr *addr, socklen_t addrlen) in test_bind_fail() 177 static void test_connect_success(int sock, const struct sockaddr *addr, socklen_t addrlen) in test_connect_success() 190 static void test_connect_fail(int sock, const struct sockaddr *addr, socklen_t addrlen) in test_connect_fail() 200 static int test_accept(int sock, struct sockaddr *addr, socklen_t *addrlen) in test_accept() 210 const struct sockaddr *dest_addr, socklen_t addrlen) in test_sendto() 219 struct sockaddr *src_addr, socklen_t *addrlen) in test_recvfrom_success() 228 struct sockaddr *src_addr, socklen_t *addrlen) in test_recvfrom_fail() [all …]
|
/Zephyr-latest/tests/net/socket/tcp/src/ |
D | main.c | 38 static void test_bind(int sock, struct sockaddr *addr, socklen_t addrlen) in test_bind() 52 static void test_connect(int sock, struct sockaddr *addr, socklen_t addrlen) in test_connect() 72 const struct sockaddr *addr, socklen_t addrlen) in test_sendto() 79 static void test_accept(int sock, int *new_sock, struct sockaddr *addr, in test_accept() 88 static void test_accept_timeout(int sock, int *new_sock, struct sockaddr *addr, in test_accept_timeout() 119 struct sockaddr *addr, in test_recvfrom() 238 struct sockaddr addr; in ZTEST_USER() 244 test_bind(s_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER() 247 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER() 273 struct sockaddr addr; in ZTEST_USER() [all …]
|
/Zephyr-latest/tests/net/socket/udp/src/ |
D | main.c | 60 struct sockaddr *client_addr, in comm_sendto_recvfrom() 63 struct sockaddr *server_addr, in comm_sendto_recvfrom() 69 struct sockaddr addr; in comm_sendto_recvfrom() 71 struct sockaddr addr2; in comm_sendto_recvfrom() 181 (struct sockaddr *)&server_addr, in ZTEST() 186 (struct sockaddr *)&client_addr, in ZTEST() 189 (struct sockaddr *)&server_addr, in ZTEST() 210 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST() 214 (struct sockaddr *)&client_addr, in ZTEST() 217 (struct sockaddr *)&server_addr, in ZTEST() [all …]
|
/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_internal.h | 59 int (*bind)(void *obj, const struct sockaddr *addr, socklen_t addrlen); 60 int (*connect)(void *obj, const struct sockaddr *addr, 63 int (*accept)(void *obj, struct sockaddr *addr, socklen_t *addrlen); 65 const struct sockaddr *dest_addr, socklen_t addrlen); 67 struct sockaddr *src_addr, socklen_t *addrlen); 74 int (*getpeername)(void *obj, struct sockaddr *addr, 76 int (*getsockname)(void *obj, struct sockaddr *addr,
|
/Zephyr-latest/tests/net/socket/socketpair/src/ |
D | unsupported_calls.c | 19 res = zsock_bind(fixture->sv[i], (struct sockaddr *)&addr, len); in ZTEST_USER_F() 25 res = zsock_connect(fixture->sv[i], (struct sockaddr *)&addr, len); in ZTEST_USER_F() 37 res = zsock_accept(fixture->sv[i], (struct sockaddr *)&addr, &len); in ZTEST_USER_F()
|
/Zephyr-latest/include/zephyr/net/ |
D | dns_resolve.h | 175 struct sockaddr *addr, size_t addrlen, 196 struct sockaddr local_addr; 218 struct sockaddr server_addr; 253 struct sockaddr ai_addr; 342 struct sockaddr dns_server; 463 const struct sockaddr *dns_servers_sa[]); 507 const struct sockaddr *servers_sa[]);
|
D | net_offload.h | 65 const struct sockaddr *addr, 79 const struct sockaddr *addr, 106 const struct sockaddr *dst_addr, 172 const struct sockaddr *addr, in net_offload_bind() 236 const struct sockaddr *addr, in net_offload_connect() 367 const struct sockaddr *dst_addr, in net_offload_sendto() 470 const struct sockaddr *addr, 485 const struct sockaddr *addr, 514 const struct sockaddr *dst_addr,
|
D | socket.h | 284 struct sockaddr *ai_addr; /**< Pointer to the address */ 288 struct sockaddr _ai_addr; 394 __syscall int zsock_bind(int sock, const struct sockaddr *addr, 407 __syscall int zsock_connect(int sock, const struct sockaddr *addr, 432 __syscall int zsock_accept(int sock, struct sockaddr *addr, socklen_t *addrlen); 445 int flags, const struct sockaddr *dest_addr, 488 int flags, struct sockaddr *src_addr, 645 __syscall int zsock_getpeername(int sock, struct sockaddr *addr, 658 __syscall int zsock_getsockname(int sock, struct sockaddr *addr, 803 int zsock_getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
|
D | icmp.h | 76 struct sockaddr *dst, 190 struct sockaddr *dst, 214 struct sockaddr *dst,
|
D | coap.h | 264 struct sockaddr *addr, socklen_t addr_len); 302 struct sockaddr addr; 352 const struct sockaddr *from); 377 struct sockaddr addr; /**< Remote address */ 709 struct sockaddr *addr, socklen_t addr_len); 731 struct sockaddr *addr, socklen_t addr_len); 998 const struct sockaddr *addr); 1039 const struct sockaddr *addr, 1057 const struct sockaddr *addr); 1116 const struct sockaddr *addr, [all …]
|
/Zephyr-latest/subsys/net/lib/socks/ |
D | socks.h | 24 const struct sockaddr *dest, 28 const struct sockaddr *dest, in net_socks5_connect()
|
/Zephyr-latest/tests/net/socket/getnameinfo/src/ |
D | main.c | 25 ret = zsock_getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), in ZTEST_USER() 36 ret = zsock_getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), in ZTEST_USER() 55 ret = zsock_getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), in ZTEST_USER() 68 ret = zsock_getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), in ZTEST_USER()
|
/Zephyr-latest/tests/net/lib/coap_client/src/ |
D | stubs.h | 45 DECLARE_FAKE_VALUE_FUNC(ssize_t, z_impl_zsock_recvfrom, int, void *, size_t, int, struct sockaddr *, 48 const struct sockaddr *, socklen_t);
|
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/ |
D | smp_udp.c | 41 BUILD_ASSERT(sizeof(struct sockaddr) <= CONFIG_MCUMGR_TRANSPORT_NETBUF_USER_DATA_SIZE, 101 struct sockaddr *addr = net_buf_user_data(nb); in smp_udp4_tx() 125 struct sockaddr *addr = net_buf_user_data(nb); in smp_udp6_tx() 154 struct sockaddr *src_ud = net_buf_user_data(src); in smp_udp_ud_copy() 155 struct sockaddr *dst_ud = net_buf_user_data(dst); in smp_udp_ud_copy() 166 struct sockaddr *addr; in create_socket() 184 addr = (struct sockaddr *)&addr4; in create_socket() 195 addr = (struct sockaddr *)&addr6; in create_socket() 242 struct sockaddr addr; in smp_udp_receive_thread() 249 struct sockaddr *ud; in smp_udp_receive_thread()
|
/Zephyr-latest/tests/net/socket/offload_dispatcher/src/ |
D | main.c | 96 static int offload_bind(void *obj, const struct sockaddr *addr, in offload_bind() 109 static int offload_connect(void *obj, const struct sockaddr *addr, in offload_connect() 133 static int offload_accept(void *obj, struct sockaddr *addr, socklen_t *addrlen) in offload_accept() 146 int flags, const struct sockaddr *dest_addr, in offload_sendto() 175 int flags, struct sockaddr *src_addr, in offload_recvfrom() 221 static int offload_getpeername(void *obj, struct sockaddr *addr, in offload_getpeername() 234 static int offload_getsockname(void *obj, struct sockaddr *addr, in offload_getsockname() 508 ret = zsock_bind(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST() 524 ret = zsock_connect(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST() 556 ret = zsock_accept(test_sock, (struct sockaddr *)&addr, &addrlen); in ZTEST() [all …]
|
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_engine/src/ |
D | stubs.c | 29 struct sockaddr *); 95 DEFINE_FAKE_VALUE_FUNC(int, z_impl_zsock_connect, int, const struct sockaddr *, socklen_t); 98 const struct sockaddr *dest_addr, socklen_t addrlen) in z_impl_zsock_sendto() 111 struct sockaddr *src_addr, socklen_t *addrlen) in z_impl_zsock_recvfrom()
|
/Zephyr-latest/tests/net/socket/net_mgmt/src/ |
D | main.c | 360 struct sockaddr_nm sockaddr; in test_net_mgmt_setup() local 379 memset(&sockaddr, 0, sizeof(sockaddr)); in test_net_mgmt_setup() 381 sockaddr.nm_family = AF_NET_MGMT; in test_net_mgmt_setup() 382 sockaddr.nm_ifindex = net_if_get_by_iface(default_iface); in test_net_mgmt_setup() 383 sockaddr.nm_pid = (uintptr_t)k_current_get(); in test_net_mgmt_setup() 384 sockaddr.nm_mask = NET_EVENT_IPV6_DAD_SUCCEED | in test_net_mgmt_setup() 388 ret = zsock_bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); in test_net_mgmt_setup() 410 (struct sockaddr *)&event_addr, in test_net_mgmt_catch_events() 472 (struct sockaddr *)&event_addr, in test_net_mgmt_catch_events_failure()
|