Lines Matching refs:tunnel
18 /* Per tunnel, session hash table size */
89 struct l2tp_tunnel *tunnel; /* back pointer to tunnel
142 /* Describes the tunnel. It contains info to track all the associated
194 static inline void *l2tp_tunnel_priv(struct l2tp_tunnel *tunnel)
196 return &tunnel->priv[0];
206 struct l2tp_tunnel *tunnel;
212 tunnel = (struct l2tp_tunnel *)(sk->sk_user_data);
213 if (tunnel == NULL) {
218 BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC);
221 return tunnel;
224 extern struct l2tp_session *l2tp_session_find(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id);
225 extern struct l2tp_session *l2tp_session_find_nth(struct l2tp_tunnel *tunnel, int nth);
231 extern int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
232 extern struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg);
234 extern void l2tp_tunnel_free(struct l2tp_tunnel *tunnel);
237 extern int l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb, int (*payload_hook)(struct sk_buff *skb));
243 extern void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel);
250 * the tunnel.
252 static inline void l2tp_tunnel_inc_refcount_1(struct l2tp_tunnel *tunnel)
254 atomic_inc(&tunnel->ref_count);
257 static inline void l2tp_tunnel_dec_refcount_1(struct l2tp_tunnel *tunnel)
259 if (atomic_dec_and_test(&tunnel->ref_count))
260 l2tp_tunnel_free(tunnel);