| /freebsd-9-stable/sbin/routed/ |
| D | if.c | 105 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 …]
|
| D | rdisc.c | 100 #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 …]
|
| /freebsd-9-stable/sys/net/ |
| D | if.c | 128 void (*bridge_linkstate_p)(struct ifnet *ifp); 129 void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); 130 void (*lagg_linkstate_p)(struct ifnet *ifp, int state); 132 void (*carp_linkstate_p)(struct ifnet *ifp); 134 struct ifnet *(*carp_forus_p)(struct ifnet *ifp, u_char *dhost); 135 int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m, 143 struct ifaddr *(*carp_iamatch6_p)(struct ifnet *ifp, struct in6_addr *taddr6); 144 caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m, 164 static int if_transmit(struct ifnet *ifp, struct mbuf *m); 238 struct ifnet *ifp; in ifnet_byindex() local [all …]
|
| D | if_epair.c | 131 struct ifnet *ifp; /* This ifp. */ member 147 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 …]
|
| D | if_edsc.c | 78 static int edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); 79 static void edsc_start(struct ifnet *ifp); 101 struct ifnet *ifp; in edsc_clone_create() local 108 ifp = sc->sc_ifp = if_alloc(IFT_ETHER); in edsc_clone_create() 109 if (ifp == NULL) { in edsc_clone_create() 114 ifp->if_softc = sc; in edsc_clone_create() 119 if_initname(ifp, ifc->ifc_name, unit); in edsc_clone_create() 125 ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; in edsc_clone_create() 133 ifp->if_capabilities = in edsc_clone_create() 137 ifp->if_capenable = 0; in edsc_clone_create() [all …]
|
| D | if_fddisubr.c | 101 static void fddi_input(struct ifnet *ifp, struct mbuf *m); 113 fddi_output(ifp, m, dst, ro) in fddi_output() argument 114 struct ifnet *ifp; in fddi_output() 128 error = mac_ifnet_check_transmit(ifp, m); 133 if (ifp->if_flags & IFF_MONITOR) 135 if (!((ifp->if_flags & IFF_UP) && 136 (ifp->if_drv_flags & IFF_DRV_RUNNING))) 138 getmicrotime(&ifp->if_lastchange); 147 error = arpresolve(ifp, rt0, m, dst, edst, &lle); 174 bcopy(ifp->if_broadcastaddr, edst, FDDI_ADDR_LEN); [all …]
|
| D | if_vlan.c | 79 #define UP_AND_RUNNING(ifp) \ argument 80 ((ifp)->if_flags & IFF_UP && (ifp)->if_drv_flags & IFF_DRV_RUNNING) 192 static void vlan_input(struct ifnet *ifp, struct mbuf *m); 193 static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); 194 static void vlan_qflush(struct ifnet *ifp); 195 static int vlan_setflag(struct ifnet *ifp, int flag, int status, 197 static int vlan_setflags(struct ifnet *ifp, int status); 198 static int vlan_setmulti(struct ifnet *ifp); 199 static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); 200 static void vlan_unconfig(struct ifnet *ifp); [all …]
|
| D | if_iso88025subr.c | 97 iso88025_ifattach(struct ifnet *ifp, const u_int8_t *lla, int bpf) in iso88025_ifattach() argument 104 ifp->if_type = IFT_ISO88025; in iso88025_ifattach() 105 ifp->if_addrlen = ISO88025_ADDR_LEN; in iso88025_ifattach() 106 ifp->if_hdrlen = ISO88025_HDR_LEN; in iso88025_ifattach() 108 if_attach(ifp); /* Must be called before additional assignments */ in iso88025_ifattach() 110 ifp->if_output = iso88025_output; in iso88025_ifattach() 111 ifp->if_input = iso88025_input; in iso88025_ifattach() 112 ifp->if_resolvemulti = iso88025_resolvemulti; in iso88025_ifattach() 113 ifp->if_broadcastaddr = iso88025_broadcastaddr; in iso88025_ifattach() 115 if (ifp->if_baudrate == 0) in iso88025_ifattach() [all …]
|
| D | if_tap.c | 214 struct ifnet *ifp = tp->tap_ifp; in tap_destroy() local 216 CURVNET_SET(ifp->if_vnet); in tap_destroy() 220 ether_ifdetach(ifp); in tap_destroy() 221 if_free_type(ifp, IFT_ETHER); in tap_destroy() 229 tap_clone_destroy(struct ifnet *ifp) in tap_clone_destroy() argument 231 struct tap_softc *tp = ifp->if_softc; in tap_clone_destroy() 241 vmnet_clone_destroy(struct ifnet *ifp) in vmnet_clone_destroy() argument 243 tap_clone_destroy(ifp); in vmnet_clone_destroy() 256 struct ifnet *ifp = NULL; in tapmodevent() local 305 ifp = tp->tap_ifp; in tapmodevent() [all …]
|
| D | if_tun.c | 271 tun_clone_destroy(struct ifnet *ifp) in tun_clone_destroy() argument 273 struct tun_softc *tp = ifp->if_softc; in tun_clone_destroy() 328 tunstart(struct ifnet *ifp) in tunstart() argument 330 struct tun_softc *tp = ifp->if_softc; in tunstart() 333 TUNDEBUG(ifp,"%s starting\n", ifp->if_xname); in tunstart() 334 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { in tunstart() 335 IFQ_LOCK(&ifp->if_snd); in tunstart() 336 IFQ_POLL_NOLOCK(&ifp->if_snd, m); in tunstart() 338 IFQ_UNLOCK(&ifp->if_snd); in tunstart() 341 IFQ_UNLOCK(&ifp->if_snd); in tunstart() [all …]
|
| D | if_arcsubr.c | 92 #define ARC_LLADDR(ifp) (*(u_int8_t *)IF_LLADDR(ifp)) argument 104 arc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, in arc_output() argument 116 if (!((ifp->if_flags & IFF_UP) && in arc_output() 117 (ifp->if_drv_flags & IFF_DRV_RUNNING))) in arc_output() 131 else if (ifp->if_flags & IFF_NOARP) in arc_output() 134 error = arpresolve(ifp, ro ? ro->ro_rt : NULL, in arc_output() 140 atype = (ifp->if_flags & IFF_LINK0) ? in arc_output() 164 bcopy(ifp->if_broadcastaddr, &adst, ARC_ADDR_LEN); in arc_output() 173 error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, &lle); in arc_output() 195 atype = (ifp->if_flags & IFF_LINK0) ? in arc_output() [all …]
|
| D | if_loop.c | 103 int looutput(struct ifnet *ifp, struct mbuf *m, 120 lo_clone_destroy(struct ifnet *ifp) in lo_clone_destroy() argument 125 KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); in lo_clone_destroy() 128 bpfdetach(ifp); in lo_clone_destroy() 129 if_detach(ifp); in lo_clone_destroy() 130 if_free(ifp); in lo_clone_destroy() 136 struct ifnet *ifp; in lo_clone_create() local 138 ifp = if_alloc(IFT_LOOP); in lo_clone_create() 139 if (ifp == NULL) in lo_clone_create() 142 if_initname(ifp, ifc->ifc_name, unit); in lo_clone_create() [all …]
|
| D | if_ethersubr.c | 87 int (*ef_outputp)(struct ifnet *ifp, struct mbuf **mp, 110 void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp); 111 void (*ng_ether_input_orphan_p)(struct ifnet *ifp, struct mbuf *m); 112 int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp); 113 void (*ng_ether_attach_p)(struct ifnet *ifp); 114 void (*ng_ether_detach_p)(struct ifnet *ifp); 159 ether_output(struct ifnet *ifp, struct mbuf *m, in ether_output() argument 178 error = mac_ifnet_check_transmit(ifp, m); in ether_output() 184 if (ifp->if_flags & IFF_MONITOR) in ether_output() 186 if (!((ifp->if_flags & IFF_UP) && in ether_output() [all …]
|
| /freebsd-9-stable/usr.sbin/IPXrouted/ |
| D | if.c | 58 register struct interface *ifp; local 62 for (ifp = ifnet; ifp; ifp = ifp->int_next) { 63 if (ifp->int_flags & IFF_REMOTE) 65 if (ifp->int_addr.sa_family != addr->sa_family) 67 if (same(&ifp->int_addr, addr)) 69 if ((ifp->int_flags & IFF_BROADCAST) && 70 same(&ifp->int_broadaddr, addr)) 73 return (ifp); 83 register struct interface *ifp; local 85 for (ifp = ifnet; ifp; ifp = ifp->int_next) { [all …]
|
| /freebsd-9-stable/contrib/bsnmp/snmp_mibII/ |
| D | mibII.c | 148 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 …]
|
| D | mibII_interfaces.c | 71 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 …]
|
| /freebsd-9-stable/sys/netgraph/ |
| D | ng_eiface.c | 79 struct ifnet *ifp; /* per-interface network data */ member 90 static void ng_eiface_start(struct ifnet *ifp); 91 static int ng_eiface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); 93 static void ng_eiface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data); 131 ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_eiface_ioctl() argument 133 const priv_p priv = (priv_p)ifp->if_softc; in ng_eiface_ioctl() 138 ng_eiface_print_ioctl(ifp, command, data); in ng_eiface_ioctl() 145 error = ether_ioctl(ifp, command, data); in ng_eiface_ioctl() 156 if (ifp->if_flags & IFF_UP) { in ng_eiface_ioctl() 157 if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { in ng_eiface_ioctl() [all …]
|
| D | ng_iface.c | 115 struct ifnet *ifp; /* Our interface */ member 123 static void ng_iface_start(struct ifnet *ifp); 124 static int ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); 125 static int ng_iface_output(struct ifnet *ifp, struct mbuf *m0, 127 static void ng_iface_bpftap(struct ifnet *ifp, 129 static int ng_iface_send(struct ifnet *ifp, struct mbuf *m, 132 static void ng_iface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data); 286 ng_iface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_iface_ioctl() argument 292 ng_iface_print_ioctl(ifp, command, data); in ng_iface_ioctl() 298 ifp->if_flags |= IFF_UP; in ng_iface_ioctl() [all …]
|
| /freebsd-9-stable/sys/mips/cavium/octe/ |
| D | octe.c | 137 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 …]
|
| /freebsd-9-stable/sys/dev/firewire/ |
| D | if_fwe.c | 109 fwe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) in fwe_poll() argument 114 if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) in fwe_poll() 117 fwe = ((struct fwe_eth_softc *)ifp->if_softc)->fwe; in fwe_poll() 148 struct ifnet *ifp; in fwe_attach() local 182 eaddr = &IFP2ENADDR(fwe->eth_softc.ifp)[0]; in fwe_attach() 198 ifp = fwe->eth_softc.ifp = if_alloc(IFT_ETHER); in fwe_attach() 199 if (ifp == NULL) { in fwe_attach() 203 ifp->if_softc = &fwe->eth_softc; in fwe_attach() 206 if_initname(ifp, device_get_name(dev), unit); in fwe_attach() 208 ifp->if_unit = unit; in fwe_attach() [all …]
|
| /freebsd-9-stable/sys/dev/cm/ |
| D | smc90cx6.c | 156 struct ifnet *ifp; local 159 ifp = sc->sc_ifp = if_alloc(IFT_ARCNET); 160 if (ifp == NULL) 185 ifp->if_softc = sc; 186 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); 187 ifp->if_output = arc_output; 188 ifp->if_start = cm_start; 189 ifp->if_ioctl = cm_ioctl; 190 ifp->if_init = cm_init; 192 ifp->if_snd.ifq_maxlen = ifqmaxlen; [all …]
|
| /freebsd-9-stable/contrib/ipfilter/ |
| D | ip_fil.c | 215 void fr_forgetifp(ifp) in fr_forgetifp() argument 216 void *ifp; in fr_forgetifp() 222 if (f->fr_ifa == ifp) 225 if (f->fr_ifa == ifp) 228 if (f->fr_ifa == ifp) 231 if (f->fr_ifa == ifp) 235 if (f->fr_ifa == ifp) 238 if (f->fr_ifa == ifp) 241 if (f->fr_ifa == ifp) 244 if (f->fr_ifa == ifp) [all …]
|
| /freebsd-9-stable/usr.bin/systat/ |
| D | ifstat.c | 105 #define IN_col2 (ifp->if_in_curtraffic) 106 #define OUT_col2 (ifp->if_out_curtraffic) 107 #define IN_col3 (ifp->if_in_traffic_peak) 108 #define OUT_col3 (ifp->if_out_traffic_peak) 109 #define IN_col4 (ifp->if_mib.ifmd_data.ifi_ibytes) 110 #define OUT_col4 (ifp->if_mib.ifmd_data.ifi_obytes) 188 struct if_stat *ifp = NULL; in showifstat() local 189 SLIST_FOREACH(ifp, &curlist, link) { in showifstat() 190 if (ifp->display == 0) in showifstat() 192 PUTNAME(ifp); in showifstat() [all …]
|
| /freebsd-9-stable/contrib/bind9/bin/named/ |
| D | interfacemgr.c | 187 ns_interface_t *ifp; in ns_interface_create() local 193 ifp = isc_mem_get(mgr->mctx, sizeof(*ifp)); in ns_interface_create() 194 if (ifp == NULL) in ns_interface_create() 197 ifp->mgr = NULL; in ns_interface_create() 198 ifp->generation = mgr->generation; in ns_interface_create() 199 ifp->addr = *addr; in ns_interface_create() 200 ifp->flags = 0; in ns_interface_create() 201 strncpy(ifp->name, name, sizeof(ifp->name)); in ns_interface_create() 202 ifp->name[sizeof(ifp->name)-1] = '\0'; in ns_interface_create() 203 ifp->clientmgr = NULL; in ns_interface_create() [all …]
|
| /freebsd-9-stable/sys/mips/cavium/ |
| D | if_octm.c | 153 struct ifnet *ifp; in octm_attach() local 216 ifp = if_alloc(IFT_ETHER); in octm_attach() 217 if (ifp == NULL) { in octm_attach() 223 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); in octm_attach() 224 ifp->if_mtu = ETHERMTU; in octm_attach() 225 ifp->if_init = octm_init; in octm_attach() 226 ifp->if_softc = sc; in octm_attach() 227 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI; in octm_attach() 228 ifp->if_ioctl = octm_ioctl; in octm_attach() 230 sc->sc_ifp = ifp; in octm_attach() [all …]
|