Home
last modified time | relevance | path

Searched refs:sin (Results 1 – 25 of 268) sorted by relevance

1234567891011

/illumos-gate/usr/src/lib/libwrap/
H A Dsocket.c139 struct sockaddr_gen *sin = host->sin; local
141 if (sin != 0)
144 (void) inet_ntop(SGFAM(sin), SGADDRP(sin), host->addr, sizeof(host->addr));
155 struct sockaddr_gen *sin = host->sin; local
167 if (sin != 0
168 && !SG_IS_UNSPECIFIED(sin)
169 && (hp = gethostbyaddr(SGADDRP(sin), SGADDRSZ(sin), SGFAM(sin))) != 0) {
222 (char *) SGADDRP(sin),
223 SGADDRSZ(sin)) == 0) {
235 inet_ntop(SGFAM(sin), SGADDRP(sin), buf, sizeof(buf)),
[all …]
/illumos-gate/usr/src/lib/smbsrv/libsmbns/common/
H A Dsmbns_netbios_datagram.c323 struct sockaddr_in sin; in smb_netbios_datagram_send() local
373 bzero(&sin, sizeof (sin)); in smb_netbios_datagram_send()
374 sin.sin_family = AF_INET; in smb_netbios_datagram_send()
375 sinlen = sizeof (sin); in smb_netbios_datagram_send()
385 sin.sin_port = addr->sin.sin_port; in smb_netbios_datagram_send()
403 struct sockaddr_in sin; in smb_netbios_datagram_send_to_net() local
453 bzero(&sin, sizeof (sin)); in smb_netbios_datagram_send_to_net()
455 sinlen = sizeof (sin); in smb_netbios_datagram_send_to_net()
464 sin.sin_port = addr->sin.sin_port; in smb_netbios_datagram_send_to_net()
842 bzero(&sin, sizeof (sin)); in smb_netbios_datagram_service()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/
H A Darp.c221 struct sockaddr_in *sin; in set() local
230 sin->sin_family = AF_INET; in set()
240 sizeof (sin->sin_addr)); in set()
301 struct sockaddr_in *sin; in get() local
308 sin->sin_family = AF_INET; in get()
318 sizeof (sin->sin_addr)); in get()
340 inet_ntoa(sin->sin_addr), str); in get()
348 inet_ntoa(sin->sin_addr)); in get()
369 struct sockaddr_in *sin; in delete() local
374 sin->sin_family = AF_INET; in delete()
[all …]
H A Dhostconfig.c283 struct sockaddr_in *sin; local
290 sin = (struct sockaddr_in *)&route.rt_dst;
291 sin->sin_family = AF_INET;
294 sin = (struct sockaddr_in *)&route.rt_gateway;
295 sin->sin_family = AF_INET;
296 sin->sin_addr.s_addr = router_addr.s_addr;
457 struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr; local
477 *ipp = ntohl(sin->sin_addr.s_addr);
481 dev, inet_ntoa(sin->sin_addr));
489 *maskp = ntohl(sin->sin_addr.s_addr);
[all …]
/illumos-gate/usr/src/test/os-tests/tests/sockfs/
H A Dnosignal.c52 struct sockaddr_in sin; in main() local
53 sin.sin_family = AF_INET; in main()
54 sin.sin_addr.s_addr = inet_addr("127.0.0.1"); in main()
55 sin.sin_port = htons(4242); in main()
61 assert(bind(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0); in main()
63 assert(connect(c, (struct sockaddr *)&sin, sizeof (sin)) >= 0); in main()
/illumos-gate/usr/src/uts/common/inet/kifconf/
H A Dkifconf.c42 struct sockaddr_in *sin = NULL; in kivoid_to_sock() local
49 sin = (struct sockaddr_in *)dest; in kivoid_to_sock()
50 (void) bcopy(source, &sin->sin_addr, in kivoid_to_sock()
52 sin->sin_family = af; in kivoid_to_sock()
70 struct sockaddr_in sin; in kdlifconfig() local
80 rc = kivoid_to_sock(af, mymask, &sin); in kdlifconfig()
84 sbuf.buf = (caddr_t)&sin; in kdlifconfig()
85 sbuf.maxlen = sbuf.len = sizeof (sin); in kdlifconfig()
103 sbuf.buf = (caddr_t)&sin; in kdlifconfig()
104 sbuf.maxlen = sbuf.len = sizeof (sin); in kdlifconfig()
[all …]
/illumos-gate/usr/src/lib/libipmp/common/
H A Dipmp_mpathd.c58 struct sockaddr_in sin; in ipmp_connect() local
76 (void) memset(&sin, 0, sizeof (struct sockaddr_in)); in ipmp_connect()
77 sin.sin_port = htons(0); in ipmp_connect()
78 sin.sin_family = AF_INET; in ipmp_connect()
79 sin.sin_addr.s_addr = htonl(INADDR_ANY); in ipmp_connect()
81 if (bind(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) in ipmp_connect()
87 sin.sin_port = htons(MPATHD_PORT); in ipmp_connect()
88 sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in ipmp_connect()
90 if (connect(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) { in ipmp_connect()
/illumos-gate/usr/src/cmd/idmap/idmapd/
H A Dkrb5_lookup.c131 struct sockaddr_in sin; in _krb5_override_service_locator() local
133 (void) memset(&sin, 0, sizeof (sin)); in _krb5_override_service_locator()
134 sin.sin_family = AF_INET; in _krb5_override_service_locator()
135 sin.sin_port = port; in _krb5_override_service_locator()
136 (void) memcpy(&sin.sin_addr, &dsa->sin_addr, in _krb5_override_service_locator()
137 sizeof (sin.sin_addr)); in _krb5_override_service_locator()
138 rc = cbfunc(cbdata, socktype, (struct sockaddr *)&sin); in _krb5_override_service_locator()
/illumos-gate/usr/src/cmd/smbsrv/smbd/
H A Dsmbd_krb5lookup.c135 struct sockaddr_in sin; in _krb5_override_service_locator() local
136 (void) memset(&sin, 0, sizeof (sin)); in _krb5_override_service_locator()
137 sin.sin_family = AF_INET; in _krb5_override_service_locator()
138 sin.sin_port = port; in _krb5_override_service_locator()
139 (void) memcpy(&sin.sin_addr, &dxi.d_dci.dc_addr.a_ipv4, in _krb5_override_service_locator()
140 sizeof (sin.sin_addr)); in _krb5_override_service_locator()
141 rc = cbfunc(cbdata, socktype, (struct sockaddr *)&sin); in _krb5_override_service_locator()
/illumos-gate/usr/src/test/os-tests/tests/pf_key/
H A Dkmc-updater.c84 struct sockaddr_in *sin; in main() local
195 sin = (struct sockaddr_in *)(dstext + 1); in main()
196 sin->sin_family = AF_INET; in main()
197 sin->sin_port = 0; in main()
198 sin->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in main()
201 srcext = (sadb_address_t *)(sin + 1); in main()
207 sin = (struct sockaddr_in *)(srcext + 1); in main()
208 sin->sin_family = AF_INET; in main()
209 sin->sin_port = 0; in main()
210 sin->sin_addr.s_addr = 0; in main()
[all …]
/illumos-gate/usr/src/cmd/bhyve/
H A Ddbgport.c63 static struct sockaddr_in sin; variable
150 sin.sin_len = sizeof(sin); in init_dbgport()
152 sin.sin_family = AF_INET; in init_dbgport()
153 sin.sin_addr.s_addr = htonl(INADDR_ANY); in init_dbgport()
154 sin.sin_port = htons(sport); in init_dbgport()
163 if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { in init_dbgport()
H A Dmevent_test.c217 struct sockaddr_in sin; in acceptor() local
228 sin.sin_len = sizeof(sin); in acceptor()
230 sin.sin_family = AF_INET; in acceptor()
231 sin.sin_addr.s_addr = htonl(INADDR_ANY); in acceptor()
232 sin.sin_port = htons(TEST_PORT); in acceptor()
234 if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { in acceptor()
/illumos-gate/usr/src/lib/libuuid/common/
H A Detheraddr.c55 struct sockaddr_in *sin; in arp_get() local
64 sin = (struct sockaddr_in *)&ar.arp_pa; in arp_get()
65 sin->sin_family = AF_INET; in arp_get()
66 sin->sin_addr.s_addr = inet_addr(name.nodename); in arp_get()
67 if (sin->sin_addr.s_addr == (in_addr_t)-1) { in arp_get()
72 (void) memcpy(&sin->sin_addr, hp->h_addr, in arp_get()
73 sizeof (sin->sin_addr)); in arp_get()
/illumos-gate/usr/src/lib/libslp/clib/
H A Dslp_net.c78 struct sockaddr_in *sin; member
192 struct sockaddr_in *sin; in slp_uc_udp_send() local
335 struct sockaddr_in sin[1]; in slp_mc_send() local
348 (void) memset(sin, 0, sizeof (sin)); in slp_mc_send()
394 if (bcifs.sin) free(bcifs.sin); in slp_mc_send()
468 struct sockaddr_in *sin; in tcp_thread() local
520 sizeof (*sin)) < 0) { in tcp_thread()
684 msg->msg_name = (caddr_t)sin; in udp_make_msghdr()
714 sin->sin_family = AF_INET; in make_mc_target()
718 bcifs->sin = NULL; in make_mc_target()
[all …]
H A Dslp_targets.c114 struct sockaddr_in sin; member
295 return (void *)(p ? &(p->da->sin) : NULL); in slp_get_target_sin()
311 struct sockaddr_in *sin = (struct sockaddr_in *)s; in slp_fabricate_target() local
322 (void) memcpy(&(dn->sin), sin, sizeof (dn->sin)); in slp_fabricate_target()
416 static void add_da_entry(struct da_node **tel, struct sockaddr_in *sin, in add_da_entry() argument
427 (void) memcpy(&(te->sin), sin, sizeof (te->sin)); in add_da_entry()
475 struct sockaddr_in sin[1]; in collect_DAs() local
493 if (slp_surl2sin(surl, sin) != SLP_OK) { in collect_DAs()
496 if (slp_on_localhost(h, sin->sin_addr)) { in collect_DAs()
498 } else if (slp_on_subnet(h, sin->sin_addr)) { in collect_DAs()
[all …]
H A Dslp_ipc.c259 struct sockaddr_in *sin; in get_localhost_sin() local
268 if (!(sin = calloc(1, sizeof (*sin)))) { in get_localhost_sin()
273 IN_SET_LOOPBACK_ADDR(sin); in get_localhost_sin()
274 sin->sin_family = AF_INET; in get_localhost_sin()
275 sin->sin_port = htons(SLP_PORT); in get_localhost_sin()
278 local_sin = sin; in get_localhost_sin()
/illumos-gate/usr/src/cmd/backup/lib/
H A Dmyrcmd.c73 struct sockaddr_in sin; in myrcmd() local
123 if ((unsigned)(hp->h_length) > sizeof (sin.sin_addr)) { in myrcmd()
126 hp->h_length, sizeof (sin.sin_addr)); in myrcmd()
176 sin.sin_family = hp->h_addrtype; in myrcmd()
177 bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length); in myrcmd()
178 sin.sin_port = rport; in myrcmd()
179 if (connect(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0) in myrcmd()
196 inet_ntoa(sin.sin_addr)); in myrcmd()
200 bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, in myrcmd()
203 inet_ntoa(sin.sin_addr)); in myrcmd()
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Drpc_soc.c295 if (sin == 0 && fmly == 0) { in __rpc_bindresvport_ipv6()
310 if (sin == 0) { in __rpc_bindresvport_ipv6()
311 sin = (struct sockaddr *)&myaddr; in __rpc_bindresvport_ipv6()
312 get_myaddress_ipv6(fmly, sin); in __rpc_bindresvport_ipv6()
314 if (sin->sa_family == AF_INET) { in __rpc_bindresvport_ipv6()
317 } else if (sin->sa_family == AF_INET6) { in __rpc_bindresvport_ipv6()
335 tbindstr.addr.buf = (char *)sin; in __rpc_bindresvport_ipv6()
402 (void) memset(sin, 0, sizeof (*sin)); in get_myaddress_ipv6()
403 sin->sin_family = AF_INET; in get_myaddress_ipv6()
404 sin->sin_port = htons(PMAPPORT); in get_myaddress_ipv6()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/uwin/
H A Drcmd.c71 struct sockaddr_in sin; in rresvport() local
74 sin.sin_family = AF_INET; in rresvport()
75 sin.sin_addr.s_addr = INADDR_ANY; in rresvport()
80 sin.sin_port = htons((u_short)*alport); in rresvport()
81 if (bind(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0) in rresvport()
107 struct sockaddr_in sin, from; in rcmd() local
173 sin.sin_family = hp->h_addrtype; in rcmd()
175 sin.sin_port = rport; in rcmd()
176 if (connect(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0) in rcmd()
196 inet_ntoa(sin.sin_addr)); in rcmd()
[all …]
/illumos-gate/usr/src/lib/ncad_addr/common/
H A Dncad_addr.c198 struct sockaddr_in sin; in nca_bind() local
226 namelen != sizeof (sin)) { in nca_bind()
230 (void) memcpy(&sin, name, sizeof (sin)); in nca_bind()
237 if (sin.sin_port == ncaaddrs[i].port && in nca_bind()
238 (sin.sin_addr.s_addr == ncaaddrs[i].ipaddr || in nca_bind()
245 sin.sin_family = AF_NCA; in nca_bind()
251 return (real_bind(sock, (struct sockaddr *)&sin, namelen)); in nca_bind()
/illumos-gate/usr/src/lib/libstmfproxy/common/
H A Dstmftransport.c85 struct sockaddr_in sin; in pt_socket_connect() local
136 if ((inet_aton(server, &sin.sin_addr)) == 0) { in pt_socket_connect()
138 memcpy(&sin.sin_addr.s_addr, hp->h_addr, in pt_socket_connect()
152 sin.sin_family = AF_INET; in pt_socket_connect()
154 sin.sin_port = htons(6543); in pt_socket_connect()
156 while (connect(sfd, (struct sockaddr *)&sin, in pt_socket_connect()
157 sizeof (sin)) < 0) { in pt_socket_connect()
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Dbind.c257 sin_t *sin = (sin_t *)sa; in rdsv3_bind() local
261 if (len != sizeof (sin_t) || (sin == NULL) || in rdsv3_bind()
262 !OK_32PTR((char *)sin)) { in rdsv3_bind()
268 rs, ntohl(sin->sin_addr.s_addr), htons(sin->sin_port)); in rdsv3_bind()
270 if (sin->sin_addr.s_addr == INADDR_ANY) { in rdsv3_bind()
281 ret = rdsv3_add_bound(rs, sin->sin_addr.s_addr, &sin->sin_port); in rdsv3_bind()
286 rs->rs_transport = rdsv3_trans_get_preferred(sin->sin_addr.s_addr); in rdsv3_bind()
297 sin->sin_port, rs); in rdsv3_bind()
/illumos-gate/usr/src/uts/common/io/ib/clients/rds/
H A Drdsddi.c294 sin_t *sin; in rds_deliver_new_msg() local
330 sin = (sin_t *)&tudi[1]; in rds_deliver_new_msg()
331 sin->sin_addr.s_addr = rem_addr; in rds_deliver_new_msg()
332 sin->sin_port = ntohs(rem_port); in rds_deliver_new_msg()
333 sin->sin_family = rds->rds_family; in rds_deliver_new_msg()
446 sin_t *sin; in rds_bind() local
475 if (sin == NULL || !OK_32PTR((char *)sin)) { in rds_bind()
499 port = ntohs(sin->sin_port); in rds_bind()
750 sin_t *sin; in rds_wput_data() local
797 port = sin->sin_port; in rds_wput_data()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/
H A Din.rdisc.c558 pr_name(sin->sin_addr)); in solicitor()
569 if (isbroadcast(sin)) in solicitor()
571 else if (ismulticast(sin)) in solicitor()
617 pr_name(sin->sin_addr)); in advertise()
656 if (isbroadcast(sin)) in advertise()
915 struct sockaddr_in sin; in pr_pack() local
973 sin.sin_addr.s_addr = in pr_pack()
994 advertise(&sin); in pr_pack()
1544 struct sockaddr_in *sin; in getconfig() local
2201 struct sockaddr_in *sin; in rtioctl() local
[all …]
/illumos-gate/usr/src/cmd/tcpd/
H A Dscaffold.c128 struct sockaddr_gen sin; local
135 request_init(&request, RQ_CLIENT_SIN, &sin, 0);
137 memset((char *) &sin, 0, sizeof(sin));
138 sin.sg_family = hp->h_addrtype;
141 memcpy((char *) SGADDRP(&sin), addr, SGADDRSZ(&sin));

1234567891011