On Wed, Sep 04, 2002 at 02:22:02AM +0800, Iain McAleer wrote:
> I've been looking through the pcap code but can't seem to find how you get
> the link offset?

You get it with "pcap_datalink()".

I.e., you get the link-layer type with "pcap_datalink()", and then you
compute it yourself.  Libpcap doesn't supply it for you.

Note that for some link-layer types (Token Ring and 802.11, for
example), the link-layer header is *variable length*, so there is no
value that is "the" link-layer header size; it can vary from packet to
packet.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to