Lines Matching defs:sock
82 #include <net/sock.h>
128 struct sock *sock; /* Pointer to the session
130 struct sock *tunnel_sock; /* Pointer to the tunnel UDP
146 static inline struct l2tp_session *pppol2tp_sock_to_session(struct sock *sk)
191 static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock,
197 struct sock *sk = sock->sk;
228 struct sock *sk = NULL;
233 sk = ps->sock;
282 if (ps->sock)
283 sock_hold(ps->sock);
290 if (ps->sock)
291 sock_put(ps->sock);
302 static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
306 struct sock *sk = sock->sk;
391 struct sock *sk = (struct sock *) chan->private;
392 struct sock *sk_tun;
452 struct sock *sk = ps->sock;
487 static void pppol2tp_session_destruct(struct sock *sk)
507 static int pppol2tp_release(struct socket *sock)
509 struct sock *sk = sock->sk;
526 sock->sk = NULL;
563 static int pppol2tp_backlog_recv(struct sock *sk, struct sk_buff *skb)
574 /* socket() handler. Initialize a new struct sock.
576 static int pppol2tp_create(struct net *net, struct socket *sock)
579 struct sock *sk;
585 sock_init_data(sock, sk);
587 sock->state = SS_UNCONNECTED;
588 sock->ops = &pppol2tp_ops;
610 struct pppox_sock *po = pppox_sk(ps->sock);
619 static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
622 struct sock *sk = sock->sk;
700 if (tunnel->sock == NULL)
738 if (ps->sock != NULL)
742 if (ps->tunnel_sock != tunnel->sock)
749 ps->sock = sk;
750 ps->tunnel_sock = tunnel->sock;
831 if (tunnel->sock == NULL)
855 ps->tunnel_sock = tunnel->sock;
872 if (ps->sock == NULL)
882 static int pppol2tp_getname(struct socket *sock, struct sockaddr *uaddr,
889 struct sock *sk = sock->sk;
988 struct sock *sk;
998 sk = ps->sock;
1121 struct sock *sk;
1128 sk = tunnel->sock;
1178 static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd,
1181 struct sock *sk = sock->sk;
1241 static int pppol2tp_tunnel_setsockopt(struct sock *sk,
1264 static int pppol2tp_session_setsockopt(struct sock *sk,
1289 struct sock *ssk = ps->sock;
1333 static int pppol2tp_setsockopt(struct socket *sock, int level, int optname,
1336 struct sock *sk = sock->sk;
1385 /* Tunnel getsockopt helper. Called with sock locked.
1387 static int pppol2tp_tunnel_getsockopt(struct sock *sk,
1408 /* Session getsockopt helper. Called with sock locked.
1410 static int pppol2tp_session_getsockopt(struct sock *sk,
1459 static int pppol2tp_getsockopt(struct socket *sock, int level,
1462 struct sock *sk = sock->sk;
1606 (tunnel == tunnel->sock->sk_user_data) ? 'Y' : 'N',
1623 struct pppox_sock *po = pppox_sk(ps->sock);
1627 if (tunnel->sock) {
1628 struct inet_sock *inet = inet_sk(tunnel->sock);
1640 ps->sock->sk_state,
1641 (session == ps->sock->sk_user_data) ?