Home
last modified time | relevance | path

Searched refs:ifc (Results 1 – 25 of 69) sorted by relevance

123

/freebsd-10-stable/sys/net/
Dif_clone.c97 static void if_clone_free(struct if_clone *ifc);
98 static int if_clone_createif(struct if_clone *ifc, char *name, size_t len,
118 #define IF_CLONE_LOCK_INIT(ifc) \ argument
119 mtx_init(&(ifc)->ifc_mtx, "if_clone lock", NULL, MTX_DEF)
120 #define IF_CLONE_LOCK_DESTROY(ifc) mtx_destroy(&(ifc)->ifc_mtx) argument
121 #define IF_CLONE_LOCK_ASSERT(ifc) mtx_assert(&(ifc)->ifc_mtx, MA_OWNED) argument
122 #define IF_CLONE_LOCK(ifc) mtx_lock(&(ifc)->ifc_mtx) argument
123 #define IF_CLONE_UNLOCK(ifc) mtx_unlock(&(ifc)->ifc_mtx) argument
125 #define IF_CLONE_ADDREF(ifc) \ argument
127 IF_CLONE_LOCK(ifc); \
[all …]
Dif_epair.c680 epair_clone_match(struct if_clone *ifc, const char *name) in epair_clone_match() argument
706 epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) in epair_clone_create() argument
740 error = ifc_alloc_unit(ifc, &unit); in epair_clone_create()
753 ifc_free_unit(ifc, unit); in epair_clone_create()
760 ifc_free_unit(ifc, unit); in epair_clone_create()
780 ifc_free_unit(ifc, unit); in epair_clone_create()
791 ifc_free_unit(ifc, unit); in epair_clone_create()
887 epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) in epair_clone_destroy() argument
930 error = if_clone_destroyif(ifc, oifp); in epair_clone_destroy()
949 ifc_free_unit(ifc, unit); in epair_clone_destroy()
Dif_stf.c200 stf_clone_match(struct if_clone *ifc, const char *name) in stf_clone_match() argument
213 stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) in stf_clone_create() argument
225 err = ifc_alloc_unit(ifc, &unit); in stf_clone_create()
233 ifc_free_unit(ifc, unit); in stf_clone_create()
253 ifc_free_unit(ifc, unit); in stf_clone_create()
267 stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) in stf_clone_destroy() argument
280 ifc_free_unit(ifc, STFUNIT); in stf_clone_destroy()
Dif_vlan.c800 vlan_clone_match_ethervid(struct if_clone *ifc, const char *name, int *vidp) argument
838 vlan_clone_match(struct if_clone *ifc, const char *name) argument
842 if (vlan_clone_match_ethervid(ifc, name, NULL) != NULL)
856 vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) argument
904 } else if ((p = vlan_clone_match_ethervid(ifc, name, &vid)) != NULL) {
925 error = ifc_alloc_unit(ifc, &unit);
941 ifc_free_unit(ifc, unit);
985 ifc_free_unit(ifc, unit);
999 vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) argument
1008 ifc_free_unit(ifc, unit);
Dif.c657 if_attach_internal(struct ifnet *ifp, int vmove, struct if_clone *ifc) in if_attach_internal() argument
677 if (vmove && ifc != NULL) in if_attach_internal()
678 if_clone_addgroup(ifp, ifc); in if_attach_internal()
1063 struct if_clone *ifc; in if_vmove() local
1071 rc = if_detach_internal(ifp, 1, &ifc); in if_vmove()
1107 if_attach_internal(ifp, 1, ifc); in if_vmove()
2726 struct ifconf ifc; in ifioctl() local
2729 ifc.ifc_len = ifc32->ifc_len; in ifioctl()
2730 ifc.ifc_buf = PTRIN(ifc32->ifc_buf); in ifioctl()
2732 error = ifconf(SIOCGIFCONF, (void *)&ifc); in ifioctl()
[all …]
Dif_faith.c144 faith_clone_create(ifc, unit, params) in faith_clone_create() argument
145 struct if_clone *ifc; in faith_clone_create()
/freebsd-10-stable/contrib/bsnmp/snmp_mibII/
DmibII_interfaces.c70 struct ifchange *ifc = (struct ifchange *)dep; in ifchange_func() local
74 if ((ifp = mib_find_if(ifc->ifindex)) == NULL) in ifchange_func()
85 if (ifc->set & IFC_PROMISC) { in ifchange_func()
87 if (ifc->promisc) in ifchange_func()
89 ifc->rb |= IFRB_FLAGS; in ifchange_func()
91 if (ifc->set & IFC_ADMIN) { in ifchange_func()
93 if (ifc->admin) in ifchange_func()
95 ifc->rb |= IFRB_FLAGS; in ifchange_func()
97 if (ifc->rb & IFRB_FLAGS) { in ifchange_func()
103 ifc->rb_flags = ifr1.ifr_flags; in ifchange_func()
[all …]
/freebsd-10-stable/contrib/netbsd-tests/net/if/
Difconf.c54 struct ifconf ifc; in get_number_of_entries() local
60 ifc.ifc_len = 0; in get_number_of_entries()
61 ifc.ifc_buf = NULL; in get_number_of_entries()
63 r = ioctl(fd, SIOCGIFCONF, &ifc); in get_number_of_entries()
69 return ifc.ifc_len / sizeof(struct ifreq); in get_number_of_entries()
82 struct ifconf ifc; in show_interfaces() local
99 ifc.ifc_len = sizeof(struct ifreq) * nifreqs; in show_interfaces()
100 ifc.ifc_req = ifreqs; in show_interfaces()
102 r = ioctl(fd, SIOCGIFCONF, &ifc); in show_interfaces()
107 for (i=0; i < (int)(ifc.ifc_len / sizeof(struct ifreq)); i++) { in show_interfaces()
/freebsd-10-stable/contrib/traceroute/
Difaddrlist.c79 struct ifconf ifc; in ifaddrlist() local
90 ifc.ifc_len = sizeof(ibuf); in ifaddrlist()
91 ifc.ifc_buf = (caddr_t)ibuf; in ifaddrlist()
93 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 || in ifaddrlist()
94 ifc.ifc_len < (int)sizeof(struct ifreq)) { in ifaddrlist()
106 ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); in ifaddrlist()
/freebsd-10-stable/libexec/rbootd/
Dbpf.c219 struct ifconf ifc; in BpfGetIntfName() local
233 ifc.ifc_len = sizeof ibuf; in BpfGetIntfName()
234 ifc.ifc_buf = (caddr_t)ibuf; in BpfGetIntfName()
237 if (ioctl(fd, OSIOCGIFCONF, (char *)&ifc) < 0 || in BpfGetIntfName()
238 ifc.ifc_len < sizeof(struct ifreq)) { in BpfGetIntfName()
243 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 || in BpfGetIntfName()
244 ifc.ifc_len < sizeof(struct ifreq)) { in BpfGetIntfName()
250 ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); in BpfGetIntfName()
/freebsd-10-stable/contrib/netbsd-tests/net/mcast/
Dmcast.c97 unsigned int ifc; in addmc() local
129 ifc = 1; in addmc()
131 &ifc, sizeof(ifc)) == -1) in addmc()
133 ifc = 224; in addmc()
135 &ifc, sizeof(ifc)) == -1) in addmc()
137 ifc = 1; /* XXX should pick a proper interface */ in addmc()
138 if (setsockopt(s, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifc, in addmc()
139 sizeof(ifc)) == -1) in addmc()
142 ifc = 0; /* Let pick an appropriate interface */ in addmc()
144 m6.ipv6mr_interface = ifc; in addmc()
/freebsd-10-stable/contrib/libpcap/
Dfad-gifc.c146 struct ifconf ifc; in pcap_findalldevs_interfaces() local
184 ifc.ifc_len = buf_size; in pcap_findalldevs_interfaces()
185 ifc.ifc_buf = buf; in pcap_findalldevs_interfaces()
187 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 in pcap_findalldevs_interfaces()
195 if (ifc.ifc_len < buf_size && in pcap_findalldevs_interfaces()
196 (buf_size - ifc.ifc_len) > sizeof(ifrp->ifr_name) + MAX_SA_LEN) in pcap_findalldevs_interfaces()
203 ifend = (struct ifreq *)(buf + ifc.ifc_len); in pcap_findalldevs_interfaces()
Dfad-glifc.c89 struct lifconf ifc; in pcap_findalldevs_interfaces() local
151 ifc.lifc_len = buf_size; in pcap_findalldevs_interfaces()
152 ifc.lifc_buf = buf; in pcap_findalldevs_interfaces()
153 ifc.lifc_family = AF_UNSPEC; in pcap_findalldevs_interfaces()
154 ifc.lifc_flags = 0; in pcap_findalldevs_interfaces()
156 if (ioctl(fd4, SIOCGLIFCONF, (char *)&ifc) < 0) { in pcap_findalldevs_interfaces()
169 ifend = (struct lifreq *)(buf + ifc.lifc_len); in pcap_findalldevs_interfaces()
/freebsd-10-stable/libexec/bootpd/
Dgetether.c129 struct ifconf ifc; local
138 ifc.ifc_len = sizeof(ibuf);
139 ifc.ifc_buf = (caddr_t) ibuf;
140 if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 ||
141 ifc.ifc_len < sizeof(struct ifreq)) {
147 ifend = (struct ifreq *) ((char *) ibuf + ifc.ifc_len);
/freebsd-10-stable/usr.sbin/route6d/
Droute6d.c89 struct ifc { /* Configuration of an interface */ struct
90 TAILQ_ENTRY(ifc) ifc_next;
104 TAILQ_HEAD(, ifc) ifc_head = TAILQ_HEAD_INITIALIZER(ifc_head);
109 struct ifc *ifac_ifc; /* back pointer */
124 struct ifc **index2ifc;
126 struct ifc *loopifcp = NULL; /* pointing to loopback */
209 void ripsend(struct ifc *, struct sockaddr_in6 *, int);
210 int out_filter(struct riprt *, struct ifc *);
212 void sockopt(struct ifc *);
214 int ifconfig1(const char *, const struct sockaddr *, struct ifc *, int);
[all …]
/freebsd-10-stable/contrib/ntp/lib/isc/unix/
Difiter_ioctl.c60 struct ifconf ifc; member
142 memset(&iter->ifc.ifc_len, 0, sizeof(iter->ifc.ifc_len)); in getbuf4()
143 iter->ifc.ifc_len = iter->bufsize; in getbuf4()
144 iter->ifc.ifc_buf = iter->buf; in getbuf4()
150 if (isc_ioctl(iter->socket, SIOCGIFCONF, (char *)&iter->ifc) in getbuf4()
176 if (iter->ifc.ifc_len + 2 * sizeof(struct ifreq) in getbuf4()
464 if (iter->ifc.ifc_len == 0 || in internal_current4()
465 iter->pos == (unsigned int)iter->ifc.ifc_len) { in internal_current4()
473 INSIST( iter->pos < (unsigned int) iter->ifc.ifc_len); in internal_current4()
475 ifrp = (void *)((char *) iter->ifc.ifc_req + iter->pos); in internal_current4()
[all …]
/freebsd-10-stable/contrib/amd/libamu/
Dwire.c450 #define clist (ifc.ifc_ifcu.ifcu_req)
451 #define count (ifc.ifc_len/sizeof(struct ifreq))
457 struct ifconf ifc; local
482 ifc.ifc_len = sizeof(buf);
483 ifc.ifc_buf = buf;
488 if (ioctl(fd, SIOCGIFCONF, (caddr_t) & ifc) < 0)
494 cplim = buf + ifc.ifc_len;
/freebsd-10-stable/sys/netpfil/ipfw/
Dip_fw_log.c133 ipfw_log_clone_match(struct if_clone *ifc, const char *name) in ipfw_log_clone_match() argument
140 ipfw_log_clone_create(struct if_clone *ifc, char *name, size_t len, in ipfw_log_clone_create() argument
151 error = ifc_alloc_unit(ifc, &unit); in ipfw_log_clone_create()
157 ifc_free_unit(ifc, unit); in ipfw_log_clone_create()
181 ifc_free_unit(ifc, unit); in ipfw_log_clone_create()
192 ipfw_log_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) in ipfw_log_clone_destroy() argument
212 ifc_free_unit(ifc, unit); in ipfw_log_clone_destroy()
/freebsd-10-stable/usr.sbin/arp/
Darp.c800 struct ifconf ifc; in get_ether_addr() local
809 ifc.ifc_len = sizeof(ifs); in get_ether_addr()
810 ifc.ifc_req = ifs; in get_ether_addr()
811 if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) { in get_ether_addr()
824 ifend = (struct ifreq *)(ifc.ifc_buf + ifc.ifc_len); in get_ether_addr()
825 for (ifr = ifc.ifc_req; ifr < ifend; ifr = NEXTIFR(ifr) ) { in get_ether_addr()
860 for (ifr = ifc.ifc_req; ifr < ifend; ifr = NEXTIFR(ifr)) in get_ether_addr()
/freebsd-10-stable/sys/dev/cxgbe/
Dt4_tracer.c122 t4_cloner_match(struct if_clone *ifc, const char *name) in t4_cloner_match() argument
135 t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) in t4_cloner_create() argument
170 rc = ifc_alloc_unit(ifc, &unit); in t4_cloner_create()
176 ifc_free_unit(ifc, unit); in t4_cloner_create()
208 t4_cloner_destroy(struct if_clone *ifc, struct ifnet *ifp) in t4_cloner_destroy() argument
224 ifc_free_unit(ifc, unit); in t4_cloner_destroy()
/freebsd-10-stable/sys/dev/usb/
Dusb_pf.c150 usbpf_clone_match(struct if_clone *ifc, const char *name) in usbpf_clone_match() argument
164 usbpf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) in usbpf_clone_create() argument
183 error = ifc_alloc_unit(ifc, &unit); in usbpf_clone_create()
191 ifc_free_unit(ifc, unit); in usbpf_clone_create()
215 usbpf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) in usbpf_clone_destroy() argument
233 ifc_free_unit(ifc, unit); in usbpf_clone_destroy()
/freebsd-10-stable/share/doc/psd/21.ipc/
Dspell.ok205 ifc
206 ifc.ifc
/freebsd-10-stable/usr.sbin/timed/timed/
Dtimed.c121 struct ifconf ifc; in main() local
268 ifc.ifc_len = sizeof(buf); in main()
269 ifc.ifc_buf = buf; in main()
270 if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0) in main()
274 cplim = buf + ifc.ifc_len; /*skip over if's with big ifr_addr's */ in main()
/freebsd-10-stable/sys/compat/linux/
Dlinux_ioctl.c2177 struct l_ifconf ifc; in linux_ifconf() local
2179 struct ifconf ifc; in linux_ifconf()
2187 error = copyin(uifc, &ifc, sizeof(ifc)); in linux_ifconf()
2195 if ((l_uintptr_t)ifc.ifc_buf == PTROUT(NULL)) { in linux_ifconf()
2196 ifc.ifc_len = 0; in linux_ifconf()
2202 ifc.ifc_len += sizeof(ifr); in linux_ifconf()
2206 error = copyout(&ifc, uifc, sizeof(ifc)); in linux_ifconf()
2211 if (ifc.ifc_len <= 0) { in linux_ifconf()
2219 if (ifc.ifc_len <= max_len) { in linux_ifconf()
2220 max_len = ifc.ifc_len; in linux_ifconf()
[all …]
/freebsd-10-stable/sys/gnu/dts/arm/
Dls1021a.dtsi118 ifc: ifc@1530000 { label
119 compatible = "fsl,ifc", "simple-bus";

123