/third_party/cares/test/ |
D | ares-test-live.cc | 348 struct sockaddr_in sockaddr; in VIRT_NONVIRT_TEST_F() local 349 memset(&sockaddr, 0, sizeof(sockaddr)); in VIRT_NONVIRT_TEST_F() 350 sockaddr.sin_family = AF_INET; in VIRT_NONVIRT_TEST_F() 351 sockaddr.sin_port = htons(53); in VIRT_NONVIRT_TEST_F() 352 sockaddr.sin_addr.s_addr = htonl(0x08080808); in VIRT_NONVIRT_TEST_F() 353 ares_getnameinfo(channel_, (const struct sockaddr*)&sockaddr, sizeof(sockaddr), in VIRT_NONVIRT_TEST_F() 364 struct sockaddr_in sockaddr; in VIRT_NONVIRT_TEST_F() local 365 memset(&sockaddr, 0, sizeof(sockaddr)); in VIRT_NONVIRT_TEST_F() 366 sockaddr.sin_family = AF_INET; in VIRT_NONVIRT_TEST_F() 367 sockaddr.sin_port = htons(0); in VIRT_NONVIRT_TEST_F() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/bind/ |
D | bind04.c | 36 {SOCK_STREAM, 0, (struct sockaddr *)&unix_addr, sizeof(unix_addr), 38 {SOCK_SEQPACKET, 0, (struct sockaddr *)&unix_addr, sizeof(unix_addr), 40 {SOCK_STREAM, 0, (struct sockaddr *)&abstract_addr, 42 {SOCK_SEQPACKET, 0, (struct sockaddr *)&abstract_addr, 46 {SOCK_STREAM, 0, (struct sockaddr *)&ipv4_addr, sizeof(ipv4_addr), 48 {SOCK_STREAM, IPPROTO_TCP, (struct sockaddr *)&ipv4_addr, 50 {SOCK_STREAM, IPPROTO_SCTP, (struct sockaddr *)&ipv4_addr, 52 {SOCK_STREAM, 0, (struct sockaddr *)&ipv4_any_addr, 54 {SOCK_STREAM, IPPROTO_TCP, (struct sockaddr *)&ipv4_any_addr, 56 {SOCK_STREAM, IPPROTO_SCTP, (struct sockaddr *)&ipv4_any_addr, [all …]
|
D | bind05.c | 40 {SOCK_DGRAM, 0, (struct sockaddr *)&unix_addr, sizeof(unix_addr), 42 {SOCK_DGRAM, 0, (struct sockaddr *)&abstract_addr, 46 {SOCK_DGRAM, 0, (struct sockaddr *)&ipv4_addr, sizeof(ipv4_addr), 48 {SOCK_DGRAM, IPPROTO_UDP, (struct sockaddr *)&ipv4_addr, 50 {SOCK_DGRAM, IPPROTO_UDPLITE, (struct sockaddr *)&ipv4_addr, 52 {SOCK_DGRAM, 0, (struct sockaddr *)&ipv4_any_addr, 54 {SOCK_DGRAM, IPPROTO_UDP, (struct sockaddr *)&ipv4_any_addr, 56 {SOCK_DGRAM, IPPROTO_UDPLITE, (struct sockaddr *)&ipv4_any_addr, 60 {SOCK_DGRAM, 0, (struct sockaddr *)&ipv6_addr, sizeof(ipv6_addr), 62 {SOCK_DGRAM, IPPROTO_UDP, (struct sockaddr *)&ipv6_addr, [all …]
|
D | bind01.c | 28 struct sockaddr *sockaddr; member 34 { &inet_socket, (struct sockaddr *)&sin1, 3, -1, 36 { &dev_null, (struct sockaddr *)&sin1, sizeof(sin1), -1, 38 { &inet_socket, (struct sockaddr *)&sin2, sizeof(sin2), 0, 40 { &inet_socket, (struct sockaddr *)&sun, sizeof(sun), -1, 42 { &inet_socket, (struct sockaddr *)&sin3, sizeof(sin3), -1, 50 TEST(bind(*tcase->socket_fd, tcase->sockaddr, tcase->salen)); in verify_bind()
|
/third_party/ltp/testcases/kernel/syscalls/accept/ |
D | accept01.c | 36 struct sockaddr *sockaddr; /* socket address buffer */ member 43 (struct sockaddr *)&fsin1, sizeof(fsin1), EBADF, 47 PF_INET, SOCK_STREAM, 0, &devnull_fd, (struct sockaddr *)&fsin1, 51 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)3, 55 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)&fsin1, 59 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)&fsin1, 63 PF_INET, SOCK_STREAM, 0, &udp_fd, (struct sockaddr *)&fsin1, 77 SAFE_BIND(socket_fd, (struct sockaddr *)&sin0, sizeof(sin0)); in test_setup() 84 SAFE_BIND(udp_fd, (struct sockaddr *)&sin1, sizeof(sin1)); in test_setup() 98 TEST(accept(*tcase->fd, tcase->sockaddr, &tcase->salen)); in verify_accept()
|
/third_party/glib/gio/tests/ |
D | proxy.c | 143 print_proxy_address (GSocketAddress *sockaddr) in print_proxy_address() argument 147 if (sockaddr == NULL) in print_proxy_address() 153 if (G_IS_PROXY_ADDRESS (sockaddr)) in print_proxy_address() 155 proxy = G_PROXY_ADDRESS (sockaddr); in print_proxy_address() 163 if (G_IS_INET_SOCKET_ADDRESS (sockaddr)) in print_proxy_address() 169 g_object_get (sockaddr, in print_proxy_address() 203 GSocketAddress *sockaddr; in _proxy_enumerate_cb() local 205 sockaddr = g_socket_address_enumerator_next_finish (enumerator, in _proxy_enumerate_cb() 208 if (sockaddr) in _proxy_enumerate_cb() 210 print_proxy_address (sockaddr); in _proxy_enumerate_cb() [all …]
|
/third_party/libsoup/libsoup/ |
D | soup-address.c | 47 struct sockaddr_storage *sockaddr; member 58 #define SOUP_SIN(priv) ((struct sockaddr_in *)priv->sockaddr) 59 #define SOUP_SIN6(priv) ((struct sockaddr_in6 *)priv->sockaddr) 62 #define SOUP_ADDRESS_GET_FAMILY(priv) (priv->sockaddr->ss_family) 64 (priv->sockaddr->ss_family = family) 77 (priv->sockaddr->ss_family == AF_INET ? \ 82 if (priv->sockaddr->ss_family == AF_INET) \ 90 (priv->sockaddr->ss_family == AF_INET ? \ 118 g_free (priv->sockaddr); in soup_address_finalize() 141 if (!priv->name && !priv->sockaddr) { in soup_address_constructor() [all …]
|
/third_party/ltp/utils/sctp/func_tests/ |
D | test_1_to_1_connectx.c | 77 struct sockaddr *tmp_addr; in main() 108 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main() 116 error = sctp_connectx(-1, (struct sockaddr *) &conn_addr, 1, NULL); in main() 124 error = sctp_connectx(0, (struct sockaddr *) &conn_addr, 1, NULL); in main() 132 tmp_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr) - 1); in main() 142 error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 0, NULL); in main() 151 error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 1, NULL); in main() 164 error = sctp_connectx(clnt_sk[i], (struct sockaddr *)&conn_addr, in main() 176 error = sctp_connectx(clnt2_sk, (struct sockaddr *) &conn_addr, 1, NULL); in main() 186 (struct sockaddr *) &acpt_addr, &len); in main() [all …]
|
D | test_1_to_1_accept_close.c | 118 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main() 128 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main() 131 error = accept(-1, (struct sockaddr *) &acpt_addr, &len); in main() 144 error = accept(fd, (struct sockaddr *) &acpt_addr, &len); in main() 156 error = accept(lstn_sk, (struct sockaddr *) -1, &len); in main() 163 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main() 166 error = accept(sk, (struct sockaddr *) &acpt_addr, &len); in main() 173 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main() 176 acpt_sk = test_accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len); in main() 179 error = accept(acpt_sk, (struct sockaddr *) &acpt_addr, &len); in main() [all …]
|
D | test_1_to_1_connect.c | 109 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main() 117 error = connect(-1, (const struct sockaddr *) &conn_addr, len); in main() 130 error = connect(fd, (const struct sockaddr *) &conn_addr, len); in main() 142 error = connect(sk, (const struct sockaddr *) -1, len); in main() 150 error = connect(sk, (const struct sockaddr *) &conn_addr, (len - 3)); in main() 159 error = connect(sk, (const struct sockaddr *) &conn_addr, len); in main() 172 error = connect(clnt_sk[i], (const struct sockaddr *)&conn_addr, in main() 184 error = connect(clnt2_sk, (const struct sockaddr *) &conn_addr, len); in main() 194 (struct sockaddr *) &acpt_addr, &len); in main() 197 error = connect(lstn_sk, (const struct sockaddr *) &lstn_addr, len); in main() [all …]
|
D | test_1_to_1_recvfrom.c | 100 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main() 107 test_connect(sk, (struct sockaddr *) &conn_addr, len); in main() 109 acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len); in main() 119 (struct sockaddr *)&svr_addr, &len); in main() 133 (struct sockaddr *)&svr_addr, &len); in main() 146 (struct sockaddr *)&svr_addr, &len); in main() 155 (struct sockaddr *)&svr_addr, &len); in main() 168 (struct sockaddr *)&svr_addr, &len); in main() 179 (struct sockaddr *)&svr_addr, &len); in main() 191 (struct sockaddr *)&svr_addr, &len); in main()
|
/third_party/glib/gio/ |
D | gnativesocketaddress.c | 49 struct sockaddr *sockaddr; member 52 struct sockaddr sa; 64 if (address->priv->sockaddr != &address->priv->storage.sa) in G_DEFINE_TYPE_WITH_PRIVATE() 65 g_free (address->priv->sockaddr); in G_DEFINE_TYPE_WITH_PRIVATE() 79 return addr->priv->sockaddr->sa_family; in g_native_socket_address_get_family() 113 memcpy (dest, addr->priv->sockaddr, addr->priv->sockaddr_len); in g_native_socket_address_to_native() 156 addr->priv->sockaddr = &addr->priv->storage.sa; in g_native_socket_address_new() 158 addr->priv->sockaddr = g_malloc (len); in g_native_socket_address_new() 160 memcpy (addr->priv->sockaddr, native, len); in g_native_socket_address_new()
|
D | gsocketaddress.c | 215 family = ((struct sockaddr *) native)->sa_family; in g_socket_address_new_from_native() 224 GSocketAddress *sockaddr; in g_socket_address_new_from_native() local 230 sockaddr = g_inet_socket_address_new (iaddr, g_ntohs (addr->sin_port)); in g_socket_address_new_from_native() 232 return sockaddr; in g_socket_address_new_from_native() 239 GSocketAddress *sockaddr; in g_socket_address_new_from_native() local 258 sockaddr = g_object_new (G_TYPE_INET_SOCKET_ADDRESS, in g_socket_address_new_from_native() 265 return sockaddr; in g_socket_address_new_from_native() 314 GSocketAddress *sockaddr; member 331 if (sockaddr_enum->sockaddr) in G_DEFINE_TYPE() 332 g_object_unref (sockaddr_enum->sockaddr); in G_DEFINE_TYPE() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/getpeername/ |
D | getpeername01.c | 54 struct sockaddr *sockaddr; member 62 {-1, (struct sockaddr *)&fsin1, &sinlen, -1, EBADF, NULL, NULL, 64 {-1, (struct sockaddr *)&fsin1, &sinlen, -1, ENOTSOCK, setup2, cleanup2, 66 {-1, (struct sockaddr *)&fsin1, &sinlen, -1, ENOTCONN, setup3, cleanup2, 68 {-1, (struct sockaddr *)&fsin1, &invalid_sinlen, -1, EINVAL, setup4, 71 {-1, (struct sockaddr *)-1, &sinlen, -1, EFAULT, setup4, cleanup4, 73 {-1, (struct sockaddr *)&fsin1, NULL, -1, EFAULT, setup4, 75 {-1, (struct sockaddr *)&fsin1, (socklen_t *)1, -1, EFAULT, setup4, 102 test_cases[i].sockaddr, in main() 157 (struct sockaddr *)&server_addr, sizeof(server_addr)); in setup3()
|
/third_party/ltp/testcases/kernel/syscalls/connect/ |
D | connect01.c | 74 struct sockaddr *sockaddr; /* socket address buffer */ member 83 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&sin1, 89 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)-1, 94 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&sin1, 96 0, 0, 0, (struct sockaddr *)&sin1, 100 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&sin1, 104 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&sin2, 108 PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&sin4, 129 static int sys_connect(int sockfd, const struct sockaddr *addr, in sys_connect() 155 (s, tdat[testno].sockaddr, tdat[testno].salen)); in main() [all …]
|
/third_party/libuv/test/ |
D | test-udp-connect6.c | 75 (const struct sockaddr*) &lo_addr, in cl_send_cb() 86 const struct sockaddr* addr, in sv_recv_cb() 119 r = uv_udp_bind(&server, (const struct sockaddr*) &lo_addr, 0); in TEST_IMPL() 132 r = uv_udp_connect(&client, (const struct sockaddr*) &tmp_addr); in TEST_IMPL() 144 r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); in TEST_IMPL() 146 r = uv_udp_connect(&client, (const struct sockaddr*) &ext_addr); in TEST_IMPL() 150 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL() 154 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); in TEST_IMPL() 158 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &ext_addr); in TEST_IMPL() 167 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL() [all …]
|
D | test-udp-connect.c | 75 (const struct sockaddr*) &lo_addr, in cl_send_cb() 86 const struct sockaddr* addr, in sv_recv_cb() 116 r = uv_udp_bind(&server, (const struct sockaddr*) &lo_addr, 0); in TEST_IMPL() 129 r = uv_udp_connect(&client, (const struct sockaddr*) &tmp_addr); in TEST_IMPL() 141 r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); in TEST_IMPL() 143 r = uv_udp_connect(&client, (const struct sockaddr*) &ext_addr); in TEST_IMPL() 147 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL() 151 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); in TEST_IMPL() 155 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &ext_addr); in TEST_IMPL() 164 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/getsockopt/ |
D | getsockopt01.c | 77 struct sockaddr *sin; 87 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 91 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 97 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 101 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 107 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 111 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 115 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 120 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 124 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, [all …]
|
/third_party/ltp/testcases/kernel/syscalls/setsockopt/ |
D | setsockopt01.c | 77 struct sockaddr *sin; 87 sizeof(optval), (struct sockaddr *)&fsin1, 92 sizeof(optval), (struct sockaddr *)&fsin1, 99 sizeof(optval), (struct sockaddr *)&fsin1, 106 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 110 sizeof(optval), (struct sockaddr *)&fsin1, 115 sizeof(optval), (struct sockaddr *)&fsin1, 120 sizeof(optval), (struct sockaddr *)&fsin1, 125 sizeof(optval), (struct sockaddr *)&fsin1, 206 SAFE_BIND(cleanup, s, (struct sockaddr *)&sin0, sizeof(sin0)); in setup1()
|
/third_party/NuttX/include/nuttx/net/ |
D | net.h | 153 FAR const struct sockaddr *addr, socklen_t addrlen); 155 FAR struct sockaddr *addr, FAR socklen_t *addrlen); 157 FAR struct sockaddr *addr, FAR socklen_t *addrlen); 160 FAR const struct sockaddr *addr, socklen_t addrlen); 162 FAR struct sockaddr *addr, FAR socklen_t *addrlen, 169 size_t len, int flags, FAR const struct sockaddr *to, 177 size_t len, int flags, FAR struct sockaddr *from, 574 struct sockaddr; /* Forward reference. See nuttx/include/sys/socket.h */ 575 int psock_bind(struct socket *psock, const struct sockaddr *addr, 675 int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, [all …]
|
/third_party/musl/porting/liteos_a/kernel/include/net/ |
D | if.h | 52 struct sockaddr ifa_addr; 54 struct sockaddr ifu_broadaddr; 55 struct sockaddr ifu_dstaddr; 81 struct sockaddr ifru_addr; 82 struct sockaddr ifru_dstaddr; 83 struct sockaddr ifru_broadaddr; 84 struct sockaddr ifru_netmask; 85 struct sockaddr ifru_hwaddr;
|
/third_party/musl/include/net/ |
D | if.h | 52 struct sockaddr ifa_addr; 54 struct sockaddr ifu_broadaddr; 55 struct sockaddr ifu_dstaddr; 81 struct sockaddr ifru_addr; 82 struct sockaddr ifru_dstaddr; 83 struct sockaddr ifru_broadaddr; 84 struct sockaddr ifru_netmask; 85 struct sockaddr ifru_hwaddr;
|
/third_party/musl/porting/liteos_m/kernel/include/net/ |
D | if.h | 52 struct sockaddr ifa_addr; 54 struct sockaddr ifu_broadaddr; 55 struct sockaddr ifu_dstaddr; 81 struct sockaddr ifru_addr; 82 struct sockaddr ifru_dstaddr; 83 struct sockaddr ifru_broadaddr; 84 struct sockaddr ifru_netmask; 85 struct sockaddr ifru_hwaddr;
|
/third_party/ltp/testcases/kernel/syscalls/recvmsg/ |
D | recvmsg01.c | 101 struct sockaddr *from; /* from address */ 112 (struct sockaddr *)&from, sizeof(from), 118 (struct sockaddr *)&from, sizeof(from), 124 &msgdat, 0, (struct sockaddr *)-1, sizeof(from), 0, 130 &msgdat, -1, (struct sockaddr *)&from, -1, -1, 135 &msgdat, 0, (struct sockaddr *)&from, sizeof(from), 141 &msgdat, 0, (struct sockaddr *)&from, sizeof(from), 147 &msgdat, 0, (struct sockaddr *)&from, sizeof(from), 153 &msgdat, 0, (struct sockaddr *)&from, sizeof(from), 159 &msgdat, MSG_OOB, (struct sockaddr *)&from, [all …]
|
/third_party/ltp/testcases/kernel/syscalls/sockioctl/ |
D | sockioctl01.c | 73 struct sockaddr *sin; 83 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 87 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 93 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 99 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 103 (struct sockaddr *)&fsin1, sizeof(fsin1), 0, 107 (struct sockaddr *)&fsin1, sizeof(fsin1), 0, 111 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 115 (struct sockaddr *)&fsin1, sizeof(fsin1), -1, 210 SAFE_BIND(cleanup, s, (struct sockaddr *)&sin0, sizeof(sin0)); in setup1()
|