From 71ac5c883bba78094dc8d193c2c445ef643777b6 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 9 Dec 2019 15:10:06 -0800 Subject: [PATCH] Copy necessary ipt_ULOG.h structure to source. The ipt_ULOG.h file has been deprecated, so it's being removed from the bionic uapi kernel headers. Since this is the only code that is using that file, copy the one structure needed to parse one type of message into the file that needs it. Test: Builds. Change-Id: Ib879e655d598256c424792675d24e647eee33f89 --- libsysutils/src/NetlinkEvent.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libsysutils/src/NetlinkEvent.cpp b/libsysutils/src/NetlinkEvent.cpp index 8fe785421..2351afa8e 100644 --- a/libsysutils/src/NetlinkEvent.cpp +++ b/libsysutils/src/NetlinkEvent.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -39,6 +38,23 @@ const int LOCAL_QLOG_NL_EVENT = 112; const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET; +/* From deprecated ipt_ULOG.h to parse QLOG_NL_EVENT. */ +#define ULOG_MAC_LEN 80 +#define ULOG_PREFIX_LEN 32 +typedef struct ulog_packet_msg { + unsigned long mark; + long timestamp_sec; + long timestamp_usec; + unsigned int hook; + char indev_name[IFNAMSIZ]; + char outdev_name[IFNAMSIZ]; + size_t data_len; + char prefix[ULOG_PREFIX_LEN]; + unsigned char mac_len; + unsigned char mac[ULOG_MAC_LEN]; + unsigned char payload[0]; +} ulog_packet_msg_t; + #include #include #include