Lines Matching refs:sock
33 #include <net/sock.h>
151 static void rose_remove_socket(struct sock *sk)
164 struct sock *s;
184 struct sock *sk, *array[16];
257 static void rose_insert_socket(struct sock *sk)
269 static struct sock *rose_find_listener(rose_address *addr, ax25_address *call)
271 struct sock *s;
300 struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh)
302 struct sock *s;
340 void rose_destroy_socket(struct sock *);
347 struct sock *sk = from_timer(sk, t, sk_timer);
358 void rose_destroy_socket(struct sock *sk)
394 static int rose_setsockopt(struct socket *sock, int level, int optname,
397 struct sock *sk = sock->sk;
454 static int rose_getsockopt(struct socket *sock, int level, int optname,
457 struct sock *sk = sock->sk;
512 static int rose_listen(struct socket *sock, int backlog)
514 struct sock *sk = sock->sk;
517 if (sock->state != SS_UNCONNECTED) {
545 static int rose_create(struct net *net, struct socket *sock, int protocol,
548 struct sock *sk;
554 if (sock->type != SOCK_SEQPACKET || protocol != 0)
563 sock_init_data(sock, sk);
571 sock->ops = &rose_proto_ops;
588 static struct sock *rose_make_new(struct sock *osk)
590 struct sock *sk;
636 static int rose_release(struct socket *sock)
638 struct sock *sk = sock->sk;
688 sock->sk = NULL;
695 static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
697 struct sock *sk = sock->sk;
758 static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags)
760 struct sock *sk = sock->sk;
785 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
787 sock->state = SS_CONNECTED;
791 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
792 sock->state = SS_UNCONNECTED;
804 sock->state = SS_UNCONNECTED;
860 sock->state = SS_CONNECTING;
905 sock->state = SS_UNCONNECTED;
910 sock->state = SS_CONNECTED;
918 static int rose_accept(struct socket *sock, struct socket *newsock, int flags,
922 struct sock *newsk;
924 struct sock *sk;
927 if ((sk = sock->sk) == NULL)
983 static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
987 struct sock *sk = sock->sk;
1015 struct sock *sk;
1016 struct sock *make;
1094 static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1096 struct sock *sk = sock->sk;
1258 static int rose_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1261 struct sock *sk = sock->sk;
1320 static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1322 struct sock *sk = sock->sk;
1444 struct sock *s = sk_entry(v);