hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/net/protocol.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * INET An implementation of the TCP/IP protocol suite for the LINUX
34 * operating system. INET is implemented using the BSD Socket
....@@ -8,11 +9,6 @@
89 * Version: @(#)protocol.h 1.0.2 05/07/93
910 *
1011 * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
11
- *
12
- * This program is free software; you can redistribute it and/or
13
- * modify it under the terms of the GNU General Public License
14
- * as published by the Free Software Foundation; either version
15
- * 2 of the License, or (at your option) any later version.
1612 *
1713 * Changes:
1814 * Alan Cox : Added a name field and a frag handler
....@@ -39,10 +35,11 @@
3935
4036 /* This is used to register protocols. */
4137 struct net_protocol {
42
- int (*early_demux)(struct sk_buff *skb);
43
- int (*early_demux_handler)(struct sk_buff *skb);
4438 int (*handler)(struct sk_buff *skb);
45
- void (*err_handler)(struct sk_buff *skb, u32 info);
39
+
40
+ /* This returns an error if we weren't able to handle the error. */
41
+ int (*err_handler)(struct sk_buff *skb, u32 info);
42
+
4643 unsigned int no_policy:1,
4744 netns_ok:1,
4845 /* does the protocol do more stringent
....@@ -54,14 +51,14 @@
5451
5552 #if IS_ENABLED(CONFIG_IPV6)
5653 struct inet6_protocol {
57
- void (*early_demux)(struct sk_buff *skb);
58
- void (*early_demux_handler)(struct sk_buff *skb);
5954 int (*handler)(struct sk_buff *skb);
6055
61
- void (*err_handler)(struct sk_buff *skb,
56
+ /* This returns an error if we weren't able to handle the error. */
57
+ int (*err_handler)(struct sk_buff *skb,
6258 struct inet6_skb_parm *opt,
6359 u8 type, u8 code, int offset,
6460 __be32 info);
61
+
6562 unsigned int flags; /* INET6_PROTO_xxx */
6663 };
6764