Lines Matching full:tunnel

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