From 63479adf638710b6fd272be5b4b0df23bda2daac Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 5 Feb 2014 00:33:45 -0800 Subject: 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 Reviewed-by: Guy Harris --- wiretap/pcap-common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'wiretap/pcap-common.h') diff --git a/wiretap/pcap-common.h b/wiretap/pcap-common.h index 734d81856f..d0cc529cc5 100644 --- a/wiretap/pcap-common.h +++ b/wiretap/pcap-common.h @@ -36,8 +36,7 @@ extern int pcap_process_pseudo_header(FILE_T fh, int file_type, int wtap_encap, struct wtap_pkthdr *phdr, int *err, gchar **err_info); extern void pcap_read_post_process(int file_type, int wtap_encap, - union wtap_pseudo_header *pseudo_header, - guint8 *pd, guint packet_size, gboolean bytes_swapped, int fcs_len); + struct wtap_pkthdr *phdr, guint8 *pd, gboolean bytes_swapped, int fcs_len); extern int pcap_get_phdr_size(int encap, const union wtap_pseudo_header *pseudo_header); -- cgit v1.2.1