~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/net/netfilter/nf_nat_l3proto.h

Version: ~ [ linux-5.15-rc1 ] ~ [ linux-5.14.5 ] ~ [ linux-5.13.18 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.66 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.147 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.206 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.246 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.282 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.283 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _NF_NAT_L3PROTO_H
  3 #define _NF_NAT_L3PROTO_H
  4 
  5 struct nf_nat_l4proto;
  6 struct nf_nat_l3proto {
  7         u8      l3proto;
  8 
  9         bool    (*in_range)(const struct nf_conntrack_tuple *t,
 10                             const struct nf_nat_range *range);
 11 
 12         u32     (*secure_port)(const struct nf_conntrack_tuple *t, __be16);
 13 
 14         bool    (*manip_pkt)(struct sk_buff *skb,
 15                              unsigned int iphdroff,
 16                              const struct nf_nat_l4proto *l4proto,
 17                              const struct nf_conntrack_tuple *target,
 18                              enum nf_nat_manip_type maniptype);
 19 
 20         void    (*csum_update)(struct sk_buff *skb, unsigned int iphdroff,
 21                                __sum16 *check,
 22                                const struct nf_conntrack_tuple *t,
 23                                enum nf_nat_manip_type maniptype);
 24 
 25         void    (*csum_recalc)(struct sk_buff *skb, u8 proto,
 26                                void *data, __sum16 *check,
 27                                int datalen, int oldlen);
 28 
 29         void    (*decode_session)(struct sk_buff *skb,
 30                                   const struct nf_conn *ct,
 31                                   enum ip_conntrack_dir dir,
 32                                   unsigned long statusbit,
 33                                   struct flowi *fl);
 34 
 35         int     (*nlattr_to_range)(struct nlattr *tb[],
 36                                    struct nf_nat_range *range);
 37 };
 38 
 39 int nf_nat_l3proto_register(const struct nf_nat_l3proto *);
 40 void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *);
 41 const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto);
 42 
 43 int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
 44                                   enum ip_conntrack_info ctinfo,
 45                                   unsigned int hooknum);
 46 
 47 unsigned int nf_nat_ipv4_in(void *priv, struct sk_buff *skb,
 48                             const struct nf_hook_state *state,
 49                             unsigned int (*do_chain)(void *priv,
 50                                                      struct sk_buff *skb,
 51                                                      const struct nf_hook_state *state,
 52                                                      struct nf_conn *ct));
 53 
 54 unsigned int nf_nat_ipv4_out(void *priv, struct sk_buff *skb,
 55                              const struct nf_hook_state *state,
 56                              unsigned int (*do_chain)(void *priv,
 57                                                       struct sk_buff *skb,
 58                                                       const struct nf_hook_state *state,
 59                                                       struct nf_conn *ct));
 60 
 61 unsigned int nf_nat_ipv4_local_fn(void *priv,
 62                                   struct sk_buff *skb,
 63                                   const struct nf_hook_state *state,
 64                                   unsigned int (*do_chain)(void *priv,
 65                                                            struct sk_buff *skb,
 66                                                            const struct nf_hook_state *state,
 67                                                            struct nf_conn *ct));
 68 
 69 unsigned int nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
 70                             const struct nf_hook_state *state,
 71                             unsigned int (*do_chain)(void *priv,
 72                                                      struct sk_buff *skb,
 73                                                      const struct nf_hook_state *state,
 74                                                      struct nf_conn *ct));
 75 
 76 int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
 77                                     enum ip_conntrack_info ctinfo,
 78                                     unsigned int hooknum, unsigned int hdrlen);
 79 
 80 unsigned int nf_nat_ipv6_in(void *priv, struct sk_buff *skb,
 81                             const struct nf_hook_state *state,
 82                             unsigned int (*do_chain)(void *priv,
 83                                                      struct sk_buff *skb,
 84                                                      const struct nf_hook_state *state,
 85                                                      struct nf_conn *ct));
 86 
 87 unsigned int nf_nat_ipv6_out(void *priv, struct sk_buff *skb,
 88                              const struct nf_hook_state *state,
 89                              unsigned int (*do_chain)(void *priv,
 90                                                       struct sk_buff *skb,
 91                                                       const struct nf_hook_state *state,
 92                                                       struct nf_conn *ct));
 93 
 94 unsigned int nf_nat_ipv6_local_fn(void *priv,
 95                                   struct sk_buff *skb,
 96                                   const struct nf_hook_state *state,
 97                                   unsigned int (*do_chain)(void *priv,
 98                                                            struct sk_buff *skb,
 99                                                            const struct nf_hook_state *state,
100                                                            struct nf_conn *ct));
101 
102 unsigned int nf_nat_ipv6_fn(void *priv, struct sk_buff *skb,
103                             const struct nf_hook_state *state,
104                             unsigned int (*do_chain)(void *priv,
105                                                      struct sk_buff *skb,
106                                                      const struct nf_hook_state *state,
107                                                      struct nf_conn *ct));
108 
109 #endif /* _NF_NAT_L3PROTO_H */
110 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp