Lines Matching refs:sock
33 #include <net/sock.h>
152 static void rose_remove_socket(struct sock *sk)
165 struct sock *s;
185 struct sock *sk, *array[16];
258 static void rose_insert_socket(struct sock *sk)
270 static struct sock *rose_find_listener(rose_address *addr, ax25_address *call)
272 struct sock *s;
301 struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh)
303 struct sock *s;
341 void rose_destroy_socket(struct sock *);
348 struct sock *sk = from_timer(sk, t, sk_timer);
359 void rose_destroy_socket(struct sock *sk)
395 static int rose_setsockopt(struct socket *sock, int level, int optname,
398 struct sock *sk = sock->sk;
455 static int rose_getsockopt(struct socket *sock, int level, int optname,
458 struct sock *sk = sock->sk;
513 static int rose_listen(struct socket *sock, int backlog)
515 struct sock *sk = sock->sk;
518 if (sock->state != SS_UNCONNECTED) {
546 static int rose_create(struct net *net, struct socket *sock, int protocol,
549 struct sock *sk;
555 if (sock->type != SOCK_SEQPACKET || protocol != 0)
564 sock_init_data(sock, sk);
572 sock->ops = &rose_proto_ops;
589 static struct sock *rose_make_new(struct sock *osk)
591 struct sock *sk;
637 static int rose_release(struct socket *sock)
639 struct sock *sk = sock->sk;
689 sock->sk = NULL;
696 static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
698 struct sock *sk = sock->sk;
760 static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags)
762 struct sock *sk = sock->sk;
787 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
789 sock->state = SS_CONNECTED;
793 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
794 sock->state = SS_UNCONNECTED;
806 sock->state = SS_UNCONNECTED;
864 sock->state = SS_CONNECTING;
909 sock->state = SS_UNCONNECTED;
914 sock->state = SS_CONNECTED;
922 static int rose_accept(struct socket *sock, struct socket *newsock, int flags,
926 struct sock *newsk;
928 struct sock *sk;
931 if ((sk = sock->sk) == NULL)
987 static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
991 struct sock *sk = sock->sk;
1019 struct sock *sk;
1020 struct sock *make;
1101 static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1103 struct sock *sk = sock->sk;
1265 static int rose_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1268 struct sock *sk = sock->sk;
1328 static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1330 struct sock *sk = sock->sk;
1452 struct sock *s = sk_entry(v);