LAN frames; it's 0 bytes for Frame Relay and 2 bytes for ATM.
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.188 2002-07-11 08:09:46 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.189 2002-07-11 08:27:03 guy Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
extern int llc_print(const u_char *, u_int, u_int, const u_char *,
const u_char *, u_short *);
extern int snap_print(const u_char *, u_int, u_int, const u_char *,
- const u_char *, u_short *, u_int32_t, u_short);
+ const u_char *, u_short *, u_int32_t, u_short, u_int);
extern void aarp_print(const u_char *, u_int);
extern void arp_print(const u_char *, u_int, u_int);
extern void atalk_print(const u_char *, u_int);
#ifndef lint
static const char rcsid[] =
- "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.1 2002-07-11 08:09:47 guy Exp $ (LBL)";
+ "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.2 2002-07-11 08:27:03 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
et = EXTRACT_16BITS(p + 3);
if (snap_print((const u_char *)(p + 5), length - 5,
caplen - 5, NULL, NULL,
- &extracted_ethertype, orgcode, et) == 0) {
+ &extracted_ethertype, orgcode, et, 0) == 0) {
/* ether_type not known, print raw packet */
if (!eflag)
fr_hdr_print(p - layer2_len, length + layer2_len);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.46 2002-07-11 08:09:47 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.47 2002-07-11 08:27:03 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
orgcode = EXTRACT_24BITS(&llc.llc_orgcode[0]);
et = EXTRACT_16BITS(&llc.llc_ethertype[0]);
+ /*
+ * XXX - what *is* the right bridge pad value here?
+ * Does anybody ever bridge one form of LAN traffic
+ * over a networking type that uses 802.2 LLC?
+ */
ret = snap_print(p, length, caplen, esrc, edst,
- extracted_ethertype, orgcode, et);
+ extracted_ethertype, orgcode, et, 2);
if (ret)
return (ret);
}
int
snap_print(const u_char *p, u_int length, u_int caplen,
const u_char *esrc, const u_char *edst, u_short *extracted_ethertype,
- u_int32_t orgcode, u_short et)
+ u_int32_t orgcode, u_short et, u_int bridge_pad)
{
register int ret;
/*
* Skip the padding.
*/
- caplen -= 2;
- length -= 2;
- p += 2;
+ caplen -= bridge_pad;
+ length -= bridge_pad;
+ p += bridge_pad;
/*
* What remains is an Ethernet packet.
* Skip the padding, but not the Access
* Control field.
*/
- caplen -= 2;
- length -= 2;
- p += 2;
+ caplen -= bridge_pad;
+ length -= bridge_pad;
+ p += bridge_pad;
/*
* What remains is an 802.5 Token Ring
/*
* Skip the padding.
*/
- caplen -= 3;
- length -= 3;
- p += 3;
+ caplen -= bridge_pad + 1;
+ length -= bridge_pad + 1;
+ p += bridge_pad + 1;
/*
* What remains is an FDDI packet.