aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-09-04 06:40:45 +0000
committerGuy Harris <guy@alum.mit.edu>2003-09-04 06:40:45 +0000
commit4f01e65223440a194410a9dd0f6a06403ca306b1 (patch)
treebdaa267a38f46559a5c54df0d10eb71986d207c5 /wiretap/libpcap.c
parent3af28de03298629341b0fa2564c6fc74cb7b6a61 (diff)
downloadwireshark-4f01e65223440a194410a9dd0f6a06403ca306b1.tar.gz
wireshark-4f01e65223440a194410a9dd0f6a06403ca306b1.tar.bz2
wireshark-4f01e65223440a194410a9dd0f6a06403ca306b1.zip
Put in a note telling people how to add a new libpcap encapsulation
type, and telling them how it should *NOT* be done, i.e. you should ask tcpdump-workers for a new DLT_ value, you should not just pick a value on your own, and you should especially not reuse a value that's already in use! Put in comments about reserved values in the current CVS libpcap. svn path=/trunk/; revision=8367
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index 4d4c3d0fa9..9d488c6835 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -1,6 +1,6 @@
/* libpcap.c
*
- * $Id: libpcap.c,v 1.96 2003/05/15 07:14:45 guy Exp $
+ * $Id: libpcap.c,v 1.97 2003/09/04 06:40:45 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -102,6 +102,16 @@ static gboolean libpcap_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
* using them are foreign, and we don't hazard a guess as to which
* platform they came from; we could, I guess, choose the most likely
* platform).
+ *
+ * Note: if you need a new encapsulation type for libpcap files, do
+ * *N*O*T* use *ANY* of the values listed here! I.e., do *NOT*
+ * add a new encapsulation type by changing an existing entry;
+ * leave the existing entries alone.
+ *
+ * Instead, send mail to tcpdump-workers@tcpdump.org, asking for a new
+ * DLT_ value, and specifying the purpose of the new value. When you
+ * get the new DLT_ value, use that numerical value in the "dlt_value"
+ * field of "pcap_to_wtap_map[]".
*/
static const struct {
@@ -245,6 +255,27 @@ static const struct {
{ 129, WTAP_ENCAP_ARCNET_LINUX },
/*
+ * Values 130 thorugh 137 are reserved for use in Juniper
+ * hardware.
+ *
+ * 138 is reserved for Apple IP-over-IEEE 1394.
+ */
+
+ /*
+ * To repeat:
+ *
+ * If you need a new encapsulation type for libpcap files, do
+ * *N*O*T* use *ANY* of the values listed here! I.e., do *NOT*
+ * add a new encapsulation type by changing an existing entry;
+ * leave the existing entries alone.
+ *
+ * Instead, send mail to tcpdump-workers@tcpdump.org, asking for
+ * a new DLT_ value, and specifying the purpose of the new value.
+ * When you get the new DLT_ value, use that numerical value in
+ * the "dlt_value" field of "pcap_to_wtap_map[]".
+ */
+
+ /*
* The following are entries for libpcap type values that have
* different meanings on different OSes.
*
@@ -404,6 +435,21 @@ static const struct {
* purpose - hopefully nobody will do so in the future.
*/
{ 19, WTAP_ENCAP_LINUX_ATM_CLIP },
+
+ /*
+ * To repeat:
+ *
+ * If you need a new encapsulation type for libpcap files, do
+ * *N*O*T* use *ANY* of the values listed here! I.e., do *NOT*
+ * add a new encapsulation type by changing an existing entry;
+ * leave the existing entries alone.
+ *
+ * Instead, send mail to tcpdump-workers@tcpdump.org, asking for
+ * a new DLT_ value, and specifying the purpose of the new value.
+ * When you get the new DLT_ value, use that numerical value in
+ * the "dlt_value" field of "pcap_to_wtap_map[]".
+ */
+
};
#define NUM_PCAP_ENCAPS (sizeof pcap_to_wtap_map / sizeof pcap_to_wtap_map[0])