Lines Matching full:tunnel
83 /* the IPv6 tunnel fallback device */
101 * ip6_tnl_lookup - fetch tunnel matching the end-point addresses
104 * @remote: the address of the tunnel exit-point
105 * @local: the address of the tunnel entry-point
108 * tunnel matching given end-points if found,
109 * else fallback tunnel if its device is up,
176 * ip6_tnl_bucket - get head of list matching given tunnel parameters
178 * @p: parameters containing tunnel end-points
184 * Return: head of IPv6 tunnel list
203 * ip6_tnl_link - add tunnel to hash table
205 * @t: tunnel to be added
220 * ip6_tnl_unlink - remove tunnel from hash table
222 * @t: tunnel to be removed
275 * ip6_tnl_create - create a new tunnel
277 * @p: tunnel parameters
280 * Create tunnel matching given parameters.
283 * created tunnel or error pointer
324 * ip6_tnl_locate - find or create tunnel matching given parameters
326 * @p: tunnel parameters
327 * @create: != 0 if allowed to create new tunnel if no match found
330 * ip6_tnl_locate() first tries to locate an existing tunnel
332 * tunnel device is created and registered for use.
335 * matching tunnel or error pointer
365 * ip6_tnl_dev_uninit - tunnel device uninitializer
369 * ip6_tnl_dev_uninit() removes tunnel from its list
459 /* ip6_tnl_err() should handle errors in the tunnel according to the
500 net_dbg_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n", in ip6_tnl_err()
516 net_dbg_ratelimited("%s: Too small encapsulation limit or routing loop in tunnel!\n", in ip6_tnl_err()
791 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
803 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv()
805 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv()
806 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv()
807 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
811 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv()
813 (tunnel->i_seqno && in __ip6_tnl_rcv()
814 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
815 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv()
816 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
819 tunnel->i_seqno = ntohl(tpi->seq) + 1; in __ip6_tnl_rcv()
825 if (tunnel->dev->type == ARPHRD_ETHER) { in __ip6_tnl_rcv()
827 tunnel->dev->stats.rx_length_errors++; in __ip6_tnl_rcv()
828 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
833 skb->protocol = eth_type_trans(skb, tunnel->dev); in __ip6_tnl_rcv()
836 skb->dev = tunnel->dev; in __ip6_tnl_rcv()
843 __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); in __ip6_tnl_rcv()
845 err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); in __ip6_tnl_rcv()
852 ++tunnel->dev->stats.rx_frame_errors; in __ip6_tnl_rcv()
853 ++tunnel->dev->stats.rx_errors; in __ip6_tnl_rcv()
858 dev_sw_netstats_rx_add(tunnel->dev, skb->len); in __ip6_tnl_rcv()
860 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev))); in __ip6_tnl_rcv()
865 gro_cells_receive(&tunnel->gro_cells, skb); in __ip6_tnl_rcv()
894 /* no tunnel info required for ipxip6. */
899 /* no tunnel info required for ipxip6. */
904 /* no tunnel info required for mplsip6. */
991 * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
992 * @t: the outgoing tunnel device
996 * Avoid trivial tunneling loop by checking that tunnel exit-point
1051 * @dev: the outgoing tunnel device
1097 /* NBMA tunnel */ in ip6_tnl_xmit()
1513 * ip6_tnl_change - update the tunnel parameters
1514 * @t: tunnel to be changed
1515 * @p: tunnel configuration parameters
1518 * ip6_tnl_change() updates the tunnel parameters
1586 * @dev: virtual device associated with tunnel
1596 * %SIOCGETTUNNEL: get tunnel parameters for device
1597 * %SIOCADDTUNNEL: add tunnel matching given tunnel parameters
1598 * %SIOCCHGTUNNEL: change tunnel parameters to those given
1599 * %SIOCDELTUNNEL: delete tunnel
1602 * initialization, can be used for creating other tunnel devices.
1608 * %-EINVAL if passed tunnel parameters are invalid,
1609 * %-EEXIST if changing a tunnel's parameters would cause a conflict
1710 * ip6_tnl_change_mtu - change mtu manually for tunnel device
1711 * @dev: virtual device associated with tunnel
1820 * ip6_tnl_dev_setup - setup virtual tunnel device
1821 * @dev: virtual device associated with tunnel
1850 * ip6_tnl_dev_init_gen - general initializer for all tunnel devices
1851 * @dev: virtual device associated with tunnel
1900 * ip6_tnl_dev_init - initializer for all non fallback tunnel devices
1901 * @dev: virtual device associated with tunnel
1918 * ip6_fb_tnl_dev_init - initializer for fallback tunnel device
2107 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_fill_info() local
2108 struct __ip6_tnl_parm *parm = &tunnel->parms; in ip6_tnl_fill_info()
2121 if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || in ip6_tnl_fill_info()
2122 nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || in ip6_tnl_fill_info()
2123 nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || in ip6_tnl_fill_info()
2124 nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags)) in ip6_tnl_fill_info()
2139 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_get_link_net() local
2141 return tunnel->net; in ip6_tnl_get_link_net()