summaryrefslogtreecommitdiffstats
path: root/include/net/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/protocol.h')
-rw-r--r--include/net/protocol.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/protocol.h b/include/net/protocol.h
index bf36ca34af7a..65ba335b0e7e 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -40,6 +40,7 @@
40/* This is used to register protocols. */ 40/* This is used to register protocols. */
41struct net_protocol { 41struct net_protocol {
42 void (*early_demux)(struct sk_buff *skb); 42 void (*early_demux)(struct sk_buff *skb);
43 void (*early_demux_handler)(struct sk_buff *skb);
43 int (*handler)(struct sk_buff *skb); 44 int (*handler)(struct sk_buff *skb);
44 void (*err_handler)(struct sk_buff *skb, u32 info); 45 void (*err_handler)(struct sk_buff *skb, u32 info);
45 unsigned int no_policy:1, 46 unsigned int no_policy:1,
@@ -54,7 +55,7 @@ struct net_protocol {
54#if IS_ENABLED(CONFIG_IPV6) 55#if IS_ENABLED(CONFIG_IPV6)
55struct inet6_protocol { 56struct inet6_protocol {
56 void (*early_demux)(struct sk_buff *skb); 57 void (*early_demux)(struct sk_buff *skb);
57 58 void (*early_demux_handler)(struct sk_buff *skb);
58 int (*handler)(struct sk_buff *skb); 59 int (*handler)(struct sk_buff *skb);
59 60
60 void (*err_handler)(struct sk_buff *skb, 61 void (*err_handler)(struct sk_buff *skb,
@@ -92,12 +93,12 @@ struct inet_protosw {
92#define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */ 93#define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */
93#define INET_PROTOSW_ICSK 0x04 /* Is this an inet_connection_sock? */ 94#define INET_PROTOSW_ICSK 0x04 /* Is this an inet_connection_sock? */
94 95
95extern const struct net_protocol __rcu *inet_protos[MAX_INET_PROTOS]; 96extern struct net_protocol __rcu *inet_protos[MAX_INET_PROTOS];
96extern const struct net_offload __rcu *inet_offloads[MAX_INET_PROTOS]; 97extern const struct net_offload __rcu *inet_offloads[MAX_INET_PROTOS];
97extern const struct net_offload __rcu *inet6_offloads[MAX_INET_PROTOS]; 98extern const struct net_offload __rcu *inet6_offloads[MAX_INET_PROTOS];
98 99
99#if IS_ENABLED(CONFIG_IPV6) 100#if IS_ENABLED(CONFIG_IPV6)
100extern const struct inet6_protocol __rcu *inet6_protos[MAX_INET_PROTOS]; 101extern struct inet6_protocol __rcu *inet6_protos[MAX_INET_PROTOS];
101#endif 102#endif
102 103
103int inet_add_protocol(const struct net_protocol *prot, unsigned char num); 104int inet_add_protocol(const struct net_protocol *prot, unsigned char num);