forked from osmocom/wireshark
Call the capture routine for PPP-in-HDLC-like-framing (RFC 1662) the
"ppp_hdlc" capture routine. svn path=/trunk/; revision=3209
This commit is contained in:
parent
949888c04a
commit
a65579287d
|
@ -1,7 +1,7 @@
|
|||
/* capture.c
|
||||
* Routines for packet capture windows
|
||||
*
|
||||
* $Id: capture.c,v 1.144 2001/03/15 09:11:00 guy Exp $
|
||||
* $Id: capture.c,v 1.145 2001/03/30 06:15:47 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -1165,7 +1165,7 @@ pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr)
|
|||
capture_null(pd, &ld->counts);
|
||||
break;
|
||||
case WTAP_ENCAP_PPP:
|
||||
capture_ppp(pd, 0, &ld->counts);
|
||||
capture_ppp_hdlc(pd, 0, &ld->counts);
|
||||
break;
|
||||
case WTAP_ENCAP_RAW_IP:
|
||||
capture_raw(pd, &ld->counts);
|
||||
|
@ -1881,7 +1881,7 @@ capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
|
|||
capture_null(pd, &ld->counts);
|
||||
break;
|
||||
case WTAP_ENCAP_PPP:
|
||||
capture_ppp(pd, 0, &ld->counts);
|
||||
capture_ppp_hdlc(pd, 0, &ld->counts);
|
||||
break;
|
||||
case WTAP_ENCAP_RAW_IP:
|
||||
capture_raw(pd, &ld->counts);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-null.c
|
||||
* Routines for null packet disassembly
|
||||
*
|
||||
* $Id: packet-null.c,v 1.42 2001/03/30 06:10:54 guy Exp $
|
||||
* $Id: packet-null.c,v 1.43 2001/03/30 06:15:47 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -170,7 +170,7 @@ capture_null( const u_char *pd, packet_counts *ld )
|
|||
/*
|
||||
* Hand it to PPP.
|
||||
*/
|
||||
capture_ppp(pd, 0, ld);
|
||||
capture_ppp_hdlc(pd, 0, ld);
|
||||
} else {
|
||||
/*
|
||||
* Treat it as a normal DLT_NULL header.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ppp.c
|
||||
* Routines for ppp packet disassembly
|
||||
*
|
||||
* $Id: packet-ppp.c,v 1.59 2001/03/30 06:10:54 guy Exp $
|
||||
* $Id: packet-ppp.c,v 1.60 2001/03/30 06:15:47 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -678,7 +678,7 @@ fcs32(guint32 fcs,
|
|||
}
|
||||
|
||||
void
|
||||
capture_ppp( const u_char *pd, int offset, packet_counts *ld ) {
|
||||
capture_ppp_hdlc( const u_char *pd, int offset, packet_counts *ld ) {
|
||||
if (pd[0] == CHDLC_ADDR_UNICAST || pd[0] == CHDLC_ADDR_MULTICAST) {
|
||||
capture_chdlc(pd, offset, ld);
|
||||
return;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* packet-ppp.h
|
||||
*
|
||||
* $Id: packet-ppp.h,v 1.6 2000/11/29 05:16:15 gram Exp $
|
||||
* $Id: packet-ppp.h,v 1.7 2001/03/30 06:15:47 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -25,6 +25,6 @@
|
|||
#ifndef __PACKET_PPP_H__
|
||||
#define __PACKET_PPP_H__
|
||||
|
||||
void capture_ppp(const u_char *, int, packet_counts *);
|
||||
void capture_ppp_hdlc(const u_char *, int, packet_counts *);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-raw.c
|
||||
* Routines for raw packet disassembly
|
||||
*
|
||||
* $Id: packet-raw.c,v 1.25 2001/03/30 06:10:54 guy Exp $
|
||||
* $Id: packet-raw.c,v 1.26 2001/03/30 06:15:47 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -58,16 +58,16 @@ capture_raw(const u_char *pd, packet_counts *ld)
|
|||
* sometimes. This check should be removed when 2.2 is out.
|
||||
*/
|
||||
if (BYTES_ARE_IN_FRAME(0,2) && pd[0] == 0xff && pd[1] == 0x03) {
|
||||
capture_ppp(pd, 0, ld);
|
||||
capture_ppp_hdlc(pd, 0, ld);
|
||||
}
|
||||
/* The Linux ISDN driver sends a fake MAC address before the PPP header
|
||||
* on its ippp interfaces... */
|
||||
else if (BYTES_ARE_IN_FRAME(0,8) && pd[6] == 0xff && pd[7] == 0x03) {
|
||||
capture_ppp(pd, 6, ld);
|
||||
capture_ppp_hdlc(pd, 6, ld);
|
||||
}
|
||||
/* ...except when it just puts out one byte before the PPP header... */
|
||||
else if (BYTES_ARE_IN_FRAME(0,3) && pd[1] == 0xff && pd[2] == 0x03) {
|
||||
capture_ppp(pd, 1, ld);
|
||||
capture_ppp_hdlc(pd, 1, ld);
|
||||
}
|
||||
/* ...and if the connection is currently down, it sends 10 bytes of zeroes
|
||||
* instead of a fake MAC address and PPP header. */
|
||||
|
|
Loading…
Reference in New Issue