aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tap_export_pdu.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-19 08:08:38 -0500
committerAnders Broman <a.broman58@gmail.com>2015-01-02 00:00:57 +0000
commit07c9492b8d40ed766074679f86c49780277af002 (patch)
tree5a0c6f5d078872b58a7eac1469ce6d2401bf2792 /ui/tap_export_pdu.c
parentf384fa07f945fd73e3f0088c19d640a8c534a791 (diff)
Remove pkt_comment member from packet_info structure.
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d Reviewed-on: https://code.wireshark.org/review/5884 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/tap_export_pdu.c')
-rw-r--r--ui/tap_export_pdu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c
index e724cd5cbe..6744a32d96 100644
--- a/ui/tap_export_pdu.c
+++ b/ui/tap_export_pdu.c
@@ -31,6 +31,7 @@
#include <epan/tap.h>
#include <epan/exported_pdu.h>
+#include <epan/epan_dissect.h>
#include "ui/alert_box.h"
#include "ui/simple_dialog.h"
@@ -38,7 +39,7 @@
/* Main entry point to the tap */
static int
-export_pdu_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
+export_pdu_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data)
{
const exp_pdu_data_t *exp_pdu_data = (const exp_pdu_data_t *)data;
exp_pdu_t *exp_pdu_tap_data = (exp_pdu_t *)tapdata;
@@ -66,7 +67,12 @@ export_pdu_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, co
pkthdr.len = exp_pdu_data->tvb_reported_length + exp_pdu_data->tlv_buffer_len;
pkthdr.pkt_encap = exp_pdu_tap_data->pkt_encap;
- pkthdr.opt_comment = g_strdup(pinfo->pkt_comment);
+
+ if (pinfo->fd->flags.has_user_comment)
+ pkthdr.opt_comment = g_strdup(epan_get_user_comment(edt->session, pinfo->fd));
+ else if (pinfo->fd->flags.has_phdr_comment)
+ pkthdr.opt_comment = g_strdup(pinfo->phdr->opt_comment);
+
pkthdr.presence_flags = WTAP_HAS_CAP_LEN|WTAP_HAS_INTERFACE_ID|WTAP_HAS_TS|WTAP_HAS_PACK_FLAGS;
/* XXX: should the pkthdr.pseudo_header be set to the pinfo's pseudo-header? */