Lines Matching full:tunnel
83 /* the IPv6 tunnel fallback device */
131 * ip6_tnl_lookup - fetch tunnel matching the end-point addresses
134 * @remote: the address of the tunnel exit-point
135 * @local: the address of the tunnel entry-point
138 * tunnel matching given end-points if found,
139 * else fallback tunnel if its device is up,
206 * ip6_tnl_bucket - get head of list matching given tunnel parameters
207 * @p: parameters containing tunnel end-points
213 * Return: head of IPv6 tunnel list
232 * ip6_tnl_link - add tunnel to hash table
233 * @t: tunnel to be added
248 * ip6_tnl_unlink - remove tunnel from hash table
249 * @t: tunnel to be removed
304 * ip6_tnl_create - create a new tunnel
306 * @p: tunnel parameters
309 * Create tunnel matching given parameters.
312 * created tunnel or error pointer
353 * ip6_tnl_locate - find or create tunnel matching given parameters
355 * @p: tunnel parameters
356 * @create: != 0 if allowed to create new tunnel if no match found
359 * ip6_tnl_locate() first tries to locate an existing tunnel
361 * tunnel device is created and registered for use.
364 * matching tunnel or error pointer
394 * ip6_tnl_dev_uninit - tunnel device uninitializer
398 * ip6_tnl_dev_uninit() removes tunnel from its list
488 * ip6_tnl_err - tunnel error handler
491 * ip6_tnl_err() should handle errors in the tunnel according
533 net_dbg_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n", in ip6_tnl_err()
549 net_dbg_ratelimited("%s: Too small encapsulation limit or routing loop in tunnel!\n", in ip6_tnl_err()
824 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
837 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv()
839 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv()
840 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv()
841 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
845 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv()
847 (tunnel->i_seqno && in __ip6_tnl_rcv()
848 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
849 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv()
850 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
853 tunnel->i_seqno = ntohl(tpi->seq) + 1; in __ip6_tnl_rcv()
859 if (tunnel->dev->type == ARPHRD_ETHER) { in __ip6_tnl_rcv()
861 tunnel->dev->stats.rx_length_errors++; in __ip6_tnl_rcv()
862 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
867 skb->protocol = eth_type_trans(skb, tunnel->dev); in __ip6_tnl_rcv()
870 skb->dev = tunnel->dev; in __ip6_tnl_rcv()
876 __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); in __ip6_tnl_rcv()
878 err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); in __ip6_tnl_rcv()
885 ++tunnel->dev->stats.rx_frame_errors; in __ip6_tnl_rcv()
886 ++tunnel->dev->stats.rx_errors; in __ip6_tnl_rcv()
891 tstats = this_cpu_ptr(tunnel->dev->tstats); in __ip6_tnl_rcv()
897 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev))); in __ip6_tnl_rcv()
902 gro_cells_receive(&tunnel->gro_cells, skb); in __ip6_tnl_rcv()
931 /* no tunnel info required for ipxip6. */
936 /* no tunnel info required for ipxip6. */
941 /* no tunnel info required for mplsip6. */
1028 * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
1029 * @t: the outgoing tunnel device
1033 * Avoid trivial tunneling loop by checking that tunnel exit-point
1088 * @dev: the outgoing tunnel device
1131 /* NBMA tunnel */ in ip6_tnl_xmit()
1538 * ip6_tnl_change - update the tunnel parameters
1539 * @t: tunnel to be changed
1540 * @p: tunnel configuration parameters
1543 * ip6_tnl_change() updates the tunnel parameters
1615 * @dev: virtual device associated with tunnel
1624 * %SIOCGETTUNNEL: get tunnel parameters for device
1625 * %SIOCADDTUNNEL: add tunnel matching given tunnel parameters
1626 * %SIOCCHGTUNNEL: change tunnel parameters to those given
1627 * %SIOCDELTUNNEL: delete tunnel
1630 * initialization, can be used for creating other tunnel devices.
1636 * %-EINVAL if passed tunnel parameters are invalid,
1637 * %-EEXIST if changing a tunnel's parameters would cause a conflict
1738 * ip6_tnl_change_mtu - change mtu manually for tunnel device
1739 * @dev: virtual device associated with tunnel
1848 * ip6_tnl_dev_setup - setup virtual tunnel device
1849 * @dev: virtual device associated with tunnel
1878 * ip6_tnl_dev_init_gen - general initializer for all tunnel devices
1879 * @dev: virtual device associated with tunnel
1928 * ip6_tnl_dev_init - initializer for all non fallback tunnel devices
1929 * @dev: virtual device associated with tunnel
1946 * ip6_fb_tnl_dev_init - initializer for fallback tunnel device
2167 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_fill_info() local
2168 struct __ip6_tnl_parm *parm = &tunnel->parms; in ip6_tnl_fill_info()
2181 if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || in ip6_tnl_fill_info()
2182 nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || in ip6_tnl_fill_info()
2183 nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || in ip6_tnl_fill_info()
2184 nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags)) in ip6_tnl_fill_info()
2199 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_get_link_net() local
2201 return tunnel->net; in ip6_tnl_get_link_net()