/* * libnl_ifw.h */ #ifndef _LIBNL_IFW_H #define _LIBNL_IFW_H #include #include #include #include #include #include #define NETLINK_IFWLOG 20 #define PREFSIZ 32 struct nl_msg { /* Netlink kernel to user message */ long timestamp_sec; /* time packet */ char indev_name[IFNAMSIZ]; /* name of the ingoing interface */ char outdev_name[IFNAMSIZ]; /* name of the outgoing interface */ unsigned char prefix[PREFSIZ]; /* logging informations */ struct iphdr ip; union { struct tcphdr th; struct udphdr uh; } h; }; int nl_ifw_bind_socket(int s); int nl_ifw_create_socket(void); int nl_ifw_read_msg(int s, struct nlmsghdr *nlh, struct nl_msg *msg); #endif /* !_LIBNL_IFW_H */