Home
last modified time | relevance | path

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

12345678910>>...38

/external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/test/
Dares-test-live.cc280 struct sockaddr_in sockaddr; in VIRT_NONVIRT_TEST_F() local
281 memset(&sockaddr, 0, sizeof(sockaddr)); in VIRT_NONVIRT_TEST_F()
282 sockaddr.sin_family = AF_INET; in VIRT_NONVIRT_TEST_F()
283 sockaddr.sin_port = htons(53); in VIRT_NONVIRT_TEST_F()
284 sockaddr.sin_addr.s_addr = htonl(0x08080808); in VIRT_NONVIRT_TEST_F()
285 ares_getnameinfo(channel_, (const struct sockaddr*)&sockaddr, sizeof(sockaddr), in VIRT_NONVIRT_TEST_F()
296 struct sockaddr_in sockaddr; in VIRT_NONVIRT_TEST_F() local
297 memset(&sockaddr, 0, sizeof(sockaddr)); in VIRT_NONVIRT_TEST_F()
298 sockaddr.sin_family = AF_INET; in VIRT_NONVIRT_TEST_F()
299 sockaddr.sin_port = htons(0); in VIRT_NONVIRT_TEST_F()
[all …]
/external/ipsec-tools/src/racoon/
Dsockmisc.h39 struct sockaddr sa;
48 extern int cmpsaddrwop __P((const struct sockaddr *, const struct sockaddr *));
49 extern int cmpsaddrwild __P((const struct sockaddr *, const struct sockaddr *));
50 extern int cmpsaddrstrict __P((const struct sockaddr *, const struct sockaddr *));
58 extern struct sockaddr *getlocaladdr __P((struct sockaddr *));
61 struct sockaddr *, socklen_t *, struct sockaddr *, unsigned int *));
63 struct sockaddr *, struct sockaddr *, int));
67 extern struct sockaddr *newsaddr __P((int));
68 extern struct sockaddr *dupsaddr __P((struct sockaddr *));
69 extern char *saddr2str __P((const struct sockaddr *));
[all …]
Dhandler.h118 struct sockaddr *remote; /* remote address to negosiate ph1 */
119 struct sockaddr *local; /* local address to negosiate ph1 */
247 struct sockaddr *src; /* my address of SA. */
248 struct sockaddr *dst; /* peer's address of SA. */
254 struct sockaddr *src_id;
255 struct sockaddr *dst_id;
329 struct sockaddr *remote; /* remote address to negosiate ph1 */
337 struct sockaddr *remote; /* the remote address */
338 struct sockaddr *local; /* the local address */
421 struct sockaddr;
[all …]
Dpolicy.c139 saddr2str((struct sockaddr *)&spidx->src));
140 if (cmpsaddrwop(iph2->src, (struct sockaddr *)&spidx->src)
147 saddr2str((struct sockaddr *)&spidx->dst));
148 if (cmpsaddrwop(iph2->dst, (struct sockaddr *)&spidx->dst)
197 if (cmpsaddrstrict((struct sockaddr *)&a->src,
198 (struct sockaddr *)&b->src))
200 if (cmpsaddrstrict((struct sockaddr *)&a->dst,
201 (struct sockaddr *)&b->dst))
251 mask_sockaddr((struct sockaddr *)&sa1, (struct sockaddr *)&a->src,
253 mask_sockaddr((struct sockaddr *)&sa2, (struct sockaddr *)&b->src,
[all …]
Disakmp_var.h55 struct sockaddr;
65 extern int isakmp_ph1begin_i __P((struct remoteconf *, struct sockaddr *,
66 struct sockaddr *));
100 extern int isakmp_newcookie __P((caddr_t, struct sockaddr *, struct sockaddr *));
115 extern void isakmp_printpacket __P((vchar_t *, struct sockaddr *,
116 struct sockaddr *, int));
120 struct remoteconf *, struct sockaddr *, struct sockaddr *));
130 u_int32_t setscopeid __P((struct sockaddr *, struct sockaddr *));
Dsockmisc.c88 const struct sockaddr *addr1; in cmpsaddrwop()
89 const struct sockaddr *addr2;
141 const struct sockaddr *addr1; in cmpsaddrwild()
142 const struct sockaddr *addr2;
206 const struct sockaddr *addr1; in cmpsaddrstrict()
207 const struct sockaddr *addr2;
262 struct sockaddr *getlocaladdr(struct sockaddr *remote) in getlocaladdr()
272 getsockname(s, (struct sockaddr *)&local, &len) == -1) { in getlocaladdr()
277 return dupsaddr((struct sockaddr *)&local); in getlocaladdr()
280 int recvfromto(int s, void *buf, size_t len, int flags, struct sockaddr *from, in recvfromto()
[all …]
/external/ipsec-tools/src/libipsec/
Dlibpfkey.h53 struct sockaddr;
72 struct sockaddr *src; /* IP src address for SA */
73 struct sockaddr *dst; /* IP dst address for SA */
88 struct sockaddr *l_natt_oa;
118 int pfkey_send_getspi __P((int, u_int, u_int, struct sockaddr *,
119 struct sockaddr *, u_int32_t, u_int32_t, u_int32_t, u_int32_t));
123 struct sockaddr *, struct sockaddr *, u_int32_t));
125 struct sockaddr *, struct sockaddr *));
127 struct sockaddr *, struct sockaddr *, u_int32_t));
134 int pfkey_send_spdadd __P((int, struct sockaddr *, u_int,
[all …]
Dtest-policy.c252 if (pfkey_send_spdsetidx(so, (struct sockaddr *)addr, 128, in test2()
253 (struct sockaddr *)addr, 128, in test2()
260 if (pfkey_send_spdupdate(so, (struct sockaddr *)addr, 128, in test2()
261 (struct sockaddr *)addr, 128, in test2()
271 if (pfkey_send_spddelete(so, (struct sockaddr *)addr, 128, in test2()
272 (struct sockaddr *)addr, 128, in test2()
279 if (pfkey_send_spdadd(so, (struct sockaddr *)addr, 128, in test2()
280 (struct sockaddr *)addr, 128, in test2()
301 if (pfkey_send_spdadd2(so, (struct sockaddr *)addr, 128, in test2()
302 (struct sockaddr *)addr, 128, in test2()
[all …]
/external/mdnsresponder/mDNSPosix/
DmDNSUNP.h51 #define sockaddr_storage sockaddr
56 #define GET_SA_LEN(X) (sizeof(struct sockaddr) > ((struct sockaddr*)&(X))->sa_len ? \
57 sizeof(struct sockaddr) : ((struct sockaddr*)&(X))->sa_len )
59 #define GET_SA_LEN(X) (((struct sockaddr*)&(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in)…
60 …((struct sockaddr*)&(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sock…
62 …define GET_SA_LEN(X) (((struct sockaddr*)&(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) …
83 struct sockaddr *sa, socklen_t *salenptr, struct my_in_pktinfo *pktp, u_char *ttl);
92 struct sockaddr *ifi_addr; /* primary address */
93 struct sockaddr *ifi_netmask;
94 struct sockaddr *ifi_brdaddr;/* broadcast address */
[all …]
/external/rust/crates/mio/src/sys/unix/uds/
Dmod.rs10 pub(in crate::sys) fn path_offset(sockaddr: &libc::sockaddr_un) -> usize { in path_offset()
11 let base = sockaddr as *const _ as usize; in path_offset()
12 let path = &sockaddr.sun_path as *const _ as usize; in path_offset()
28 let sockaddr = mem::MaybeUninit::<libc::sockaddr_un>::zeroed(); localVariable
38 let mut sockaddr = unsafe { sockaddr.assume_init() }; localVariable
40 sockaddr.sun_family = libc::AF_UNIX as libc::sa_family_t;
43 match (bytes.get(0), bytes.len().cmp(&sockaddr.sun_path.len())) {
60 for (dst, src) in sockaddr.sun_path.iter_mut().zip(bytes.iter()) {
64 let offset = path_offset(&sockaddr);
74 Ok((sockaddr, socklen as libc::socklen_t))
[all …]
Dlistener.rs11 let (sockaddr, socklen) = socket_addr(path)?; in bind()
12 let sockaddr = &sockaddr as *const libc::sockaddr_un as *const libc::sockaddr; in bind() localVariable
14 syscall!(bind(socket, sockaddr, socklen)) in bind()
26 let sockaddr = mem::MaybeUninit::<libc::sockaddr_un>::zeroed(); in accept() localVariable
36 let mut sockaddr = unsafe { sockaddr.assume_init() }; in accept() localVariable
38 sockaddr.sun_family = libc::AF_UNIX as libc::sa_family_t; in accept()
39 let mut socklen = mem::size_of_val(&sockaddr) as libc::socklen_t; in accept()
57 &mut sockaddr as *mut libc::sockaddr_un as *mut libc::sockaddr, in accept()
76 &mut sockaddr as *mut libc::sockaddr_un as *mut libc::sockaddr, in accept()
94 .map(|stream| (stream, SocketAddr::from_parts(sockaddr, socklen))) in accept()
Dsocketaddr.rs16 sockaddr: libc::sockaddr_un, field
30 let offset = path_offset(&self.sockaddr); in address()
36 let path = unsafe { &*(&self.sockaddr.sun_path as *const [libc::c_char] as *const [u8]) }; in address()
41 && self.sockaddr.sun_path[0] == 0) in address()
44 } else if self.sockaddr.sun_path[0] == 0 { in address()
58 F: FnOnce(*mut libc::sockaddr, &mut libc::socklen_t) -> io::Result<libc::c_int>,
60 let mut sockaddr = { localVariable
61 let sockaddr = mem::MaybeUninit::<libc::sockaddr_un>::zeroed(); localVariable
62 unsafe { sockaddr.assume_init() }
65 let raw_sockaddr = &mut sockaddr as *mut libc::sockaddr_un as *mut libc::sockaddr;
[all …]
/external/ltp/testcases/kernel/syscalls/accept/
Daccept01.c36 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()
/external/llvm-project/clang/test/Analysis/
Dstd-c-library-functions-POSIX-socket-sockaddr.cpp21 struct sockaddr;
23 int accept(int socket, struct sockaddr *address, socklen_t *address_len);
24 int bind(int socket, const struct sockaddr *address, socklen_t address_len);
25 int getpeername(int socket, struct sockaddr *address, socklen_t *address_len);
26 int getsockname(int socket, struct sockaddr *address, socklen_t *address_len);
27 int connect(int socket, const struct sockaddr *address, socklen_t address_len);
30 ssize_t recvfrom(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, sock…
31 ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *de…
/external/ltp/utils/sctp/func_tests/
Dtest_1_to_1_connectx.c77 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 …]
Dtest_1_to_1_accept_close.c118 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 …]
Dtest_1_to_1_connect.c109 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 …]
/external/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 …]
/external/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()
/external/usrsctp/usrsctplib/netinet/
Dsctp_output.h91 struct sockaddr *, struct sockaddr *,
125 void sctp_send_shutdown_complete2(struct sockaddr *, struct sockaddr *,
153 sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
156 sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
169 struct sockaddr *,
226 sctp_send_abort(struct mbuf *, int, struct sockaddr *, struct sockaddr *,
233 void sctp_send_operr_to(struct sockaddr *, struct sockaddr *,
245 struct sockaddr *addr,
/external/llvm-project/lldb/include/lldb/Host/
DSocketAddress.h44 SocketAddress(const struct sockaddr &s);
53 const SocketAddress &operator=(const struct sockaddr &s);
119 struct sockaddr &sockaddr() { in sockaddr() function
123 const struct sockaddr &sockaddr() const { return m_socket_addr.sa; } in sockaddr() function
154 operator struct sockaddr *() { return &m_socket_addr.sa; }
156 operator const struct sockaddr *() const { return &m_socket_addr.sa; }
176 struct sockaddr sa;
/external/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 …]
/external/ltp/testcases/kernel/syscalls/bind/
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,
50 TEST(bind(*tcase->socket_fd, tcase->sockaddr, tcase->salen)); in verify_bind()
/external/libevent/test/
Dregress_listener.c59 struct sockaddr *addr, int socklen, void *arg) in acceptcb()
97 flags, -1, (struct sockaddr *)&sin, sizeof(sin)); in regress_pick_a_port()
100 flags, -1, (struct sockaddr *)&sin, sizeof(sin)); in regress_pick_a_port()
106 (struct sockaddr*)&ss1, &slen1) == 0); in regress_pick_a_port()
108 (struct sockaddr*)&ss2, &slen2) == 0); in regress_pick_a_port()
122 evutil_socket_connect_(&fd1, (struct sockaddr*)&ss1, slen1); in regress_pick_a_port()
123 evutil_socket_connect_(&fd2, (struct sockaddr*)&ss1, slen1); in regress_pick_a_port()
124 evutil_socket_connect_(&fd3, (struct sockaddr*)&ss2, slen2); in regress_pick_a_port()
191 struct sockaddr *addr, int socklen, void *arg) in acceptcb_free()
221 flags, -1, (struct sockaddr *)&sin, sizeof(sin)); in regress_listener_close_accepted_fd()
[all …]
/external/usrsctp/usrsctplib/netinet6/
Dsctp6_var.h46 extern void in6_sin6_2_sin_in_sock(struct sockaddr *);
73 __P((struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
75 void sctp6_ctlinput __P((int, struct sockaddr *, void *));
77 int sctp6_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *,
80 void sctp6_ctlinput(int, struct sockaddr *, void *, struct ifnet * SCTP_UNUSED);
82 void sctp6_ctlinput(int, struct sockaddr *, void *);
88 extern void in6_sin6_2_sin_in_sock(struct sockaddr *);

12345678910>>...38