aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netscaler.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-24 13:02:31 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-24 21:02:54 +0000
commitfe5aea7c625cde22ffa61081193936e3105079dc (patch)
tree059f0bcddea1d100c8dcd9de9a3afa30b7856a16 /wiretap/netscaler.c
parentced6fbaae4a09ed2fd74cd6669118637fea78055 (diff)
Move the setting of rec_type.
This makes the code slightly less unclear. (You are in a maze of twisty little C macros, all different.) Change-Id: I9f1bcc7a9a1a7afe87ede8b1ba513e3d8e53845c Reviewed-on: https://code.wireshark.org/review/7349 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/netscaler.c')
-rw-r--r--wiretap/netscaler.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/wiretap/netscaler.c b/wiretap/netscaler.c
index 85899e4822..67ffdc2739 100644
--- a/wiretap/netscaler.c
+++ b/wiretap/netscaler.c
@@ -1013,7 +1013,6 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define TIMEDEFV20(fp,type) \
do {\
- wth->phdr.rec_type = REC_TYPE_PACKET;\
wth->phdr.presence_flags |= WTAP_HAS_TS;\
nsg_creltime += ns_hrtime2nsec(pletoh32(fp->type##_RelTimeHr));\
wth->phdr.ts.secs = nstrace->nspm_curtime + (guint32) (nsg_creltime / 1000000000);\
@@ -1022,7 +1021,6 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define TIMEDEFV23(fp,type) \
do {\
- wth->phdr.rec_type = REC_TYPE_PACKET;\
wth->phdr.presence_flags |= WTAP_HAS_TS;\
/* access _AbsTimeHr as a 64bit value */\
nsg_creltime = pletoh64(fp->type##_AbsTimeHr);\
@@ -1032,7 +1030,6 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define TIMEDEFV30(fp,type) \
do {\
- wth->phdr.rec_type = REC_TYPE_PACKET;\
wth->phdr.presence_flags |= WTAP_HAS_TS;\
/* access _AbsTimeHr as a 64bit value */\
nsg_creltime = pletoh64(fp->type##_AbsTimeHr);\
@@ -1048,7 +1045,6 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define PPSIZEDEFV20(phdr,pp,ver) \
do {\
- (phdr)->rec_type = REC_TYPE_PACKET;\
(phdr)->presence_flags |= WTAP_HAS_CAP_LEN;\
(phdr)->len = pletoh16(&pp->pp_PktSizeOrg) + nspr_pktracepart_v##ver##_s;\
(phdr)->caplen = nspr_getv20recordsize((nspr_hd_v20_t *)pp);\
@@ -1076,7 +1072,6 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define FPSIZEDEFV30(phdr,fp,ver)\
do {\
- (phdr)->rec_type = REC_TYPE_PACKET;\
(phdr)->presence_flags |= WTAP_HAS_CAP_LEN;\
(phdr)->len = pletoh16(&fp->fp_PktSizeOrg) + nspr_pktracefull_v##ver##_s;\
(phdr)->caplen = nspr_getv20recordsize((nspr_hd_v20_t *)fp);\
@@ -1085,6 +1080,7 @@ static gboolean nstrace_read_v10(wtap *wth, int *err, gchar **err_info, gint64 *
#define PACKET_DESCRIBE(phdr,FPTIMEDEF,SIZEDEF,ver,enumprefix,type,structname,TYPE)\
do {\
nspr_##structname##_t *fp= (nspr_##structname##_t*)&nstrace_buf[nstrace_buf_offset];\
+ (phdr)->rec_type = REC_TYPE_PACKET;\
TIMEDEFV##ver(fp,type);\
SIZEDEF##ver((phdr),fp,ver);\
TRACE_V##ver##_REC_LEN_OFF((phdr),enumprefix,type,structname);\
@@ -1210,6 +1206,7 @@ static gboolean nstrace_read_v20(wtap *wth, int *err, gchar **err_info, gint64 *
#define PACKET_DESCRIBE(phdr,FPTIMEDEF,SIZEDEF,ver,enumprefix,type,structname,TYPE)\
do {\
nspr_##structname##_t *fp = (nspr_##structname##_t *) &nstrace_buf[nstrace_buf_offset];\
+ (phdr)->rec_type = REC_TYPE_PACKET;\
TIMEDEFV##ver(fp,type);\
SIZEDEF##ver((phdr),fp,ver);\
TRACE_V##ver##_REC_LEN_OFF((phdr),enumprefix,type,structname);\