diff --git a/sys/net/altq/altq_cbq.c b/sys/net/altq/altq_cbq.c --- a/sys/net/altq/altq_cbq.c +++ b/sys/net/altq/altq_cbq.c @@ -47,6 +47,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_codel.c b/sys/net/altq/altq_codel.c --- a/sys/net/altq/altq_codel.c +++ b/sys/net/altq/altq_codel.c @@ -53,6 +53,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_fairq.c b/sys/net/altq/altq_fairq.c --- a/sys/net/altq/altq_fairq.c +++ b/sys/net/altq/altq_fairq.c @@ -104,6 +104,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_hfsc.c b/sys/net/altq/altq_hfsc.c --- a/sys/net/altq/altq_hfsc.c +++ b/sys/net/altq/altq_hfsc.c @@ -63,6 +63,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_priq.c b/sys/net/altq/altq_priq.c --- a/sys/net/altq/altq_priq.c +++ b/sys/net/altq/altq_priq.c @@ -49,6 +49,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c --- a/sys/net/altq/altq_rmclass.c +++ b/sys/net/altq/altq_rmclass.c @@ -52,6 +52,7 @@ #include #include +#include #include #include diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/bpf.c b/sys/net/bpf.c --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -78,6 +78,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -55,6 +55,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c --- a/sys/net/debugnet.c +++ b/sys/net/debugnet.c @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/debugnet_inet.c b/sys/net/debugnet_inet.c --- a/sys/net/debugnet_inet.c +++ b/sys/net/debugnet_inet.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -53,6 +53,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if.c b/sys/net/if.c --- a/sys/net/if.c +++ b/sys/net/if.c @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -110,6 +110,7 @@ #include #include #include +#include #include #include diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_dead.c b/sys/net/if_dead.c --- a/sys/net/if_dead.c +++ b/sys/net/if_dead.c @@ -42,6 +42,7 @@ #include #include +#include static int ifdead_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa, diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c --- a/sys/net/if_disc.c +++ b/sys/net/if_disc.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_edsc.c b/sys/net/if_edsc.c --- a/sys/net/if_edsc.c +++ b/sys/net/if_edsc.c @@ -50,9 +50,9 @@ #include /* Ethernet related constants and types */ #include #include /* basic part of ifnet(9) */ +#include #include /* network interface cloning */ #include /* IFT_ETHER and friends */ -#include /* kernel-only part of ifnet(9) */ #include static const char edscname[] = "edsc"; diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #ifdef RSS diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c --- a/sys/net/if_fwsubr.c +++ b/sys/net/if_fwsubr.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -60,6 +60,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_ipsec.c b/sys/net/if_ipsec.c --- a/sys/net/if_ipsec.c +++ b/sys/net/if_ipsec.c @@ -52,6 +52,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -53,6 +53,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_me.c b/sys/net/if_me.c --- a/sys/net/if_me.c +++ b/sys/net/if_me.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_media.c b/sys/net/if_media.c --- a/sys/net/if_media.c +++ b/sys/net/if_media.c @@ -75,6 +75,7 @@ #ifdef IFMEDIA_DEBUG #include +#include int ifmedia_debug = 0; SYSCTL_INT(_debug, OID_AUTO, ifmedia, CTLFLAG_RW, &ifmedia_debug, 0, "if_media debugging msgs"); diff --git a/sys/net/if_mib.c b/sys/net/if_mib.c --- a/sys/net/if_mib.c +++ b/sys/net/if_mib.c @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include diff --git a/sys/net/if_private.h b/sys/net/if_private.h new file mode 100644 --- /dev/null +++ b/sys/net/if_private.h @@ -0,0 +1,195 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * From: @(#)if.h 8.1 (Berkeley) 6/10/93 + */ + +#ifndef _NET_IF_PRIVATE_H_ +#define _NET_IF_PRIVATE_H_ + +/* + * Structure defining a network interface. + */ +struct ifnet { + /* General book keeping of interface lists. */ + CK_STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ + LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ + CK_STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ + /* protected by if_addr_lock */ + u_char if_alloctype; /* if_type at time of allocation */ + uint8_t if_numa_domain; /* NUMA domain of device */ + /* Driver and protocol specific information that remains stable. */ + void *if_softc; /* pointer to driver state */ + void *if_llsoftc; /* link layer softc */ + void *if_l2com; /* pointer to protocol bits */ + const char *if_dname; /* driver name */ + int if_dunit; /* unit or IF_DUNIT_NONE */ + u_short if_index; /* numeric abbreviation for this if */ + u_short if_idxgen; /* ... and its generation count */ + char if_xname[IFNAMSIZ]; /* external name (name + unit) */ + char *if_description; /* interface description */ + + /* Variable fields that are touched by the stack and drivers. */ + int if_flags; /* up/down, broadcast, etc. */ + int if_drv_flags; /* driver-managed status flags */ + int if_capabilities; /* interface features & capabilities */ + int if_capabilities2; /* part 2 */ + int if_capenable; /* enabled features & capabilities */ + int if_capenable2; /* part 2 */ + void *if_linkmib; /* link-type-specific MIB data */ + size_t if_linkmiblen; /* length of above data */ + u_int if_refcount; /* reference count */ + + /* These fields are shared with struct if_data. */ + uint8_t if_type; /* ethernet, tokenring, etc */ + uint8_t if_addrlen; /* media address length */ + uint8_t if_hdrlen; /* media header length */ + uint8_t if_link_state; /* current link state */ + uint32_t if_mtu; /* maximum transmission unit */ + uint32_t if_metric; /* routing metric (external only) */ + uint64_t if_baudrate; /* linespeed */ + uint64_t if_hwassist; /* HW offload capabilities, see IFCAP */ + time_t if_epoch; /* uptime at attach or stat reset */ + struct timeval if_lastchange; /* time of last administrative change */ + + struct ifaltq if_snd; /* output queue (includes altq) */ + struct task if_linktask; /* task for link change events */ + struct task if_addmultitask; /* task for SIOCADDMULTI */ + + /* Addresses of different protocol families assigned to this if. */ + struct mtx if_addr_lock; /* lock to protect address lists */ + /* + * if_addrhead is the list of all addresses associated to + * an interface. + * Some code in the kernel assumes that first element + * of the list has type AF_LINK, and contains sockaddr_dl + * addresses which store the link-level address and the name + * of the interface. + * However, access to the AF_LINK address through this + * field is deprecated. Use if_addr instead. + */ + struct ifaddrhead if_addrhead; /* linked list of addresses per if */ + struct ifmultihead if_multiaddrs; /* multicast addresses configured */ + int if_amcount; /* number of all-multicast requests */ + struct ifaddr *if_addr; /* pointer to link-level address */ + void *if_hw_addr; /* hardware link-level address */ + const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ + struct mtx if_afdata_lock; + void *if_afdata[AF_MAX]; + int if_afdata_initialized; + + /* Additional features hung off the interface. */ + u_int if_fib; /* interface FIB */ + struct vnet *if_vnet; /* pointer to network stack instance */ + struct vnet *if_home_vnet; /* where this ifnet originates from */ + struct ifvlantrunk *if_vlantrunk; /* pointer to 802.1q data */ + struct bpf_if *if_bpf; /* packet filter structure */ + int if_pcount; /* number of promiscuous listeners */ + void *if_bridge; /* bridge glue */ + void *if_lagg; /* lagg glue */ + void *if_pf_kif; /* pf glue */ + struct carp_if *if_carp; /* carp interface structure */ + struct label *if_label; /* interface MAC label */ + struct netmap_adapter *if_netmap; /* netmap(4) softc */ + + /* Various procedures of the layer2 encapsulation and drivers. */ + if_output_fn_t if_output; /* output routine (enqueue) */ + if_input_fn_t if_input; /* input routine (from h/w driver) */ + struct mbuf *(*if_bridge_input)(struct ifnet *, struct mbuf *); + int (*if_bridge_output)(struct ifnet *, struct mbuf *, struct sockaddr *, + struct rtentry *); + void (*if_bridge_linkstate)(struct ifnet *ifp); + if_start_fn_t if_start; /* initiate output routine */ + if_ioctl_fn_t if_ioctl; /* ioctl routine */ + if_init_fn_t if_init; /* Init routine */ + int (*if_resolvemulti) /* validate/resolve multicast */ + (struct ifnet *, struct sockaddr **, struct sockaddr *); + if_qflush_fn_t if_qflush; /* flush any queue */ + if_transmit_fn_t if_transmit; /* initiate output routine */ + + void (*if_reassign) /* reassign to vnet routine */ + (struct ifnet *, struct vnet *, char *); + if_get_counter_t if_get_counter; /* get counter values */ + int (*if_requestencap) /* make link header from request */ + (struct ifnet *, struct if_encap_req *); + + /* Statistics. */ + counter_u64_t if_counters[IFCOUNTERS]; + + /* Stuff that's only temporary and doesn't belong here. */ + + /* + * Network adapter TSO limits: + * =========================== + * + * If the "if_hw_tsomax" field is zero the maximum segment + * length limit does not apply. If the "if_hw_tsomaxsegcount" + * or the "if_hw_tsomaxsegsize" field is zero the TSO segment + * count limit does not apply. If all three fields are zero, + * there is no TSO limit. + * + * NOTE: The TSO limits should reflect the values used in the + * BUSDMA tag a network adapter is using to load a mbuf chain + * for transmission. The TCP/IP network stack will subtract + * space for all linklevel and protocol level headers and + * ensure that the full mbuf chain passed to the network + * adapter fits within the given limits. + */ + u_int if_hw_tsomax; /* TSO maximum size in bytes */ + u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ + u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ + + /* + * Network adapter send tag support: + */ + if_snd_tag_alloc_t *if_snd_tag_alloc; + + /* Ratelimit (packet pacing) */ + if_ratelimit_query_t *if_ratelimit_query; + if_ratelimit_setup_t *if_ratelimit_setup; + + /* Ethernet PCP */ + uint8_t if_pcp; + + /* + * Debugnet (Netdump) hooks to be called while in db/panic. + */ + struct debugnet_methods *if_debugnet_methods; + struct epoch_context if_epoch_ctx; + + /* + * Spare fields to be added before branching a stable branch, so + * that structure can be enhanced without changing the kernel + * binary interface. + */ + int if_ispare[4]; /* general use */ +}; + +#endif /* _NET_IF_PRIVATE_H_ */ diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -100,6 +100,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_var.h b/sys/net/if_var.h --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -316,165 +316,6 @@ typedef void (if_ratelimit_query_t)(struct ifnet *, struct if_ratelimit_query_results *); typedef int (if_ratelimit_setup_t)(struct ifnet *, uint64_t, uint32_t); - -/* - * Structure defining a network interface. - */ -struct ifnet { - /* General book keeping of interface lists. */ - CK_STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ - LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ - CK_STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ - /* protected by if_addr_lock */ - u_char if_alloctype; /* if_type at time of allocation */ - uint8_t if_numa_domain; /* NUMA domain of device */ - /* Driver and protocol specific information that remains stable. */ - void *if_softc; /* pointer to driver state */ - void *if_llsoftc; /* link layer softc */ - void *if_l2com; /* pointer to protocol bits */ - const char *if_dname; /* driver name */ - int if_dunit; /* unit or IF_DUNIT_NONE */ - u_short if_index; /* numeric abbreviation for this if */ - u_short if_idxgen; /* ... and its generation count */ - char if_xname[IFNAMSIZ]; /* external name (name + unit) */ - char *if_description; /* interface description */ - - /* Variable fields that are touched by the stack and drivers. */ - int if_flags; /* up/down, broadcast, etc. */ - int if_drv_flags; /* driver-managed status flags */ - int if_capabilities; /* interface features & capabilities */ - int if_capabilities2; /* part 2 */ - int if_capenable; /* enabled features & capabilities */ - int if_capenable2; /* part 2 */ - void *if_linkmib; /* link-type-specific MIB data */ - size_t if_linkmiblen; /* length of above data */ - u_int if_refcount; /* reference count */ - - /* These fields are shared with struct if_data. */ - uint8_t if_type; /* ethernet, tokenring, etc */ - uint8_t if_addrlen; /* media address length */ - uint8_t if_hdrlen; /* media header length */ - uint8_t if_link_state; /* current link state */ - uint32_t if_mtu; /* maximum transmission unit */ - uint32_t if_metric; /* routing metric (external only) */ - uint64_t if_baudrate; /* linespeed */ - uint64_t if_hwassist; /* HW offload capabilities, see IFCAP */ - time_t if_epoch; /* uptime at attach or stat reset */ - struct timeval if_lastchange; /* time of last administrative change */ - - struct ifaltq if_snd; /* output queue (includes altq) */ - struct task if_linktask; /* task for link change events */ - struct task if_addmultitask; /* task for SIOCADDMULTI */ - - /* Addresses of different protocol families assigned to this if. */ - struct mtx if_addr_lock; /* lock to protect address lists */ - /* - * if_addrhead is the list of all addresses associated to - * an interface. - * Some code in the kernel assumes that first element - * of the list has type AF_LINK, and contains sockaddr_dl - * addresses which store the link-level address and the name - * of the interface. - * However, access to the AF_LINK address through this - * field is deprecated. Use if_addr instead. - */ - struct ifaddrhead if_addrhead; /* linked list of addresses per if */ - struct ifmultihead if_multiaddrs; /* multicast addresses configured */ - int if_amcount; /* number of all-multicast requests */ - struct ifaddr *if_addr; /* pointer to link-level address */ - void *if_hw_addr; /* hardware link-level address */ - const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ - struct mtx if_afdata_lock; - void *if_afdata[AF_MAX]; - int if_afdata_initialized; - - /* Additional features hung off the interface. */ - u_int if_fib; /* interface FIB */ - struct vnet *if_vnet; /* pointer to network stack instance */ - struct vnet *if_home_vnet; /* where this ifnet originates from */ - struct ifvlantrunk *if_vlantrunk; /* pointer to 802.1q data */ - struct bpf_if *if_bpf; /* packet filter structure */ - int if_pcount; /* number of promiscuous listeners */ - void *if_bridge; /* bridge glue */ - void *if_lagg; /* lagg glue */ - void *if_pf_kif; /* pf glue */ - struct carp_if *if_carp; /* carp interface structure */ - struct label *if_label; /* interface MAC label */ - struct netmap_adapter *if_netmap; /* netmap(4) softc */ - - /* Various procedures of the layer2 encapsulation and drivers. */ - if_output_fn_t if_output; /* output routine (enqueue) */ - if_input_fn_t if_input; /* input routine (from h/w driver) */ - struct mbuf *(*if_bridge_input)(struct ifnet *, struct mbuf *); - int (*if_bridge_output)(struct ifnet *, struct mbuf *, struct sockaddr *, - struct rtentry *); - void (*if_bridge_linkstate)(struct ifnet *ifp); - if_start_fn_t if_start; /* initiate output routine */ - if_ioctl_fn_t if_ioctl; /* ioctl routine */ - if_init_fn_t if_init; /* Init routine */ - int (*if_resolvemulti) /* validate/resolve multicast */ - (struct ifnet *, struct sockaddr **, struct sockaddr *); - if_qflush_fn_t if_qflush; /* flush any queue */ - if_transmit_fn_t if_transmit; /* initiate output routine */ - - void (*if_reassign) /* reassign to vnet routine */ - (struct ifnet *, struct vnet *, char *); - if_get_counter_t if_get_counter; /* get counter values */ - int (*if_requestencap) /* make link header from request */ - (struct ifnet *, struct if_encap_req *); - - /* Statistics. */ - counter_u64_t if_counters[IFCOUNTERS]; - - /* Stuff that's only temporary and doesn't belong here. */ - - /* - * Network adapter TSO limits: - * =========================== - * - * If the "if_hw_tsomax" field is zero the maximum segment - * length limit does not apply. If the "if_hw_tsomaxsegcount" - * or the "if_hw_tsomaxsegsize" field is zero the TSO segment - * count limit does not apply. If all three fields are zero, - * there is no TSO limit. - * - * NOTE: The TSO limits should reflect the values used in the - * BUSDMA tag a network adapter is using to load a mbuf chain - * for transmission. The TCP/IP network stack will subtract - * space for all linklevel and protocol level headers and - * ensure that the full mbuf chain passed to the network - * adapter fits within the given limits. - */ - u_int if_hw_tsomax; /* TSO maximum size in bytes */ - u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ - u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ - - /* - * Network adapter send tag support: - */ - if_snd_tag_alloc_t *if_snd_tag_alloc; - - /* Ratelimit (packet pacing) */ - if_ratelimit_query_t *if_ratelimit_query; - if_ratelimit_setup_t *if_ratelimit_setup; - - /* Ethernet PCP */ - uint8_t if_pcp; - - /* - * Debugnet (Netdump) hooks to be called while in db/panic. - */ - struct debugnet_methods *if_debugnet_methods; - struct epoch_context if_epoch_ctx; - - /* - * Spare fields to be added before branching a stable branch, so - * that structure can be enhanced without changing the kernel - * binary interface. - */ - int if_ispare[4]; /* general use */ -}; - #define IF_NODOM 255 /* * Locks for address lists on the network interface. @@ -834,6 +675,7 @@ #endif /* _KERNEL */ +#include /* XXX: temporary until drivers converted. */ #include /* XXXAO: temporary unconditional include */ #endif /* !_NET_IF_VAR_H_ */ diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -54,6 +54,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/iflib_clone.c b/sys/net/iflib_clone.c --- a/sys/net/iflib_clone.c +++ b/sys/net/iflib_clone.c @@ -60,6 +60,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/netisr.c b/sys/net/netisr.c --- a/sys/net/netisr.c +++ b/sys/net/netisr.c @@ -93,6 +93,7 @@ #define _WANT_NETISR_INTERNAL /* Enable definitions from netisr_internal.h */ #include #include +#include #include #include #include diff --git a/sys/net/route.c b/sys/net/route.c --- a/sys/net/route.c +++ b/sys/net/route.c @@ -59,6 +59,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -43,6 +43,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/route_ddb.c b/sys/net/route/route_ddb.c --- a/sys/net/route/route_ddb.c +++ b/sys/net/route/route_ddb.c @@ -47,6 +47,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/route_ifaddrs.c b/sys/net/route/route_ifaddrs.c --- a/sys/net/route/route_ifaddrs.c +++ b/sys/net/route/route_ifaddrs.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sys/net/route/route_rtentry.c b/sys/net/route/route_rtentry.c --- a/sys/net/route/route_rtentry.c +++ b/sys/net/route/route_rtentry.c @@ -48,7 +48,7 @@ #include #include #include -#include +//#include #include diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -57,6 +57,7 @@ #include #include +#include #include #include #include