Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: add missing includes and forward declarations under net/

This patch adds missing includes to headers under include/net.
All these problems are currently masked by the existing users
including the missing dependency before the broken header.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
949d6b40 735dbc69

+183 -11
+5
include/linux/lapb.h
··· 6 6 #ifndef LAPB_KERNEL_H 7 7 #define LAPB_KERNEL_H 8 8 9 + #include <linux/skbuff.h> 10 + #include <linux/timer.h> 11 + 12 + struct net_device; 13 + 9 14 #define LAPB_OK 0 10 15 #define LAPB_BADTOKEN 1 11 16 #define LAPB_INVALUE 2
+1
include/net/af_vsock.h
··· 10 10 11 11 #include <linux/kernel.h> 12 12 #include <linux/workqueue.h> 13 + #include <net/sock.h> 13 14 #include <uapi/linux/vm_sockets.h> 14 15 15 16 #include "vsock_addr.h"
+3
include/net/amt.h
··· 7 7 8 8 #include <linux/siphash.h> 9 9 #include <linux/jhash.h> 10 + #include <linux/netdevice.h> 11 + #include <net/gro_cells.h> 12 + #include <net/rtnetlink.h> 10 13 11 14 enum amt_msg_type { 12 15 AMT_MSG_DISCOVERY = 1,
+2
include/net/ax88796.h
··· 8 8 #ifndef __NET_AX88796_PLAT_H 9 9 #define __NET_AX88796_PLAT_H 10 10 11 + #include <linux/types.h> 12 + 11 13 struct sk_buff; 12 14 struct net_device; 13 15 struct platform_device;
+8
include/net/bond_options.h
··· 7 7 #ifndef _NET_BOND_OPTIONS_H 8 8 #define _NET_BOND_OPTIONS_H 9 9 10 + #include <linux/bits.h> 11 + #include <linux/limits.h> 12 + #include <linux/types.h> 13 + #include <linux/string.h> 14 + 15 + struct netlink_ext_ack; 16 + struct nlattr; 17 + 10 18 #define BOND_OPT_MAX_NAMELEN 32 11 19 #define BOND_OPT_VALID(opt) ((opt) < BOND_OPT_LAST) 12 20 #define BOND_MODE_ALL_EX(x) (~(x))
+1
include/net/codel_qdisc.h
··· 49 49 * Implemented on linux by Dave Taht and Eric Dumazet 50 50 */ 51 51 52 + #include <net/codel.h> 52 53 #include <net/pkt_sched.h> 53 54 54 55 /* Qdiscs using codel plugin must use codel_skb_cb in their own cb[] */
+7
include/net/datalink.h
··· 2 2 #ifndef _NET_INET_DATALINK_H_ 3 3 #define _NET_INET_DATALINK_H_ 4 4 5 + #include <linux/list.h> 6 + 7 + struct llc_sap; 8 + struct net_device; 9 + struct packet_type; 10 + struct sk_buff; 11 + 5 12 struct datalink_proto { 6 13 unsigned char type[8]; 7 14
+2
include/net/dcbevent.h
··· 8 8 #ifndef _DCB_EVENT_H 9 9 #define _DCB_EVENT_H 10 10 11 + struct notifier_block; 12 + 11 13 enum dcbevent_notif_type { 12 14 DCB_APP_EVENT = 1, 13 15 };
+2
include/net/dcbnl.h
··· 10 10 11 11 #include <linux/dcbnl.h> 12 12 13 + struct net_device; 14 + 13 15 struct dcb_app_type { 14 16 int ifindex; 15 17 struct dcb_app app;
+1
include/net/dn_dev.h
··· 2 2 #ifndef _NET_DN_DEV_H 3 3 #define _NET_DN_DEV_H 4 4 5 + #include <linux/netdevice.h> 5 6 6 7 struct dn_dev; 7 8
+2
include/net/dn_fib.h
··· 4 4 5 5 #include <linux/netlink.h> 6 6 #include <linux/refcount.h> 7 + #include <linux/rtnetlink.h> 8 + #include <net/fib_rules.h> 7 9 8 10 extern const struct nla_policy rtm_dn_policy[]; 9 11
+2
include/net/dn_neigh.h
··· 2 2 #ifndef _NET_DN_NEIGH_H 3 3 #define _NET_DN_NEIGH_H 4 4 5 + #include <net/neighbour.h> 6 + 5 7 /* 6 8 * The position of the first two fields of 7 9 * this structure are critical - SJW
+6
include/net/dn_nsp.h
··· 6 6 7 7 *******************************************************************************/ 8 8 /* dn_nsp.c functions prototyping */ 9 + #include <linux/atomic.h> 10 + #include <linux/types.h> 11 + #include <net/sock.h> 12 + 13 + struct sk_buff; 14 + struct sk_buff_head; 9 15 10 16 void dn_nsp_send_data_ack(struct sock *sk); 11 17 void dn_nsp_send_oth_ack(struct sock *sk);
+3
include/net/dn_route.h
··· 7 7 8 8 *******************************************************************************/ 9 9 10 + #include <linux/types.h> 11 + #include <net/dst.h> 12 + 10 13 struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); 11 14 int dn_route_output_sock(struct dst_entry __rcu **pprt, struct flowidn *, 12 15 struct sock *sk, int flags);
+3
include/net/erspan.h
··· 58 58 * GRE proto ERSPAN type I/II = 0x88BE, type III = 0x22EB 59 59 */ 60 60 61 + #include <linux/ip.h> 62 + #include <linux/ipv6.h> 63 + #include <linux/skbuff.h> 61 64 #include <uapi/linux/erspan.h> 62 65 63 66 #define ERSPAN_VERSION 0x1 /* ERSPAN type II */
+1
include/net/esp.h
··· 5 5 #include <linux/skbuff.h> 6 6 7 7 struct ip_esp_hdr; 8 + struct xfrm_state; 8 9 9 10 static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb) 10 11 {
+3
include/net/ethoc.h
··· 10 10 #ifndef LINUX_NET_ETHOC_H 11 11 #define LINUX_NET_ETHOC_H 1 12 12 13 + #include <linux/if.h> 14 + #include <linux/types.h> 15 + 13 16 struct ethoc_platform_data { 14 17 u8 hwaddr[IFHWADDRLEN]; 15 18 s8 phy_id;
+2
include/net/firewire.h
··· 2 2 #ifndef _NET_FIREWIRE_H 3 3 #define _NET_FIREWIRE_H 4 4 5 + #include <linux/types.h> 6 + 5 7 /* Pseudo L2 address */ 6 8 #define FWNET_ALEN 16 7 9 union fwnet_hwaddr {
+4
include/net/fq.h
··· 7 7 #ifndef __NET_SCHED_FQ_H 8 8 #define __NET_SCHED_FQ_H 9 9 10 + #include <linux/skbuff.h> 11 + #include <linux/spinlock.h> 12 + #include <linux/types.h> 13 + 10 14 struct fq_tin; 11 15 12 16 /**
+2
include/net/garp.h
··· 2 2 #ifndef _NET_GARP_H 3 3 #define _NET_GARP_H 4 4 5 + #include <linux/if_ether.h> 6 + #include <linux/types.h> 5 7 #include <net/stp.h> 6 8 7 9 #define GARP_PROTOCOL_ID 0x1
+4
include/net/gtp.h
··· 2 2 #ifndef _GTP_H_ 3 3 #define _GTP_H_ 4 4 5 + #include <linux/netdevice.h> 6 + #include <linux/types.h> 7 + #include <net/rtnetlink.h> 8 + 5 9 /* General GTP protocol related definitions. */ 6 10 7 11 #define GTP0_PORT 3386
+3
include/net/gue.h
··· 30 30 * may refer to options placed after this field. 31 31 */ 32 32 33 + #include <asm/byteorder.h> 34 + #include <linux/types.h> 35 + 33 36 struct guehdr { 34 37 union { 35 38 struct {
+2
include/net/hwbm.h
··· 2 2 #ifndef _HWBM_H 3 3 #define _HWBM_H 4 4 5 + #include <linux/mutex.h> 6 + 5 7 struct hwbm_pool { 6 8 /* Capacity of the pool */ 7 9 int size;
+2
include/net/ila.h
··· 8 8 #ifndef _NET_ILA_H 9 9 #define _NET_ILA_H 10 10 11 + struct sk_buff; 12 + 11 13 int ila_xlat_outgoing(struct sk_buff *skb); 12 14 int ila_xlat_incoming(struct sk_buff *skb); 13 15
+2
include/net/inet6_connection_sock.h
··· 11 11 12 12 #include <linux/types.h> 13 13 14 + struct flowi; 15 + struct flowi6; 14 16 struct request_sock; 15 17 struct sk_buff; 16 18 struct sock;
+6
include/net/inet_common.h
··· 3 3 #define _INET_COMMON_H 4 4 5 5 #include <linux/indirect_call_wrapper.h> 6 + #include <linux/net.h> 7 + #include <linux/netdev_features.h> 8 + #include <linux/types.h> 9 + #include <net/sock.h> 6 10 7 11 extern const struct proto_ops inet_stream_ops; 8 12 extern const struct proto_ops inet_dgram_ops; ··· 16 12 */ 17 13 18 14 struct msghdr; 15 + struct net; 16 + struct page; 19 17 struct sock; 20 18 struct sockaddr; 21 19 struct socket;
+3
include/net/inet_frag.h
··· 4 4 5 5 #include <linux/rhashtable-types.h> 6 6 #include <linux/completion.h> 7 + #include <linux/in6.h> 8 + #include <linux/rbtree_types.h> 9 + #include <linux/refcount.h> 7 10 8 11 /* Per netns frag queues directory */ 9 12 struct fqdir {
+10 -10
include/net/ip6_route.h
··· 2 2 #ifndef _NET_IP6_ROUTE_H 3 3 #define _NET_IP6_ROUTE_H 4 4 5 + #include <net/addrconf.h> 6 + #include <net/flow.h> 7 + #include <net/ip6_fib.h> 8 + #include <net/sock.h> 9 + #include <net/lwtunnel.h> 10 + #include <linux/ip.h> 11 + #include <linux/ipv6.h> 12 + #include <linux/route.h> 13 + #include <net/nexthop.h> 14 + 5 15 struct route_info { 6 16 __u8 type; 7 17 __u8 length; ··· 28 18 __be32 lifetime; 29 19 __u8 prefix[]; /* 0,8 or 16 */ 30 20 }; 31 - 32 - #include <net/addrconf.h> 33 - #include <net/flow.h> 34 - #include <net/ip6_fib.h> 35 - #include <net/sock.h> 36 - #include <net/lwtunnel.h> 37 - #include <linux/ip.h> 38 - #include <linux/ipv6.h> 39 - #include <linux/route.h> 40 - #include <net/nexthop.h> 41 21 42 22 #define RT6_LOOKUP_F_IFACE 0x00000001 43 23 #define RT6_LOOKUP_F_REACHABLE 0x00000002
+2
include/net/ipcomp.h
··· 2 2 #ifndef _NET_IPCOMP_H 3 3 #define _NET_IPCOMP_H 4 4 5 + #include <linux/skbuff.h> 5 6 #include <linux/types.h> 6 7 7 8 #define IPCOMP_SCRATCH_SIZE 65400 8 9 9 10 struct crypto_comp; 11 + struct ip_comp_hdr; 10 12 11 13 struct ipcomp_data { 12 14 u16 threshold;
+2
include/net/ipconfig.h
··· 7 7 8 8 /* The following are initdata: */ 9 9 10 + #include <linux/types.h> 11 + 10 12 extern int ic_proto_enabled; /* Protocols enabled (see IC_xxx) */ 11 13 extern int ic_set_manually; /* IPconfig parameters set manually */ 12 14
+7
include/net/llc_c_ac.h
··· 16 16 * Connection state transition actions 17 17 * (Fb = F bit; Pb = P bit; Xb = X bit) 18 18 */ 19 + 20 + #include <linux/types.h> 21 + 22 + struct sk_buff; 23 + struct sock; 24 + struct timer_list; 25 + 19 26 #define LLC_CONN_AC_CLR_REMOTE_BUSY 1 20 27 #define LLC_CONN_AC_CONN_IND 2 21 28 #define LLC_CONN_AC_CONN_CONFIRM 3
+4
include/net/llc_c_st.h
··· 11 11 * 12 12 * See the GNU General Public License for more details. 13 13 */ 14 + 15 + #include <net/llc_c_ac.h> 16 + #include <net/llc_c_ev.h> 17 + 14 18 /* Connection component state management */ 15 19 /* connection states */ 16 20 #define LLC_CONN_OUT_OF_SVC 0 /* prior to allocation */
+4
include/net/llc_s_ac.h
··· 11 11 * 12 12 * See the GNU General Public License for more details. 13 13 */ 14 + 15 + struct llc_sap; 16 + struct sk_buff; 17 + 14 18 /* SAP component actions */ 15 19 #define SAP_ACT_UNITDATA_IND 1 16 20 #define SAP_ACT_SEND_UI 2
+1
include/net/llc_s_ev.h
··· 13 13 */ 14 14 15 15 #include <linux/skbuff.h> 16 + #include <net/llc.h> 16 17 17 18 /* Defines SAP component events */ 18 19 /* Types of events (possible values in 'ev->type') */
+3
include/net/mpls_iptunnel.h
··· 6 6 #ifndef _NET_MPLS_IPTUNNEL_H 7 7 #define _NET_MPLS_IPTUNNEL_H 1 8 8 9 + #include <linux/types.h> 10 + #include <net/lwtunnel.h> 11 + 9 12 struct mpls_iptunnel_encap { 10 13 u8 labels; 11 14 u8 ttl_propagate;
+4
include/net/mrp.h
··· 2 2 #ifndef _NET_MRP_H 3 3 #define _NET_MRP_H 4 4 5 + #include <linux/netdevice.h> 6 + #include <linux/skbuff.h> 7 + #include <linux/types.h> 8 + 5 9 #define MRP_END_MARK 0x0 6 10 7 11 struct mrp_pdu_hdr {
+2
include/net/ncsi.h
··· 2 2 #ifndef __NET_NCSI_H 3 3 #define __NET_NCSI_H 4 4 5 + #include <linux/types.h> 6 + 5 7 /* 6 8 * The NCSI device states seen from external. More NCSI device states are 7 9 * only visible internally (in net/ncsi/internal.h). When the NCSI device
+1
include/net/netevent.h
··· 14 14 15 15 struct dst_entry; 16 16 struct neighbour; 17 + struct notifier_block ; 17 18 18 19 struct netevent_redirect { 19 20 struct dst_entry *old;
+1
include/net/netns/can.h
··· 7 7 #define __NETNS_CAN_H__ 8 8 9 9 #include <linux/spinlock.h> 10 + #include <linux/timer.h> 10 11 11 12 struct can_dev_rcv_lists; 12 13 struct can_pkg_stats;
+2
include/net/netns/core.h
··· 2 2 #ifndef __NETNS_CORE_H__ 3 3 #define __NETNS_CORE_H__ 4 4 5 + #include <linux/types.h> 6 + 5 7 struct ctl_table_header; 6 8 struct prot_inuse; 7 9
+1
include/net/netns/generic.h
··· 8 8 9 9 #include <linux/bug.h> 10 10 #include <linux/rcupdate.h> 11 + #include <net/net_namespace.h> 11 12 12 13 /* 13 14 * Generic net pointers are to be used by modules to put some private
+1
include/net/netns/ipv4.h
··· 9 9 #include <linux/uidgid.h> 10 10 #include <net/inet_frag.h> 11 11 #include <linux/rcupdate.h> 12 + #include <linux/seqlock.h> 12 13 #include <linux/siphash.h> 13 14 14 15 struct ctl_table_header;
+1
include/net/netns/mctp.h
··· 6 6 #ifndef __NETNS_MCTP_H__ 7 7 #define __NETNS_MCTP_H__ 8 8 9 + #include <linux/mutex.h> 9 10 #include <linux/types.h> 10 11 11 12 struct netns_mctp {
+2
include/net/netns/mpls.h
··· 6 6 #ifndef __NETNS_MPLS_H__ 7 7 #define __NETNS_MPLS_H__ 8 8 9 + #include <linux/types.h> 10 + 9 11 struct mpls_route; 10 12 struct ctl_table_header; 11 13
+1
include/net/netns/nexthop.h
··· 6 6 #ifndef __NETNS_NEXTHOP_H__ 7 7 #define __NETNS_NEXTHOP_H__ 8 8 9 + #include <linux/notifier.h> 9 10 #include <linux/rbtree.h> 10 11 11 12 struct netns_nexthop {
+3
include/net/netns/sctp.h
··· 2 2 #ifndef __NETNS_SCTP_H__ 3 3 #define __NETNS_SCTP_H__ 4 4 5 + #include <linux/timer.h> 6 + #include <net/snmp.h> 7 + 5 8 struct sock; 6 9 struct proc_dir_entry; 7 10 struct sctp_mib;
+2
include/net/netns/unix.h
··· 5 5 #ifndef __NETNS_UNIX_H__ 6 6 #define __NETNS_UNIX_H__ 7 7 8 + #include <linux/spinlock.h> 9 + 8 10 struct unix_table { 9 11 spinlock_t *locks; 10 12 struct hlist_head *buckets;
+1
include/net/netrom.h
··· 14 14 #include <net/sock.h> 15 15 #include <linux/refcount.h> 16 16 #include <linux/seq_file.h> 17 + #include <net/ax25.h> 17 18 18 19 #define NR_NETWORK_LEN 15 19 20 #define NR_TRANSPORT_LEN 5
+5
include/net/p8022.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 #ifndef _NET_P8022_H 3 3 #define _NET_P8022_H 4 + 5 + struct net_device; 6 + struct packet_type; 7 + struct sk_buff; 8 + 4 9 struct datalink_proto * 5 10 register_8022_client(unsigned char type, 6 11 int (*func)(struct sk_buff *skb,
+3
include/net/phonet/pep.h
··· 10 10 #ifndef NET_PHONET_PEP_H 11 11 #define NET_PHONET_PEP_H 12 12 13 + #include <linux/skbuff.h> 14 + #include <net/phonet/phonet.h> 15 + 13 16 struct pep_sock { 14 17 struct pn_sock pn_sk; 15 18
+4
include/net/phonet/phonet.h
··· 10 10 #ifndef AF_PHONET_H 11 11 #define AF_PHONET_H 12 12 13 + #include <linux/phonet.h> 14 + #include <linux/skbuff.h> 15 + #include <net/sock.h> 16 + 13 17 /* 14 18 * The lower layers may not require more space, ever. Make sure it's 15 19 * enough.
+5
include/net/phonet/pn_dev.h
··· 10 10 #ifndef PN_DEV_H 11 11 #define PN_DEV_H 12 12 13 + #include <linux/list.h> 14 + #include <linux/mutex.h> 15 + 16 + struct net; 17 + 13 18 struct phonet_device_list { 14 19 struct list_head list; 15 20 struct mutex lock;
+3
include/net/pptp.h
··· 2 2 #ifndef _NET_PPTP_H 3 3 #define _NET_PPTP_H 4 4 5 + #include <linux/types.h> 6 + #include <net/gre.h> 7 + 5 8 #define PPP_LCP_ECHOREQ 0x09 6 9 #define PPP_LCP_ECHOREP 0x0A 7 10 #define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
+5
include/net/psnap.h
··· 2 2 #ifndef _NET_PSNAP_H 3 3 #define _NET_PSNAP_H 4 4 5 + struct datalink_proto; 6 + struct sk_buff; 7 + struct packet_type; 8 + struct net_device; 9 + 5 10 struct datalink_proto * 6 11 register_snap_client(const unsigned char *desc, 7 12 int (*rcvfunc)(struct sk_buff *, struct net_device *,
+3
include/net/regulatory.h
··· 1 + 1 2 #ifndef __NET_REGULATORY_H 2 3 #define __NET_REGULATORY_H 3 4 /* ··· 20 19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 20 */ 22 21 22 + #include <linux/ieee80211.h> 23 + #include <linux/nl80211.h> 23 24 #include <linux/rcupdate.h> 24 25 25 26 /**
+1
include/net/rose.h
··· 9 9 #define _ROSE_H 10 10 11 11 #include <linux/rose.h> 12 + #include <net/ax25.h> 12 13 #include <net/sock.h> 13 14 14 15 #define ROSE_ADDR_LEN 5
+2
include/net/secure_seq.h
··· 4 4 5 5 #include <linux/types.h> 6 6 7 + struct net; 8 + 7 9 u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); 8 10 u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, 9 11 __be16 dport);
+7
include/net/smc.h
··· 11 11 #ifndef _SMC_H 12 12 #define _SMC_H 13 13 14 + #include <linux/device.h> 15 + #include <linux/spinlock.h> 16 + #include <linux/types.h> 17 + #include <linux/wait.h> 18 + 19 + struct sock; 20 + 14 21 #define SMC_MAX_PNETID_LEN 16 /* Max. length of PNET id */ 15 22 16 23 struct smc_hashinfo {
+2
include/net/stp.h
··· 2 2 #ifndef _NET_STP_H 3 3 #define _NET_STP_H 4 4 5 + #include <linux/if_ether.h> 6 + 5 7 struct stp_proto { 6 8 unsigned char group_address[ETH_ALEN]; 7 9 void (*rcv)(const struct stp_proto *, struct sk_buff *,
+2
include/net/transp_v6.h
··· 3 3 #define _TRANSP_V6_H 4 4 5 5 #include <net/checksum.h> 6 + #include <net/sock.h> 6 7 7 8 /* IPv6 transport protocols */ 8 9 extern struct proto rawv6_prot; ··· 13 12 extern struct proto pingv6_prot; 14 13 15 14 struct flowi6; 15 + struct ipcm6_cookie; 16 16 17 17 /* extension headers */ 18 18 int ipv6_exthdrs_init(void);
+2 -1
include/net/tun_proto.h
··· 1 1 #ifndef __NET_TUN_PROTO_H 2 2 #define __NET_TUN_PROTO_H 3 3 4 - #include <linux/kernel.h> 4 + #include <linux/if_ether.h> 5 + #include <linux/types.h> 5 6 6 7 /* One byte protocol values as defined by VXLAN-GPE and NSH. These will 7 8 * hopefully get a shared IANA registry.
+1
include/net/udplite.h
··· 6 6 #define _UDPLITE_H 7 7 8 8 #include <net/ip6_checksum.h> 9 + #include <net/udp.h> 9 10 10 11 /* UDP-Lite socket options */ 11 12 #define UDPLITE_SEND_CSCOV 10 /* sender partial coverage (as sent) */
+1
include/net/xdp_priv.h
··· 3 3 #define __LINUX_NET_XDP_PRIV_H__ 4 4 5 5 #include <linux/rhashtable.h> 6 + #include <net/xdp.h> 6 7 7 8 /* Private to net/core/xdp.c, but used by trace/events/xdp.h */ 8 9 struct xdp_mem_allocator {