Searched defs:ifr (Results 1 - 25 of 227) sorted by relevance

12345678910

/freebsd-head/usr.sbin/ppp/
H A Dtun.c89 struct ifreq ifr; local
99 sprintf(ifr.ifr_name, "tun%d", bundle->unit);
100 ifr.ifr_mtu = bundle->iface->mtu;
101 if (ioctl(s, SIOCSIFMTU, &ifr) < 0)
/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/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) {
/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/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/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 Dsbpf.c64 struct ifreq ifr; local
106 (void) strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
107 if (ioctl(fd, BIOCSETIF, &ifr) == -1)
109 fprintf(stderr, "%s(%d):", ifr.ifr_name, fd);
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);
H A Dsnit.c66 struct ifreq ifr; local
100 strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
101 ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = ' ';
103 si.ic_len = sizeof(ifr);
104 si.ic_dp = (char*)&ifr;
107 perror(ifr.ifr_name);
/freebsd-head/sys/dev/rtwn/rtl8812a/
H A Dr12a_caps.c68 struct ifreq *ifr = (struct ifreq *)data; local
78 rxmask = ifr->ifr_reqcap & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
83 !(ifr->ifr_reqcap & IFCAP_RXCSUM)) {
88 !(ifr->ifr_reqcap & IFCAP_RXCSUM_IPV6)) {
/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 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 Daf_link.c65 struct ifreq ifr; local
101 strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
102 memcpy(&ifr.ifr_addr, ifa->ifa_addr, sizeof(ifa->ifa_addr->sa_len));
103 ifr.ifr_addr.sa_family = AF_LOCAL;
108 rc = ioctl(sock_hw, SIOCGHWADDR, &ifr);
117 if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0 ||
118 memcmp(ifr.ifr_addr.sa_data, LLADDR(sdl), sdl->sdl_alen) == 0)
122 &ifr.ifr_addr.sa_data);
132 if (ioctl(s, SIOCGLANPCP, (caddr_t)&ifr)
[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/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/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/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/tools/tools/ath/athradar/
H A Dathradar.c44 struct ifreq ifr; member in struct:radarhandler
/freebsd-head/tools/tools/ath/athspectral/
H A Dathspectral.c44 struct ifreq ifr; member in struct:spectralhandler
/freebsd-head/contrib/netbsd-tests/net/bpf/
H A Dt_bpf.c79 struct ifreq ifr; local
84 sprintf(ifr.ifr_name, "shmif%d", ifnum);
87 RL(rump_sys_ioctl(bpfd, BIOCSETIF, &ifr));
88 RL(rump_sys_ioctl(bpfd, BIOCSFEEDBACK, &ifr));
109 struct ifreq ifr; local
116 memset(&ifr, 0, sizeof(ifr));
156 netcfg_rump_makeshmif("bpfwritetrunc", ifr.ifr_name);
157 netcfg_rump_if(ifr.ifr_name, "10.1.1.1", "255.0.0.0");
160 RL(rump_sys_ioctl(bpfd, BIOCSETIF, &ifr));
179 struct ifreq ifr; local
[all...]
/freebsd-head/contrib/netbsd-tests/net/if_loop/
H A Dt_pr.c68 struct ifreq ifr; local
85 memset(&ifr, 0, sizeof(ifr));
86 strcpy(ifr.ifr_name, "lo0");
87 ifr.ifr_mtu = 1300;
88 if (rump_sys_ioctl(s, SIOCSIFMTU, &ifr) == -1)
/freebsd-head/sbin/spppcontrol/
H A Dspppcontrol.c64 struct ifreq ifr; local
84 strncpy(ifr.ifr_name, ifname, sizeof ifr.ifr_name);
94 ifr.ifr_data = (caddr_t)&spr;
96 if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1)
193 if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
/freebsd-head/sys/dev/ath/
H A Dif_ath_ioctl.c240 struct ifreq *ifr = data; local
270 return copyout(&sc->sc_stats, ifr_data_get_ptr(ifr),
274 return copyout(&sc->sc_aggr_stats, ifr_data_get_ptr(ifr),

Completed in 497 milliseconds

12345678910