Lines Matching defs:sock
32 #include <net/sock.h>
95 static void nr_remove_socket(struct sock *sk)
107 struct sock *s;
139 static void nr_insert_socket(struct sock *sk)
150 static struct sock *nr_find_listener(ax25_address *addr)
152 struct sock *s;
171 static struct sock *nr_find_socket(unsigned char index, unsigned char id)
173 struct sock *s;
194 static struct sock *nr_find_peer(unsigned char index, unsigned char id,
197 struct sock *s;
223 struct sock *sk;
244 void nr_destroy_socket(struct sock *);
251 struct sock *sk=(struct sock *)data;
265 void nr_destroy_socket(struct sock *sk)
304 static int nr_setsockopt(struct socket *sock, int level, int optname,
307 struct sock *sk = sock->sk;
356 static int nr_getsockopt(struct socket *sock, int level, int optname,
359 struct sock *sk = sock->sk;
406 static int nr_listen(struct socket *sock, int backlog)
408 struct sock *sk = sock->sk;
429 static int nr_create(struct net *net, struct socket *sock, int protocol,
432 struct sock *sk;
438 if (sock->type != SOCK_SEQPACKET || protocol != 0)
447 sock_init_data(sock, sk);
449 sock->ops = &nr_proto_ops;
476 static struct sock *nr_make_new(struct sock *osk)
478 struct sock *sk;
521 static int nr_release(struct socket *sock)
523 struct sock *sk = sock->sk;
560 sock->sk = NULL;
567 static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
569 struct sock *sk = sock->sk;
639 static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
642 struct sock *sk = sock->sk;
651 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
652 sock->state = SS_CONNECTED;
656 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
657 sock->state = SS_UNCONNECTED;
668 sock->state = SS_UNCONNECTED;
719 sock->state = SS_CONNECTING;
761 sock->state = SS_UNCONNECTED;
766 sock->state = SS_CONNECTED;
774 static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
777 struct sock *newsk;
779 struct sock *sk;
782 if ((sk = sock->sk) == NULL)
836 static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
840 struct sock *sk = sock->sk;
868 struct sock *sk;
869 struct sock *make;
1030 static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
1033 struct sock *sk = sock->sk;
1149 static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,
1152 struct sock *sk = sock->sk;
1200 static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1202 struct sock *sk = sock->sk;
1287 struct sock *s = sk_entry(v);