| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * INET An implementation of the TCP/IP protocol suite for the LINUX |
|---|
| 3 | 4 | * operating system. INET is implemented using the BSD Socket |
|---|
| .. | .. |
|---|
| 8 | 9 | * Version: @(#)protocol.h 1.0.2 05/07/93 |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * 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. |
|---|
| 16 | 12 | * |
|---|
| 17 | 13 | * Changes: |
|---|
| 18 | 14 | * Alan Cox : Added a name field and a frag handler |
|---|
| .. | .. |
|---|
| 39 | 35 | |
|---|
| 40 | 36 | /* This is used to register protocols. */ |
|---|
| 41 | 37 | struct net_protocol { |
|---|
| 42 | | - int (*early_demux)(struct sk_buff *skb); |
|---|
| 43 | | - int (*early_demux_handler)(struct sk_buff *skb); |
|---|
| 44 | 38 | 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 | + |
|---|
| 46 | 43 | unsigned int no_policy:1, |
|---|
| 47 | 44 | netns_ok:1, |
|---|
| 48 | 45 | /* does the protocol do more stringent |
|---|
| .. | .. |
|---|
| 54 | 51 | |
|---|
| 55 | 52 | #if IS_ENABLED(CONFIG_IPV6) |
|---|
| 56 | 53 | struct inet6_protocol { |
|---|
| 57 | | - void (*early_demux)(struct sk_buff *skb); |
|---|
| 58 | | - void (*early_demux_handler)(struct sk_buff *skb); |
|---|
| 59 | 54 | int (*handler)(struct sk_buff *skb); |
|---|
| 60 | 55 | |
|---|
| 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, |
|---|
| 62 | 58 | struct inet6_skb_parm *opt, |
|---|
| 63 | 59 | u8 type, u8 code, int offset, |
|---|
| 64 | 60 | __be32 info); |
|---|
| 61 | + |
|---|
| 65 | 62 | unsigned int flags; /* INET6_PROTO_xxx */ |
|---|
| 66 | 63 | }; |
|---|
| 67 | 64 | |
|---|