Add support for NetBSD DLT_PPP_SERIAL (PPP in HDLC-like framing, as per
RFC 1662, or Cisco point-to-point with HDLC framing, as per seciont 4.3.1 of RFC 1547; there's always an address and control octet at the beginning of these packets, but they're not necessarily 0xff 0x03), which we map to PCAP_ENCAP_PPP_HDLC.
This commit is contained in:
parent
7e461ddcbe
commit
8445a15c7c
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.40 2000-09-17 04:04:36 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.41 2000-09-18 05:08:02 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -321,6 +321,13 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifdef DLT_PPP_SERIAL
|
||||
case DLT_PPP_SERIAL:
|
||||
/* NetBSD sync/async serial PPP (or Cisco HDLC) */
|
||||
v = PCAP_ENCAP_PPP_HDLC;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
/*
|
||||
* We don't know what this is; we'd need to add a
|
||||
|
|
14
pcap.h
14
pcap.h
|
@ -30,7 +30,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.26 2000-09-17 04:04:39 guy Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.27 2000-09-18 05:08:02 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef lib_pcap_h
|
||||
|
@ -177,6 +177,18 @@ struct pcap_file_header {
|
|||
#define PCAP_ENCAP_IEEE802_11 105 /* IEEE 802.11 (wireless) */
|
||||
#define PCAP_ENCAP_ATM_CLIP 106 /* Linux Classical IP over ATM */
|
||||
|
||||
/*
|
||||
* PCAP_ENCAP_PPP is for use when there might, or might not, be an RFC 1662
|
||||
* PPP in HDLC-like framing header (with 0xff 0x03 before the PPP protocol
|
||||
* field) at the beginning of the packet.
|
||||
*
|
||||
* This is for use when there is always such a header; the address field
|
||||
* might be 0xff, for regular PPP, or it might be an address field for Cisco
|
||||
* point-to-point with HDLC framing as per section 4.3.1 of RFC 1547 ("Cisco
|
||||
* HDLC"). This is, for example, what you get with NetBSD's DLT_PPP_SERIAL.
|
||||
*/
|
||||
#define PCAP_ENCAP_PPP_HDLC 107 /* PPP in HDLC-like framing */
|
||||
|
||||
/*
|
||||
* Each packet in the dump file is prepended with this generic header.
|
||||
* This gets around the problem of different headers for different
|
||||
|
|
Reference in New Issue