Lines Matching refs: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;
230 sock->sk = NULL;
268 * @sock: socket to bind
276 static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr)
278 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;
436 * @sock: Socket to shutdown.
445 static int llc_ui_shutdown(struct socket *sock, int how)
447 struct sock *sk = sock->sk;
468 * @sock: Socket which will be connected to the remote destination.
480 static int llc_ui_connect(struct socket *sock, struct sockaddr *uaddr,
483 struct sock *sk = sock->sk;
497 if (unlikely(sock->state == SS_CONNECTING))
502 rc = llc_ui_autobind(sock, addr);
508 sock->state = SS_CONNECTING;
515 sock->state = SS_UNCONNECTED;
534 sock->state = SS_CONNECTED;
541 sock->state = SS_UNCONNECTED;
547 * @sock: Socket to allow incoming connections on.
553 static int llc_ui_listen(struct socket *sock, int backlog)
555 struct sock *sk = sock->sk;
559 if (unlikely(sock->state != SS_UNCONNECTED))
581 static int llc_ui_wait_for_disc(struct sock *sk, long timeout)
603 static bool llc_ui_wait_for_conn(struct sock *sk, long timeout)
619 static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout)
645 static int llc_wait_data(struct sock *sk, long timeo)
689 * @sock: Socket which connections arrive on.
697 static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags,
700 struct sock *sk = sock->sk, *newsk;
711 if (unlikely(sock->state != SS_UNCONNECTED ||
752 * @sock: Socket to copy data from.
760 static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
766 struct sock *sk = sock->sk;
924 * @sock: Socket to transmit data from.
931 static int llc_ui_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
934 struct sock *sk = sock->sk;
957 rc = llc_ui_autobind(sock, addr);
1021 * @sock: Socket to get address of.
1027 static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
1031 struct sock *sk = sock->sk;
1069 * @sock: Socket to get/set info
1075 static int llc_ui_ioctl(struct socket *sock, unsigned int cmd,
1083 * @sock: Socket to set options on.
1091 static int llc_ui_setsockopt(struct socket *sock, int level, int optname,
1094 struct sock *sk = sock->sk;
1165 * @sock: Socket to get information from.
1173 static int llc_ui_getsockopt(struct socket *sock, int level, int optname,
1176 struct sock *sk = sock->sk;