Home
last modified time | relevance | path

Searched refs:lifc (Results 1 – 25 of 33) sorted by relevance

12

/illumos-gate/usr/src/lib/libinetutil/common/
H A Difaddrlist.c59 struct lifconf lifc; in ifaddrlist() local
66 (void) memset(&lifc, 0, sizeof (lifc)); in ifaddrlist()
94 lifc.lifc_flags = flags; in ifaddrlist()
95 lifc.lifc_family = family; in ifaddrlist()
96 lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq); in ifaddrlist()
97 if ((lifc.lifc_buf = realloc(lifc.lifc_buf, lifc.lifc_len)) == NULL) { in ifaddrlist()
102 if (ioctl(fd, SIOCGLIFCONF, &lifc) == -1) { in ifaddrlist()
112 nlifr = lifc.lifc_len / sizeof (struct lifreq); in ifaddrlist()
131 for (lifrp = lifc.lifc_req, i = 0; i < nlifr; i++, lifrp++) { in ifaddrlist()
169 free(lifc.lifc_buf); in ifaddrlist()
[all …]
H A Difaddrlistx.c43 struct lifconf lifc; in ifaddrlistx() local
55 (void) memset(&lifc, 0, sizeof (lifc)); in ifaddrlistx()
82 lifc.lifc_flags = flags; in ifaddrlistx()
83 lifc.lifc_family = AF_UNSPEC; in ifaddrlistx()
84 lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq); in ifaddrlistx()
85 if ((lifc.lifc_buf = realloc(lifc.lifc_buf, lifc.lifc_len)) == NULL) in ifaddrlistx()
88 if (ioctl(s4, SIOCGLIFCONF, &lifc) == -1) in ifaddrlistx()
96 nlifr = lifc.lifc_len / sizeof (struct lifreq); in ifaddrlistx()
105 for (lifrp = lifc.lifc_req, i = 0; i < nlifr; i++, lifrp++) { in ifaddrlistx()
143 free(lifc.lifc_buf); in ifaddrlistx()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/
H A Dselfcheck.c121 struct lifconf *lifc; in getmyaddrs() local
139 lifc = (struct lifconf *)malloc(sizeof (struct lifconf)); in getmyaddrs()
140 if (lifc == NULL) { in getmyaddrs()
151 free(lifc); in getmyaddrs()
155 lifc->lifc_family = AF_UNSPEC; in getmyaddrs()
156 lifc->lifc_flags = 0; in getmyaddrs()
157 lifc->lifc_buf = buf; in getmyaddrs()
158 lifc->lifc_len = numifs * sizeof (struct lifreq); in getmyaddrs()
160 if (ioctl(sock, SIOCGLIFCONF, (char *)lifc) < 0) { in getmyaddrs()
164 free(lifc); in getmyaddrs()
[all …]
/illumos-gate/usr/src/lib/libsocket/inet/
H A Dinterface_id.c115 struct lifconf lifc; in if_indextoname() local
168 lifc.lifc_family = AF_UNSPEC; in if_indextoname()
169 lifc.lifc_flags = flags; in if_indextoname()
170 lifc.lifc_len = bufsize; in if_indextoname()
171 lifc.lifc_buf = buf; in if_indextoname()
172 if (ioctl(s, SIOCGLIFCONF, (char *)&lifc) < 0) { in if_indextoname()
180 lifrp = lifc.lifc_req; in if_indextoname()
182 for (n = lifc.lifc_len / sizeof (struct lifreq); n > 0; n--, lifrp++) { in if_indextoname()
224 struct lifconf lifc; in if_nameindex() local
255 lifc.lifc_family = AF_UNSPEC; in if_nameindex()
[all …]
H A Dgetifaddrs.c557 struct lifconf lifc; in getallifs() local
582 lifc.lifc_family = af; in getallifs()
583 lifc.lifc_flags = lifc_flags; in getallifs()
584 lifc.lifc_len = bufsize; in getallifs()
585 lifc.lifc_buf = *buf; in getallifs()
586 if (ioctl(s, SIOCGLIFCONF, (char *)&lifc) < 0) in getallifs()
589 *numifs = lifc.lifc_len / sizeof (struct lifreq); in getallifs()
/illumos-gate/usr/src/uts/common/io/ib/clients/rds/
H A Drds_ioctl.c166 struct lifconf lifc; in rds_ioctl_copyin_done() local
170 if ((err = rds_do_lifconf(&lifc, &bufsize)) != 0) in rds_ioctl_copyin_done()
173 nifs = lifc.lifc_len / sizeof (struct lifreq); in rds_ioctl_copyin_done()
174 for (lifrp = lifc.lifc_req, i = 0; i < nifs; i++, lifrp++) { in rds_ioctl_copyin_done()
181 kmem_free(lifc.lifc_buf, bufsize); in rds_ioctl_copyin_done()
192 struct lifconf lifc; in rds_ioctl_copyin_done() local
200 if ((err = rds_do_lifconf(&lifc, &bufsize)) != 0) in rds_ioctl_copyin_done()
206 kmem_free(lifc.lifc_buf, bufsize); in rds_ioctl_copyin_done()
211 nifs = lifc.lifc_len / sizeof (struct lifreq); in rds_ioctl_copyin_done()
212 for (lifrp = lifc.lifc_req, i = 0; i < nifs && in rds_ioctl_copyin_done()
[all …]
/illumos-gate/usr/src/cmd/svr4pkg/libinst/
H A Dis_local_host.c76 struct lifconf lifc; in is_local_if() local
105 lifc.lifc_family = hp->h_addrtype; in is_local_if()
106 lifc.lifc_flags = LIFC_EXTERNAL_SOURCE; in is_local_if()
107 lifc.lifc_len = bufsiz; in is_local_if()
108 lifc.lifc_buf = buf; in is_local_if()
109 if (ioctl(s, SIOCGLIFCONF, (char *)&lifc) == -1) { in is_local_if()
120 for (lifrp = lifc.lifc_req, in is_local_if()
121 nif = lifc.lifc_len / sizeof (struct lifreq); in is_local_if()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dforeachaddr.c142 struct lifconf lifc; in get_lifconf() local
144 lifc.lifc_family = af; in get_lifconf()
145 lifc.lifc_flags = 0; in get_lifconf()
146 lifc.lifc_len = *lenp; in get_lifconf()
147 lifc.lifc_buf = buf; in get_lifconf()
150 ret = ioctl (s, SIOCGLIFCONF, (char *)&lifc); in get_lifconf()
154 *lenp = lifc.lifc_len; in get_lifconf()
H A Dlocaladdr.c294 struct lifconf lifc; in get_lifconf() local
296 lifc.lifc_family = af; in get_lifconf()
297 lifc.lifc_flags = 0; in get_lifconf()
299 lifc.lifc_len = *lenp; in get_lifconf()
301 lifc.lifc_buf = buf; in get_lifconf()
304 ret = ioctl (s, SIOCGLIFCONF, (char *)&lifc); in get_lifconf()
309 *lenp = lifc.lifc_len; in get_lifconf()
/illumos-gate/usr/src/lib/smbsrv/libsmb/common/
H A Dsmb_nic.c607 struct lifconf lifc; in smb_nic_hlist_sysget() local
646 lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq); in smb_nic_hlist_sysget()
647 lifc.lifc_buf = malloc(lifc.lifc_len); in smb_nic_hlist_sysget()
648 if (lifc.lifc_buf == NULL) { in smb_nic_hlist_sysget()
653 bzero(lifc.lifc_buf, lifc.lifc_len); in smb_nic_hlist_sysget()
654 lifc.lifc_family = AF_UNSPEC; in smb_nic_hlist_sysget()
655 lifc.lifc_flags = 0; in smb_nic_hlist_sysget()
657 if (ioctl(s4, SIOCGLIFCONF, (char *)&lifc) < 0) { in smb_nic_hlist_sysget()
660 free(lifc.lifc_buf); in smb_nic_hlist_sysget()
664 lifrp = lifc.lifc_req; in smb_nic_hlist_sysget()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/
H A Dstartup.c57 struct lifconf lifc; in initifs() local
86 lifc.lifc_family = AF_INET6; in initifs()
87 lifc.lifc_flags = 0; in initifs()
88 lifc.lifc_len = bufsize; in initifs()
89 lifc.lifc_buf = buf; in initifs()
90 if (ioctl(iocsoc, SIOCGLIFCONF, (char *)&lifc) < 0) { in initifs()
102 lifrp = lifc.lifc_req; in initifs()
103 for (n = lifc.lifc_len / sizeof (struct lifreq); n > 0; n--, lifrp++) { in initifs()
/illumos-gate/usr/src/cmd/cmd-inet/sbin/dhcpagent/
H A Dinterface.c1711 struct lifconf lifc; in remove_v6_strays() local
1738 (void) memset(&lifc, 0, sizeof (lifc)); in remove_v6_strays()
1739 lifc.lifc_family = AF_INET6; in remove_v6_strays()
1740 lifc.lifc_flags = LIFC_ALLZONES | LIFC_NOXMIT | LIFC_TEMPORARY; in remove_v6_strays()
1742 lifc.lifc_len = numifs * sizeof (*lifrp); in remove_v6_strays()
1743 lifrp = realloc(lifc.lifc_buf, lifc.lifc_len); in remove_v6_strays()
1747 free(lifc.lifc_buf); in remove_v6_strays()
1750 lifc.lifc_buf = (caddr_t)lifrp; in remove_v6_strays()
1752 if (ioctl(v6_sock_fd, SIOCGLIFCONF, &lifc) == 0 && in remove_v6_strays()
1753 lifc.lifc_len < numifs * sizeof (*lifrp)) in remove_v6_strays()
[all …]
/illumos-gate/usr/src/contrib/mDNSResponder/mDNSPosix/
H A DmDNSUNP.c382 struct lifconf lifc; in get_ifi_info_solaris() local
410 lifc.lifc_family = family; in get_ifi_info_solaris()
411 lifc.lifc_len = len; in get_ifi_info_solaris()
412 lifc.lifc_buf = buf; in get_ifi_info_solaris()
413 lifc.lifc_flags = 0; in get_ifi_info_solaris()
415 if (ioctl(sockfd, SIOCGLIFCONF, &lifc) < 0) in get_ifi_info_solaris()
418 nlifr = lifc.lifc_len / sizeof(struct lifreq); in get_ifi_info_solaris()
422 lifrp = lifc.lifc_req; in get_ifi_info_solaris()
463 lifc.lifc_req, ifname, &best_lifr)) == NULL) in get_ifi_info_solaris()
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Daf_rds.c268 struct lifconf lifc; in rdsv3_ioctl() local
315 if (ddi_copyin((void *)arg, &lifc, sizeof (struct lifconf), 0) in rdsv3_ioctl()
329 if ((lifc.lifc_len > 0) && (numifs > 0)) { in rdsv3_ioctl()
330 if (ddi_copyout(buf, (void *)lifc.lifc_req, in rdsv3_ioctl()
331 (lifc.lifc_len < bufsize) ? lifc.lifc_len : in rdsv3_ioctl()
340 lifc.lifc_len = bufsize; in rdsv3_ioctl()
341 if (ddi_copyout(&lifc, (void *)arg, sizeof (struct lifconf), in rdsv3_ioctl()
H A Drdsv3_impl.c116 struct lifconf lifc; in rdsv3_do_ip_ioctl() local
156 lifc.lifc_family = AF_UNSPEC; in rdsv3_do_ip_ioctl()
157 lifc.lifc_flags = LIFC_NOXMIT | LIFC_TEMPORARY | LIFC_ALLZONES; in rdsv3_do_ip_ioctl()
158 lifc.lifc_len = bufsize; in rdsv3_do_ip_ioctl()
159 lifc.lifc_buf = buf; in rdsv3_do_ip_ioctl()
160 rc = ksocket_ioctl(so4, SIOCGLIFCONF, (intptr_t)&lifc, &rval, CRED()); in rdsv3_do_ip_ioctl()
167 if (bufsize <= lifc.lifc_len) { in rdsv3_do_ip_ioctl()
173 n = lifc.lifc_len / sizeof (struct lifreq); in rdsv3_do_ip_ioctl()
178 for (i = 0, j = 0, lp = lifc.lifc_req; i < n; i++, lp++) { in rdsv3_do_ip_ioctl()
228 for (i = 0, lp = lifc.lifc_req; i < n; i++, lp++) { in rdsv3_do_ip_ioctl()
/illumos-gate/usr/src/uts/common/io/ib/mgt/ibcm/
H A Dibcm_arp.c381 struct lifconf lifc; in ibcm_arp_get_ibd_ipaddr() local
390 if (ibcm_do_lifconf(&lifc, &bufsize, family_loc) != 0) in ibcm_arp_get_ibd_ipaddr()
393 nifs = lifc.lifc_len / sizeof (struct lifreq); in ibcm_arp_get_ibd_ipaddr()
398 for (lifrp = lifc.lifc_req, i = 0; i < nifs; i++, lifrp++) { in ibcm_arp_get_ibd_ipaddr()
504 kmem_free(lifc.lifc_buf, bufsize); in ibcm_arp_get_ibd_ipaddr()
/illumos-gate/usr/src/lib/libresolv2/common/resolv/
H A Dres_init.c292 struct lifconf lifc; in __res_vinit() local
310 lifc.lifc_family = AF_UNSPEC; in __res_vinit()
311 lifc.lifc_flags = 0; in __res_vinit()
312 lifc.lifc_len = buflen; in __res_vinit()
313 lifc.lifc_lifcu.lifcu_buf = (caddr_t)buf; in __res_vinit()
314 if (ioctl(s, SIOCGLIFCONF, (char *)&lifc) < 0) { in __res_vinit()
323 lreqp = (struct lifreq *)&lifc.lifc_req[i]; in __res_vinit()
/illumos-gate/usr/src/lib/libnsl/nss/
H A Dnetdir_inet_sundry.c332 struct lifconf lifc; in get_if_info() local
358 lifc.lifc_family = AF_INET; in get_if_info()
359 lifc.lifc_flags = 0; in get_if_info()
360 lifc.lifc_len = needed; in get_if_info()
361 lifc.lifc_buf = (char *)buf; in get_if_info()
362 if (nss_ioctl(AF_INET, SIOCGLIFCONF, &lifc) == -1) { in get_if_info()
377 numifs = lifc.lifc_len / (int)sizeof (struct lifreq); in get_if_info()
H A Dgetipnodeby.c684 struct lifconf lifc; in __ai_addrconfig() local
749 lifc.lifc_family = af; in __ai_addrconfig()
750 lifc.lifc_flags = 0; in __ai_addrconfig()
751 lifc.lifc_len = bufsize; in __ai_addrconfig()
752 lifc.lifc_buf = (caddr_t)buf; in __ai_addrconfig()
753 if (nss_ioctl(af, SIOCGLIFCONF, &lifc) < 0) in __ai_addrconfig()
756 nlifr = lifc.lifc_len / sizeof (struct lifreq); in __ai_addrconfig()
/illumos-gate/usr/src/lib/libresolv2/common/irs/
H A Dgethostent.c505 struct LIFCONF lifc; local
526 lifc.lifc_family = AF_UNSPEC; /*%< request all families */
527 lifc.lifc_flags = 0;
529 lifc.lifc_len = bufsiz;
530 lifc.lifc_buf = buf;
531 if ((n = ioctl(s, SIOCGLIFCONF, (char *)&lifc)) != -1) {
540 if (lifc.lifc_len + 2 * sizeof(lifreq) < bufsiz)
554 cplim = buf + lifc.lifc_len; /*%< skip over if's with big ifr_addr's */
/illumos-gate/usr/src/lib/libadutils/common/
H A Daddisc.c475 struct lifconf lifc; in find_subnets() local
506 lifc.lifc_family = AF_INET; in find_subnets()
507 lifc.lifc_flags = 0; in find_subnets()
508 lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq); in find_subnets()
509 lifc.lifc_buf = malloc(lifc.lifc_len); in find_subnets()
511 if (lifc.lifc_buf == NULL) { in find_subnets()
517 if (ioctl(sock, SIOCGLIFCONF, (char *)&lifc) < 0) { in find_subnets()
520 free(lifc.lifc_buf); in find_subnets()
525 n = lifc.lifc_len / (int)sizeof (struct lifreq); in find_subnets()
528 free(lifc.lifc_buf); in find_subnets()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/statd/
H A Dsm_proc.c1034 struct lifconf *lifc = NULL; in merge_hosts() local
1065 lifc = getmyaddrs(); in merge_hosts()
1066 if (lifc == NULL) { in merge_hosts()
1069 lifrp = lifc->lifc_req; in merge_hosts()
1070 for (n = lifc->lifc_len / sizeof (struct lifreq); n > 0; n--, lifrp++) { in merge_hosts()
1130 if (lifc) { in merge_hosts()
1131 free(lifc->lifc_buf); in merge_hosts()
1132 free(lifc); in merge_hosts()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.routed/
H A Dif.c1041 struct lifconf lifc; in ifscan() local
1099 lifc.lifc_family = AF_INET; /* We only need IPv4 interfaces */ in ifscan()
1100 lifc.lifc_flags = LIFC_NOXMIT; in ifscan()
1101 lifc.lifc_len = needed; in ifscan()
1102 lifc.lifc_buf = buf; in ifscan()
1103 if (ioctl(sock, SIOCGLIFCONF, &lifc) == -1) { in ifscan()
1120 if (lifc.lifc_len >= needed - sizeof (struct lifreq)) in ifscan()
1123 lifrp = lifc.lifc_req; in ifscan()
1124 lifrp_lim = lifrp + lifc.lifc_len / sizeof (*lifrp); in ifscan()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/
H A Dmain.c625 struct lifconf lifc; in initifs() local
672 lifc.lifc_family = AF_INET6; in initifs()
673 lifc.lifc_flags = LIFC_NOXMIT | LIFC_TEMPORARY; in initifs()
674 lifc.lifc_len = bufsize; in initifs()
675 lifc.lifc_buf = buf; in initifs()
677 if (ioctl(ifsock, SIOCGLIFCONF, (char *)&lifc) < 0) { in initifs()
683 lifr = (struct lifreq *)lifc.lifc_req; in initifs()
684 for (n = lifc.lifc_len / sizeof (struct lifreq); n > 0; n--, lifr++) in initifs()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/
H A Dmpd_main.c267 struct lifconf lifc; in initifs() local
331 lifc.lifc_family = AF_UNSPEC; in initifs()
332 lifc.lifc_flags = LIFC_ALLZONES | LIFC_UNDER_IPMP; in initifs()
333 lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq); in initifs()
334 lifc.lifc_buf = buf; in initifs()
336 if (ioctl(ifsock_v4, SIOCGLIFCONF, (char *)&lifc) < 0) { in initifs()
347 nlifr = lifc.lifc_len / sizeof (struct lifreq); in initifs()
357 for (lifr = lifc.lifc_req, i = 0; i < nlifr; i++, lifr++) { in initifs()

12