Add hdr and tlv of nflog for pcap
[platform/core/connectivity/stc-manager.git] / plugin / pcap / include / stc-plugin-pcap.h
index f545445..aced8f9 100755 (executable)
@@ -26,6 +26,7 @@
 #include <signal.h>
 #include <errno.h>
 #include <pcap.h>
+#include <pcap/nflog.h>
 #include <arpa/inet.h>
 #include <net/ethernet.h>
 #include <net/if_arp.h>
 
 typedef struct {
        char *ifname;
+       char *nfname;
        int nflog_group;
        GThread *thread;
        pcap_t *handle;
+       int encap_type;
 } stc_pcap_data_s;
 
 typedef struct {
@@ -210,6 +213,9 @@ typedef struct udphdr          udp_t;
 #define SIZE_UDP_HEADER        sizeof(udp_t)
 #define SIZE_DNS_HEADER        sizeof(dns_t)
 
+#define SIZE_NFLOG_HDR         sizeof(nflog_hdr_t)
+#define SIZE_NFLOG_TLV         sizeof(nflog_tlv_t)
+
 #define IS_SRC_OR_DST_PORT(p) (source == (p) || dest == (p))
 
 typedef struct {
@@ -217,7 +223,7 @@ typedef struct {
        int (*deinitialize_plugin) (void);
        int (*lookup_dev) (void);
        int (*lookup_net) (void);
-       int (*find_alldevs) (void);
+       int (*find_all_devs) (GVariantBuilder *builder);
        int (*register_loop) (const char *ifname, int group);
        int (*unregister_loop) (const char *ifname, int group);
        int (*get_all_loop) (GVariantBuilder *builder);