ifpps: remove unsupported noise display
[netsniff.git] / src / pcap.c
blob481ccb43a7b9006f60733313da91be234aa6ce06
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>
4 * Copyright 2011 Daniel Borkmann.
5 * Subject to the GPL, version 2.
6 */
8 #include <errno.h>
9 #include "pcap.h"
11 const struct pcap_file_ops *pcap_ops[PCAP_OPS_SIZ] = {0};
13 int pcap_ops_group_register(const struct pcap_file_ops *ops,
14 enum pcap_ops_groups group)
16 if (!ops)
17 return -EINVAL;
18 if (pcap_ops[group])
19 return -EBUSY;
20 pcap_ops[group] = ops;
21 return 0;
24 void pcap_ops_group_unregister(enum pcap_ops_groups group)
26 pcap_ops[group] = NULL;