diff options
author | Guy Harris <gharris@sonic.net> | 2021-08-20 13:16:15 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-08-20 13:16:15 -0700 |
commit | 097656e8055d674b35b6e788fcf679ec0e879e66 (patch) | |
tree | d5180660572eb0f83fc13c483c7d0e6b75d091e8 /extcap | |
parent | 4fc200ce51b55023f8e6c8f79668ea6648f18199 (diff) |
androiddump: get the WIRESHARK_UPPER_PDU tags from the header.
Don't define WIRESHARK_UPPER_PDU_TAG_DISSECTOR_NAME ourselves and use
it, use EXP_PDU_TAG_PROTO_NAME from wsutil/exported_pdu_tlvs.h.
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/androiddump.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index f7df7cfbbf..88a6f89192 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -26,6 +26,7 @@ #include <wsutil/wslog.h> #include <ui/cmdarg_err.h> #include <wsutil/inet_addr.h> +#include <wsutil/exported_pdu_tlvs.h> #include "ui/failure_message.h" @@ -98,8 +99,6 @@ #define EXTCAP_ENCAP_NETLINK WTAP_ENCAP_NETLINK #endif -#define WIRESHARK_UPPER_PDU_TAG_DISSECTOR_NAME 0x000C - #define INTERFACE_ANDROID_LOGCAT_MAIN "android-logcat-main" #define INTERFACE_ANDROID_LOGCAT_SYSTEM "android-logcat-system" #define INTERFACE_ANDROID_LOGCAT_RADIO "android-logcat-radio" @@ -2029,7 +2028,7 @@ static int capture_android_logcat_text(char *interface, char *fifo, extcap_dumper = extcap_dumper_open(fifo, EXTCAP_ENCAP_WIRESHARK_UPPER_PDU); - exported_pdu_header_protocol_normal.tag = GUINT16_TO_BE(WIRESHARK_UPPER_PDU_TAG_DISSECTOR_NAME); + exported_pdu_header_protocol_normal.tag = GUINT16_TO_BE(EXP_PDU_TAG_PROTO_NAME); exported_pdu_header_protocol_normal.length = GUINT16_TO_BE(strlen(wireshark_protocol_logcat_text) + 2); serial_number = get_serial_from_interface(interface); @@ -2182,10 +2181,10 @@ static int capture_android_logcat(char *interface, char *fifo, extcap_dumper = extcap_dumper_open(fifo, EXTCAP_ENCAP_WIRESHARK_UPPER_PDU); - exported_pdu_header_protocol_events.tag = GUINT16_TO_BE(WIRESHARK_UPPER_PDU_TAG_DISSECTOR_NAME); + exported_pdu_header_protocol_events.tag = GUINT16_TO_BE(EXP_PDU_TAG_PROTO_NAME); exported_pdu_header_protocol_events.length = GUINT16_TO_BE(strlen(wireshark_protocol_logcat_events) + 2); - exported_pdu_header_protocol_normal.tag = GUINT16_TO_BE(WIRESHARK_UPPER_PDU_TAG_DISSECTOR_NAME); + exported_pdu_header_protocol_normal.tag = GUINT16_TO_BE(EXP_PDU_TAG_PROTO_NAME); exported_pdu_header_protocol_normal.length = GUINT16_TO_BE(strlen(wireshark_protocol_logcat) + 2); serial_number = get_serial_from_interface(interface); |