Lines Matching refs:tunnel
37 int tunnel_idx; /* current tunnel */
38 int session_idx; /* index of session within current tunnel */
39 struct l2tp_tunnel *tunnel;
40 struct l2tp_session *session; /* NULL means get next tunnel */
46 if (pd->tunnel)
47 l2tp_tunnel_dec_refcount(pd->tunnel);
49 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx);
59 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx);
82 if (!pd->tunnel)
87 /* NULL tunnel and session indicates end of list */
88 if (!pd->tunnel && !pd->session)
115 if (pd->tunnel) {
116 l2tp_tunnel_dec_refcount(pd->tunnel);
117 pd->tunnel = NULL;
123 struct l2tp_tunnel *tunnel = v;
130 hlist_for_each_entry_rcu(session, &tunnel->session_hlist[hash], hlist) {
140 seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id);
141 if (tunnel->sock) {
142 struct inet_sock *inet = inet_sk(tunnel->sock);
145 if (tunnel->sock->sk_family == AF_INET6) {
146 const struct ipv6_pinfo *np = inet6_sk(tunnel->sock);
149 &np->saddr, &tunnel->sock->sk_v6_daddr);
152 if (tunnel->sock->sk_family == AF_INET)
156 if (tunnel->encap == L2TP_ENCAPTYPE_UDP)
160 seq_printf(m, " L2TPv%d, %s\n", tunnel->version,
161 tunnel->encap == L2TP_ENCAPTYPE_UDP ? "UDP" :
162 tunnel->encap == L2TP_ENCAPTYPE_IP ? "IP" :
165 tunnel->sock ? refcount_read(&tunnel->sock->sk_refcnt) : 0,
166 refcount_read(&tunnel->ref_count));
169 atomic_long_read(&tunnel->stats.tx_packets),
170 atomic_long_read(&tunnel->stats.tx_bytes),
171 atomic_long_read(&tunnel->stats.tx_errors),
172 atomic_long_read(&tunnel->stats.rx_packets),
173 atomic_long_read(&tunnel->stats.rx_bytes),
174 atomic_long_read(&tunnel->stats.rx_errors));
252 l2tp_dfs_seq_tunnel_show(m, pd->tunnel);