Lines Matching defs:sock
2 * linux/fs/ncpfs/sock.c
26 #include <net/sock.h>
35 static int _recv(struct socket *sock, void *buf, int size, unsigned flags)
39 return kernel_recvmsg(sock, &msg, &iov, 1, size, flags);
42 static inline int do_send(struct socket *sock, struct kvec *vec, int count,
46 return kernel_sendmsg(sock, &msg, vec, count, len);
49 static int _send(struct socket *sock, const void *buff, int len)
54 return do_send(sock, &vec, 1, len, 0);
99 void ncp_tcp_data_ready(struct sock *sk, int len)
107 void ncp_tcp_error_report(struct sock *sk)
115 void ncp_tcp_write_space(struct sock *sk)
205 static int ncpdgram_send(struct socket *sock, struct ncp_request_reply *req)
210 return do_send(sock, vec, req->tx_iovlen,
385 struct socket* sock;
387 sock = server->ncp_sock;
393 result = _recv(sock, &reply, sizeof(reply), MSG_PEEK | MSG_DONTWAIT);
406 result = _recv(sock, buf, sizeof(buf), MSG_DONTWAIT);
420 _send(sock, buf, sizeof(buf));
424 result = _recv(sock, server->unexpected_packet.data, sizeof(server->unexpected_packet.data), MSG_DONTWAIT);
440 result = _recv(sock, server->rxbuf, req->datalen, MSG_DONTWAIT);
449 hdrl = sock->sk->sk_family == AF_INET ? 8 : 6;
468 _recv(sock, &reply, sizeof(reply), MSG_DONTWAIT);