Jean-Louis ha scritto:
today I have found some bug on pcap-usb-linux.c
now i can try to tell you which are
removed unneeded code
Index: pcap-usb-linux.c
===================================================================
RCS file: /home/jean-louis/cvsroot/libpcap/pcap-usb-linux.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -c -r1.2 -r1.3
*** pcap-usb-linux.c 29 Oct 2008 14:17:44 -0000 1.2
--- pcap-usb-linux.c 29 Oct 2008 15:03:27 -0000 1.3
***************
*** 67,78 ****
#define USB_LINE_LEN 4096
- #define PIPE_IN 0x80
- #define PIPE_ISOCHRONOUS 0
- #define PIPE_INTERRUPT 1
- #define PIPE_CONTROL 2
- #define PIPE_BULK 3
-
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htols(s) s
#define htoll(l) l
--- 67,72 ----
***************
*** 213,218 ****
--- 207,217 ----
handle->getnonblock_op = pcap_getnonblock_fd;
handle->setnonblock_op = pcap_setnonblock_fd;
+ /*Monitor mode doesn't apply to USB devices. */
+ if (handle->opt.rfmon) {
+ return PCAP_ERROR_RFMON_NOTSUP;
+ }
+
/*get usb bus index from device name */
if (sscanf(handle->opt.source, USB_IFACE"%d", &handle->md.ifindex) != 1)
{
***************
*** 226,237 ****
handle->fd = open(full_path, O_RDONLY, 0);
if (handle->fd >= 0)
{
- if (handle->opt.rfmon) {
- /*
- * Monitor mode doesn't apply to USB devices.
- */
- return PCAP_ERROR_RFMON_NOTSUP;
- }
/* binary api is available, try to use fast mmap access */
if (usb_mmap(handle)) {
--- 225,230 ----
***************
*** 266,278 ****
handle->read_op = usb_read_linux;
}
- if (handle->opt.rfmon) {
- /*
- * Monitor mode doesn't apply to USB devices.
- */
- return PCAP_ERROR_RFMON_NOTSUP;
- }
-
/*
* "handle->fd" is a real file, so "select()" and "poll()"
* work on it.
--- 259,264 ----
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.