cregit-Linux how code gets into the kernel

Release 4.18 include/net/netfilter/nf_nat_l3proto.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _NF_NAT_L3PROTO_H

#define _NF_NAT_L3PROTO_H

struct nf_nat_l4proto;

struct nf_nat_l3proto {
	
u8	l3proto;

	
bool	(*in_range)(const struct nf_conntrack_tuple *t,
			    const struct nf_nat_range2 *range);

	
u32 	(*secure_port)(const struct nf_conntrack_tuple *t, __be16);

	
bool	(*manip_pkt)(struct sk_buff *skb,
			     unsigned int iphdroff,
			     const struct nf_nat_l4proto *l4proto,
			     const struct nf_conntrack_tuple *target,
			     enum nf_nat_manip_type maniptype);

	
void	(*csum_update)(struct sk_buff *skb, unsigned int iphdroff,
			       __sum16 *check,
			       const struct nf_conntrack_tuple *t,
			       enum nf_nat_manip_type maniptype);

	
void	(*csum_recalc)(struct sk_buff *skb, u8 proto,
			       void *data, __sum16 *check,
			       int datalen, int oldlen);

	
void	(*decode_session)(struct sk_buff *skb,
				  const struct nf_conn *ct,
				  enum ip_conntrack_dir dir,
				  unsigned long statusbit,
				  struct flowi *fl);

	
int	(*nlattr_to_range)(struct nlattr *tb[],
				   struct nf_nat_range2 *range);
};

int nf_nat_l3proto_register(const struct nf_nat_l3proto *);
void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *);
const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto);

int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
				  enum ip_conntrack_info ctinfo,
				  unsigned int hooknum);

int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
				    enum ip_conntrack_info ctinfo,
				    unsigned int hooknum, unsigned int hdrlen);

int nf_nat_l3proto_ipv4_register_fn(struct net *net, const struct nf_hook_ops *ops);
void nf_nat_l3proto_ipv4_unregister_fn(struct net *net, const struct nf_hook_ops *ops);

int nf_nat_l3proto_ipv6_register_fn(struct net *net, const struct nf_hook_ops *ops);
void nf_nat_l3proto_ipv6_unregister_fn(struct net *net, const struct nf_hook_ops *ops);

#endif /* _NF_NAT_L3PROTO_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy15948.04%640.00%
Jozsef Kadlecsik10632.02%16.67%
Florian Westphal5215.71%16.67%
Pablo Neira Ayuso61.81%16.67%
Thierry Du Tre20.60%16.67%
Eric W. Biedermann20.60%16.67%
Herbert Xu10.30%16.67%
Jan Engelhardt10.30%16.67%
Greg Kroah-Hartman10.30%16.67%
Changli Gao10.30%16.67%
Total331100.00%15100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.