diff options
author | hannes <hannes> | 2005-12-13 13:41:39 +0000 |
---|---|---|
committer | hannes <hannes> | 2005-12-13 13:41:39 +0000 |
commit | 98a1d8cfbd094112ecbc35719bdb12c25b535203 (patch) | |
tree | d29e57364737460ded3df89dfd3a2082cb7f964d | |
parent | 8fe5fce9e47e2520d99c00dacb0eb94134d7aff9 (diff) |
add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay
-rw-r--r-- | gencode.c | 13 | ||||
-rw-r--r-- | pcap-bpf.h | 7 | ||||
-rw-r--r-- | pcap.c | 3 | ||||
-rw-r--r-- | savefile.c | 9 |
4 files changed, 28 insertions, 4 deletions
@@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.261 2005-11-17 04:49:34 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.262 2005-12-13 13:41:39 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -1081,6 +1081,17 @@ init_linktype(p) off_nl_nosnap = 0; /* no 802.2 LLC */ return; + /* + * the only BPF-interesting FRF.16 frames are non-control frames; + * Frame Relay has a variable length link-layer + * so lets start with offset 4 for now and increments later on (FIXME); + */ + case DLT_MFR: + off_linktype = -1; + off_nl = 4; + off_nl_nosnap = 0; /* XXX - for now -> no 802.2 LLC */ + return; + case DLT_APPLE_IP_OVER_IEEE1394: off_linktype = 16; off_nl = 18; @@ -37,7 +37,7 @@ * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 * - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.40 2005-08-12 19:23:31 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.41 2005-12-13 13:41:39 hannes Exp $ (LBL) */ /* @@ -606,6 +606,11 @@ struct bpf_version { #define DLT_JUNIPER_CHDLC 181 /* + * Multi Link Frame Relay (FRF.16) + */ +#define DLT_MFR 182 + +/* * The instruction encodings. */ /* instruction classes */ @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.96 2005-08-12 19:23:31 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.97 2005-12-13 13:41:39 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -378,6 +378,7 @@ static struct dlt_choice dlt_choices[] = { DLT_CHOICE(DLT_JUNIPER_PPP, "Juniper PPP"), DLT_CHOICE(DLT_JUNIPER_FRELAY, "Juniper Frame Relay"), DLT_CHOICE(DLT_JUNIPER_CHDLC, "Juniper C-HDLC"), + DLT_CHOICE(DLT_MFR, "FRF.16 Frame Relay"), DLT_CHOICE_SENTINEL }; @@ -30,7 +30,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.140 2005-08-29 21:05:05 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.141 2005-12-13 13:41:39 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -430,6 +430,11 @@ static const char rcsid[] _U_ = #define LINKTYPE_JUNIPER_FRELAY 180 #define LINKTYPE_JUNIPER_CHDLC 181 +/* + * Multi Link Frame Relay (FRF.16) + */ +#define LINKTYPE_MFR 182 + static struct linktype_map { int dlt; int linktype; @@ -635,6 +640,8 @@ static struct linktype_map { { DLT_JUNIPER_FRELAY, LINKTYPE_JUNIPER_FRELAY }, { DLT_JUNIPER_CHDLC, LINKTYPE_JUNIPER_CHDLC }, + /* Multi Link Frame Relay (FRF.16) */ + { DLT_MFR, LINKTYPE_MFR }, { -1, -1 } }; |