• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/irda/

Lines Matching refs:sock

60 #include <net/sock.h>
65 static int irda_create(struct net *net, struct socket *sock, int protocol, int kern);
87 struct sock *sk;
117 struct sock *sk;
182 struct sock *sk;
246 struct sock *sk;
332 struct sock *sk;
707 * Function irda_getname (sock, uaddr, uaddr_len, peer)
712 static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
716 struct sock *sk = sock->sk;
749 * Function irda_listen (sock, backlog)
754 static int irda_listen(struct socket *sock, int backlog)
756 struct sock *sk = sock->sk;
779 * Function irda_bind (sock, uaddr, addr_len)
784 static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
786 struct sock *sk = sock->sk;
812 sock->state = SS_CONNECTED;
844 * Function irda_accept (sock, newsock, flags)
849 static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
851 struct sock *sk = sock->sk;
853 struct sock *newsk;
865 if (sock->state != SS_UNCONNECTED)
868 if ((sk = sock->sk) == NULL)
955 * Function irda_connect (sock, uaddr, addr_len, flags)
974 static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
977 struct sock *sk = sock->sk;
990 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
991 sock->state = SS_CONNECTED;
996 if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) {
997 sock->state = SS_UNCONNECTED;
1007 sock->state = SS_UNCONNECTED;
1051 sock->state = SS_CONNECTING;
1074 sock->state = SS_UNCONNECTED;
1081 sock->state = SS_CONNECTED;
1098 * Function irda_create (sock, protocol)
1103 static int irda_create(struct net *net, struct socket *sock, int protocol,
1106 struct sock *sk;
1115 switch (sock->type) {
1134 switch (sock->type) {
1136 sock->ops = &irda_stream_ops;
1140 sock->ops = &irda_seqpacket_ops;
1147 sock->ops = &irda_ultra_ops;
1155 sock->ops = &irda_dgram_ops;
1170 sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */
1223 * Function irda_release (sock)
1225 static int irda_release(struct socket *sock)
1227 struct sock *sk = sock->sk;
1244 sock->sk = NULL;
1285 * Function irda_sendmsg (iocb, sock, msg, len)
1291 static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1294 struct sock *sk = sock->sk;
1377 * Function irda_recvmsg_dgram (iocb, sock, msg, size, flags)
1382 static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1385 struct sock *sk = sock->sk;
1437 * Function irda_recvmsg_stream (iocb, sock, msg, size, flags)
1439 static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1442 struct sock *sk = sock->sk;
1456 if (sock->flags & __SO_ACCEPTCON)
1562 * Function irda_sendmsg_dgram (iocb, sock, msg, len)
1568 static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1571 struct sock *sk = sock->sk;
1641 * Function irda_sendmsg_ultra (iocb, sock, msg, len)
1647 static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1650 struct sock *sk = sock->sk;
1743 static int irda_shutdown(struct socket *sock, int how)
1745 struct sock *sk = sock->sk;
1778 * Function irda_poll (file, sock, wait)
1780 static unsigned int irda_poll(struct file * file, struct socket *sock,
1783 struct sock *sk = sock->sk;
1841 static unsigned int irda_datagram_poll(struct file *file, struct socket *sock,
1847 err = datagram_poll(file, sock, wait);
1854 * Function irda_ioctl (sock, cmd, arg)
1856 static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1858 struct sock *sk = sock->sk;
1913 * Function irda_ioctl (sock, cmd, arg)
1915 static int irda_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1925 * Function irda_setsockopt (sock, level, optname, optval, optlen)
1930 static int __irda_setsockopt(struct socket *sock, int level, int optname,
1933 struct sock *sk = sock->sk;
2180 static int irda_setsockopt(struct socket *sock, int level, int optname,
2186 err = __irda_setsockopt(sock, level, optname, optval, optlen);
2242 * Function irda_getsockopt (sock, level, optname, optval, optlen)
2244 static int __irda_getsockopt(struct socket *sock, int level, int optname,
2247 struct sock *sk = sock->sk;
2568 static int irda_getsockopt(struct socket *sock, int level, int optname,
2574 err = __irda_getsockopt(sock, level, optname, optval, optlen);