aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netxray.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-02-05 00:33:45 -0800
committerGuy Harris <guy@alum.mit.edu>2014-02-06 21:35:58 +0000
commit63479adf638710b6fd272be5b4b0df23bda2daac (patch)
tree0d7fd0d6b0de10ffc163b270e387aa814305e364 /wiretap/netxray.c
parent1dc06a2681495b3bb2c75fc871f156f06b973260 (diff)
Make some routines take a struct wtap_pkthdr * as an argument.
For some routines that take multiple arguments that come from a struct wtap_pkthdr, pass a pointer to the struct wtap_pkthdr in question, rather than the separate arguments. Do this even if we're passing expressions that were earlier assigned to the struct wtap_pkthdr fields in question. This simplifies the calling sequences and ensures that the right values are picked up by the called routine; in at least one case we were *not* passing the right values (the code to handle Simple Packet Blocks in pcap-ng files). Also, call the byte-swapping routines for pseudo-header fields only if we need to do byte-swapping. Change-Id: I3a8badfcfeb0237dfc1d1014185a67f18c0f2ebe Reviewed-on: https://code.wireshark.org/review/119 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/netxray.c')
-rw-r--r--wiretap/netxray.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/wiretap/netxray.c b/wiretap/netxray.c
index 774262cf3e..a416a7723e 100644
--- a/wiretap/netxray.c
+++ b/wiretap/netxray.c
@@ -1642,8 +1642,7 @@ netxray_guess_atm_type(wtap *wth, struct wtap_pkthdr *phdr, Buffer *buf)
* on the VPI/VCI and packet contents.
*/
pd = buffer_start_ptr(buf);
- atm_guess_traffic_type(pd, phdr->caplen,
- &phdr->pseudo_header);
+ atm_guess_traffic_type(phdr, pd);
} else if (phdr->pseudo_header.atm.aal == AAL_5 &&
phdr->pseudo_header.atm.type == TRAF_LANE) {
/*
@@ -1651,8 +1650,7 @@ netxray_guess_atm_type(wtap *wth, struct wtap_pkthdr *phdr, Buffer *buf)
* packet contents.
*/
pd = buffer_start_ptr(buf);
- atm_guess_lane_type(pd, phdr->caplen,
- &phdr->pseudo_header);
+ atm_guess_lane_type(phdr, pd);
}
}
}