/net/l2tp/ |
H A D | l2tp_core.c | 116 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel); 131 * the tunnel. 133 static inline void l2tp_tunnel_inc_refcount_1(struct l2tp_tunnel *tunnel) argument 135 atomic_inc(&tunnel->ref_count); 138 static inline void l2tp_tunnel_dec_refcount_1(struct l2tp_tunnel *tunnel) argument 140 if (atomic_dec_and_test(&tunnel->ref_count)) 141 l2tp_tunnel_free(tunnel); 175 /* Lookup the tunnel socket, possibly involving the fs code if the socket is 179 static struct sock *l2tp_tunnel_sock_lookup(struct l2tp_tunnel *tunnel) argument 185 if (!tunnel) 209 struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk); local 248 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) argument 255 l2tp_session_find(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id) argument 281 l2tp_session_find_nth(struct l2tp_tunnel *tunnel, int nth) argument 332 struct l2tp_tunnel *tunnel; local 351 struct l2tp_tunnel *tunnel; local 404 struct l2tp_tunnel *tunnel = session->tunnel; local 641 struct l2tp_tunnel *tunnel = session->tunnel; local 843 l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb, int (*payload_hook)(struct sk_buff *skb)) argument 951 struct l2tp_tunnel *tunnel; local 981 struct l2tp_tunnel *tunnel = session->tunnel; local 1009 struct l2tp_tunnel *tunnel = session->tunnel; local 1055 struct l2tp_tunnel *tunnel = session->tunnel; local 1105 struct l2tp_tunnel *tunnel = session->tunnel; local 1193 struct l2tp_tunnel *tunnel = l2tp_tunnel(sk); local 1238 l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) argument 1294 struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk); local 1304 l2tp_tunnel_free(struct l2tp_tunnel *tunnel) argument 1315 struct l2tp_tunnel *tunnel = NULL; local 1476 struct l2tp_tunnel *tunnel = NULL; local 1640 l2tp_tunnel_delete(struct l2tp_tunnel *tunnel) argument 1651 struct l2tp_tunnel *tunnel = session->tunnel; local 1675 struct l2tp_tunnel *tunnel = session->tunnel; local 1732 l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) argument 1847 struct l2tp_tunnel *tunnel = NULL; local [all...] |
H A D | l2tp_debugfs.c | 42 int tunnel_idx; /* current tunnel */ 43 int session_idx; /* index of session within current tunnel */ 44 struct l2tp_tunnel *tunnel; member in struct:l2tp_dfs_seq_data 45 struct l2tp_session *session; /* NULL means get next tunnel */ 50 pd->tunnel = l2tp_tunnel_find_nth(pd->net, pd->tunnel_idx); 56 pd->session = l2tp_session_find_nth(pd->tunnel, pd->session_idx); 77 if (pd->tunnel == NULL) 82 /* NULL tunnel and session indicates end of list */ 83 if ((pd->tunnel == NULL) && (pd->session == NULL)) 104 struct l2tp_tunnel *tunnel local [all...] |
H A D | l2tp_ppp.c | 31 * zero, the socket is treated as a special tunnel management socket. 127 struct sock *tunnel_sock; /* Pointer to the tunnel UDP 141 /* Helpers to obtain tunnel/session contexts from sockets. 246 * of the UDP tunnel 306 struct l2tp_tunnel *tunnel; local 314 /* Get session and tunnel contexts */ 321 tunnel = l2tp_sock_to_tunnel(ps->tunnel_sock); 322 if (tunnel == NULL) 325 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; 393 struct l2tp_tunnel *tunnel; local 597 struct l2tp_tunnel *tunnel; local 811 struct l2tp_tunnel *tunnel; local 868 struct l2tp_tunnel *tunnel; local 1011 struct l2tp_tunnel *tunnel = session->tunnel; local 1137 pppol2tp_tunnel_ioctl(struct l2tp_tunnel *tunnel, unsigned int cmd, unsigned long arg) argument 1203 struct l2tp_tunnel *tunnel; local 1261 pppol2tp_tunnel_setsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int val) argument 1363 struct l2tp_tunnel *tunnel; local 1412 pppol2tp_tunnel_getsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int *val) argument 1489 struct l2tp_tunnel *tunnel; local 1558 struct l2tp_tunnel *tunnel; member in struct:pppol2tp_seq_data 1627 struct l2tp_tunnel *tunnel = v; local 1646 struct l2tp_tunnel *tunnel = session->tunnel; local [all...] |
H A D | l2tp_netlink.c | 51 struct l2tp_tunnel *tunnel; local 62 tunnel = l2tp_tunnel_find(net, tunnel_id); 63 if (tunnel) 64 session = l2tp_session_find(net, tunnel, session_id); 108 struct l2tp_tunnel *tunnel; local 176 tunnel = l2tp_tunnel_find(net, tunnel_id); 177 if (tunnel != NULL) { 187 peer_tunnel_id, &cfg, &tunnel); 197 struct l2tp_tunnel *tunnel; local 208 tunnel 222 struct l2tp_tunnel *tunnel; local 246 l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int flags, struct l2tp_tunnel *tunnel) argument 336 struct l2tp_tunnel *tunnel; local 378 struct l2tp_tunnel *tunnel; local 406 struct l2tp_tunnel *tunnel; local 613 struct l2tp_tunnel *tunnel = session->tunnel; local 719 struct l2tp_tunnel *tunnel = NULL; local [all...] |
H A D | l2tp_core.h | 18 /* Per tunnel, session hash table size */ 89 struct l2tp_tunnel *tunnel; /* back pointer to tunnel member in struct:l2tp_session 105 u32 nr_max; /* max NR. Depends on tunnel */ 148 /* Describes the tunnel. It contains info to track all the associated 197 int fd; /* Parent fd, if tunnel socket 213 static inline void *l2tp_tunnel_priv(struct l2tp_tunnel *tunnel) argument 215 return &tunnel->priv[0]; 225 struct l2tp_tunnel *tunnel; local 231 tunnel [all...] |
H A D | Kconfig | 19 L2TP is often used to tunnel PPP traffic over IP 20 tunnels. One IP tunnel may carry thousands of individual PPP 29 userland daemon handles L2TP the control protocol (tunnel 67 tunnel raw ethernet frames using L2TP, say Y here. If 79 userspace L2TPv3 daemons may create L2TP/IP tunnel sockets
|
H A D | l2tp_ip.c | 123 struct l2tp_tunnel *tunnel = NULL; local 149 tunnel = session->tunnel; 150 if (tunnel == NULL) 154 if (tunnel->debug & L2TP_MSG_DATA) { 159 pr_debug("%s: ip recv\n", tunnel->name); 163 l2tp_recv_common(session, skb, ptr, optr, 0, skb->len, tunnel->recv_payload_hook); 176 tunnel = l2tp_tunnel_find(net, tunnel_id); 177 if (tunnel != NULL) 178 sk = tunnel 231 struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk); local [all...] |
H A D | l2tp_ip6.c | 135 struct l2tp_tunnel *tunnel = NULL; local 161 tunnel = session->tunnel; 162 if (tunnel == NULL) 166 if (tunnel->debug & L2TP_MSG_DATA) { 171 pr_debug("%s: ip recv\n", tunnel->name); 176 tunnel->recv_payload_hook); 188 tunnel = l2tp_tunnel_find(&init_net, tunnel_id); 189 if (tunnel != NULL) 190 sk = tunnel 244 struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk); local [all...] |
H A D | l2tp_eth.c | 212 struct l2tp_tunnel *tunnel; local 219 tunnel = l2tp_tunnel_find(net, tunnel_id); 220 if (!tunnel) { 225 session = l2tp_session_find(net, tunnel, session_id); 242 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, 267 priv->tunnel_sock = tunnel->sock;
|
/net/ipv4/ |
H A D | ip_tunnel.c | 141 /* Fallback tunnel: no source, no destination, no key, no options 145 it will match only tunnel with the same key; if it is not present, 146 it will match only keyless tunnel. 149 will match fallback tunnel. 150 Given src, dst and key, find appropriate for input tunnel. 301 struct ip_tunnel *tunnel; local 326 tunnel = netdev_priv(dev); 327 tunnel->parms = *parms; 328 tunnel->net = net; 359 struct ip_tunnel *tunnel local 423 ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, bool log_ecn_error) argument 592 struct ip_tunnel *tunnel = netdev_priv(dev); local 640 struct ip_tunnel *tunnel = netdev_priv(dev); local 940 struct ip_tunnel *tunnel = netdev_priv(dev); local 953 struct ip_tunnel *tunnel = netdev_priv(dev); local 963 struct ip_tunnel *tunnel = netdev_priv(dev); local 1085 struct ip_tunnel *tunnel = netdev_priv(dev); local 1121 struct ip_tunnel *tunnel = netdev_priv(dev); local 1155 struct ip_tunnel *tunnel = netdev_priv(dev); local 1171 struct ip_tunnel *tunnel = netdev_priv(dev); local [all...] |
H A D | ip_vti.c | 3 * virtual tunnel interface 56 struct ip_tunnel *tunnel; local 61 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, 63 if (tunnel != NULL) { 67 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; 68 skb->mark = be32_to_cpu(tunnel->parms.i_key); 93 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; local 95 if (!tunnel) 150 struct ip_tunnel *tunnel = netdev_priv(dev); local 214 struct ip_tunnel *tunnel = netdev_priv(dev); local 244 struct ip_tunnel *tunnel; local 355 struct ip_tunnel *tunnel = netdev_priv(dev); local 374 struct ip_tunnel *tunnel = netdev_priv(dev); local [all...] |
H A D | ipip.c | 27 /* tunnel.c: an IP tunnel driver 29 The purpose of this driver is to provide an IP tunnel through 30 which you can tunnel network traffic transparently across subnets. 41 Made the tunnels use dev->name not tunnel: when error reporting. 47 Changed to tunnel to destination gateway in addition to the 48 tunnel's pointopoint address 56 /* Things I wish I had known when writing the tunnel driver: 60 contains the tunnel device that _we_ are. 182 /* no tunnel inf 190 struct ip_tunnel *tunnel; local 217 struct ip_tunnel *tunnel = netdev_priv(dev); local 301 struct ip_tunnel *tunnel = netdev_priv(dev); local 449 struct ip_tunnel *tunnel = netdev_priv(dev); local [all...] |
H A D | ip_gre.c | 84 - traceroute does not work. I planned to relay ICMP from tunnel, 102 (branches, that exceed pmtu are pruned) and tunnel mtu 208 struct ip_tunnel *tunnel; local 216 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, 219 if (tunnel) { 221 ip_tunnel_rcv(tunnel, skb, tpi, log_ecn_error); 231 struct ip_tunnel *tunnel = netdev_priv(dev); local 234 tpi.flags = tunnel->parms.o_flags; 236 tpi.key = tunnel->parms.o_key; 237 if (tunnel 252 struct ip_tunnel *tunnel = netdev_priv(dev); local 292 struct ip_tunnel *tunnel = netdev_priv(dev); local 474 struct ip_tunnel *tunnel; local 504 struct ip_tunnel *tunnel = netdev_priv(dev); local [all...] |
H A D | xfrm4_protocol.c | 73 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; 97 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; 123 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; 149 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
|
H A D | ipcomp.c | 59 /* We always hold one tunnel user reference to indicate a tunnel */ 95 * Must be protected by xfrm_cfg_mutex. State and tunnel user references are 116 x->tunnel = t;
|
/net/ipv6/ |
H A D | sit.c | 2 * IPv6 over IPv4 tunnel device - Simple Internet Transition (SIT) 75 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, 469 struct ip_tunnel *tunnel = netdev_priv(dev); local 470 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); 475 ipip6_tunnel_unlink(sitn, tunnel); 476 ipip6_tunnel_del_prl(tunnel, NULL); 478 ip_tunnel_dst_reset_all(tunnel); 593 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, argument 597 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) 602 /* Checks if an address matches an address on the tunnel interfac 614 only_dnatted(const struct ip_tunnel *tunnel, const struct in6_addr *v6dst) argument 629 packet_is_spoofed(struct sk_buff *skb, const struct iphdr *iph, struct ip_tunnel *tunnel) argument 669 struct ip_tunnel *tunnel; local 731 struct ip_tunnel *tunnel; local 759 check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, __be32 *v4dst) argument 793 try_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst) argument 809 struct ip_tunnel *tunnel = netdev_priv(dev); local 1003 struct ip_tunnel *tunnel = netdev_priv(dev); local 1045 struct ip_tunnel *tunnel; local 1322 struct ip_tunnel *tunnel = netdev_priv(dev); local 1342 struct ip_tunnel *tunnel = netdev_priv(dev); local 1357 struct ip_tunnel *tunnel = netdev_priv(dev); local 1377 struct ip_tunnel *tunnel = netdev_priv(dev); local 1399 struct ip_tunnel *tunnel = netdev_priv(dev); local 1681 struct ip_tunnel *tunnel = netdev_priv(dev); local [all...] |
H A D | ip6_gre.c | 92 it will match only tunnel with the same key; if it is not present, 93 it will match only keyless tunnel. 96 will match fallback tunnel. 112 /* Given src, dst and key, find appropriate for input tunnel. */ 411 net_warn_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n", 423 net_warn_ratelimited("%s: Too small encapsulation limit or routing loop in tunnel!\n", 454 struct ip6_tnl *tunnel; local 489 tunnel = ip6gre_tunnel_lookup(skb->dev, 492 if (tunnel) { 498 if (!ip6_tnl_rcv_ctl(tunnel, 608 struct ip6_tnl *tunnel = netdev_priv(dev); local 1248 struct ip6_tnl *tunnel; local 1280 struct ip6_tnl *tunnel = netdev_priv(dev); local 1469 struct ip6_tnl *tunnel; local [all...] |
H A D | xfrm6_protocol.c | 71 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; 98 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; 125 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
|
H A D | Kconfig | 115 tristate "IPv6: IPsec tunnel mode" 119 Support for IPsec tunnel mode. 146 encapsulating protocol. This can be used with xfrm mode tunnel to give 147 the notion of a secure tunnel for IPSEC and then use routing protocol 151 tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)" 188 tristate "IPv6: IP-in-IPv6 tunnel (RFC2473)" 197 tristate "IPv6: GRE tunnel" 209 through the tunnel.
|
H A D | ip6_vti.c | 69 /* the vti6 tunnel fallback device */ 81 * vti6_tnl_lookup - fetch tunnel matching the end-point addresses 83 * @remote: the address of the tunnel exit-point 84 * @local: the address of the tunnel entry-point 87 * tunnel matching given end-points if found, 88 * else fallback tunnel if its device is up, 113 * vti6_tnl_bucket - get head of list matching given tunnel parameters 114 * @p: parameters containing tunnel end-points 120 * Return: head of IPv6 tunnel list 226 * vti6_locate - find or create tunnel matchin 959 struct ip6_tnl *tunnel = netdev_priv(dev); local [all...] |
H A D | ipcomp6.c | 142 x->tunnel = t;
|
/net/openvswitch/ |
H A D | flow.h | 53 struct ovs_key_ipv4_tunnel tunnel; member in struct:ovs_tunnel_info 73 tun_info->tunnel.tun_id = tun_id; 74 tun_info->tunnel.ipv4_src = iph->saddr; 75 tun_info->tunnel.ipv4_dst = iph->daddr; 76 tun_info->tunnel.ipv4_tos = iph->tos; 77 tun_info->tunnel.ipv4_ttl = iph->ttl; 78 tun_info->tunnel.tun_flags = tun_flags; 81 memset((unsigned char *)&tun_info->tunnel + OVS_TUNNEL_KEY_SIZE, 0, 82 sizeof(tun_info->tunnel) - OVS_TUNNEL_KEY_SIZE); 91 struct ovs_key_ipv4_tunnel tun_key; /* Encapsulating tunnel ke [all...] |
H A D | vport-gre.c | 69 tun_key = &OVS_CB(skb)->egress_tun_info->tunnel; 147 tun_key = &OVS_CB(skb)->egress_tun_info->tunnel;
|
H A D | vport-geneve.c | 53 /* Convert 64 bit tunnel ID to 24 bit VNI. */ 67 /* Convert 24 bit VNI to 64 bit tunnel ID. */ 188 tun_key = &tun_info->tunnel;
|
H A D | vport-vxlan.c | 66 /* Save outer tunnel values */ 155 tun_key = &OVS_CB(skb)->egress_tun_info->tunnel;
|