// SPDX-License-Identifier: GPL-2.0-or-later/* GTP according to GSM TS 09.60 / 3GPP TS 29.060 * * (C) 2012-2014 by sysmocom - s.f.m.c. GmbH * (C) 2016 by Pablo Neira Ayuso <pablo@netfilter.org> * * Author: Harald Welte <hwelte@sysmocom.de> * Pablo Neira Ayuso <pablo@netfilter.org> * Andreas Schultz <aschultz@travelping.com> */#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt#include<linux/module.h>#include<linux/skbuff.h>#include<linux/udp.h>#include<linux/rculist.h>#include<linux/jhash.h>#include<linux/if_tunnel.h>#include<linux/net.h>#include<linux/file.h>#include<linux/gtp.h>#include<net/net_namespace.h>#include<net/protocol.h>#include<net/ip.h>#include<net/udp.h>#include<net/udp_tunnel.h>#include<net/icmp.h>#include<net/xfrm.h>#include<net/genetlink.h>#include<net/netns/generic.h>#include<net/gtp.h>/* An active session for the subscriber. */structpdp_ctx{structhlist_nodehlist_tid;structhlist_nodehlist_addr;union{u64tid;struct{u64tid;u16flow;}v0;struct{u32i_tei;u32o_tei;}v1;}u;u8gtp_version;u16af;structin_addrms_addr_ip4;structin_addrpeer_addr_ip4;structsock*sk;structnet_device*dev;atomic_ttx_seq;structrcu_headrcu_head;};/* One instance of the GTP device. */structgtp_dev{structlist_headlist;structsock*sk0;structsock*sk1u;structnet_device*dev;unsignedintrole;unsignedinthash_size;structhlist_head*tid_hash;structhlist_head*addr_hash;};staticunsignedintgtp_net_id__read_mostly;structgtp_net{structlist_headgtp_dev_list;};staticu32gtp_h_initval;staticvoidpdp_context_delete(struct<