Lines Matching refs:tunnel
36 int tunnel_idx; /* current tunnel */
37 int session_idx; /* index of session within current tunnel */
38 struct l2tp_tunnel *tunnel;
39 struct l2tp_session *session; /* NULL means get next tunnel */
45 if (pd->tunnel)
46 l2tp_tunnel_dec_refcount(pd->tunnel);
48 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx);
58 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx);
81 if (!pd->tunnel)
86 /* NULL tunnel and session indicates end of list */
87 if (!pd->tunnel && !pd->session)
114 if (pd->tunnel) {
115 l2tp_tunnel_dec_refcount(pd->tunnel);
116 pd->tunnel = NULL;
122 struct l2tp_tunnel *tunnel = v;
128 read_lock_bh(&tunnel->hlist_lock);
130 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
140 read_unlock_bh(&tunnel->hlist_lock);
142 seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id);
143 if (tunnel->sock) {
144 struct inet_sock *inet = inet_sk(tunnel->sock);
147 if (tunnel->sock->sk_family == AF_INET6) {
148 const struct ipv6_pinfo *np = inet6_sk(tunnel->sock);
151 &np->saddr, &tunnel->sock->sk_v6_daddr);
154 if (tunnel->sock->sk_family == AF_INET)
158 if (tunnel->encap == L2TP_ENCAPTYPE_UDP)
162 seq_printf(m, " L2TPv%d, %s\n", tunnel->version,
163 tunnel->encap == L2TP_ENCAPTYPE_UDP ? "UDP" :
164 tunnel->encap == L2TP_ENCAPTYPE_IP ? "IP" :
167 tunnel->sock ? refcount_read(&tunnel->sock->sk_refcnt) : 0,
168 refcount_read(&tunnel->ref_count));
171 atomic_long_read(&tunnel->stats.tx_packets),
172 atomic_long_read(&tunnel->stats.tx_bytes),
173 atomic_long_read(&tunnel->stats.tx_errors),
174 atomic_long_read(&tunnel->stats.rx_packets),
175 atomic_long_read(&tunnel->stats.rx_bytes),
176 atomic_long_read(&tunnel->stats.rx_errors));
254 l2tp_dfs_seq_tunnel_show(m, pd->tunnel);