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

TOMOYO Linux Cross Reference
Linux/net/netfilter/nf_conntrack_l3proto_generic.c

Version: ~ [ linux-5.10-rc6 ] ~ [ linux-5.9.12 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.81 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.161 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.210 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.247 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.247 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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 /*
  2  * (C) 2003,2004 USAGI/WIDE Project <http://www.linux-ipv6.org>
  3  *
  4  * Based largely upon the original ip_conntrack code which
  5  * had the following copyright information:
  6  *
  7  * (C) 1999-2001 Paul `Rusty' Russell
  8  * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
  9  *
 10  * This program is free software; you can redistribute it and/or modify
 11  * it under the terms of the GNU General Public License version 2 as
 12  * published by the Free Software Foundation.
 13  *
 14  * Author:
 15  *      Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
 16  */
 17 
 18 #include <linux/types.h>
 19 #include <linux/ip.h>
 20 #include <linux/netfilter.h>
 21 #include <linux/module.h>
 22 #include <linux/skbuff.h>
 23 #include <linux/icmp.h>
 24 #include <linux/sysctl.h>
 25 #include <net/ip.h>
 26 
 27 #include <linux/netfilter_ipv4.h>
 28 #include <net/netfilter/nf_conntrack.h>
 29 #include <net/netfilter/nf_conntrack_l4proto.h>
 30 #include <net/netfilter/nf_conntrack_l3proto.h>
 31 #include <net/netfilter/nf_conntrack_core.h>
 32 #include <net/netfilter/ipv4/nf_conntrack_ipv4.h>
 33 
 34 static bool generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff,
 35                                  struct nf_conntrack_tuple *tuple)
 36 {
 37         memset(&tuple->src.u3, 0, sizeof(tuple->src.u3));
 38         memset(&tuple->dst.u3, 0, sizeof(tuple->dst.u3));
 39 
 40         return true;
 41 }
 42 
 43 static bool generic_invert_tuple(struct nf_conntrack_tuple *tuple,
 44                                  const struct nf_conntrack_tuple *orig)
 45 {
 46         memset(&tuple->src.u3, 0, sizeof(tuple->src.u3));
 47         memset(&tuple->dst.u3, 0, sizeof(tuple->dst.u3));
 48 
 49         return true;
 50 }
 51 
 52 static int generic_print_tuple(struct seq_file *s,
 53                             const struct nf_conntrack_tuple *tuple)
 54 {
 55         return 0;
 56 }
 57 
 58 static int generic_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
 59                                unsigned int *dataoff, u_int8_t *protonum)
 60 {
 61         /* Never track !!! */
 62         return -NF_ACCEPT;
 63 }
 64 
 65 
 66 struct nf_conntrack_l3proto nf_conntrack_l3proto_generic __read_mostly = {
 67         .l3proto         = PF_UNSPEC,
 68         .name            = "unknown",
 69         .pkt_to_tuple    = generic_pkt_to_tuple,
 70         .invert_tuple    = generic_invert_tuple,
 71         .print_tuple     = generic_print_tuple,
 72         .get_l4proto     = generic_get_l4proto,
 73 };
 74 EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_generic);
 75 

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