Lines Matching defs:tunnel
37 unsigned long tkey; /* lookup key of current tunnel */
39 struct l2tp_tunnel *tunnel;
40 struct l2tp_session *session; /* NULL means get next tunnel */
46 if (pd->tunnel)
47 l2tp_tunnel_put(pd->tunnel);
49 pd->tunnel = l2tp_tunnel_get_next(pd->net, &pd->tkey);
59 pd->session = l2tp_session_get_next(pd->net, pd->tunnel->sock,
60 pd->tunnel->version,
61 pd->tunnel->tunnel_id, &pd->skey);
84 if (!pd->tunnel)
89 /* NULL tunnel and session indicates end of list */
90 if (!pd->tunnel && !pd->session)
117 if (pd->tunnel) {
118 l2tp_tunnel_put(pd->tunnel);
119 pd->tunnel = NULL;
125 struct l2tp_tunnel *tunnel = v;
130 list_for_each_entry_rcu(session, &tunnel->session_list, list) {
139 seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id);
140 if (tunnel->sock) {
141 struct inet_sock *inet = inet_sk(tunnel->sock);
144 if (tunnel->sock->sk_family == AF_INET6) {
145 const struct ipv6_pinfo *np = inet6_sk(tunnel->sock);
148 &np->saddr, &tunnel->sock->sk_v6_daddr);
151 if (tunnel->sock->sk_family == AF_INET)
155 if (tunnel->encap == L2TP_ENCAPTYPE_UDP)
159 seq_printf(m, " L2TPv%d, %s\n", tunnel->version,
160 tunnel->encap == L2TP_ENCAPTYPE_UDP ? "UDP" :
161 tunnel->encap == L2TP_ENCAPTYPE_IP ? "IP" :
164 tunnel->sock ? refcount_read(&tunnel->sock->sk_refcnt) : 0,
165 refcount_read(&tunnel->ref_count));
168 atomic_long_read(&tunnel->stats.tx_packets),
169 atomic_long_read(&tunnel->stats.tx_bytes),
170 atomic_long_read(&tunnel->stats.tx_errors),
171 atomic_long_read(&tunnel->stats.rx_packets),
172 atomic_long_read(&tunnel->stats.rx_bytes),
173 atomic_long_read(&tunnel->stats.rx_errors));
251 l2tp_dfs_seq_tunnel_show(m, pd->tunnel);