aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-usb-linux.c
diff options
context:
space:
mode:
authorguy <guy>2008-12-23 20:13:29 +0000
committerguy <guy>2008-12-23 20:13:29 +0000
commitb9084821372f987dbc1eccec360e2f3eadb270aa (patch)
tree37dd365765e932b4cff039d204fdfab09bac253f /pcap-usb-linux.c
parent687233847f996ba6ab48322e67bf1262d7764540 (diff)
Update CHANGES for USB fixes.
Update CREDITS to give Jon Smirl credit for some of the USB fixes. Rename DLT_USB_LINUX_MMAP to DLT_USB_LINUX_MMAPPED, and declare a structure for the header of packets in DLT_USB_LINUX_MMAPPED captures.
Diffstat (limited to 'pcap-usb-linux.c')
-rw-r--r--pcap-usb-linux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c
index e8c3972..d399c75 100644
--- a/pcap-usb-linux.c
+++ b/pcap-usb-linux.c
@@ -34,7 +34,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-usb-linux.c,v 1.29 2008-12-23 19:05:26 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-usb-linux.c,v 1.30 2008-12-23 20:13:29 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -255,7 +255,7 @@ usb_activate(pcap_t* handle)
/* binary api is available, try to use fast mmap access */
if (usb_mmap(handle)) {
- handle->linktype = DLT_USB_LINUX_MMAP;
+ handle->linktype = DLT_USB_LINUX_MMAPPED;
handle->stats_op = usb_stats_linux_bin;
handle->read_op = usb_read_linux_mmap;
handle->cleanup_op = usb_cleanup_linux_mmap;
@@ -733,8 +733,8 @@ usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_ch
clen = hdr->data_len;
/* get packet info from header*/
- pkth.caplen = clen + MMAPPED_USB_HEADER_SIZE;
- pkth.len = hdr->data_len + MMAPPED_USB_HEADER_SIZE;
+ pkth.caplen = clen + sizeof(pcap_usb_header_mmapped);
+ pkth.len = hdr->data_len + sizeof(pcap_usb_header_mmapped);
pkth.ts.tv_sec = hdr->ts_sec;
pkth.ts.tv_usec = hdr->ts_usec;