From: hannes Date: Tue, 25 Jan 2005 22:38:23 +0000 (+0000) Subject: add support for DLT_JUNIPER_{MLFR,MLPPP) X-Git-Tag: libpcap-0.9.1~94 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/b82f83587c5527c8395a5cc6f56c6b8df1358cf8 add support for DLT_JUNIPER_{MLFR,MLPPP) --- diff --git a/gencode.c b/gencode.c index 535f4a64..0c77fd95 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.216 2005-01-12 09:02:55 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.217 2005-01-25 22:38:23 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -1023,11 +1023,12 @@ init_linktype(p) off_nl_nosnap = PFLOG_HDRLEN; return; + case DLT_JUNIPER_MLFR: case DLT_JUNIPER_MLPPP: off_linktype = 4; off_nl = 4; off_nl_nosnap = -1; - break; + return; case DLT_JUNIPER_ATM1: off_linktype = 4; /* in reality variable between 4-8 */ @@ -1828,11 +1829,12 @@ gen_linktype(proto) /*NOTREACHED*/ break; + case DLT_JUNIPER_MLFR: case DLT_JUNIPER_MLPPP: case DLT_JUNIPER_ATM1: case DLT_JUNIPER_ATM2: /* just lets verify the magic number for now - - * we may have up to 6 different encapsulations on the wire + * on ATM we may have up to 6 different encapsulations on the wire * and need a lot of heuristics to figure out that the payload * might be; * @@ -5125,6 +5127,7 @@ gen_inbound(dir) } break; + case DLT_JUNIPER_MLFR: case DLT_JUNIPER_MLPPP: case DLT_JUNIPER_ATM1: case DLT_JUNIPER_ATM2: diff --git a/pcap.c b/pcap.c index 4d0a3ad1..1588f86c 100644 --- a/pcap.c +++ b/pcap.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.83 2005-01-12 09:15:05 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.84 2005-01-25 22:38:23 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -366,6 +366,8 @@ static struct dlt_choice dlt_choices[] = { DLT_CHOICE(DLT_GPF_T, "GPF-T"), DLT_CHOICE(DLT_GPF_F, "GPF-F"), DLT_CHOICE(DLT_JUNIPER_PIC_PEER, "Juniper PIC Peer"), + DLT_CHOICE(DLT_JUNIPER_MLFR, "Juniper Multi-Link Frame Relay"), + DLT_CHOICE(DLT_JUNIPER_MLPPP, "Juniper Multi-Link PPP"), DLT_CHOICE_SENTINEL };