Home
last modified time | relevance | path

Searched refs:sockaddr (Results 1 – 25 of 750) sorted by relevance

12345678910>>...30

/third_party/ltp/testcases/kernel/syscalls/bind/
Dbind05.c40 {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 …]
Dbind04.c36 {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 …]
Dbind01.c28 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,
51 TST_EXP_FAIL(bind(*tcase->socket_fd, tcase->sockaddr, tcase->salen), in verify_bind()
54 TST_EXP_PASS(bind(*tcase->socket_fd, tcase->sockaddr, tcase->salen), in verify_bind()
/third_party/libsoup/libsoup/
Dsoup-address.c47 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/testcases/kernel/syscalls/accept/
Daccept01.c38 struct sockaddr *sockaddr; /* socket address buffer */ member
45 (struct sockaddr *)&fsin1, sizeof(fsin1), EBADF,
49 PF_INET, SOCK_STREAM, 0, &devnull_fd, (struct sockaddr *)&fsin1,
53 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)3,
57 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)&fsin1,
61 PF_INET, SOCK_STREAM, 0, &socket_fd, (struct sockaddr *)&fsin1,
65 PF_INET, SOCK_STREAM, 0, &udp_fd, (struct sockaddr *)&fsin1,
79 SAFE_BIND(socket_fd, (struct sockaddr *)&sin0, sizeof(sin0)); in test_setup()
86 SAFE_BIND(udp_fd, (struct sockaddr *)&sin1, sizeof(sin1)); in test_setup()
100 TST_EXP_FAIL2(accept(*tcase->fd, tcase->sockaddr, &tcase->salen), in verify_accept()
/third_party/glib/gio/tests/
Dproxy.c143 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/ltp/utils/sctp/func_tests/
Dtest_1_to_1_connectx.c78 struct sockaddr *tmp_addr; in main()
112 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main()
120 error = sctp_connectx(-1, (struct sockaddr *) &conn_addr, 1, NULL); in main()
128 error = sctp_connectx(0, (struct sockaddr *) &conn_addr, 1, NULL); in main()
136 tmp_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr) - 1); in main()
146 error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 0, NULL); in main()
155 error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 1, NULL); in main()
168 error = sctp_connectx(clnt_sk[i], (struct sockaddr *)&conn_addr, in main()
180 error = sctp_connectx(clnt2_sk, (struct sockaddr *) &conn_addr, 1, NULL); in main()
190 (struct sockaddr *) &acpt_addr, &len); in main()
[all …]
Dtest_1_to_1_accept_close.c122 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main()
132 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main()
135 error = accept(-1, (struct sockaddr *) &acpt_addr, &len); in main()
148 error = accept(fd, (struct sockaddr *) &acpt_addr, &len); in main()
160 error = accept(lstn_sk, (struct sockaddr *) -1, &len); in main()
167 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main()
170 error = accept(sk, (struct sockaddr *) &acpt_addr, &len); in main()
177 test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len); in main()
180 acpt_sk = test_accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len); in main()
183 error = accept(acpt_sk, (struct sockaddr *) &acpt_addr, &len); in main()
[all …]
Dtest_1_to_1_connect.c113 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main()
121 error = connect(-1, (const struct sockaddr *) &conn_addr, len); in main()
134 error = connect(fd, (const struct sockaddr *) &conn_addr, len); in main()
146 error = connect(sk, (const struct sockaddr *) -1, len); in main()
154 error = connect(sk, (const struct sockaddr *) &conn_addr, (len - 3)); in main()
163 error = connect(sk, (const struct sockaddr *) &conn_addr, len); in main()
176 error = connect(clnt_sk[i], (const struct sockaddr *)&conn_addr, in main()
188 error = connect(clnt2_sk, (const struct sockaddr *) &conn_addr, len); in main()
198 (struct sockaddr *) &acpt_addr, &len); in main()
201 error = connect(lstn_sk, (const struct sockaddr *) &lstn_addr, len); in main()
[all …]
Dtest_1_to_1_recvfrom.c104 test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr)); in main()
111 test_connect(sk, (struct sockaddr *) &conn_addr, len); in main()
113 acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len); in main()
123 (struct sockaddr *)&svr_addr, &len); in main()
137 (struct sockaddr *)&svr_addr, &len); in main()
150 (struct sockaddr *)&svr_addr, &len); in main()
159 (struct sockaddr *)&svr_addr, &len); in main()
172 (struct sockaddr *)&svr_addr, &len); in main()
183 (struct sockaddr *)&svr_addr, &len); in main()
195 (struct sockaddr *)&svr_addr, &len); in main()
/third_party/glib/gio/
Dgnativesocketaddress.c49 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()
Dgsocketaddress.c215 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/connect/
Dconnect01.c74 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/ltp/testcases/kernel/syscalls/getpeername/
Dgetpeername01.c54 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/libuv/test/
Dtest-udp-connect.c75 (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 …]
Dtest-udp-connect6.c75 (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 …]
/third_party/gstreamer/gstplugins_bad/ext/sctp/usrsctp/usrsctplib/netinet/
Dsctp_output.h87 struct sockaddr *, struct sockaddr *,
121 void sctp_send_shutdown_complete2(struct sockaddr *, struct sockaddr *,
149 sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
152 sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
161 struct sockaddr *,
206 sctp_send_abort(struct mbuf *, int, struct sockaddr *, struct sockaddr *,
213 void sctp_send_operr_to(struct sockaddr *, struct sockaddr *,
225 struct sockaddr *addr,
Dsctp_pcb.h708 void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t …
709 void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t if…
715 void *ifa, struct sockaddr *addr, uint32_t ifa_flags,
724 void sctp_del_addr_from_vrf(uint32_t vrfid, struct sockaddr *addr,
729 struct sctp_nets *sctp_findnet(struct sctp_tcb *, struct sockaddr *);
731 struct sctp_inpcb *sctp_pcb_findep(struct sockaddr *, int, int, uint32_t);
734 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
737 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
741 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
747 struct sockaddr *, struct sockaddr *,
[all …]
/third_party/ltp/testcases/kernel/syscalls/getsockopt/
Dgetsockopt01.c77 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/recvmsg/
Drecvmsg01.c101 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/NuttX/include/nuttx/net/
Dnet.h137 FAR const struct sockaddr *addr, socklen_t addrlen);
139 FAR struct sockaddr *addr, FAR socklen_t *addrlen);
141 FAR struct sockaddr *addr, FAR socklen_t *addrlen);
144 FAR const struct sockaddr *addr, socklen_t addrlen);
146 FAR struct sockaddr *addr, FAR socklen_t *addrlen,
153 size_t len, int flags, FAR const struct sockaddr *to,
161 size_t len, int flags, FAR struct sockaddr *from,
558 struct sockaddr; /* Forward reference. See nuttx/include/sys/socket.h */
559 int psock_bind(struct socket *psock, const struct sockaddr *addr,
659 int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
[all …]
/third_party/ltp/testcases/kernel/syscalls/sendmsg/
Dsendmsg01.c95 struct sockaddr *to; /* destination */
114 .to = (struct sockaddr *)&sin1,
131 .to = (struct sockaddr *)&sin1,
148 .to = (struct sockaddr *)&sin1,
165 .to = (struct sockaddr *)&sin2,
182 .to = (struct sockaddr *)&sin1,
199 .to = (struct sockaddr *)&sin1,
215 .to = (struct sockaddr *)-1,
216 .tolen = sizeof(struct sockaddr),
231 .to = (struct sockaddr *)&sin1,
[all …]
/third_party/musl/ndk_musl_include/net/
Dif.h52 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_a/kernel/include/net/
Dif.h52 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/uniproton/kernel/include/net/
Dif.h52 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;

12345678910>>...30