/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Definitions for the protocol dispatcher. * * Version: @(#)protocol.h 1.0.2 05/07/93 * * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> * * Changes: * Alan Cox : Added a name field and a frag handler * field for later. * Alan Cox : Cleaned up, and sorted types. * Pedro Roque : inet6 protocols
*/
/* This is one larger than the largest protocol value that can be * found in an ipv4 or ipv6 header. Since in both cases the protocol * value is presented in a __u8, this is defined to be 256.
*/ #define MAX_INET_PROTOS 256
/* This is used to register protocols. */ struct net_protocol { int (*handler)(struct sk_buff *skb);
/* This returns an error if we weren't able to handle the error. */ int (*err_handler)(struct sk_buff *skb, u32 info);
unsignedint no_policy:1, /* does the protocol do more stringent * icmp tag validation than simple * socket lookup?
*/
icmp_strict_tag_validation:1;
u32 secret;
};
#if IS_ENABLED(CONFIG_IPV6) struct inet6_protocol { int (*handler)(struct sk_buff *skb);
/* This returns an error if we weren't able to handle the error. */ int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt,
u8 type, u8 code, int offset,
__be32 info);
struct net_offload { struct offload_callbacks callbacks; unsignedint flags; /* Flags used by IPv6 for now */
u32 secret;
}; /* This should be set for any extension header which is compatible with GSO. */ #define INET6_PROTO_GSO_EXTHDR 0x1
/* This is used to register socket interfaces for IP protocols. */ struct inet_protosw { struct list_head list;
/* These two fields form the lookup key. */ unsignedshort type; /* This is the 2nd argument to socket(2). */ unsignedshort protocol; /* This is the L4 protocol number. */
struct proto *prot; conststruct proto_ops *ops;
unsignedchar flags; /* See INET_PROTOSW_* below. */
}; #define INET_PROTOSW_REUSE 0x01 /* Are ports automatically reusable? */ #define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */ #define INET_PROTOSW_ICSK 0x04 /* Is this an inet_connection_sock? */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.