mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 20:14:12 +08:00
add support for FRF.16 Multilink Frame-Relay (DLT_MFR)
This commit is contained in:
parent
8e01df24a4
commit
997e4c6954
@ -18,7 +18,7 @@
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.263 2005-10-20 07:43:51 hannes Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.264 2005-12-13 13:44:29 hannes Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef tcpdump_interface_h
|
||||
@ -202,6 +202,7 @@ extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
|
||||
extern void fddi_print(const u_char *, u_int, u_int);
|
||||
extern u_int fddi_if_print(const struct pcap_pkthdr *, const u_char *);
|
||||
extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *);
|
||||
extern u_int mfr_if_print(const struct pcap_pkthdr *, const u_char *);
|
||||
extern u_int fr_print(register const u_char *, u_int);
|
||||
extern u_int mfr_print(register const u_char *, u_int);
|
||||
extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
|
||||
|
20
print-fr.c
20
print-fr.c
@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.48 2005-11-13 11:53:19 guy Exp $ (LBL)";
|
||||
"@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.49 2005-12-13 13:44:30 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -324,6 +324,24 @@ fr_print(register const u_char *p, u_int length)
|
||||
|
||||
}
|
||||
|
||||
u_int
|
||||
mfr_if_print(const struct pcap_pkthdr *h, register const u_char *p)
|
||||
{
|
||||
register u_int length = h->len;
|
||||
register u_int caplen = h->caplen;
|
||||
|
||||
TCHECK2(*p, 2); /* minimum frame header length */
|
||||
|
||||
if ((length = mfr_print(p, length)) == 0)
|
||||
return (0);
|
||||
else
|
||||
return length;
|
||||
trunc:
|
||||
printf("[|mfr]");
|
||||
return caplen;
|
||||
}
|
||||
|
||||
|
||||
#define MFR_CTRL_MSG_ADD_LINK 1
|
||||
#define MFR_CTRL_MSG_ADD_LINK_ACK 2
|
||||
#define MFR_CTRL_MSG_ADD_LINK_REJ 3
|
||||
|
@ -30,7 +30,7 @@ static const char copyright[] _U_ =
|
||||
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.265 2005-12-13 08:37:22 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.266 2005-12-13 13:44:30 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -260,6 +260,9 @@ static struct printer printers[] = {
|
||||
#endif
|
||||
#ifdef DLT_JUNIPER_CHDLC
|
||||
{ juniper_chdlc_print, DLT_JUNIPER_CHDLC },
|
||||
#endif
|
||||
#ifdef DLT_MFR
|
||||
{ mfr_if_print, DLT_MFR },
|
||||
#endif
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user