aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-04-21 20:51:22 +0000
committerGuy Harris <guy@alum.mit.edu>2010-04-21 20:51:22 +0000
commit21a210b77763224e0ac15611842cf7203d07fa08 (patch)
tree8bcb5aa12a0e02936ac8737faf20ddbae72d0998 /wiretap/libpcap.c
parentc1729024c520afc5c8824abc04b3a3cc9eacb716 (diff)
From Chris Maynard:
Support PPP-over-USB. Don't remove the USB pseudo-header from the packet data for Linux USB packets, just byte-swap it if necessary and have the USB dissector fetch the pseudo-header from the raw packet data. Update USB language ID values. svn path=/trunk/; revision=32534
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index 6a0d9aaecc..117409c25a 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -643,8 +643,8 @@ static gboolean libpcap_read(wtap *wth, int *err, gchar **err_info,
libpcap = (libpcap_t *)wth->priv;
phdr_len = pcap_process_pseudo_header(wth->fh, wth->file_type,
- wth->file_encap, libpcap->byte_swapped, packet_size,
- TRUE, &wth->phdr, &wth->pseudo_header, err, err_info);
+ wth->file_encap, packet_size, TRUE, &wth->phdr,
+ &wth->pseudo_header, err, err_info);
if (phdr_len < 0)
return FALSE; /* error */
@@ -698,6 +698,8 @@ static gboolean libpcap_read(wtap *wth, int *err, gchar **err_info,
}
}
+ pcap_read_post_process(wth->file_encap, wth->phdr.caplen,
+ libpcap->byte_swapped, buffer_start_ptr(wth->frame_buffer));
return TRUE;
}
@@ -714,8 +716,7 @@ libpcap_seek_read(wtap *wth, gint64 seek_off,
libpcap = (libpcap_t *)wth->priv;
phdr_len = pcap_process_pseudo_header(wth->random_fh, wth->file_type,
- wth->file_encap, libpcap->byte_swapped, length,
- FALSE, NULL, pseudo_header, err, err_info);
+ wth->file_encap, length, FALSE, NULL, pseudo_header, err, err_info);
if (phdr_len < 0)
return FALSE; /* error */
@@ -746,6 +747,8 @@ libpcap_seek_read(wtap *wth, gint64 seek_off,
atm_guess_lane_type(pd, length, pseudo_header);
}
}
+ pcap_read_post_process(wth->file_encap, length,
+ libpcap->byte_swapped, pd);
return TRUE;
}