aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcap-common.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2009-06-27 16:08:18 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2009-06-27 16:08:18 +0000
commitdce1889fd7e70809fefd85cccbf4ee426fd77106 (patch)
treefda3612fc819dbdf37ddbe60b96647ee60a36b77 /wiretap/pcap-common.c
parenta41d93603c07fa8b6a7a334e7bf969ebd188085e (diff)
Cleanup. Should be included in Wireshark 1.2.1 and higher to keep
merging future bug fixes simple. svn path=/trunk/; revision=28863
Diffstat (limited to 'wiretap/pcap-common.c')
-rw-r--r--wiretap/pcap-common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 7c0899eb7b..17fc517cbd 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -916,8 +916,8 @@ pcap_read_sita_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header,
}
static gboolean
-pcap_read_linux_usb_pseudoheader(wtap *wth, FILE_T fh,
- union wtap_pseudo_header *pseudo_header, int *err)
+pcap_read_linux_usb_pseudoheader(FILE_T fh,
+ union wtap_pseudo_header *pseudo_header, gboolean byte_swapped, int *err)
{
int bytes_read;
@@ -931,7 +931,7 @@ pcap_read_linux_usb_pseudoheader(wtap *wth, FILE_T fh,
return FALSE;
}
- if (wth->capture.pcap->byte_swapped) {
+ if (byte_swapped) {
pseudo_header->linux_usb.id = GUINT64_SWAP_LE_BE(pseudo_header->linux_usb.id);
pseudo_header->linux_usb.bus_id = GUINT16_SWAP_LE_BE(pseudo_header->linux_usb.bus_id);
pseudo_header->linux_usb.ts_sec = GUINT64_SWAP_LE_BE(pseudo_header->linux_usb.ts_sec);
@@ -1115,17 +1115,17 @@ pcap_read_i2c_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, i
}
int
-pcap_process_pseudo_header(wtap *wth, int encap, FILE_T fh, guint packet_size,
+pcap_process_pseudo_header(FILE_T fh, int file_type, int wtap_encap, gboolean bytes_swapped, guint packet_size,
gboolean check_packet_size, struct wtap_pkthdr *phdr,
union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info)
{
int phdr_len = 0;
guint size;
- switch (encap) {
+ switch (wtap_encap) {
case WTAP_ENCAP_ATM_PDUS:
- if (wth->file_type == WTAP_FILE_PCAP_NOKIA) {
+ if (file_type == WTAP_FILE_PCAP_NOKIA) {
/*
* Nokia IPSO ATM.
*/
@@ -1273,8 +1273,8 @@ pcap_process_pseudo_header(wtap *wth, int encap, FILE_T fh, guint packet_size,
packet_size);
return -1;
}
- if (!pcap_read_linux_usb_pseudoheader(wth, fh,
- pseudo_header, err))
+ if (!pcap_read_linux_usb_pseudoheader(fh,
+ pseudo_header, bytes_swapped, err))
return -1; /* Read error */
phdr_len = (int)sizeof (struct linux_usb_phdr);