Deleted Added
full compact
print-egp.c (127668) print-egp.c (146773)
1/*
2 * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such

--- 6 unchanged lines hidden (view full) ---

15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * Initial contribution from Jeff Honig (jch@MITCHELL.CIT.CORNELL.EDU).
19 */
20
21#ifndef lint
22static const char rcsid[] _U_ =
1/*
2 * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such

--- 6 unchanged lines hidden (view full) ---

15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * Initial contribution from Jeff Honig (jch@MITCHELL.CIT.CORNELL.EDU).
19 */
20
21#ifndef lint
22static const char rcsid[] _U_ =
23 "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.34.2.2 2003/11/16 08:51:18 guy Exp $ (LBL)";
23 "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.37 2005/01/12 11:19:09 hannes Exp $ (LBL)";
24#endif
25
26#ifdef HAVE_CONFIG_H
27#include "config.h"
28#endif
29
30#include <tcpdump-stdinc.h>
31

--- 177 unchanged lines hidden (view full) ---

209 putchar(')');
210 }
211 return;
212trunc:
213 fputs("[|]", stdout);
214}
215
216void
24#endif
25
26#ifdef HAVE_CONFIG_H
27#include "config.h"
28#endif
29
30#include <tcpdump-stdinc.h>
31

--- 177 unchanged lines hidden (view full) ---

209 putchar(')');
210 }
211 return;
212trunc:
213 fputs("[|]", stdout);
214}
215
216void
217egp_print(register const u_int8_t *bp)
217egp_print(register const u_int8_t *bp, register u_int length)
218{
219 register const struct egp_packet *egp;
220 register int status;
221 register int code;
222 register int type;
223
224 egp = (struct egp_packet *)bp;
218{
219 register const struct egp_packet *egp;
220 register int status;
221 register int code;
222 register int type;
223
224 egp = (struct egp_packet *)bp;
225 if (!TTEST(*egp)) {
225 if (!TTEST2(*egp, length)) {
226 printf("[|egp]");
227 return;
228 }
229 (void)printf("egp: ");
230
231 if (egp->egp_version != EGP_VERSION) {
232 printf("[version %d]", egp->egp_version);
233 return;

--- 119 unchanged lines hidden ---
226 printf("[|egp]");
227 return;
228 }
229 (void)printf("egp: ");
230
231 if (egp->egp_version != EGP_VERSION) {
232 printf("[version %d]", egp->egp_version);
233 return;

--- 119 unchanged lines hidden ---