In the comments for pcap_link_type, point to
authorGuy Harris <guy@alum.mit.edu>
Mon, 29 Jul 2013 08:37:18 +0000 (08:37 -0000)
committerGuy Harris <guy@alum.mit.edu>
Mon, 29 Jul 2013 08:37:18 +0000 (08:37 -0000)
http://www.tcpdump.org/linktypes.html for the details, rather than to
some particular OS's net/bpf.h (assuming it even has one), and speak of
it as a LINKTYPE_ value rather than a DLT_ value (in those cases where
the LINKTYPE_ value for a given link-layer header type is different from
the DLT_ value, it's the LINKTYPE_ value that should be passed to
text2pcap, as it's what gets written to the file, and those should be
the always-platform-independent LINKTYPE_ values rather than the
possibly-platform-dependent DLT_ values).

svn path=/trunk/; revision=51008

text2pcap.c

index 85044ec4312011f0871355dd580d04252f61266e..c8fe7a03f8648f790264d9eee4630acadb1c0923 100644 (file)
@@ -437,8 +437,8 @@ struct pcaprec_hdr {
     guint32 orig_len;       /* actual length of packet */
 };
 
-/* Link-layer type; see net/bpf.h for details */
-static guint32 pcap_link_type = 1;   /* Default is DLT-EN10MB */
+/* Link-layer type; see http://www.tcpdump.org/linktypes.html for details */
+static guint32 pcap_link_type = 1;   /* Default is LINKTYPE_ETHERNET */
 
 /*----------------------------------------------------------------------
  * Parse a single hex number