Wireshark-dev: Re: [Wireshark-dev] regression: no USB packets captured

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 13 Dec 2007 23:54:39 -0800
N�meth M�rton wrote:

I don't know much about the changes, do you know any idea what could went wrong?

	M�rton N�meth

P.S.: Here is a copy of the "svn log" between the two revisions:


------------------------------------------------------------------------
r22635 | richardv | 2007-08-24 15:44:59 +0200 (p, 24 aug 2007) | 2 lines

complete the death of the h223 plugin

Unrelated to USB or capturing..

r22636 | jmayer | 2007-08-24 15:52:37 +0200 (p, 24 aug 2007) | 1 line

Revert back to old version with manually fixed get_ber_length parameters

Unrelated to USB or capturing.

r22637 | richardv | 2007-08-24 17:29:13 +0200 (p, 24 aug 2007) | 1 line

fix log msg typo

Capture-related, but it only changes a log message, not anything that matters.

r22638 | richardv | 2007-08-24 17:33:37 +0200 (p, 24 aug 2007) | 5 lines

Add some comments to the effect that capture_loop_dispatch must timeout to make
the packet batching stuff work properly.

Hence, do not block forever when doing a select() on a capture fd.

Capture-related.

r22639 | richardv | 2007-08-24 17:34:08 +0200 (p, 24 aug 2007) | 2 lines

Fix bug 1181 by always using select() on a capture fd on linux

Capture-related.

r22640 | richardv | 2007-08-24 17:45:16 +0200 (p, 24 aug 2007) | 1 line

do the fifo test on platforms where mkfifo is available

Not a change in the code, but a change in the test scripts probably related to earlier changes.

r22641 | gerald | 2007-08-24 18:08:31 +0200 (p, 24 aug 2007) | 4 lines

Clear out any remaining references to the h223 plugin.  Replace the
references to h223 in README.plugins with agentx since it's small and
no one seems to be in a hurry to move it to epan/dissectors.

Not USB or capture-related.

r22642 | richardv | 2007-08-24 18:43:42 +0200 (p, 24 aug 2007) | 4 lines

take out oid_to_subid_buf again, because joerg has put it back into packet-snmp.c.

Not USB or capture-related.

One should, in theory, be able to do a select() on the devices on which the USB capture code in libpcap reads. It might be that you can't.

However, it also appears to be the case that the "selectable file descriptor" member of the pcap_t structure gets set from the "file descriptor" member *before the "file descriptor" member gets set*! That Does Not Look Good, and could easily completely screw up doing selects on the capture fd, as you're doing selects on some random number that might not even be a valid file descriptor.

I'll figure out what needs to be fixed, and check in a fix. When that's done, try building the top-of-tree libpcap and see if that fixes it.