Menu

#137 pcap-ng: export linktype or convert to DLT_*

Git head
closed-fixed
nobody
None
5
2013-11-20
2010-07-20
No

for classic pcap, pcap_datalink() returns the DLT_* types (linktype is converted via linktype_to_dlt when reading a packet)

for pcap-ng, pcap_datalink() retuns the LINKTYPE_* types (linktype is not converted when reading) as described here:
http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#appendixLinkTypes

Now, these constants are not exported (defined in pcap-common.c).
In order to use a generic api for reading pcap and pcap-ng, pcap_datalink() should return the DLT_* value for pcap-ng.

As a second option, the LINKTYPE_* values should be exported to a header file and a second function (pcap_linktype() or so) should be introduced to return the LINKTYPE_* values without conversion.

Discussion

  • Guy Harris

    Guy Harris - 2010-07-20
    • status: open --> closed-fixed
     
  • Guy Harris

    Guy Harris - 2010-07-20

    I've checked a fix into the trunk and 1.x branch to convert the LINKTYPE_ value to a DLT_ value in sf-pcap-ng.c.

     
  • Denis Ovsienko

    Denis Ovsienko - 2013-11-20

    Administrators of the "libpcap" SourceForge project have superseded this tracker item (formerly artifact 3032040, now bug 137) with issue 139 of the "libpcap" GitHub project.

     
MongoDB Logo MongoDB