Home
last modified time | relevance | path

Searched refs:ifr (Results 1 – 25 of 26) sorted by relevance

12

/illumos-gate/usr/src/cmd/ipf/lib/common/
H A Dprintfraginfo.c11 void printfraginfo(prefix, ifr) in printfraginfo() argument
13 struct ipfr *ifr;
19 printf("%s%s -> ", prefix, hostname(4, &ifr->ipfr_src));
20 if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule,
24 hostname(4, &ifr->ipfr_dst), ifr->ipfr_id, ifr->ipfr_ttl,
25 ifr->ipfr_p, ifr->ipfr_seen0, ifr->ipfr_ifp, ifr->ipfr_tos,
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/
H A Dhostconfig.c118 struct ifreq *ifr; local
243 ifr = ifc.ifc_req;
245 for (; n > 0; n--, ifr++) {
250 if ((ifr->ifr_flags & IFF_LOOPBACK) ||
252 !(ifr->ifr_flags & IFF_UP) ||
253 (ifr->ifr_flags & IFF_NOARP) ||
257 ifr->ifr_name);
262 ifr->ifr_name);
455 struct ifreq ifr; local
465 if (strlcpy(ifr.ifr_name, dev, sizeof (ifr.ifr_name)) >=
[all …]
H A Din.rarpd.c304 struct ifreq *ifr; in getintf() local
342 if ((ifr->ifr_flags & IFF_LOOPBACK) || in getintf()
343 !(ifr->ifr_flags & IFF_UP) || in getintf()
344 !(ifr->ifr_flags & IFF_BROADCAST) || in getintf()
345 (ifr->ifr_flags & IFF_NOARP) || in getintf()
346 (ifr->ifr_flags & IFF_POINTOPOINT)) in getintf()
349 if (!ifparse_ifspec(ifr->ifr_name, &ifsp)) in getintf()
859 struct ifreq ifr; in get_ifdata() local
874 (void) snprintf(ifr.ifr_name, sizeof (ifr.ifr_name), "%s%d", dev, unit); in get_ifdata()
876 (char *)&ifr) < 0) in get_ifdata()
[all …]
H A Din.rwhod.c502 struct ifreq ifreq, *ifr; in configure() local
552 ifr = ifc.ifc_req; in configure()
553 for (n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++) { in configure()
555 if (index(ifr->ifr_name, ':') != NULL) in configure()
560 strcmp(ifr->ifr_name, np->n_name) == 0) in configure()
565 ifreq = *ifr; in configure()
569 np->n_name = malloc(strlen(ifr->ifr_name) + 1); in configure()
574 (void) strcpy(np->n_name, ifr->ifr_name); in configure()
575 np->n_addrlen = sizeof (ifr->ifr_addr); in configure()
582 bcopy(&ifr->ifr_addr, np->n_addr, np->n_addrlen); in configure()
H A Droute.c1965 struct ifreq *ifr; in inet_makesubnetmask() local
1991 ifr = ifc.ifc_req; in inet_makesubnetmask()
1992 for (n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++) { in inet_makesubnetmask()
1993 ifreq = *ifr; in inet_makesubnetmask()
1995 sin = (struct sockaddr_in *)&ifr->ifr_addr; in inet_makesubnetmask()
/illumos-gate/usr/src/lib/libslp/clib/
H A Dslp_net_utils.c230 struct ifreq *ifrp, ifr; in get_all_interfaces() local
271 (void) memset((char *)&ifr, 0, sizeof (ifr)); in get_all_interfaces()
272 (void) strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof (ifr.ifr_name)); in get_all_interfaces()
273 if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) { in get_all_interfaces()
276 if (!(ifr.ifr_flags & IFF_UP)) { in get_all_interfaces()
280 all_ifs[i].flags = ifr.ifr_flags; in get_all_interfaces()
283 if (ioctl(s, SIOCGIFADDR, (caddr_t)&ifr) < 0) { in get_all_interfaces()
287 (void) memcpy(&(all_ifs[i].addr), &ifr.ifr_addr, in get_all_interfaces()
291 if (ioctl(s, SIOCGIFBRDADDR, (caddr_t)&ifr) < 0) { in get_all_interfaces()
295 (void) memcpy(&(all_ifs[i].bc_addr), &ifr.ifr_addr, in get_all_interfaces()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dsys-solaris.c312 BZERO(&ifr, sizeof (ifr)); in read_ip_interface()
313 (void) strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); in read_ip_interface()
615 BZERO(&ifr, sizeof (ifr)); in plumb_ipif()
616 (void) strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); in plumb_ipif()
784 BZERO(&ifr, sizeof (ifr));
866 BZERO(&ifr, sizeof (ifr)); in giflags()
867 (void) strncpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); in giflags()
2288 BZERO(&ifr, sizeof (ifr));
2427 BZERO(&ifr, sizeof (ifr));
2472 BZERO(&ifr, sizeof (ifr));
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/sbin/netstrategy/
H A Dnetstrategy.c169 struct lifreq *ifr; in get_first_interface() local
194 for (ifr = ifconf.lifc_req; ifr < &ifconf.lifc_req[ifconf.lifc_len / in get_first_interface()
195 sizeof (ifconf.lifc_req[0])]; ifr++) { in get_first_interface()
199 if (strchr(ifr->lifr_name, ':') != NULL) in get_first_interface()
202 isv4 = ifr->lifr_addr.ss_family == AF_INET; in get_first_interface()
204 (void) strncpy(flifr.lifr_name, ifr->lifr_name, LIFNAMSIZ); in get_first_interface()
240 (void) strncpy(interface, ifr->lifr_name, LIFNAMSIZ); in get_first_interface()
242 sin = (struct sockaddr_in *)&ifr->lifr_addr; in get_first_interface()
/illumos-gate/usr/src/ucblib/librpcsoc/
H A Dget_myaddress.c55 struct ifreq ifreq, *ifr; in get_myaddress() local
94 ifr = ifc.ifc_req; in get_myaddress()
95 for (len = ifc.ifc_len; len > 0; len -= sizeof (ifreq), ifr++) { in get_myaddress()
96 ifreq = *ifr; in get_myaddress()
104 if (ifr->ifr_addr.sa_family != AF_INET) in get_myaddress()
112 *addr = *((struct sockaddr_in *)&ifr->ifr_addr); in get_myaddress()
/illumos-gate/usr/src/contrib/mDNSResponder/mDNSPosix/
H A DmDNSUNP.c95 struct ifreq ifr; in get_ifi_info_linuxv6() local
182 memcpy(ifr.ifr_name, ifname, IFNAMSIZ); in get_ifi_info_linuxv6()
200 ifi->ifi_flags = ifr.ifr_flags; in get_ifi_info_linuxv6()
549 struct ifreq *ifr, ifrcopy; in get_ifi_info() local
600 ifr = (struct ifreq *) ptr; in get_ifi_info()
603 if (sizeof(struct ifreq) > sizeof(ifr->ifr_name) + GET_SA_LEN(ifr->ifr_addr)) in get_ifi_info()
606 ptr += sizeof(ifr->ifr_name) + GET_SA_LEN(ifr->ifr_addr); in get_ifi_info()
610 if (ifr->ifr_addr.sa_family != family) in get_ifi_info()
623 ifrcopy = *ifr; in get_ifi_info()
646 ifrcopy = *ifr; in get_ifi_info()
[all …]
/illumos-gate/usr/src/lib/libresolv/
H A Dres_init.c112 struct ifreq ifr; in res_init() local
144 (void) memset((void *) &ifr, 0, sizeof (ifr)); in res_init()
145 strncpy(ifr.ifr_name, ifrp->ifr_name, in res_init()
146 sizeof (ifr.ifr_name)); in res_init()
147 if (ioctl(s, SIOCGIFFLAGS, (char *)&ifr) < 0) { in res_init()
153 flags = ifr.ifr_flags; in res_init()
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Drdsv3_impl.c321 struct ifreq *lp, *rlp, ifr; in rdsv3_do_ip_ioctl_old() local
382 bcopy(lp, &ifr, sizeof (struct ifreq)); in rdsv3_do_ip_ioctl_old()
386 switch (ifr.ifr_addr.sa_family) { in rdsv3_do_ip_ioctl_old()
399 (ushort_t)ifr.ifr_flags); in rdsv3_do_ip_ioctl_old()
409 (ushort_t)ifr.ifr_flags); in rdsv3_do_ip_ioctl_old()
410 if (((ushort_t)ifr.ifr_flags) & in rdsv3_do_ip_ioctl_old()
415 (ushort_t)ifr.ifr_flags); in rdsv3_do_ip_ioctl_old()
420 (ushort_t)ifr.ifr_flags); in rdsv3_do_ip_ioctl_old()
449 switch (ifr.ifr_addr.sa_family) { in rdsv3_do_ip_ioctl_old()
462 rc, ifr.ifr_name); in rdsv3_do_ip_ioctl_old()
[all …]
H A Daf_rds.c271 struct ifreq ifr; in rdsv3_ioctl() local
422 if (ddi_copyin((void *)arg, &ifr, sizeof (struct ifreq), 0) in rdsv3_ioctl()
429 RDSV3_DPRINTF2("rdsv3_ioctl", "1. name: %s", ifr.ifr_name); in rdsv3_ioctl()
431 rc = ksocket_ioctl(so4, cmd, (intptr_t)&ifr, &rval, CRED()); in rdsv3_ioctl()
435 rc, ifr.ifr_name, cmd); in rdsv3_ioctl()
440 RDSV3_DPRINTF2("rdsv3_ioctl", "2. name: %s", ifr.ifr_name); in rdsv3_ioctl()
442 (void) ddi_copyout(&ifr, (void *)arg, in rdsv3_ioctl()
/illumos-gate/usr/src/uts/common/io/
H A Dstrplumb.c334 struct ifreq ifr; in strplumb_dev() local
340 bzero(&ifr, sizeof (ifr)); in strplumb_dev()
412 &(ifr.ifr_ip_muxid))) != 0) { in strplumb_dev()
422 DBG2("UDP-ARP-IP-%s muxid: %d\n", rootfs.bo_ifname, ifr.ifr_ip_muxid); in strplumb_dev()
449 &(ifr.ifr_arp_muxid))) != 0) { in strplumb_dev()
455 DBG2("UDP-ARP-%s muxid: %d\n", rootfs.bo_ifname, ifr.ifr_arp_muxid); in strplumb_dev()
460 (void) strlcpy(ifr.ifr_name, rootfs.bo_ifname, sizeof (ifr.ifr_name)); in strplumb_dev()
462 if ((err = ldi_ioctl(mux_lh, SIOCSIFMUXID, (intptr_t)&ifr, FKIOCTL, in strplumb_dev()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dlocaladdr.c929 struct ifreq *ifr, ifreq, *ifr2; in foreach_localaddr() local
958 ifr = (struct ifreq *)((caddr_t) buf+i); in foreach_localaddr()
960 if (i + ifreq_size(*ifr) > n) in foreach_localaddr()
969 ifr->ifr_name[0] = '\0'; in foreach_localaddr()
992 if (ifr2->ifr_addr.sa_family == ifr->ifr_addr.sa_family in foreach_localaddr()
993 && ifreq_size (*ifr) == ifreq_size (*ifr2) in foreach_localaddr()
999 (ifreq_size (*ifr) in foreach_localaddr()
1007 if ((*pass1fn) (data, &ifr->ifr_addr)) in foreach_localaddr()
1025 ifr = (struct ifreq *)((caddr_t) buf+i); in foreach_localaddr()
1027 if (ifr->ifr_name[0] == '\0') in foreach_localaddr()
[all …]
/illumos-gate/usr/src/boot/include/net/
H A Dif.h415 #define _SIZEOF_ADDR_IFREQ(ifr) \ argument
416 ((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
418 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/
H A Din.rdisc.c188 struct ifreq *ifr, struct logint *li);
1304 struct ifreq ifreq, *ifr; in initifs() local
1360 ifr = ifc.ifc_req; in initifs()
1362 ifreq = *ifr; in initifs()
1366 (void) strncpy(lifreq.lifr_name, ifr->ifr_name, in initifs()
1367 sizeof (ifr->ifr_name)); in initifs()
1372 if (ifr->ifr_addr.sa_family != AF_INET) in initifs()
1413 if (!getconfig(sock, lifreq.lifr_flags, &ifr->ifr_addr, in initifs()
1541 struct ifreq *ifr, struct logint *li) in getconfig() argument
1547 ifreq = *ifr; /* Copy name etc */ in getconfig()
[all …]
/illumos-gate/usr/src/cmd/sendmail/src/
H A Dconf.c4792 int af = ifr->lifr_addr.ss_family; in load_if_names()
4823 if ((len - i) < sizeof(*ifr)) in load_if_names()
4833 i += sizeof(ifr->ifr_name) + in load_if_names()
4834 max(sizeof(ifr->ifr_addr), ifr->ifr_addr.sa_len); in load_if_names()
4836 i += sizeof(*ifr); in load_if_names()
4857 name = ifr->lifr_name; in load_if_names()
5020 i += sizeof(*ifr); in load_if_names()
5025 af = ifr->ifr_addr.sa_family; in load_if_names()
5043 # define IFRFREF (*ifr) in load_if_names()
5060 ifr->ifr_name, inet_ntoa(ia)); in load_if_names()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppstats/
H A Dpppstats.c544 struct ifreq ifr; local
557 strncpy(ifr.ifr_name, interface, sizeof(ifr.ifr_name));
558 if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) {
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipfstat.c1603 struct ipfr *ipfrtab[IPFT_SIZE], ifr; local
1625 if (kmemcpy((char *)&ifr, (u_long)ipfrtab[i],
1626 sizeof(ifr)) == -1)
1628 ifr.ipfr_ttl -= ticks;
1629 printfraginfo("", &ifr);
1630 ipfrtab[i] = ifr.ipfr_next;
1639 if (kmemcpy((char *)&ifr, (u_long)ipfrtab[i],
1640 sizeof(ifr)) == -1)
1642 ifr.ipfr_ttl -= ticks;
1643 printfraginfo("NAT: ", &ifr);
[all …]
/illumos-gate/usr/src/uts/common/fs/nfs/
H A Dnfs_dlinet.c1522 struct ifreq ifr; in ifioctl() local
1528 ifr.ifr_addr = *(struct sockaddr *)nbuf->buf; in ifioctl()
1529 (void) strncpy((caddr_t)&ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); in ifioctl()
1532 iocb.ic_len = sizeof (ifr); in ifioctl()
1533 iocb.ic_dp = (caddr_t)&ifr; in ifioctl()
1550 *(struct sockaddr *)nbuf->buf = ifr.ifr_addr; in ifioctl()
1559 struct ifreq ifr; in setifflags() local
1563 (void) strncpy((caddr_t)&ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); in setifflags()
1566 iocb.ic_len = sizeof (ifr); in setifflags()
1567 iocb.ic_dp = (caddr_t)&ifr; in setifflags()
[all …]
/illumos-gate/usr/src/lib/libsldap/common/
H A Dns_common.c677 struct ifreq ifreq, *ifr; in __s_api_get_local_interfaces() local
706 ifr = (struct ifreq *)buf; in __s_api_get_local_interfaces()
717 for (i = 0, n = numifs; n > 0; n--, ifr++) { in __s_api_get_local_interfaces()
720 ifreq = *ifr; in __s_api_get_local_interfaces()
726 (ifr->ifr_addr.sa_family != AF_INET)) in __s_api_get_local_interfaces()
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dip_if.c7047 struct ifreq *ifr; in ip_extract_lifreq() local
7088 name = ifr->ifr_name; in ip_extract_lifreq()
7329 struct ifreq *ifr; in ip_sioctl_get_ifconf() local
7447 ifr++; in ip_sioctl_get_ifconf()
10231 struct ifreq *ifr; in ip_sioctl_flags() local
10773 struct ifreq *ifr; in ip_sioctl_mtu() local
10836 struct ifreq *ifr; in ip_sioctl_get_mtu() local
11098 struct ifreq *ifr; in ip_sioctl_metric() local
11121 struct ifreq *ifr; in ip_sioctl_get_metric() local
19058 struct ifreq *ifr; in ip_sioctl_get_ifhwaddr() local
[all …]
H A Dip.c12538 struct ifreq *ifr; in ip_reprocess_ioctl() local
12560 ifr = (struct ifreq *)mp1->b_rptr; in ip_reprocess_ioctl()
12561 sin = (sin_t *)&ifr->ifr_addr; in ip_reprocess_ioctl()
/illumos-gate/usr/src/lib/libnsl/nss/
H A Dnetdir_inet.c2912 struct ifreq ifreq, *ifr; in getbroadcastnets() local
2959 ifr = (struct ifreq *)buf; in getbroadcastnets()
2961 n > 0; n--, ifr++) { in getbroadcastnets()
2962 ifreq = *ifr; in getbroadcastnets()
2969 (ifr->ifr_addr.sa_family != AF_INET)) in getbroadcastnets()
2973 sin = (struct sockaddr_in *)&ifr->ifr_addr; in getbroadcastnets()
2992 sin = (struct sockaddr_in *)&ifr->ifr_addr; in getbroadcastnets()

12