Searched refs:ifr (Results 1 - 25 of 249) sorted by relevance

12345678910

/freebsd-head/contrib/ipfilter/lib/
H A Dprintfraginfo.c15 printfraginfo(prefix, ifr)
17 struct ipfr *ifr;
23 if (ifr->ipfr_v == 6) {
32 PRINTF(" %s -> ", hostname(family, &ifr->ipfr_src));
34 if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule,
39 hostname(family, &ifr->ipfr_dst), ifr->ipfr_id,
40 ifr->ipfr_ttl, ifr->ipfr_p, ifr
[all...]
/freebsd-head/sbin/ifconfig/
H A Diffib.c51 struct ifreq ifr; local
53 memset(&ifr, 0, sizeof(ifr));
54 strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
55 if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) == 0 &&
56 ifr.ifr_fib != RT_DEFAULT_FIB)
57 printf("\tfib: %u\n", ifr.ifr_fib);
59 memset(&ifr, 0, sizeof(ifr));
[all...]
H A Difmac.c57 struct ifreq ifr; local
61 memset(&ifr, 0, sizeof(ifr));
62 strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
66 ifr.ifr_ifru.ifru_data = (void *)label;
67 if (ioctl(s, SIOCGIFMAC, &ifr) == -1)
85 struct ifreq ifr; local
94 memset(&ifr, 0, sizeof(ifr));
[all...]
H A Difgre.c57 ifr.ifr_data = (caddr_t)&opts;
58 if (ioctl(s, GREGKEY, &ifr) == 0)
62 if (ioctl(s, GREGOPTS, &ifr) != 0 || opts == 0)
66 ifr.ifr_data = (caddr_t)&port;
67 if (ioctl(s, GREGPORT, &ifr) == 0 && port != 0)
79 strlcpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
80 ifr.ifr_data = (caddr_t)&grekey;
81 if (ioctl(s, GRESKEY, (caddr_t)&ifr) < 0)
91 strlcpy(ifr
[all...]
H A Difvlan.c74 getvlan(int s, struct ifreq *ifr, struct vlanreq *vreq) argument
77 ifr->ifr_data = (caddr_t)vreq;
79 return ioctl(s, SIOCGETVLAN, (caddr_t)ifr);
87 if (getvlan(s, &ifr, &vreq) == -1)
90 if (ioctl(s, SIOCGVLANPCP, (caddr_t)&ifr) != -1)
91 printf(" vlanpcp: %u", ifr.ifr_vlan_pcp);
98 vlan_create(int s, struct ifreq *ifr) argument
108 ifr->ifr_data = (caddr_t) &params;
110 if (ioctl(s, SIOCIFCREATE2, ifr) < 0)
122 vlan_set(int s, struct ifreq *ifr) argument
[all...]
H A Difipsec.c58 ifr.ifr_data = (caddr_t)&reqid;
59 if (ioctl(s, IPSECGREQID, &ifr) == -1)
75 strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
76 ifr.ifr_data = (char *)&v;
77 if (ioctl(s, IPSECSREQID, &ifr) == -1) {
H A Difclone.c124 struct ifreq ifr; local
128 memset(&ifr, 0, sizeof(ifr));
129 (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
134 if (strncmp(dcp->ifprefix, ifr.ifr_name,
143 if (ioctl(s, SIOCIFCREATE2, &ifr) < 0)
146 clone_cb(s, &ifr);
153 if (strncmp(name, ifr.ifr_name, sizeof(name)) != 0) {
154 strlcpy(name, ifr
[all...]
H A Difgif.c65 ifr.ifr_data = (caddr_t)&opts;
66 if (ioctl(s, GIFGOPTS, &ifr) == -1)
79 ifr.ifr_data = (caddr_t)&opts;
80 if (ioctl(s, GIFGOPTS, &ifr) == -1) {
90 if (ioctl(s, GIFSOPTS, &ifr) == -1) {
H A Difpfsync.c66 ifr.ifr_data = (caddr_t)&preq;
68 if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
73 if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
84 ifr.ifr_data = (caddr_t)&preq;
86 if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
91 if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
104 ifr.ifr_data = (caddr_t)&preq;
106 if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
123 if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
135 ifr
[all...]
/freebsd-head/contrib/wpa/src/ap/
H A Dvlan_ifconfig.c22 struct ifreq ifr; local
30 os_memset(&ifr, 0, sizeof(ifr));
31 os_strlcpy(ifr.ifr_name, if_name, IFNAMSIZ);
33 if (ioctl(fd, SIOCGIFFLAGS, &ifr) != 0) {
42 ifr.ifr_flags |= IFF_UP;
44 ifr.ifr_flags &= ~IFF_UP;
46 if (ioctl(fd, SIOCSIFFLAGS, &ifr) != 0) {
/freebsd-head/tools/tools/ath/common/
H A Dctrl.c143 struct ifreq ifr; local
147 bzero(&ifr, sizeof(ifr));
148 strncpy(ifr.ifr_name, req->ifname, sizeof (ifr.ifr_name));
149 ifr.ifr_data = NULL;
152 ret = ioctl(req->s, SIOCZATHSTATS, &ifr);
164 struct ifreq ifr; local
168 bzero(&ifr, sizeof(ifr));
186 struct ifreq ifr; local
[all...]
/freebsd-head/lib/libifconfig/
H A Dlibifconfig_carp.c48 struct ifreq ifr; local
52 strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
53 ifr.ifr_data = (caddr_t)carpr;
55 if (ifconfig_ioctlwrap(h, AF_LOCAL, SIOCGVH, &ifr) != 0) {
H A Dlibifconfig.c171 struct ifreq ifr; local
177 memset(&ifr, 0, sizeof(ifr));
178 (void)strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
187 ifr.ifr_buffer.buffer = descr;
188 ifr.ifr_buffer.length = descrlen;
189 if (ifconfig_ioctlwrap(h, AF_LOCAL, SIOCGIFDESCR, &ifr) != 0) {
194 if (ifr.ifr_buffer.buffer == descr) {
207 } else if (ifr
223 struct ifreq ifr; local
259 struct ifreq ifr; local
275 struct ifreq ifr; local
344 struct ifreq ifr; local
360 struct ifreq ifr; local
376 struct ifreq ifr; local
410 struct ifreq ifr; local
426 struct ifreq ifr; local
443 struct ifreq ifr; local
480 struct ifreq ifr; local
535 struct ifreq ifr; local
549 struct ifreq ifr; local
590 struct ifreq ifr; local
617 struct ifreq ifr; local
[all...]
/freebsd-head/usr.sbin/bluetooth/btpand/
H A Dtap.c58 struct ifreq ifr; local
68 memset(&ifr, 0, sizeof(ifr));
69 if (ioctl(fd, TAPGIFNAME, &ifr) == -1) {
80 ifr.ifr_addr.sa_family = AF_LINK;
81 ifr.ifr_addr.sa_len = ETHER_ADDR_LEN;
82 b2eaddr(ifr.ifr_addr.sa_data, &local_bdaddr);
84 if (ioctl(s, SIOCSIFLLADDR, &ifr) == -1) {
85 log_err("Could not set %s physical address: %m", ifr.ifr_name);
89 if (ioctl(s, SIOCGIFFLAGS, &ifr)
[all...]
/freebsd-head/contrib/ipfilter/ipsend/
H A Dsockraw.c40 struct ifreq ifr; local
43 memset(&ifr, 0, sizeof(ifr));
44 strncpy(ifr.ifr_name, device, sizeof ifr.ifr_name);
52 if (ioctl(fd, SIOCGIFADDR, &ifr) == -1)
60 bcopy(&ifr.ifr_addr, s.sa_data, 4);
H A Dsirix.c66 struct ifreq ifr; local
75 memset(&ifr, 0, sizeof(ifr));
76 strncpy(ifr.ifr_name, sr.sr_ifname, sizeof ifr.ifr_name);
78 if (ioctl(fd, SIOCGIFADDR, &ifr) == -1)
84 memcpy(eh->ether_shost, ifr.ifr_addr.sa_data, sizeof(eh->ether_shost));
H A Dslinux.c73 struct ifreq ifr; local
75 strncpy(ifr.ifr_name, eth_dev, sizeof(ifr.ifr_name));
76 if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1)
81 bcopy(ifr.ifr_hwaddr.sa_data, pkt + 6, 6);
/freebsd-head/lib/libc/net/
H A Dif_nametoindex.c69 struct ifreq ifr; local
75 memset(&ifr, 0, sizeof(ifr));
76 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
77 if (_ioctl(s, SIOCGIFINDEX, &ifr) != -1) {
79 return (ifr.ifr_index);
/freebsd-head/contrib/traceroute/
H A Difaddrlist.c80 struct ifreq ibuf[(32 * 1024) / sizeof(struct ifreq)], ifr; local
83 char device[sizeof(ifr.ifr_name) + 1];
129 strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name));
130 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) < 0) {
134 (int)sizeof(ifr.ifr_name), ifr.ifr_name,
141 if ((ifr.ifr_flags & IFF_UP) == 0)
145 (void)strncpy(device, ifr.ifr_name, sizeof(ifr
[all...]
/freebsd-head/usr.sbin/wpa/wpa_supplicant/
H A DPacket32.c117 struct ifreq ifr; local
138 strncpy(ireq.i_name, iface, sizeof (ifr.ifr_name));
148 bzero((char *)&ifr, sizeof(ifr));
149 strncpy(ifr.ifr_name, iface, sizeof (ifr.ifr_name));
150 if (ioctl(a->socket, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) {
155 ifr.ifr_flags |= IFF_UP;
156 if (ioctl(a->socket, SIOCSIFFLAGS, (caddr_t)&ifr) < 0) {
170 struct ifreq ifr; local
341 struct ifreq ifr; local
392 struct ifreq ifr; local
[all...]
/freebsd-head/tools/regression/netinet/msocket_ifnet_remove/
H A Dmsocket_ifnet_remove.c73 struct ifreq ifr; local
92 bzero(&ifr, sizeof(ifr));
93 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s%d", DISC_IFNAME,
96 if (ioctl(s, SIOCIFCREATE, &ifr) < 0) {
97 warn("disc_setup: ioctl(%s, SIOCIFCREATE)", ifr.ifr_name);
109 struct ifreq ifr; local
118 bzero(&ifr, sizeof(ifr));
[all...]
/freebsd-head/contrib/wpa/src/drivers/
H A Ddriver_wired_common.c35 struct ifreq ifr; local
44 os_memset(&ifr, 0, sizeof(ifr));
45 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
46 if (ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
53 *flags = ifr.ifr_flags & 0xffff;
60 struct ifreq ifr; local
69 os_memset(&ifr, 0, sizeof(ifr));
70 os_strlcpy(ifr
85 struct ifreq ifr; local
[all...]
H A Ddriver_nl80211_android.c45 struct ifreq ifr; local
50 os_memset(&ifr, 0, sizeof(ifr));
52 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ);
60 ifr.ifr_data = &priv_cmd;
62 ret = ioctl(drv->global->ioctl_sock, SIOCDEVPRIVATE + 1, &ifr);
79 struct ifreq ifr; local
123 memset(&ifr, 0, sizeof(ifr));
125 os_strlcpy(ifr
[all...]
/freebsd-head/libexec/bootpd/
H A Dtrygetif.c38 struct ifreq *ifr; local
64 ifr = getif(s, dap);
65 if (!ifr) {
69 printf("Intf-name:%s\n", ifr->ifr_name);
70 sip = (struct sockaddr_in *) &(ifr->ifr_addr);
/freebsd-head/crypto/openssh/openbsd-compat/
H A Dport-net.c144 struct ifreq ifr; local
157 bzero(&ifr, sizeof(ifr));
160 ifr.ifr_flags = IFF_TAP;
163 ifr.ifr_flags = IFF_TUN;
166 ifr.ifr_flags |= IFF_NO_PI;
174 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), name, tun);
177 if (ioctl(fd, TUNSETIFF, &ifr) == -1) {
186 debug("%s: %s mode %d fd %d", __func__, ifr
210 struct ifreq ifr; local
[all...]

Completed in 269 milliseconds

12345678910