Home
last modified time | relevance | path

Searched full:ifp (Results 1 – 25 of 649) sorted by relevance

12345678910>>...26

/freebsd/sbin/routed/
H A Dif.c95 if_link(struct interface *ifp) in if_link() argument
99 LIST_INSERT_HEAD(&ifnet, ifp, int_list); in if_link()
101 hifp = AHASH(ifp->int_addr); in if_link()
102 ifp->int_ahash_prev = hifp; in if_link()
103 if ((ifp->int_ahash = *hifp) != NULL) in if_link()
104 (*hifp)->int_ahash_prev = &ifp->int_ahash; in if_link()
105 *hifp = ifp; in if_link()
107 if (ifp->int_if_flags & IFF_BROADCAST) { in if_link()
108 hifp = BHASH(ifp->int_brdaddr); in if_link()
109 ifp->int_bhash_prev = hifp; in if_link()
[all …]
H A Drdisc.c90 #define PREF(p, ifp) ((int)(p) <= ((ifp)->int_metric+(ifp)->int_adj_outmetric)\ argument
92 : (p) - ((ifp)->int_metric+(ifp)->int_adj_outmetric))
103 struct interface *ifp, in trace_rdisc() argument
120 ifp ? ifp->int_name : "?", in trace_rdisc()
137 ifp ? ifp->int_name : "?", in trace_rdisc()
160 set_rdisc_mg(struct interface *ifp, in set_rdisc_mg() argument
166 assert(ifp != NULL); in set_rdisc_mg()
172 if ((ifp->int_state & IS_NO_RDISC) == IS_NO_RDISC in set_rdisc_mg()
178 if (!(ifp->int_if_flags & IFF_MULTICAST)) { in set_rdisc_mg()
179 ifp->int_state &= ~(IS_ALL_HOSTS | IS_ALL_ROUTERS); in set_rdisc_mg()
[all …]
/freebsd/sys/net/
H A Dif.c243 void (*ng_ether_link_state_p)(struct ifnet *ifp, int state);
244 void (*lagg_linkstate_p)(struct ifnet *ifp, int state);
246 void (*carp_linkstate_p)(struct ifnet *ifp);
250 int (*carp_forus_p)(struct ifnet *ifp, u_char *dhost);
251 int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m,
261 struct ifaddr *(*carp_iamatch6_p)(struct ifnet *ifp, struct in6_addr *taddr6);
262 caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m,
279 static int if_transmit_default(struct ifnet *ifp, struct mbuf *m);
366 struct ifnet *ifp; in ifnet_byindex() local
373 ifp = ck_pr_load_ptr(&ifindex_table[idx].ife_ifnet); in ifnet_byindex()
[all …]
H A Dif_var.h44 * (*ifp->if_output)(ifp, m, dst, ro)
134 typedef int (*if_spdadd_fn_t)(if_t ifp, void *sp, void *inp, void **priv);
135 typedef int (*if_spddel_fn_t)(if_t ifp, void *sp, void *priv);
136 typedef int (*if_sa_newkey_fn_t)(if_t ifp, void *sav, u_int drv_spi,
138 typedef int (*if_sa_deinstall_fn_t)(if_t ifp, u_int drv_spi, void *priv);
149 typedef int (*if_sa_cnt_fn_t)(if_t ifp, void *sa,
151 typedef int (*if_ipsec_hwassist_fn_t)(if_t ifp, void *sav,
376 typedef void (*ifnet_event_fn)(void *, if_t ifp, int event);
419 #define TOEDEV(ifp) if_getllsoftc(ifp) argument
420 #define SETTOEDEV(ifp, sc) if_setllsoftc((ifp), (sc)) argument
[all …]
H A Dif_epair.c126 struct ifnet *ifp; /* This ifp. */ member
127 struct ifnet *oifp; /* other ifp of pair. */
164 if_t ifp; in epair_tx_start_deferred() local
168 ifp = q->sc->ifp; in epair_tx_start_deferred()
170 if_ref(ifp); in epair_tx_start_deferred()
171 CURVNET_SET(ifp->if_vnet); in epair_tx_start_deferred()
181 if_input(ifp, m); in epair_tx_start_deferred()
203 if_rele(ifp); in epair_tx_start_deferred()
258 struct ifnet *ifp, *oifp; in epair_menq() local
266 oifp = osc->ifp; in epair_menq()
[all …]
H A Difq.c45 drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m) in drbr_enqueue() argument
49 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { in drbr_enqueue()
50 IFQ_ENQUEUE(&ifp->if_snd, m, error); in drbr_enqueue()
52 if_inc_counter((ifp), IFCOUNTER_OQDROPS, 1); in drbr_enqueue()
63 drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m_new) in drbr_putback() argument
69 if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) { in drbr_putback()
74 IFQ_DRV_PREPEND(&ifp->if_snd, m_new); in drbr_putback()
81 drbr_peek(struct ifnet *ifp, struct buf_ring *br) in drbr_peek() argument
84 if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) { in drbr_peek()
91 IFQ_DEQUEUE(&ifp->if_snd, m); in drbr_peek()
[all …]
H A Dif_vlan.c94 #define UP_AND_RUNNING(ifp) \ argument
95 ((ifp)->if_flags & IFF_UP && (ifp)->if_drv_flags & IFF_DRV_RUNNING)
287 static void vlan_input(struct ifnet *ifp, struct mbuf *m);
288 static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
301 static void vlan_qflush(struct ifnet *ifp);
302 static int vlan_setflag(struct ifnet *ifp, int flag, int status,
304 static int vlan_setflags(struct ifnet *ifp, int status);
305 static int vlan_setmulti(struct ifnet *ifp);
306 static int vlan_transmit(struct ifnet *ifp, struct mbuf *m);
308 static void vlan_altq_start(struct ifnet *ifp);
[all …]
H A Dif_loop.c92 static int looutput(struct ifnet *ifp, struct mbuf *m,
102 lo_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags) in lo_clone_destroy() argument
104 if (ifp->if_dunit == 0 && (flags & IFC_F_FORCE) == 0) in lo_clone_destroy()
109 KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); in lo_clone_destroy()
112 bpfdetach(ifp); in lo_clone_destroy()
113 if_detach(ifp); in lo_clone_destroy()
114 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_initname(ifp, loname, ifd->unit); in lo_clone_create()
[all …]
H A Dif_ethersubr.c98 void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp);
99 void (*ng_ether_input_orphan_p)(struct ifnet *ifp, struct mbuf *m);
100 int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
101 void (*ng_ether_attach_p)(struct ifnet *ifp);
102 void (*ng_ether_detach_p)(struct ifnet *ifp);
144 ether_requestencap(struct ifnet *ifp, struct if_encap_req *req) in ether_requestencap() argument
185 lladdr = ifp->if_broadcastaddr; in ether_requestencap()
193 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
218 error = arpresolve(ifp, 0, m, dst, phdr, &lleflags, in ether_resolve_addr()
[all …]
H A Dif_infiniband.c127 infiniband_bpf_mtap(struct ifnet *ifp, struct mbuf *mb) in infiniband_bpf_mtap() argument
132 if (!bpf_peers_present(ifp->if_bpf)) in infiniband_bpf_mtap()
146 bpf_mtap2(ifp->if_bpf, &eh, sizeof(eh), mb); in infiniband_bpf_mtap()
163 infiniband_resolve_bpf(struct ifnet *ifp, const struct sockaddr *dst, in infiniband_resolve_bpf() argument
180 memcpy(ibh->ib_hwaddr, ifp->if_broadcastaddr, sizeof(ibh->ib_hwaddr)); in infiniband_resolve_bpf()
209 infiniband_requestencap(struct ifnet *ifp, struct if_encap_req *req) in infiniband_requestencap() argument
250 lladdr = ifp->if_broadcastaddr; in infiniband_requestencap()
265 infiniband_resolve_addr(struct ifnet *ifp, struct mbuf *m, in infiniband_resolve_addr() argument
282 error = arpresolve(ifp, 0, m, dst, phdr, &lleflags, plle); in infiniband_resolve_addr()
285 memcpy(ih->ib_hwaddr, ifp->if_broadcastaddr, in infiniband_resolve_addr()
[all …]
H A Dif_tuntap.c231 static void tunrename(void *arg, struct ifnet *ifp);
247 static void tun_vnethdr_set(struct ifnet *ifp, int vhdrlen);
713 tun_clone_destroy(struct if_clone *ifc __unused, struct ifnet *ifp, uint32_t flags) in tun_clone_destroy() argument
715 struct tuntap_softc *tp = ifp->if_softc; in tun_clone_destroy()
777 tuntap_driver_from_ifnet(const struct ifnet *ifp) in tuntap_driver_from_ifnet() argument
782 if (ifp == NULL) in tuntap_driver_from_ifnet()
787 if (strcmp(ifp->if_dname, drv->cdevsw.d_name) == 0) in tuntap_driver_from_ifnet()
913 tunstart(struct ifnet *ifp) in tunstart() argument
915 struct tuntap_softc *tp = ifp->if_softc; in tunstart()
918 TUNDEBUG(ifp, "starting\n"); in tunstart()
[all …]
/freebsd/sys/dev/liquidio/
H A Dlio_ioctl.c48 static int lio_set_rx_csum(if_t ifp, uint32_t data);
49 static int lio_set_tso4(if_t ifp);
50 static int lio_set_tso6(if_t ifp);
51 static int lio_set_lro(if_t ifp);
52 static int lio_change_mtu(if_t ifp, int new_mtu);
53 static int lio_set_mcast_list(if_t ifp);
54 static inline enum lio_ifflags lio_get_new_flags(if_t ifp);
65 lio_change_dev_flags(if_t ifp) in lio_change_dev_flags() argument
68 struct lio *lio = if_getsoftc(ifp); in lio_change_dev_flags()
77 nctrl.ncmd.s.param1 = lio_get_new_flags(ifp); in lio_change_dev_flags()
[all …]
/freebsd/usr.bin/systat/
H A Difstat.c106 #define IN_col2 (showpps ? ifp->if_in_curpps : ifp->if_in_curtraffic)
107 #define OUT_col2 (showpps ? ifp->if_out_curpps : ifp->if_out_curtraffic)
109 ifp->if_in_pps_peak : ifp->if_in_traffic_peak)
111 ifp->if_out_pps_peak : ifp->if_out_traffic_peak)
113 ifp->if_mib.ifmd_data.ifi_ipackets : ifp->if_mib.ifmd_data.ifi_ibytes)
115 ifp->if_mib.ifmd_data.ifi_opackets : ifp->if_mib.ifmd_data.ifi_obytes)
206 struct if_stat *ifp = NULL; in showifstat() local
208 SLIST_FOREACH(ifp, &curlist, link) { in showifstat()
209 if (ifp->if_ypos < LINES - 3 && ifp->if_ypos != -1) { in showifstat()
210 if (!ifp->display || ifp->match == 0) { in showifstat()
[all …]
/freebsd/contrib/bsnmp/snmp_mibII/
H A DmibII.c145 struct mibif *ifp; in mib_find_if() local
147 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if()
148 if (ifp->index == idx) in mib_find_if()
149 return (ifp); in mib_find_if()
156 struct mibif *ifp; in mib_find_if_sys() local
158 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if_sys()
159 if (ifp->sysindex == sysindex) in mib_find_if_sys()
160 return (ifp); in mib_find_if_sys()
167 struct mibif *ifp; in mib_find_if_name() local
169 TAILQ_FOREACH(ifp, &mibif_list, link) in mib_find_if_name()
[all …]
H A DmibII_interfaces.c71 struct mibif *ifp; in ifchange_func() local
74 if ((ifp = mib_find_if(ifc->ifindex)) == NULL) in ifchange_func()
80 strlcpy(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 strlcpy(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/sys/netpfil/ipfw/
H A Dip_fw_bpf.c61 ipfw_bpf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) in ipfw_bpf_ioctl() argument
68 ipfw_bpf_output(struct ifnet *ifp, struct mbuf *m, in ipfw_bpf_output() argument
78 ipfw_clone_destroy(struct ifnet *ifp) in ipfw_clone_destroy() argument
81 if (ifp->if_hdrlen == ETHER_HDR_LEN) in ipfw_clone_destroy()
87 bpfdetach(ifp); in ipfw_clone_destroy()
88 if_detach(ifp); in ipfw_clone_destroy()
89 if_free(ifp); in ipfw_clone_destroy()
95 struct ifnet *ifp; in ipfw_clone_create() local
97 ifp = if_alloc(IFT_PFLOG); in ipfw_clone_create()
98 if_initname(ifp, ipfwname, unit); in ipfw_clone_create()
[all …]
/freebsd/sys/dev/ntb/if_ntb/
H A Dif_ntb.c84 if_t ifp; member
94 if_t ifp; member
108 static int ntb_ioctl(if_t ifp, u_long command, caddr_t data);
109 static int ntb_transmit(if_t ifp, struct mbuf *m);
117 static void ntb_qflush(if_t ifp);
133 if_t ifp; in ntb_net_attach() local
138 ifp = sc->ifp = if_gethandle(IFT_ETHER); in ntb_net_attach()
139 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); in ntb_net_attach()
140 if_setdev(ifp, dev); in ntb_net_attach()
150 q->ifp = ifp; in ntb_net_attach()
[all …]
/freebsd/sys/netgraph/
H A Dng_eiface.c82 struct ifnet *ifp; /* per-interface network data */ member
93 static void ng_eiface_start(struct ifnet *ifp);
94 static int ng_eiface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
96 static void ng_eiface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data);
134 ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_eiface_ioctl() argument
136 const priv_p priv = (priv_p)ifp->if_softc; in ng_eiface_ioctl()
141 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 …]
H A Dng_iface.c118 struct ifnet *ifp; /* Our interface */ member
132 static void ng_iface_start(struct ifnet *ifp);
133 static int ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
134 static int ng_iface_output(struct ifnet *ifp, struct mbuf *m0,
136 static void ng_iface_bpftap(struct ifnet *ifp,
138 static int ng_iface_send(struct ifnet *ifp, struct mbuf *m,
141 static void ng_iface_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data);
280 ng_iface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) in ng_iface_ioctl() argument
286 ng_iface_print_ioctl(ifp, command, data); in ng_iface_ioctl()
291 ifp->if_flags |= IFF_UP; in ng_iface_ioctl()
[all …]
/freebsd/share/man/man9/
H A Difnet.955 .Fn if_attach "if_t ifp"
57 .Fn if_detach "if_t ifp"
59 .Fn if_free "if_t ifp"
61 .Fn if_free_type "if_t ifp" "u_char type"
63 .Fn if_down "if_t ifp"
67 .Fn ifpromisc "if_t ifp" "int pswitch"
69 .Fn if_allmulti "if_t ifp" "int amswitch"
75 .Fn if_up "if_t ifp"
85 .Fn ifaof_ifpforaddr "struct sockaddr *addr" "if_t ifp"
93 .Fn if_addmulti "if_t ifp" "struct sockaddr *sa" "struct ifmultiaddr **ifmap"
[all …]
H A Daltq.944 .Fn IFQ_HANDOFF "struct ifnet *ifp" "struct mbuf *m" "int error"
46 .Fa "struct ifnet *ifp" "struct mbuf *m" "int adjust" "int error"
352 ether_output(ifp, m0, dst, rt0) | ether_output(ifp, m0, dst, rt0)
359 if (IF_QFULL(&ifp->if_snd)) { | IFQ_ENQUEUE(&ifp->if_snd, m,
361 IF_DROP(&ifp->if_snd); | if (error != 0) {
365 IF_ENQUEUE(&ifp->if_snd, m); |
366 ifp->if_obytes += | ifp->if_obytes += len;
369 ifp->if_omcasts++; | ifp->if_omcasts++;
371 if ((ifp->if_flags & IFF_OACTIVE) | if ((ifp->if_flags & IFF_OACTIVE)
373 (*ifp->if_start)(ifp); | (*ifp->if_start)(ifp);
[all …]
/freebsd/sys/dev/firewire/
H A Dif_fwe.c99 fwe_poll(if_t ifp, enum poll_cmd cmd, int count) in fwe_poll() argument
104 if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) in fwe_poll()
107 fwe = ((struct fwe_eth_softc *)if_getsoftc(ifp))->fwe; in fwe_poll()
138 if_t ifp; in fwe_attach() local
180 ifp = fwe->eth_softc.ifp = if_alloc(IFT_ETHER); in fwe_attach()
181 if_setsoftc(ifp, &fwe->eth_softc); in fwe_attach()
183 if_initname(ifp, device_get_name(dev), unit); in fwe_attach()
184 if_setinitfn(ifp, fwe_init); in fwe_attach()
185 if_setstartfn(ifp, fwe_start); in fwe_attach()
186 if_setioctlfn(ifp, fwe_ioctl); in fwe_attach()
[all …]
/freebsd/sys/netipsec/
H A Dipsec_offload.c90 struct ifnet *ifp; member
110 struct ifnet *ifp; member
145 static int ipsec_accel_handle_sav(struct secasvar *sav, struct ifnet *ifp,
149 struct ifnet *ifp);
151 struct seclifetime *lft_c, if_t ifp, enum IF_SA_CNT_WHICH op,
157 static void ipsec_accel_on_ifdown_impl(struct ifnet *ifp);
159 if_t ifp, u_int drv_spi, uint64_t octets, uint64_t allocs);
161 if_t ifp, u_int drv_spi, uint64_t *octets, uint64_t *allocs);
162 static void ipsec_accel_ifdetach_event(void *arg, struct ifnet *ifp);
163 static bool ipsec_accel_fill_xh_impl(if_t ifp, uint32_t drv_spi,
[all …]
/freebsd/sbin/ipf/ipftest/
H A Dip_fil.c77 ipf_forgetifp(softc, ifp) in ipf_forgetifp() argument
79 void *ifp;
86 if (f->fr_ifa == ifp)
90 if (f->fr_ifa == ifp)
94 if (f->fr_ifa == ifp)
98 if (f->fr_ifa == ifp)
101 ipf_nat_sync(softc, ifp);
102 ipf_lookup_sync(softc, ifp);
107 no_output(ifp, m, s, rt) in no_output() argument
109 struct ifnet *ifp;
[all …]
/freebsd/sys/compat/linsysfs/
H A Dlinsysfs_net.c56 if_t ifp; member
88 if_t ifp; in linsysfs_if_addr() local
93 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_addr()
94 if (ifp != NULL && (error = linux_ifhwaddr(ifp, &lsa)) == 0) in linsysfs_if_addr()
117 if_t ifp; in linsysfs_if_flags() local
122 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_flags()
123 if (ifp != NULL) in linsysfs_if_flags()
124 error = sbuf_printf(sb, "0x%x\n", linux_ifflags(ifp)); in linsysfs_if_flags()
136 if_t ifp; in linsysfs_if_ifindex() local
141 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_ifindex()
[all …]

12345678910>>...26