X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/77b2a4405561467f66a3dfb0f8ce2b0eaa5ebaf9..f5c79aedbe9c52dad10a196d805718f55a2be17a:/print-cip.c diff --git a/print-cip.c b/print-cip.c index aeeae2d6..248fb5e4 100644 --- a/print-cip.c +++ b/print-cip.c @@ -22,7 +22,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.1 1999-11-21 03:52:22 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.9 2000-09-29 04:58:35 guy Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -30,59 +34,52 @@ static const char rcsid[] = #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include "interface.h" #include "addrtoname.h" +#include "ethertype.h" +#include "ether.h" const u_char *packetp; const u_char *snapend; -#define RFC1483LLC_LEN 8 +#define RFC1483LLC_LEN 8 static unsigned char rfcllc[] = { - 0xaa, /* DSAP: non-ISO */ - 0xaa, /* SSAP: non-ISO */ - 0x03, /* Ctrl: Unnumbered Information Command PDU */ - 0x00, /* OUI: EtherType */ - 0x00, - 0x00 }; + 0xaa, /* DSAP: non-ISO */ + 0xaa, /* SSAP: non-ISO */ + 0x03, /* Ctrl: Unnumbered Information Command PDU */ + 0x00, /* OUI: EtherType */ + 0x00, + 0x00 }; static inline void cip_print(register const u_char *bp, int length) { - int i; - - if (memcmp(rfcllc, bp, sizeof(rfcllc))) { - if (qflag) { - for(i=0;i