1 #include <linux/module.h>
2 #include <linux/sock_diag.h>
4 #include <linux/netdevice.h>
52 nla_nest_cancel(nlskb, mca);
65 nla_nest_end(nlskb, mca);
86 pdr.pdr_sizeof_priv = ring->
prb_bdqc.blk_sizeof_priv;
89 pdr.pdr_retire_tmo = 0;
90 pdr.pdr_sizeof_priv = 0;
139 rp = nlmsg_data(nlh);
147 pdiag_put_info(po, skb))
151 pdiag_put_mclist(po, skb))
155 pdiag_put_rings_cfg(po, skb))
159 pdiag_put_fanout(po, skb))
162 return nlmsg_end(skb, nlh);
165 nlmsg_cancel(skb, nlh);
171 int num = 0, s_num = cb->
args[0];
177 net = sock_net(skb->
sk);
178 req = nlmsg_data(cb->
nlh);
182 if (!net_eq(sock_net(sk), net))
201 static int packet_diag_handler_dump(
struct sk_buff *skb,
struct nlmsghdr *
h)
204 struct net *net = sock_net(skb->
sk);
207 if (nlmsg_len(h) < hdrlen)
217 .dump = packet_diag_dump,
219 return netlink_dump_start(net->
diag_nlsk, skb, h, &c);
226 .dump = packet_diag_handler_dump,
229 static int __init packet_diag_init(
void)
234 static void __exit packet_diag_exit(
void)