Hey

Sorry I think you missunderstood my question. I'm actually wondering how
pcap_datalink() works......I can't seem to find where it actually gets the
link type.......

Cheers

-----Original Message-----
From: Guy Harris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 2:42 AM
To: Iain McAleer
Cc: [EMAIL PROTECTED]
Subject: Re: [tcpdump-workers] Link header size


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