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

Lines Matching refs:sock

68 #include <net/sock.h>
163 static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
183 static void packet_flush_mclist(struct sock *sk);
186 /* struct sock has to be the first member of packet_sock */
187 struct sock sk;
314 static inline struct packet_sock *pkt_sk(struct sock *sk)
319 static void packet_sock_destruct(struct sock *sk)
342 struct sock *sk;
411 static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
414 struct sock *sk = sock->sk;
502 static inline unsigned int run_filter(struct sk_buff *skb, struct sock *sk,
531 struct sock *sk;
641 struct sock *sk;
850 struct socket *sock = po->sk.sk_socket;
882 if (sock->type == SOCK_DGRAM) {
941 struct socket *sock;
953 sock = po->sk.sk_socket;
1067 static inline struct sk_buff *packet_alloc_skb(struct sock *sk, size_t prepad,
1091 static int packet_snd(struct socket *sock,
1094 struct sock *sk = sock->sk;
1131 if (sock->type == SOCK_RAW)
1200 if (sock->type == SOCK_DGRAM &&
1257 static int packet_sendmsg(struct kiocb *iocb, struct socket *sock,
1260 struct sock *sk = sock->sk;
1265 return packet_snd(sock, msg, len);
1273 static int packet_release(struct socket *sock)
1275 struct sock *sk = sock->sk;
1318 sock->sk = NULL;
1333 static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protocol)
1381 static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr,
1384 struct sock *sk = sock->sk;
1405 static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1408 struct sock *sk = sock->sk;
1446 static int packet_create(struct net *net, struct socket *sock, int protocol,
1449 struct sock *sk;
1456 if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
1457 sock->type != SOCK_PACKET)
1460 sock->state = SS_UNCONNECTED;
1467 sock->ops = &packet_ops;
1468 if (sock->type == SOCK_PACKET)
1469 sock->ops = &packet_ops_spkt;
1471 sock_init_data(sock, sk);
1488 if (sock->type == SOCK_PACKET)
1510 static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
1560 static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
1563 struct sock *sk = sock->sk;
1649 if (sock->type == SOCK_PACKET)
1702 static int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr,
1706 struct sock *sk = sock->sk;
1724 static int packet_getname(struct socket *sock, struct sockaddr *uaddr,
1728 struct sock *sk = sock->sk;
1795 static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq)
1849 static int packet_mc_drop(struct sock *sk, struct packet_mreq_max *mreq)
1876 static void packet_flush_mclist(struct sock *sk)
1898 packet_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
1900 struct sock *sk = sock->sk;
2027 if (sock->type != SOCK_RAW)
2056 static int packet_getsockopt(struct socket *sock, int level, int optname,
2061 struct sock *sk = sock->sk;
2163 struct sock *sk;
2214 static int packet_ioctl(struct socket *sock, unsigned int cmd,
2217 struct sock *sk = sock->sk;
2258 return inet_dgram_ops.ioctl(sock, cmd, arg);
2267 static unsigned int packet_poll(struct file *file, struct socket *sock,
2270 struct sock *sk = sock->sk;
2272 unsigned int mask = datagram_poll(file, sock, wait);
2297 struct socket *sock = file->private_data;
2298 struct sock *sk = sock->sk;
2307 struct socket *sock = file->private_data;
2308 struct sock *sk = sock->sk;
2362 static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
2489 static int packet_mmap(struct file *file, struct socket *sock,
2492 struct sock *sk = sock->sk;
2629 struct sock *s = sk_entry(v);