missing includes in networking headers
Subsystems (3)
PATCH 1/1 missing includes in networking headers
I'm looking through the debian kernel package, and it's adding a bunch of additional includes and forward declarations to the networking headers. After review all of these makes sense although I don't know what the pratical implications.
In particular:
- struct sk_buff forward declaration in netlink.h
- struct net_device forward declaration in skbuff.h
- <linux/spinlock.h> for rwlock_t in ip6_fib.h
- <linux/ipv6.h> for inet6_sk in ip6_route.h
- struct neighbour and struct net_device forward declarations in neighbour.h
include/linux/netlink.h +3 -0
@@ -4,6 +4,9 @@#include <linux/socket.h> /* for sa_family_t */ #include <linux/types.h> +struct sk_buff ; + +#define NETLINK_ROUTE 0/* Routing/device hook */ #define NETLINK_SKIP 1/* Reserved for ENskip */ #define NETLINK_USERSOCK 2/* Reserved for user mode socket protocols */
include/linux/skbuff.h +3 -0
@@ -28,6 +28,9 @@#include <linux/poll.h> #include <linux/net.h> +struct net_device ; + +#define HAVE_ALLOC_SKB /* For the drivers to know */ #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ #define SLAB_SKB /* Slabified skbuffs */
include/net/ip6_fib.h +1 -0
@@ -20,6 +20,7 @@#include <net/dst.h> #include <net/flow.h> #include <linux/rtnetlink.h> +#include <linux/spinlock.h> struct rt6_info ;
===== include/net/ip6_route.h 1.13 vs edited =====
include/net/ip6_route.h +1 -0
@@ -11,6 +11,7 @@#include <net/flow.h> #include <net/ip6_fib.h> +#include <linux/ipv6.h> #include <linux/tcp.h> #include <linux/ip.h>
include/net/neighbour.h +3 -0
@@ -49,6 +49,9 @@#include <linux/err.h> #include <linux/sysctl.h> +struct neighbour ; +struct net_device ; +#define NUD_IN_TIMER (NUD_INCOMPLETE|NUD_DELAY|NUD_PROBE)#define NUD_VALID (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY)#define NUD_CONNECTED (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE)