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

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

Version: ~ [ linux-5.13-rc5 ] ~ [ linux-5.12.9 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.42 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.124 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.193 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.235 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.271 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.271 ] ~ [ 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 #ifndef _NF_NAT_L3PROTO_H
  2 #define _NF_NAT_L3PROTO_H
  3 
  4 struct nf_nat_l4proto;
  5 struct nf_nat_l3proto {
  6         u8      l3proto;
  7 
  8         bool    (*in_range)(const struct nf_conntrack_tuple *t,
  9                             const struct nf_nat_range *range);
 10 
 11         u32     (*secure_port)(const struct nf_conntrack_tuple *t, __be16);
 12 
 13         bool    (*manip_pkt)(struct sk_buff *skb,
 14                              unsigned int iphdroff,
 15                              const struct nf_nat_l4proto *l4proto,
 16                              const struct nf_conntrack_tuple *target,
 17                              enum nf_nat_manip_type maniptype);
 18 
 19         void    (*csum_update)(struct sk_buff *skb, unsigned int iphdroff,
 20                                __sum16 *check,
 21                                const struct nf_conntrack_tuple *t,
 22                                enum nf_nat_manip_type maniptype);
 23 
 24         void    (*csum_recalc)(struct sk_buff *skb, u8 proto,
 25                                void *data, __sum16 *check,
 26                                int datalen, int oldlen);
 27 
 28         void    (*decode_session)(struct sk_buff *skb,
 29                                   const struct nf_conn *ct,
 30                                   enum ip_conntrack_dir dir,
 31                                   unsigned long statusbit,
 32                                   struct flowi *fl);
 33 
 34         int     (*nlattr_to_range)(struct nlattr *tb[],
 35                                    struct nf_nat_range *range);
 36 };
 37 
 38 int nf_nat_l3proto_register(const struct nf_nat_l3proto *);
 39 void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *);
 40 const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto);
 41 
 42 int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
 43                                   enum ip_conntrack_info ctinfo,
 44                                   unsigned int hooknum);
 45 
 46 unsigned int nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb,
 47                             const struct nf_hook_state *state,
 48                             unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 49                                                      struct sk_buff *skb,
 50                                                      const struct nf_hook_state *state,
 51                                                      struct nf_conn *ct));
 52 
 53 unsigned int nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb,
 54                              const struct nf_hook_state *state,
 55                              unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 56                                                       struct sk_buff *skb,
 57                                                       const struct nf_hook_state *state,
 58                                                       struct nf_conn *ct));
 59 
 60 unsigned int nf_nat_ipv4_local_fn(const struct nf_hook_ops *ops,
 61                                   struct sk_buff *skb,
 62                                   const struct nf_hook_state *state,
 63                                   unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 64                                                            struct sk_buff *skb,
 65                                                            const struct nf_hook_state *state,
 66                                                            struct nf_conn *ct));
 67 
 68 unsigned int nf_nat_ipv4_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
 69                             const struct nf_hook_state *state,
 70                             unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 71                                                      struct sk_buff *skb,
 72                                                      const struct nf_hook_state *state,
 73                                                      struct nf_conn *ct));
 74 
 75 int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
 76                                     enum ip_conntrack_info ctinfo,
 77                                     unsigned int hooknum, unsigned int hdrlen);
 78 
 79 unsigned int nf_nat_ipv6_in(const struct nf_hook_ops *ops, struct sk_buff *skb,
 80                             const struct nf_hook_state *state,
 81                             unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 82                                                      struct sk_buff *skb,
 83                                                      const struct nf_hook_state *state,
 84                                                      struct nf_conn *ct));
 85 
 86 unsigned int nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb,
 87                              const struct nf_hook_state *state,
 88                              unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 89                                                       struct sk_buff *skb,
 90                                                       const struct nf_hook_state *state,
 91                                                       struct nf_conn *ct));
 92 
 93 unsigned int nf_nat_ipv6_local_fn(const struct nf_hook_ops *ops,
 94                                   struct sk_buff *skb,
 95                                   const struct nf_hook_state *state,
 96                                   unsigned int (*do_chain)(const struct nf_hook_ops *ops,
 97                                                            struct sk_buff *skb,
 98                                                            const struct nf_hook_state *state,
 99                                                            struct nf_conn *ct));
100 
101 unsigned int nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
102                             const struct nf_hook_state *state,
103                             unsigned int (*do_chain)(const struct nf_hook_ops *ops,
104                                                      struct sk_buff *skb,
105                                                      const struct nf_hook_state *state,
106                                                      struct nf_conn *ct));
107 
108 #endif /* _NF_NAT_L3PROTO_H */
109 

~ [ 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