Lines Matching refs:sock
20 * 2000-09-04 Henner Eisen Set sock->state in x25_accept().
47 #include <net/sock.h>
195 static void x25_remove_socket(struct sock *sk)
207 struct sock *s;
260 static void x25_insert_socket(struct sock *sk)
274 static struct sock *x25_find_listener(struct x25_address *addr,
277 struct sock *s;
278 struct sock *next_best;
318 static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
320 struct sock *s;
332 struct sock *x25_find_socket(unsigned int lci, struct x25_neigh *nb)
334 struct sock *s;
348 struct sock *sk;
365 static void __x25_destroy_socket(struct sock *);
372 struct sock *sk = from_timer(sk, t, sk_timer);
384 static void __x25_destroy_socket(struct sock *sk)
419 void x25_destroy_socket_from_timer(struct sock *sk)
433 static int x25_setsockopt(struct socket *sock, int level, int optname,
437 struct sock *sk = sock->sk;
460 static int x25_getsockopt(struct socket *sock, int level, int optname,
463 struct sock *sk = sock->sk;
489 static int x25_listen(struct socket *sock, int backlog)
491 struct sock *sk = sock->sk;
495 if (sock->state != SS_UNCONNECTED) {
518 static struct sock *x25_alloc_socket(struct net *net, int kern)
521 struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, kern);
537 static int x25_create(struct net *net, struct socket *sock, int protocol,
540 struct sock *sk;
548 if (sock->type != SOCK_SEQPACKET)
561 sock_init_data(sock, sk);
565 sock->ops = &x25_proto_ops;
597 static struct sock *x25_make_new(struct sock *osk)
599 struct sock *sk = NULL;
635 static int x25_release(struct socket *sock)
637 struct sock *sk = sock->sk;
683 static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
685 struct sock *sk = sock->sk;
722 static int x25_wait_for_connection_establishment(struct sock *sk)
751 static int x25_connect(struct socket *sock, struct sockaddr *uaddr,
754 struct sock *sk = sock->sk;
761 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
762 sock->state = SS_CONNECTED;
767 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
768 sock->state = SS_UNCONNECTED;
781 sock->state = SS_UNCONNECTED;
814 sock->state = SS_CONNECTING;
833 sock->state = SS_CONNECTED;
850 static int x25_wait_for_data(struct sock *sk, long timeout)
879 static int x25_accept(struct socket *sock, struct socket *newsock, int flags,
882 struct sock *sk = sock->sk;
883 struct sock *newsk;
921 static int x25_getname(struct socket *sock, struct sockaddr *uaddr,
925 struct sock *sk = sock->sk;
948 struct sock *sk;
949 struct sock *make;
1108 static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1110 struct sock *sk = sock->sk;
1282 static int x25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1285 struct sock *sk = sock->sk;
1384 static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1386 struct sock *sk = sock->sk;
1684 static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
1693 rc = x25_ioctl(sock, cmd, (unsigned long)argp);
1734 rc = x25_ioctl(sock, cmd, (unsigned long)argp);
1780 struct sock *s;