Lines Matching defs:sock

43 static bool llc_ui_wait_for_conn(struct sock *sk, long timeout);
44 static int llc_ui_wait_for_disc(struct sock *sk, long timeout);
45 static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout);
97 static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr)
127 static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock)
146 static void llc_ui_sk_init(struct socket *sock, struct sock *sk)
148 sock_graft(sk, sock);
149 sk->sk_type = sock->type;
150 sock->ops = &llc_ui_ops;
163 * @sock: Socket to initialize and attach allocated sk to.
171 static int llc_ui_create(struct net *net, struct socket *sock, int protocol,
174 struct sock *sk;
183 if (likely(sock->type == SOCK_DGRAM || sock->type == SOCK_STREAM)) {
188 llc_ui_sk_init(sock, sk);
196 * @sock: Socket to release.
200 static int llc_ui_release(struct socket *sock)
202 struct sock *sk = sock->sk;
231 sock->sk = NULL;
269 * @sock: socket to bind
277 static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr)
279 struct sock *sk = sock->sk;
328 * @sock: Socket to bind an address to.
340 static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
343 struct sock *sk = sock->sk;
396 struct sock *ask;
435 * @sock: Socket to shutdown.
444 static int llc_ui_shutdown(struct socket *sock, int how)
446 struct sock *sk = sock->sk;
467 * @sock: Socket which will be connected to the remote destination.
479 static int llc_ui_connect(struct socket *sock, struct sockaddr *uaddr,
482 struct sock *sk = sock->sk;
496 if (unlikely(sock->state == SS_CONNECTING))
501 rc = llc_ui_autobind(sock, addr);
507 sock->state = SS_CONNECTING;
514 sock->state = SS_UNCONNECTED;
533 sock->state = SS_CONNECTED;
540 sock->state = SS_UNCONNECTED;
546 * @sock: Socket to allow incoming connections on.
552 static int llc_ui_listen(struct socket *sock, int backlog)
554 struct sock *sk = sock->sk;
558 if (unlikely(sock->state != SS_UNCONNECTED))
580 static int llc_ui_wait_for_disc(struct sock *sk, long timeout)
602 static bool llc_ui_wait_for_conn(struct sock *sk, long timeout)
618 static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout)
644 static int llc_wait_data(struct sock *sk, long timeo)
688 * @sock: Socket which connections arrive on.
696 static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags,
699 struct sock *sk = sock->sk, *newsk;
710 if (unlikely(sock->state != SS_UNCONNECTED ||
751 * @sock: Socket to copy data from.
759 static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
765 struct sock *sk = sock->sk;
923 * @sock: Socket to transmit data from.
930 static int llc_ui_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
933 struct sock *sk = sock->sk;
956 rc = llc_ui_autobind(sock, addr);
1020 * @sock: Socket to get address of.
1026 static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
1030 struct sock *sk = sock->sk;
1068 * @sock: Socket to get/set info
1074 static int llc_ui_ioctl(struct socket *sock, unsigned int cmd,
1082 * @sock: Socket to set options on.
1090 static int llc_ui_setsockopt(struct socket *sock, int level, int optname,
1093 struct sock *sk = sock->sk;
1164 * @sock: Socket to get information from.
1172 static int llc_ui_getsockopt(struct socket *sock, int level, int optname,
1175 struct sock *sk = sock->sk;