Lines Matching defs: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)
250 static void x25_insert_socket(struct sock *sk)
264 static struct sock *x25_find_listener(struct x25_address *addr,
267 struct sock *s;
268 struct sock *next_best;
308 static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
310 struct sock *s;
322 struct sock *x25_find_socket(unsigned int lci, struct x25_neigh *nb)
324 struct sock *s;
338 struct sock *sk;
355 static void __x25_destroy_socket(struct sock *);
362 struct sock *sk = from_timer(sk, t, sk_timer);
374 static void __x25_destroy_socket(struct sock *sk)
409 void x25_destroy_socket_from_timer(struct sock *sk)
423 static int x25_setsockopt(struct socket *sock, int level, int optname,
427 struct sock *sk = sock->sk;
450 static int x25_getsockopt(struct socket *sock, int level, int optname,
453 struct sock *sk = sock->sk;
479 static int x25_listen(struct socket *sock, int backlog)
481 struct sock *sk = sock->sk;
485 if (sock->state != SS_UNCONNECTED) {
508 static struct sock *x25_alloc_socket(struct net *net, int kern)
511 struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, kern);
527 static int x25_create(struct net *net, struct socket *sock, int protocol,
530 struct sock *sk;
538 if (sock->type != SOCK_SEQPACKET)
551 sock_init_data(sock, sk);
555 sock->ops = &x25_proto_ops;
587 static struct sock *x25_make_new(struct sock *osk)
589 struct sock *sk = NULL;
625 static int x25_release(struct socket *sock)
627 struct sock *sk = sock->sk;
673 static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
675 struct sock *sk = sock->sk;
712 static int x25_wait_for_connection_establishment(struct sock *sk)
746 static int x25_connect(struct socket *sock, struct sockaddr *uaddr,
749 struct sock *sk = sock->sk;
756 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
757 sock->state = SS_CONNECTED;
762 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
763 sock->state = SS_UNCONNECTED;
776 sock->state = SS_UNCONNECTED;
809 sock->state = SS_CONNECTING;
828 sock->state = SS_CONNECTED;
845 static int x25_wait_for_data(struct sock *sk, long timeout)
874 static int x25_accept(struct socket *sock, struct socket *newsock, int flags,
877 struct sock *sk = sock->sk;
878 struct sock *newsk;
916 static int x25_getname(struct socket *sock, struct sockaddr *uaddr,
920 struct sock *sk = sock->sk;
943 struct sock *sk;
944 struct sock *make;
1103 static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1105 struct sock *sk = sock->sk;
1277 static int x25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1280 struct sock *sk = sock->sk;
1378 static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1380 struct sock *sk = sock->sk;
1678 static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
1687 rc = x25_ioctl(sock, cmd, (unsigned long)argp);
1728 rc = x25_ioctl(sock, cmd, (unsigned long)argp);
1773 struct sock *s;