Lines Matching defs:ifnet

238 static MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions");
242 SX_SYSINIT(ifdescr_sx, &ifdescr_sx, "ifnet descr");
244 void (*ng_ether_link_state_p)(struct ifnet *ifp, int state);
245 void (*lagg_linkstate_p)(struct ifnet *ifp, int state);
247 void (*carp_linkstate_p)(struct ifnet *ifp);
251 int (*carp_forus_p)(struct ifnet *ifp, u_char *dhost);
252 int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m,
262 struct ifaddr *(*carp_iamatch6_p)(struct ifnet *ifp, struct in6_addr *taddr6);
263 caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m,
275 static void if_attachdomain1(struct ifnet *);
277 static void if_input_default(struct ifnet *, struct mbuf *);
278 static int if_requestencap_default(struct ifnet *, struct if_encap_req *);
279 static int if_setflag(struct ifnet *, int, int, int *, int);
280 static int if_transmit_default(struct ifnet *ifp, struct mbuf *m);
281 static void if_unroute(struct ifnet *, int flag, int fam);
282 static int if_delmulti_locked(struct ifnet *, struct ifmultiaddr *, int);
284 static int if_getgroup(struct ifgroupreq *, struct ifnet *);
286 static void if_delgroups(struct ifnet *);
287 static void if_attach_internal(struct ifnet *, bool);
288 static int if_detach_internal(struct ifnet *, bool);
290 static void if_link_ifnet(struct ifnet *);
291 static bool if_unlink_ifnet(struct ifnet *, bool);
293 static int if_vmove(struct ifnet *, struct vnet *);
301 extern void nd6_setmtu(struct ifnet *);
309 VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */
312 /* Table of ifnet by index. */
316 struct ifnet *ife_ifnet;
361 static MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals");
365 struct ifnet *
368 struct ifnet *ifp;
383 struct ifnet *
386 struct ifnet *ifp;
396 struct ifnet *
399 struct ifnet *ifp;
442 if_link_ifnet(struct ifnet *ifp)
454 if_unlink_ifnet(struct ifnet *ifp, bool vmove)
456 struct ifnet *iter;
462 CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link);
480 struct ifnet *ifp, *nifp;
481 struct ifnet **pending;
500 pending = malloc(sizeof(struct ifnet *) * curvnet->vnet_ifcnt,
527 * Allocate a struct ifnet and an index for an interface. A layer 2
531 static struct ifnet *
534 struct ifnet *ifp;
539 ifp = malloc(sizeof(struct ifnet), M_IFNET,
542 ifp = malloc_domainset(sizeof(struct ifnet), M_IFNET,
611 struct ifnet *
621 struct ifnet *
628 * Do the actual work of freeing a struct ifnet, and layer 2 common
635 struct ifnet *ifp = __containerof(ctx, struct ifnet, if_epoch_ctx);
663 if_free(struct ifnet *ifp)
692 * Interfaces to keep an ifnet type-stable despite the possibility of the
697 if_ref(struct ifnet *ifp)
701 /* We don't assert the ifnet list lock here, but arguably should. */
707 if_try_ref(struct ifnet *ifp)
714 if_rele(struct ifnet *ifp)
723 ifq_init(struct ifaltq *ifq, struct ifnet *ifp)
748 * tasks, given that we are moving from one vnet to another an ifnet which
767 if_attach(struct ifnet *ifp)
825 if_attach_internal(struct ifnet *ifp, bool vmove)
972 struct ifnet *ifp;
981 if_attachdomain1(struct ifnet *ifp)
1012 if_purgeaddrs(struct ifnet *ifp)
1065 * Remove any multicast network addresses from an interface when an ifnet
1069 if_purgemaddrs(struct ifnet *ifp)
1085 * limited subset of cleanup tasks, given that we are moving an ifnet from
1092 if_detach(struct ifnet *ifp)
1117 if_detach_internal(struct ifnet *ifp, bool vmove)
1131 * At this point we know the interface still was on the ifnet list
1140 * belonging ifnet structure:
1168 * abort as if we did not find the ifnet anymore.
1215 * Prevent further calls into the device driver via ifnet.
1262 * vnet and if_attach()es the ifnet to the vnet specified as 2nd arg.
1265 if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
1271 * mark as dead etc. so that the ifnet can be reattached later.
1295 * Move an ifnet to or from another child prison/vnet, specified by the jail id.
1298 if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid)
1301 struct ifnet *difp;
1367 struct ifnet *ifp;
1426 if_addgroup(struct ifnet *ifp, const char *groupname)
1493 * ifnet lock to be write-locked, and drops it before returning.
1496 _if_delgroup_locked(struct ifnet *ifp, struct ifg_list *ifgl,
1539 if_delgroup(struct ifnet *ifp, const char *groupname)
1561 if_delgroups(struct ifnet *ifp)
1579 if_getgroup(struct ifgroupreq *ifgr, struct ifnet *ifp)
1661 * Return counter values from counter(9)s stored in ifnet.
1664 if_get_counter_default(struct ifnet *ifp, ift_counter cnt)
1673 * Increase an ifnet counter. Usually used for counters shared
1677 if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc)
1686 * Copy data from ifnet to userland API structure if_data.
1689 if_data_copy(struct ifnet *ifp, struct if_data *ifd)
1820 struct ifnet *ifp;
1865 struct ifnet *ifp;
1895 struct ifnet *ifp;
1925 struct ifnet *ifp;
2014 ifaof_ifpforaddr(const struct sockaddr *addr, struct ifnet *ifp)
2091 link_init_sdl(struct ifnet *ifp, struct sockaddr *paddr, u_char iftype)
2110 if_unroute(struct ifnet *ifp, int flag, int fam)
2124 void (*vlan_link_state_p)(struct ifnet *); /* XXX: private from if_vlan */
2125 void (*vlan_trunk_cap_p)(struct ifnet *); /* XXX: private from if_vlan */
2126 struct ifnet *(*vlan_trunkdev_p)(struct ifnet *);
2127 struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t);
2128 int (*vlan_tag_p)(struct ifnet *, uint16_t *);
2129 int (*vlan_pcp_p)(struct ifnet *, uint16_t *);
2130 int (*vlan_setcookie_p)(struct ifnet *, void *);
2131 void *(*vlan_cookie_p)(struct ifnet *);
2140 if_link_state_change(struct ifnet *ifp, int link_state)
2155 struct ifnet *ifp;
2194 if_down(struct ifnet *ifp)
2206 if_up(struct ifnet *ifp)
2221 if_qflush(struct ifnet *ifp)
2247 struct ifnet *
2251 struct ifnet *ifp;
2268 struct ifnet *
2272 struct ifnet *ifp;
2439 ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
2926 struct ifnet *ifp;
3130 if_rename(struct ifnet *ifp, char *new_name)
3200 if_setflag(struct ifnet *ifp, int flag, int pflag, int *refcount, int onswitch)
3225 /* Save ifnet parameters for if_ioctl() may fail */
3271 ifpromisc(struct ifnet *ifp, int pswitch)
3297 struct ifnet *ifp;
3398 if_allmulti(struct ifnet *ifp, int onswitch)
3406 if_findmulti(struct ifnet *ifp, const struct sockaddr *sa)
3428 * the ifnet multicast address list here, so the caller must do that and
3433 if_allocmulti(struct ifnet *ifp, struct sockaddr *sa, struct sockaddr *llsa,
3536 if_addmulti(struct ifnet *ifp, struct sockaddr *sa,
3621 * ifnet address list.
3664 struct ifnet *ifp;
3686 if_delmulti(struct ifnet *ifp, struct sockaddr *sa)
3715 if_delallmulti(struct ifnet *ifp)
3741 struct ifnet *ifp;
3753 struct ifnet *oifp;
3765 * If and only if the ifnet instance exists: Acquire the address lock.
3774 * If and only if the ifnet instance exists:
3793 if_delmulti_locked(struct ifnet *ifp, struct ifmultiaddr *ifma, int detaching)
3807 * If the ifnet is detaching, null out references to ifnet,
3809 * to obtain locks for an ifnet which no longer exists. The
3810 * routing socket announcement must happen before the ifnet
3815 printf("%s: detaching ifnet instance %p\n", __func__, ifp);
3880 if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
3943 if_requestencap_default(struct ifnet *ifp, struct if_encap_req *req)
3976 if_tunnel_check_nesting(struct ifnet *ifp, struct mbuf *m, uint32_t cookie,
3985 if (*(struct ifnet **)(mtag + 1) == ifp) {
3997 mtag = m_tag_alloc(cookie, 0, sizeof(struct ifnet *), M_NOWAIT);
4000 *(struct ifnet **)(mtag + 1) = ifp;
4012 if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr)
4034 if_initname(struct ifnet *ifp, const char *name, int unit)
4045 if_vlog(struct ifnet *ifp, int pri, const char *fmt, va_list ap)
4056 if_printf(struct ifnet *ifp, const char *fmt, ...)
4067 if_log(struct ifnet *ifp, int pri, const char *fmt, ...)
4078 if_start(struct ifnet *ifp)
4089 if_transmit_default(struct ifnet *ifp, struct mbuf *m)
4098 if_input_default(struct ifnet *ifp __unused, struct mbuf *m)
4104 if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, int adjust)
4162 /* API for driver access to network stack owned ifnet.*/
4164 if_setbaudrate(struct ifnet *ifp, uint64_t baudrate)
4366 * This is largely undesirable because it ties ifnet to a device, but does
4546 struct ifnet **match_array = NULL;
4552 struct ifnet **new_array;
4555 struct ifnet *ifp;
4772 m->m_pkthdr.rcvif = (struct ifnet *)ifp;
5169 if_show_ifnet(struct ifnet *ifp)
5218 DB_SHOW_COMMAND(ifnet, db_show_ifnet)
5221 db_printf("usage: show ifnet <struct ifnet *>\n");
5225 if_show_ifnet((struct ifnet *)addr);
5230 struct ifnet *ifp;