text_import.c: get EXP_PDU_TAG_PROTO_NAME from the header.

Don't hardcode 12, use EXP_PDU_TAG_PROTO_NAME from
wsutil/exported_pdu_tlvs.h.
This commit is contained in:
Guy Harris 2021-08-20 14:58:44 -07:00
parent 097656e805
commit c6717dc6b3
1 changed files with 3 additions and 1 deletions

View File

@ -121,6 +121,8 @@
#include <wsutil/crc32.h>
#include <epan/in_cksum.h>
#include <wsutil/exported_pdu_tlvs.h>
#ifndef HAVE_STRPTIME
# include "wsutil/strptime.h"
#endif
@ -588,7 +590,7 @@ write_current_packet (void)
/* Write ExportPDU header */
if (hdr_export_pdu) {
guint payload_len = (guint)strlen(hdr_export_pdu_payload);
HDR_EXPORT_PDU.tag_type = g_htons(0x0c); // EXP_PDU_TAG_PROTO_NAME;
HDR_EXPORT_PDU.tag_type = g_htons(EXP_PDU_TAG_PROTO_NAME);
HDR_EXPORT_PDU.payload_len = g_htons(payload_len);
memcpy(&packet_buf[prefix_index], &HDR_EXPORT_PDU, sizeof(HDR_EXPORT_PDU));
prefix_index += sizeof(HDR_EXPORT_PDU);