fanci wrote:
As for my workaround, I didn't really hardcoded 88-8e in libpcap;
instead I modified a bit in pcap_open_live() to let it parse the "char
*ebuf" parameter in "$SAP=%d" format. If the parse succeeds, then
libpcap would take the user-supplied number for SAP. Otherwise, it uses
0 for the parameter. Thus the interface remains source-level compatible
while providing a workaround for the driver's bug :-)
...if the user's always going to be transmitting packets with the
specified Ethernet type. If the application might transmit packets with
different Ethernet types, it would have to call pcap_close() and
pcap_open_live() every time it wants to transmit a packet with a
different Ethernet type from the one it previously transmitted.
The current libpcap manpage mentions that the MAC_SRC field may be
changed in certain OS. It also mentions that filtering rule doesn't work
under certain OS. So, as you have said, it may as well add a comment
that certain device driver misinterprets the SAP field, so that
programmers using libpcap can have one more thing to check if their
program doesn't work as expected~~
I've checked into the main and x.9 branches a man page change to mention
that, so it shold appear in the next release.
One more thing: the documentation for libpcap on
http://www.tcpdump.org is not up-to-date (Updated: 21 November
2003...hmmm...). It lacks pcap_inject() and pcap_sendpacket() functions
... -,- Maybe you could get it updated to reflect this important feature :-)
Michael, what tool do you use to generate the HTML man page?
BTW, I don't really understand the following comment...
(Blah blah blah wrong From: address bounce blah blah blah fool the
duplicate message detector into not bouncing this retransmission from
the right address blah blah blah.)
Anyway this is the first time I use a mailing list so please excuse me if I did
anything wrong.... :-P
You didn't do anything wrong - I did. The address from which I'm
sending this is an alias that routes both to my work and home e-mail
addresses; that address is the one to which I'm subscribed to
tcpdump-workers. If I send mail from my work or home address, the mail
isn't delivered immediately, because I'm not subscribed to the list with
those addresses (I think Michael said I could subscribe without getting
mail delivered to those addresses - I wouldn't need that because it's
already getting sent to the other address, which forwards to my work and
home addresses - which would let me send from those addresses).
I re-sent the mail from the correct address; however, if I re-send it
without any change, the mail software for tcpdump-workers thinks it's a
duplicate message and bounces it, so I have to make a change in order to
keep the duplicaste message detector from doing that. That's what that
parenthetical note was.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.