/freebsd/sys/sys/ |
H A D | sockio.h | 51 #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ 53 #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ 54 #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ 56 #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ 57 #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ 58 #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ 60 #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ 61 #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ 65 #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ 66 #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ [all …]
|
/freebsd/libexec/bootpd/ |
H A D | getif.c | 34 static struct ifreq ifreq[10]; /* Holds interface configuration */ variable 40 struct ifreq * 45 struct ifreq *ifrq, *ifrmax; in getif() 51 return (struct ifreq *) 0; in getif() 63 ioc.ic_len = sizeof(ifreq); in getif() 64 ioc.ic_dp = (char *) ifreq; in getif() 67 ifconf.ifc_req = ifreq; in getif() 69 ifconf.ifc_len = sizeof(ifreq); in getif() 70 ifconf.ifc_req = ifreq; in getif() 75 return (struct ifreq *) 0; in getif() [all …]
|
H A D | getether.c | 79 struct ifreq ifrnit; 124 struct ifreq ibuf[16]; in getether() 126 struct ifreq *ifrp, *ifend; in getether() 137 ifc.ifc_len < sizeof(struct ifreq)) { in getether() 143 ifend = (struct ifreq *) ((char *) ibuf + ifc.ifc_len); in getether() 157 ifrp = (struct ifreq *) ((char *) ifrp + n); in getether() 342 struct ifreq phys;
|
/freebsd/contrib/libpcap/ |
H A D | pcap-haiku.c | 48 struct ifreq ifreq; member 153 struct ifreq *ifreq, char *errbuf) in ioctl_ifreq() argument 155 if (ioctl(fd, op, ifreq, sizeof(struct ifreq)) < 0) { in ioctl_ifreq() 170 &handlep->ifreq, handle->errbuf) < 0) in get_promisc() 172 return (handlep->ifreq.ifr_flags & IFF_PROMISC) != 0; in get_promisc() 181 handlep->ifreq.ifr_flags |= IFF_PROMISC; in set_promisc() 183 handlep->ifreq.ifr_flags &= ~IFF_PROMISC; in set_promisc() 186 &handlep->ifreq, handle->errbuf); in set_promisc() 229 &handlep->ifreq, handle->errbuf) < 0) in pcap_stats_haiku() 234 stats->ps_ifdrop = handlep->ifreq.ifr_stats.receive.dropped - stats->ps_ifdrop; in pcap_stats_haiku() [all …]
|
H A D | fad-gifc.c | 141 register struct ifreq *ifrp, *ifend, *ifnext; in pcapint_findalldevs_interfaces() 149 struct ifreq ifrflags, ifrnetmask, ifrbroadaddr, ifrdstaddr; in pcapint_findalldevs_interfaces() 209 ifrp = (struct ifreq *)buf; in pcapint_findalldevs_interfaces() 210 ifend = (struct ifreq *)(buf + ifc.ifc_len); in pcapint_findalldevs_interfaces() 227 ifnext = (struct ifreq *)((char *)ifrp + n); in pcapint_findalldevs_interfaces()
|
/freebsd/sys/net/ |
H A D | if_gre.h | 162 #define GRESADDRS _IOW('i', 101, struct ifreq) 163 #define GRESADDRD _IOW('i', 102, struct ifreq) 164 #define GREGADDRS _IOWR('i', 103, struct ifreq) 165 #define GREGADDRD _IOWR('i', 104, struct ifreq) 166 #define GRESPROTO _IOW('i' , 105, struct ifreq) 167 #define GREGPROTO _IOWR('i', 106, struct ifreq) 169 #define GREGKEY _IOWR('i', 107, struct ifreq) 170 #define GRESKEY _IOW('i', 108, struct ifreq) 171 #define GREGOPTS _IOWR('i', 109, struct ifreq) 172 #define GRESOPTS _IOW('i', 110, struct ifreq) [all …]
|
H A D | if_pfsync.h | 273 #define SIOCSETPFSYNC _IOW('i', 247, struct ifreq) 274 #define SIOCGETPFSYNC _IOWR('i', 248, struct ifreq) 275 #define SIOCSETPFSYNCNV _IOW('i', 249, struct ifreq) 276 #define SIOCGETPFSYNCNV _IOWR('i', 250, struct ifreq)
|
H A D | if_ipsec.h | 34 #define IPSECGREQID _IOWR('i', 160, struct ifreq) 35 #define IPSECSREQID _IOW('i', 161, struct ifreq)
|
/freebsd/contrib/ntp/libntp/lib/isc/unix/ |
H A D | ifiter_ioctl.c | 176 if (iter->ifc.ifc_len + 2 * sizeof(struct ifreq) in getbuf4() 451 struct ifreq *ifrp; in internal_current4() 452 struct ifreq ifreq; in internal_current4() local 477 memset(&ifreq, 0, sizeof(ifreq)); in internal_current4() 478 memcpy(&ifreq, ifrp, sizeof(ifreq)); in internal_current4() 480 family = ifreq.ifr_addr.sa_family; in internal_current4() 491 INSIST(sizeof(ifreq.ifr_name) <= sizeof(iter->current.name)); in internal_current4() 493 memcpy(iter->current.name, ifreq.ifr_name, sizeof(ifreq.ifr_name)); in internal_current4() 496 (struct sockaddr *)&ifrp->ifr_addr, ifreq.ifr_name); in internal_current4() 524 if (isc_ioctl(iter->socket, SIOCGIFFLAGS, (char *) &ifreq) < 0) { in internal_current4() [all …]
|
/freebsd/tools/tools/mcgrab/ |
H A D | mcgrab.cc | 94 struct ifreq ifreq; in grab() local 110 bzero((struct ifreq *)&ifreq, sizeof(ifreq)); in grab() 112 strncpy(ifreq.ifr_name, interface, IFNAMSIZ); in grab() 113 if (ioctl(sock, SIOCGIFADDR, &ifreq) < 0) { in grab() 119 &((struct sockaddr_in*) &ifreq.ifr_addr)->sin_addr, in grab() 131 &((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr, in grab()
|
/freebsd/contrib/netbsd-tests/net/if/ |
H A D | t_compat.c | 53 struct oifreq ifreq; in ATF_TC_BODY() local 57 memset(&ifreq,'\0',sizeof ifreq); in ATF_TC_BODY() 65 sprintf(ifreq.ifr_name, "shmif%d", ifnum); in ATF_TC_BODY() 66 netcfg_rump_if(ifreq.ifr_name, "1.7.64.10", "255.255.0.0"); in ATF_TC_BODY() 72 RL(rump_sys_ioctl(fd, OOSIOCGIFBRDADDR, &ifreq)); in ATF_TC_BODY() 75 sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; in ATF_TC_BODY()
|
H A D | ifconf.c | 69 return ifc.ifc_len / sizeof(struct ifreq); in get_number_of_entries() 83 struct ifreq *ifreqs; in show_interfaces() 91 ifreqs = malloc(sizeof(struct ifreq) * nifreqs); in show_interfaces() 99 ifc.ifc_len = sizeof(struct ifreq) * nifreqs; in show_interfaces() 107 for (i=0; i < (int)(ifc.ifc_len / sizeof(struct ifreq)); i++) { in show_interfaces()
|
/freebsd/usr.sbin/traceroute/ |
H A D | ifaddrlist.c | 67 register struct ifreq *ifrp, *ifend, *ifnext; in ifaddrlist() 71 struct ifreq ibuf[(32 * 1024) / sizeof(struct ifreq)], ifr; in ifaddrlist() 85 ifc.ifc_len < (int)sizeof(struct ifreq)) { in ifaddrlist() 97 ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); in ifaddrlist() 106 ifnext = (struct ifreq *)((char *)ifrp + n); in ifaddrlist()
|
/freebsd/tools/tools/mctest/ |
H A D | mctest.cc | 102 struct ifreq ifreq; in sink() local 122 strncpy(ifreq.ifr_name, interface, IFNAMSIZ); in sink() 123 if (ioctl(sock, SIOCGIFADDR, &ifreq) < 0) { in sink() 129 &((struct sockaddr_in*) &ifreq.ifr_addr)->sin_addr, in sink() 140 &((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr, in sink() 303 struct ifreq ifreq; in source() local 323 strncpy(ifreq.ifr_name, interface, IFNAMSIZ); in source() 324 if (ioctl(sock, SIOCGIFADDR, &ifreq) < 0) { in source() 330 &((struct sockaddr_in*) &ifreq.ifr_addr)->sin_addr, in source() 341 &((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr, in source()
|
/freebsd/lib/libifconfig/ |
H A D | libifconfig.c | 169 struct ifreq ifr; in ifconfig_get_description() 221 struct ifreq ifr; in ifconfig_set_description() 257 struct ifreq ifr; in ifconfig_unset_description() 273 struct ifreq ifr; in ifconfig_set_name() 342 struct ifreq ifr; in ifconfig_get_fib() 358 struct ifreq ifr; in ifconfig_set_mtu() 374 struct ifreq ifr; in ifconfig_get_mtu() 408 struct ifreq ifr; in ifconfig_set_metric() 424 struct ifreq ifr; in ifconfig_get_metric() 441 struct ifreq ifr; in ifconfig_set_capability() [all …]
|
/freebsd/tools/tools/vimage/ |
H A D | vimage.c | 93 struct ifreq ifreq; in main() local 218 ifreq.ifr_jid = jid; in main() 219 strncpy(ifreq.ifr_name, argv[1], sizeof(ifreq.ifr_name)); in main() 220 if (ioctl(s, SIOCSIFVNET, (caddr_t)&ifreq) < 0) in main() 227 ifreq.ifr_data = ifname; in main() 229 if (strcmp(ifreq.ifr_name, ifname) != 0) { in main() 238 while (ioctl(s, SIOCSIFNAME, (caddr_t)&ifreq) < 0) { in main() 249 printf("%s@%s\n", ifreq.ifr_name, argv[0]); in main()
|
/freebsd/sbin/ifconfig/ |
H A D | ifvlan.c | 78 struct ifreq ifr = { .ifr_data = (caddr_t)&vreq }; in vlan_status() 149 vlan_create(if_ctx *ctx, struct ifreq *ifr) in vlan_create() 176 vlan_set(int s, struct ifreq *ifr) in vlan_set() 191 struct ifreq ifr = { .ifr_data = (caddr_t)&vreq }; in setvlantag() 222 struct ifreq ifr = { .ifr_data = (caddr_t)&vreq }; in setvlandev() 234 struct ifreq ifr = { .ifr_data = (caddr_t)&vreq }; in setvlanproto() 265 struct ifreq ifr = {}; in setvlanpcp() 281 struct ifreq ifr = { .ifr_data = (caddr_t)&vreq }; in unsetvlandev()
|
H A D | ifconfig.c | 192 ifr_set_name(struct ifreq *ifr, const char *name) in ifr_set_name() 198 ioctl_ctx_ifr(if_ctx *ctx, unsigned long cmd, struct ifreq *ifr) in ioctl_ctx_ifr() 205 ifcreate_ioctl(if_ctx *ctx, struct ifreq *ifr) in ifcreate_ioctl() 803 struct ifreq paifr = {}; in list_interfaces_ioctl() 1052 struct ifreq *req = (struct ifreq *)data; in af_exec_ioctl() 1114 struct ifreq ifr = {}; in ifconfig_ioctl() 1292 struct ifreq ifr = {}; in deletetunnel() 1302 struct ifreq ifr = {}; in setifvnet() 1314 struct ifreq ifr = {}; in setifrvnet() 1373 struct ifreq my_ifr; in getifflags() [all …]
|
H A D | iffib.c | 49 struct ifreq ifr; in fib_status() 67 struct ifreq ifr = {}; in setiffib() 85 struct ifreq ifr = {}; in settunfib()
|
/freebsd/contrib/wpa/src/drivers/ |
H A D | linux_ioctl.c | 21 struct ifreq ifr; in linux_set_iface_flags() 61 struct ifreq ifr; in linux_iface_up() 83 struct ifreq ifr; in linux_get_ifhwaddr() 106 struct ifreq ifr; in linux_set_ifhwaddr() 152 struct ifreq ifr; in linux_br_add_if() 186 struct ifreq ifr; in linux_br_del_if()
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | getifaddrs.c | 882 struct ifreq *ifr; in getifaddrs2() 923 struct ifreq ifreq; in getifaddrs2() local 927 ifr = (struct ifreq *)p; in getifaddrs2() 940 memset (&ifreq, 0, sizeof(ifreq)); in getifaddrs2() 941 memcpy (ifreq.ifr_name, ifr->ifr_name, sizeof(ifr->ifr_name)); in getifaddrs2() 943 if (ioctl(fd, siocgifflags, &ifreq) < 0) { in getifaddrs2() 960 (*end)->ifa_flags = ifreq.ifr_flags; in getifaddrs2() 971 if(ifreq.ifr_flags & IFF_BROADCAST) { in getifaddrs2() 979 } else if(ifreq.ifr_flags & IFF_POINTOPOINT) { in getifaddrs2() 1069 struct lifreq ifreq; in getlifaddrs2() local [all …]
|
/freebsd/sys/dev/sbni/ |
H A D | if_sbnivar.h | 143 #define SIOCGHWFLAGS _IOWR('i', 62, struct ifreq) /* get flags */ 144 #define SIOCSHWFLAGS _IOWR('i', 61, struct ifreq) /* set flags */ 145 #define SIOCGINSTATS _IOWR('i', 60, struct ifreq) /* get internal stats */ 146 #define SIOCRINSTATS _IOWR('i', 63, struct ifreq) /* reset internal stats */
|
/freebsd/sys/netinet/ |
H A D | ip_carp.h | 178 #define SIOCSVH _IOWR('i', 245, struct ifreq) 179 #define SIOCGVH _IOWR('i', 246, struct ifreq) 187 int carp_ioctl(struct ifreq *, u_long, struct thread *); 201 extern int (*carp_ioctl_p)(struct ifreq *, u_long, struct thread *);
|
/freebsd/libexec/rbootd/ |
H A D | bpf.c | 81 struct ifreq ifr; in BpfOpen() 210 struct ifreq ibuf[8], *ifrp, *ifend, *mp; in BpfGetIntfName() 229 ifc.ifc_len < sizeof(struct ifreq)) { in BpfGetIntfName() 234 ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); in BpfGetIntfName() 378 struct ifreq ifr; in BpfClose()
|
/freebsd/sys/dev/iwi/ |
H A D | if_iwi_ioctl.h | 20 #define SIOCGIWISTATS _IOWR('i', 147, struct ifreq) 21 #define SIOCZIWISTATS _IOWR('i', 148, struct ifreq)
|