Home
last modified time | relevance | path

Searched refs:ifp (Results 1 – 25 of 588) sorted by relevance

12345678910>>...24

/NextBSD/sys/net/
HDif.c127 void (*bridge_linkstate_p)(struct ifnet *ifp);
128 void (*ng_ether_link_state_p)(struct ifnet *ifp, int state);
129 void (*lagg_linkstate_p)(struct ifnet *ifp, int state);
131 void (*carp_linkstate_p)(struct ifnet *ifp);
135 int (*carp_forus_p)(struct ifnet *ifp, u_char *dhost);
136 int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m,
146 struct ifaddr *(*carp_iamatch6_p)(struct ifnet *ifp, struct in6_addr *taddr6);
147 caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m,
167 static int if_transmit(struct ifnet *ifp, struct mbuf *m);
246 struct ifnet *ifp; in ifnet_byindex() local
[all …]
HDif_epair.c132 struct ifnet *ifp; /* This ifp. */ member
148 struct ifnet *ifp; member
233 cpuid_from_ifp(struct ifnet *ifp) in cpuid_from_ifp() argument
237 if (ifp == NULL) in cpuid_from_ifp()
239 sc = ifp->if_softc; in cpuid_from_ifp()
250 struct ifnet *ifp; in epair_nh_sintr() local
253 ifp = m->m_pkthdr.rcvif; in epair_nh_sintr()
254 (*ifp->if_input)(ifp, m); in epair_nh_sintr()
255 sc = ifp->if_softc; in epair_nh_sintr()
259 __func__, ifp, sc->refcount)); in epair_nh_sintr()
[all …]
HDif_var.h318 #define if_name(ifp) ((ifp)->if_xname) argument
337 void if_addr_rlock(struct ifnet *ifp); /* if_addrhead */
338 void if_addr_runlock(struct ifnet *ifp); /* if_addrhead */
339 void if_maddr_rlock(if_t ifp); /* if_multiaddrs */
340 void if_maddr_runlock(if_t ifp); /* if_multiaddrs */
394 #define IF_AFDATA_LOCK_INIT(ifp) \ argument
395 rw_init(&(ifp)->if_afdata_lock, "if_afdata")
397 #define IF_AFDATA_WLOCK(ifp) rw_wlock(&(ifp)->if_afdata_lock) argument
398 #define IF_AFDATA_RLOCK(ifp) rw_rlock(&(ifp)->if_afdata_lock) argument
399 #define IF_AFDATA_WUNLOCK(ifp) rw_wunlock(&(ifp)->if_afdata_lock) argument
[all …]
HDif_fddisubr.c86 static void fddi_input(struct ifnet *ifp, struct mbuf *m);
97 fddi_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, in fddi_output() argument
109 error = mac_ifnet_check_transmit(ifp, m); in fddi_output()
114 if (ifp->if_flags & IFF_MONITOR) in fddi_output()
116 if (!((ifp->if_flags & IFF_UP) && in fddi_output()
117 (ifp->if_drv_flags & IFF_DRV_RUNNING))) in fddi_output()
119 getmicrotime(&ifp->if_lastchange); in fddi_output()
129 error = arpresolve(ifp, is_gw, m, dst, edst, NULL); in fddi_output()
156 bcopy(ifp->if_broadcastaddr, edst, FDDI_ADDR_LEN); in fddi_output()
165 error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); in fddi_output()
[all …]
HDif_ethersubr.c91 void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp);
92 void (*ng_ether_input_orphan_p)(struct ifnet *ifp, struct mbuf *m);
93 int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
94 void (*ng_ether_attach_p)(struct ifnet *ifp);
95 void (*ng_ether_detach_p)(struct ifnet *ifp);
143 ether_requestencap(struct ifnet *ifp, struct if_encap_req *req) in ether_requestencap() argument
184 lladdr = ifp->if_broadcastaddr; in ether_requestencap()
192 memcpy(eh->ether_shost, IF_LLADDR(ifp), ETHER_ADDR_LEN); in ether_requestencap()
200 ether_resolve_addr(struct ifnet *ifp, struct mbuf *m, in ether_resolve_addr() argument
217 error = arpresolve(ifp, 0, m, dst, phdr, &lleflags); in ether_resolve_addr()
[all …]
HDif_iso88025subr.c92 iso88025_ifattach(struct ifnet *ifp, const u_int8_t *lla, int bpf) in iso88025_ifattach() argument
99 ifp->if_type = IFT_ISO88025; in iso88025_ifattach()
100 ifp->if_addrlen = ISO88025_ADDR_LEN; in iso88025_ifattach()
101 ifp->if_hdrlen = ISO88025_HDR_LEN; in iso88025_ifattach()
103 if_attach(ifp); /* Must be called before additional assignments */ in iso88025_ifattach()
105 ifp->if_output = iso88025_output; in iso88025_ifattach()
106 ifp->if_input = iso88025_input; in iso88025_ifattach()
107 ifp->if_resolvemulti = iso88025_resolvemulti; in iso88025_ifattach()
108 ifp->if_broadcastaddr = iso88025_broadcastaddr; in iso88025_ifattach()
110 if (ifp->if_baudrate == 0) in iso88025_ifattach()
[all …]
HDif_vlan.c80 #define UP_AND_RUNNING(ifp) \ argument
81 ((ifp)->if_flags & IFF_UP && (ifp)->if_drv_flags & IFF_DRV_RUNNING)
196 static void vlan_input(struct ifnet *ifp, struct mbuf *m);
197 static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
198 static void vlan_qflush(struct ifnet *ifp);
199 static int vlan_setflag(struct ifnet *ifp, int flag, int status,
201 static int vlan_setflags(struct ifnet *ifp, int status);
202 static int vlan_setmulti(struct ifnet *ifp);
203 static int vlan_transmit(struct ifnet *ifp, struct mbuf *m);
204 static void vlan_unconfig(struct ifnet *ifp);
[all …]
HDif_loop.c91 int looutput(struct ifnet *ifp, struct mbuf *m,
107 lo_clone_destroy(struct ifnet *ifp) in lo_clone_destroy() argument
112 KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); in lo_clone_destroy()
115 bpfdetach(ifp); in lo_clone_destroy()
116 if_detach(ifp); in lo_clone_destroy()
117 if_free(ifp); in lo_clone_destroy()
123 struct ifnet *ifp; in lo_clone_create() local
125 ifp = if_alloc(IFT_LOOP); in lo_clone_create()
126 if (ifp == NULL) in lo_clone_create()
129 if_initname(ifp, loname, unit); in lo_clone_create()
[all …]
HDif_tap.c217 struct ifnet *ifp = tp->tap_ifp; in tap_destroy() local
219 CURVNET_SET(ifp->if_vnet); in tap_destroy()
224 ether_ifdetach(ifp); in tap_destroy()
225 if_free(ifp); in tap_destroy()
233 tap_clone_destroy(struct ifnet *ifp) in tap_clone_destroy() argument
235 struct tap_softc *tp = ifp->if_softc; in tap_clone_destroy()
245 vmnet_clone_destroy(struct ifnet *ifp) in vmnet_clone_destroy() argument
247 tap_clone_destroy(ifp); in vmnet_clone_destroy()
260 struct ifnet *ifp = NULL; in tapmodevent() local
311 ifp = tp->tap_ifp; in tapmodevent()
[all …]
HDif_edsc.c83 static int edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
84 static void edsc_start(struct ifnet *ifp);
98 struct ifnet *ifp; in edsc_clone_create() local
105 ifp = sc->sc_ifp = if_alloc(IFT_ETHER); in edsc_clone_create()
106 if (ifp == NULL) { in edsc_clone_create()
111 ifp->if_softc = sc; in edsc_clone_create()
116 if_initname(ifp, edscname, unit); in edsc_clone_create()
122 ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; in edsc_clone_create()
130 ifp->if_capabilities = in edsc_clone_create()
134 ifp->if_capenable = 0; in edsc_clone_create()
[all …]
HDif_tun.c267 tun_clone_destroy(struct ifnet *ifp) in tun_clone_destroy() argument
269 struct tun_softc *tp = ifp->if_softc; in tun_clone_destroy()
325 tunstart(struct ifnet *ifp) in tunstart() argument
327 struct tun_softc *tp = ifp->if_softc; in tunstart()
330 TUNDEBUG(ifp,"%s starting\n", ifp->if_xname); in tunstart()
331 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { in tunstart()
332 IFQ_LOCK(&ifp->if_snd); in tunstart()
333 IFQ_POLL_NOLOCK(&ifp->if_snd, m); in tunstart()
335 IFQ_UNLOCK(&ifp->if_snd); in tunstart()
338 IFQ_UNLOCK(&ifp->if_snd); in tunstart()
[all …]
HDif_arcsubr.c87 #define ARC_LLADDR(ifp) (*(u_int8_t *)IF_LLADDR(ifp)) argument
98 arc_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, in arc_output() argument
110 if (!((ifp->if_flags & IFF_UP) && in arc_output()
111 (ifp->if_drv_flags & IFF_DRV_RUNNING))) in arc_output()
129 else if (ifp->if_flags & IFF_NOARP) in arc_output()
132 error = arpresolve(ifp, is_gw, m, dst, &adst, NULL); in arc_output()
137 atype = (ifp->if_flags & IFF_LINK0) ? in arc_output()
161 bcopy(ifp->if_broadcastaddr, &adst, ARC_ADDR_LEN); in arc_output()
173 error = nd6_resolve(ifp, is_gw, m, dst, &adst, NULL); in arc_output()
190 atype = (ifp->if_flags & IFF_LINK0) ? in arc_output()
[all …]
/NextBSD/sbin/routed/
HDif.c105 if_link(struct interface *ifp) in if_link() argument
109 LIST_INSERT_HEAD(&ifnet, ifp, int_list); in if_link()
111 hifp = AHASH(ifp->int_addr); in if_link()
112 ifp->int_ahash_prev = hifp; in if_link()
113 if ((ifp->int_ahash = *hifp) != 0) in if_link()
114 (*hifp)->int_ahash_prev = &ifp->int_ahash; in if_link()
115 *hifp = ifp; in if_link()
117 if (ifp->int_if_flags & IFF_BROADCAST) { in if_link()
118 hifp = BHASH(ifp->int_brdaddr); in if_link()
119 ifp->int_bhash_prev = hifp; in if_link()
[all …]
HDrdisc.c100 #define PREF(p, ifp) ((int)(p) <= ((ifp)->int_metric+(ifp)->int_adj_outmetric)\ argument
102 : (p) - ((ifp)->int_metric+(ifp)->int_adj_outmetric))
113 struct interface *ifp, in trace_rdisc() argument
130 ifp ? ifp->int_name : "?", in trace_rdisc()
147 ifp ? ifp->int_name : "?", in trace_rdisc()
170 set_rdisc_mg(struct interface *ifp, in set_rdisc_mg() argument
176 assert(ifp != NULL); in set_rdisc_mg()
182 if ((ifp->int_state & IS_NO_RDISC) == IS_NO_RDISC in set_rdisc_mg()
188 if (!(ifp->int_if_flags & IFF_MULTICAST)) { in set_rdisc_mg()
189 ifp->int_state &= ~(IS_ALL_HOSTS | IS_ALL_ROUTERS); in set_rdisc_mg()
[all …]
/NextBSD/sys/netgraph/
HDng_eiface.c81 struct ifnet *ifp; /* per-interface network data */ member
92 static void ng_eiface_start(struct ifnet *ifp);
93 static int ng_eiface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
95 static void ng_eiface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data);
133 ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_eiface_ioctl() argument
135 const priv_p priv = (priv_p)ifp->if_softc; in ng_eiface_ioctl()
140 ng_eiface_print_ioctl(ifp, command, data); in ng_eiface_ioctl()
146 error = ether_ioctl(ifp, command, data); in ng_eiface_ioctl()
157 if (ifp->if_flags & IFF_UP) { in ng_eiface_ioctl()
158 if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { in ng_eiface_ioctl()
[all …]
HDng_iface.c111 struct ifnet *ifp; /* Our interface */ member
119 static void ng_iface_start(struct ifnet *ifp);
120 static int ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
121 static int ng_iface_output(struct ifnet *ifp, struct mbuf *m0,
123 static void ng_iface_bpftap(struct ifnet *ifp,
125 static int ng_iface_send(struct ifnet *ifp, struct mbuf *m,
128 static void ng_iface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data);
267 ng_iface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_iface_ioctl() argument
273 ng_iface_print_ioctl(ifp, command, data); in ng_iface_ioctl()
279 ifp->if_flags |= IFF_UP; in ng_iface_ioctl()
[all …]
/NextBSD/usr.bin/systat/
HDifstat.c110 #define IN_col2 (showpps ? ifp->if_in_curpps : ifp->if_in_curtraffic)
111 #define OUT_col2 (showpps ? ifp->if_out_curpps : ifp->if_out_curtraffic)
113 ifp->if_in_pps_peak : ifp->if_in_traffic_peak)
115 ifp->if_out_pps_peak : ifp->if_out_traffic_peak)
117 ifp->if_mib.ifmd_data.ifi_ipackets : ifp->if_mib.ifmd_data.ifi_ibytes)
119 ifp->if_mib.ifmd_data.ifi_opackets : ifp->if_mib.ifmd_data.ifi_obytes)
210 struct if_stat *ifp = NULL; in showifstat() local
212 SLIST_FOREACH(ifp, &curlist, link) { in showifstat()
213 if (ifp->if_ypos < LINES - 3 && ifp->if_ypos != -1) in showifstat()
214 if (ifp->display == 0 || ifp->match == 0) { in showifstat()
[all …]
/NextBSD/contrib/bsnmp/snmp_mibII/
HDmibII.c148 struct mibif *ifp; in mib_find_if() local
150 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if()
151 if (ifp->index == idx) in mib_find_if()
152 return (ifp); in mib_find_if()
159 struct mibif *ifp; in mib_find_if_sys() local
161 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if_sys()
162 if (ifp->sysindex == sysindex) in mib_find_if_sys()
163 return (ifp); in mib_find_if_sys()
170 struct mibif *ifp; in mib_find_if_name() local
172 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if_name()
[all …]
HDmibII_interfaces.c71 struct mibif *ifp; in ifchange_func() local
74 if ((ifp = mib_find_if(ifc->ifindex)) == NULL) in ifchange_func()
80 strncpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); in ifchange_func()
82 syslog(LOG_ERR, "GIFFLAGS(%s): %m", ifp->name); in ifchange_func()
98 strncpy(ifr1.ifr_name, ifp->name, sizeof(ifr1.ifr_name)); in ifchange_func()
100 syslog(LOG_ERR, "GIFFLAGS(%s): %m", ifp->name); in ifchange_func()
105 syslog(LOG_ERR, "SIFFLAGS(%s): %m", ifp->name); in ifchange_func()
108 (void)mib_fetch_ifmib(ifp); in ifchange_func()
112 ifc->rb_traps = ifp->trap_enable; in ifchange_func()
113 ifp->trap_enable = ifc->traps; in ifchange_func()
[all …]
/NextBSD/sys/mips/cavium/octe/
HDocte.c137 struct ifnet *ifp; in octe_attach() local
144 ifp = priv->ifp; in octe_attach()
146 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); in octe_attach()
150 error = mii_attach(dev, &priv->miibus, ifp, in octe_attach()
175 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI; in octe_attach()
176 ifp->if_init = octe_init; in octe_attach()
177 ifp->if_ioctl = octe_ioctl; in octe_attach()
179 priv->if_flags = ifp->if_flags; in octe_attach()
181 mtx_init(&priv->tx_mtx, ifp->if_xname, "octe tx send queue", MTX_DEF); in octe_attach()
184 mtx_init(&priv->tx_free_queue[qos].ifq_mtx, ifp->if_xname, "octe tx free queue", MTX_DEF); in octe_attach()
[all …]
/NextBSD/sys/dev/cm/
HDsmc90cx6.c157 struct ifnet *ifp; local
160 ifp = sc->sc_ifp = if_alloc(IFT_ARCNET);
161 if (ifp == NULL)
186 ifp->if_softc = sc;
187 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
188 ifp->if_output = arc_output;
189 ifp->if_start = cm_start;
190 ifp->if_ioctl = cm_ioctl;
191 ifp->if_init = cm_init;
193 ifp->if_snd.ifq_maxlen = ifqmaxlen;
[all …]
/NextBSD/sys/dev/firewire/
HDif_fwe.c99 fwe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) in fwe_poll() argument
104 if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) in fwe_poll()
107 fwe = ((struct fwe_eth_softc *)ifp->if_softc)->fwe; in fwe_poll()
138 struct ifnet *ifp; in fwe_attach() local
180 ifp = fwe->eth_softc.ifp = if_alloc(IFT_ETHER); in fwe_attach()
181 if (ifp == NULL) { in fwe_attach()
185 ifp->if_softc = &fwe->eth_softc; in fwe_attach()
187 if_initname(ifp, device_get_name(dev), unit); in fwe_attach()
188 ifp->if_init = fwe_init; in fwe_attach()
189 ifp->if_start = fwe_start; in fwe_attach()
[all …]
/NextBSD/sys/netinet/
HDif_ether.c154 struct ifnet *ifp, int bridged, struct llentry *la);
156 static void arp_iflladdr(void *arg __unused, struct ifnet *ifp);
174 struct ifnet *ifp; in arptimer() local
200 ifp = lle->lle_tbl->llt_ifp; in arptimer()
201 CURVNET_SET(ifp->if_vnet); in arptimer()
235 arprequest(ifp, NULL, &dst, NULL); in arptimer()
266 IF_AFDATA_LOCK(ifp); in arptimer()
274 IF_AFDATA_UNLOCK(ifp); in arptimer()
291 arp_fillheader(struct ifnet *ifp, struct arphdr *ah, int bcast, u_char *buf, in arp_fillheader() argument
307 error = ifp->if_requestencap(ifp, &ereq); in arp_fillheader()
[all …]
/NextBSD/sys/netinet6/
HDin6_ifattach.c115 get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6) in get_rand_ifid() argument
239 in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) in in6_get_hw_ifid() argument
249 IF_ADDR_RLOCK(ifp); in in6_get_hw_ifid()
250 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { in in6_get_hw_ifid()
261 IF_ADDR_RUNLOCK(ifp); in in6_get_hw_ifid()
266 IF_ADDR_LOCK_ASSERT(ifp); in in6_get_hw_ifid()
271 switch (ifp->if_type) { in in6_get_hw_ifid()
287 IF_ADDR_RUNLOCK(ifp); in in6_get_hw_ifid()
297 IF_ADDR_RUNLOCK(ifp); in in6_get_hw_ifid()
301 IF_ADDR_RUNLOCK(ifp); in in6_get_hw_ifid()
[all …]
/NextBSD/sys/dev/vx/
HDif_vx.c147 struct ifnet *ifp; in vx_attach() local
151 ifp = sc->vx_ifp = if_alloc(IFT_ETHER); in vx_attach()
152 if (ifp == NULL) { in vx_attach()
156 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); in vx_attach()
177 if_free(ifp); in vx_attach()
184 if_free(ifp); in vx_attach()
192 ifp->if_snd.ifq_maxlen = ifqmaxlen; in vx_attach()
193 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; in vx_attach()
194 ifp->if_start = vx_start; in vx_attach()
195 ifp->if_ioctl = vx_ioctl; in vx_attach()
[all …]

12345678910>>...24