#include <linux/module.h>
#include <linux/sock_diag.h>
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/packet_diag.h>
#include <linux/percpu.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include "internal.h"
static int pdiag_put_info(const struct packet_sock *po, struct sk_buff *nlskb)
{ … }
static int pdiag_put_mclist(const struct packet_sock *po, struct sk_buff *nlskb)
{ … }
static int pdiag_put_ring(struct packet_ring_buffer *ring, int ver, int nl_type,
struct sk_buff *nlskb)
{ … }
static int pdiag_put_rings_cfg(struct packet_sock *po, struct sk_buff *skb)
{ … }
static int pdiag_put_fanout(struct packet_sock *po, struct sk_buff *nlskb)
{ … }
static int sk_diag_fill(struct sock *sk, struct sk_buff *skb,
struct packet_diag_req *req,
bool may_report_filterinfo,
struct user_namespace *user_ns,
u32 portid, u32 seq, u32 flags, int sk_ino)
{ … }
static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
static int packet_diag_handler_dump(struct sk_buff *skb, struct nlmsghdr *h)
{ … }
static const struct sock_diag_handler packet_diag_handler = …;
static int __init packet_diag_init(void)
{ … }
static void __exit packet_diag_exit(void)
{ … }
module_init(…) …;
module_exit(packet_diag_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS_NET_PF_PROTO_TYPE(…);