Deleted Added
full compact
print-ipx.c (127675) print-ipx.c (146778)
1/*
2 * Copyright (c) 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

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

16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * Format and print Novell IPX packets.
22 * Contributed by Brad Parker (brad@fcr.com).
23 *
1/*
2 * Copyright (c) 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

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

16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * Format and print Novell IPX packets.
22 * Contributed by Brad Parker (brad@fcr.com).
23 *
24 * $FreeBSD: head/contrib/tcpdump/print-ipx.c 127675 2004-03-31 14:57:24Z bms $
24 * $FreeBSD: head/contrib/tcpdump/print-ipx.c 146778 2005-05-29 19:09:28Z sam $
25 */
26
27#ifndef lint
28static const char rcsid[] _U_ =
25 */
26
27#ifndef lint
28static const char rcsid[] _U_ =
29 "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.34.2.2 2003/11/16 08:51:28 guy Exp $";
29 "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.40 2004/05/26 19:57:57 guy Exp $";
30#endif
31
32#ifdef HAVE_CONFIG_H
33#include "config.h"
34#endif
35
36#include <tcpdump-stdinc.h>
37

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

53/*
54 * Print IPX datagram packets.
55 */
56void
57ipx_print(const u_char *p, u_int length)
58{
59 const struct ipxHdr *ipx = (const struct ipxHdr *)p;
60
30#endif
31
32#ifdef HAVE_CONFIG_H
33#include "config.h"
34#endif
35
36#include <tcpdump-stdinc.h>
37

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

53/*
54 * Print IPX datagram packets.
55 */
56void
57ipx_print(const u_char *p, u_int length)
58{
59 const struct ipxHdr *ipx = (const struct ipxHdr *)p;
60
61 if (!eflag)
62 printf("IPX ");
63
61 TCHECK(ipx->srcSkt);
62 (void)printf("%s.%04x > ",
63 ipxaddr_string(EXTRACT_32BITS(ipx->srcNet), ipx->srcNode),
64 EXTRACT_16BITS(&ipx->srcSkt));
65
64 TCHECK(ipx->srcSkt);
65 (void)printf("%s.%04x > ",
66 ipxaddr_string(EXTRACT_32BITS(ipx->srcNet), ipx->srcNode),
67 EXTRACT_16BITS(&ipx->srcSkt));
68
66 (void)printf("%s.%04x:",
69 (void)printf("%s.%04x: ",
67 ipxaddr_string(EXTRACT_32BITS(ipx->dstNet), ipx->dstNode),
68 EXTRACT_16BITS(&ipx->dstSkt));
69
70 /* take length from ipx header */
71 TCHECK(ipx->length);
72 length = EXTRACT_16BITS(&ipx->length);
73
74 ipx_decode(ipx, (u_char *)ipx + ipxSize, length - ipxSize);

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

91void
92ipx_decode(const struct ipxHdr *ipx, const u_char *datap, u_int length)
93{
94 register u_short dstSkt;
95
96 dstSkt = EXTRACT_16BITS(&ipx->dstSkt);
97 switch (dstSkt) {
98 case IPX_SKT_NCP:
70 ipxaddr_string(EXTRACT_32BITS(ipx->dstNet), ipx->dstNode),
71 EXTRACT_16BITS(&ipx->dstSkt));
72
73 /* take length from ipx header */
74 TCHECK(ipx->length);
75 length = EXTRACT_16BITS(&ipx->length);
76
77 ipx_decode(ipx, (u_char *)ipx + ipxSize, length - ipxSize);

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

94void
95ipx_decode(const struct ipxHdr *ipx, const u_char *datap, u_int length)
96{
97 register u_short dstSkt;
98
99 dstSkt = EXTRACT_16BITS(&ipx->dstSkt);
100 switch (dstSkt) {
101 case IPX_SKT_NCP:
99 (void)printf(" ipx-ncp %d", length);
102 (void)printf("ipx-ncp %d", length);
100 break;
101 case IPX_SKT_SAP:
102 ipx_sap_print((u_short *)datap, length);
103 break;
104 case IPX_SKT_RIP:
105 ipx_rip_print((u_short *)datap, length);
106 break;
107 case IPX_SKT_NETBIOS:
103 break;
104 case IPX_SKT_SAP:
105 ipx_sap_print((u_short *)datap, length);
106 break;
107 case IPX_SKT_RIP:
108 ipx_rip_print((u_short *)datap, length);
109 break;
110 case IPX_SKT_NETBIOS:
108 (void)printf(" ipx-netbios %d", length);
111 (void)printf("ipx-netbios %d", length);
109#ifdef TCPDUMP_DO_SMB
110 ipx_netbios_print(datap, length);
111#endif
112 break;
113 case IPX_SKT_DIAGNOSTICS:
112#ifdef TCPDUMP_DO_SMB
113 ipx_netbios_print(datap, length);
114#endif
115 break;
116 case IPX_SKT_DIAGNOSTICS:
114 (void)printf(" ipx-diags %d", length);
117 (void)printf("ipx-diags %d", length);
115 break;
116 case IPX_SKT_NWLINK_DGM:
118 break;
119 case IPX_SKT_NWLINK_DGM:
117 (void)printf(" ipx-nwlink-dgm %d", length);
120 (void)printf("ipx-nwlink-dgm %d", length);
118#ifdef TCPDUMP_DO_SMB
119 ipx_netbios_print(datap, length);
120#endif
121 break;
122 case IPX_SKT_EIGRP:
121#ifdef TCPDUMP_DO_SMB
122 ipx_netbios_print(datap, length);
123#endif
124 break;
125 case IPX_SKT_EIGRP:
123 (void)printf(" ipx-eigrp %d", length);
126 eigrp_print(datap, length);
124 break;
125 default:
127 break;
128 default:
126 (void)printf(" ipx-#%x %d", dstSkt, length);
129 (void)printf("ipx-#%x %d", dstSkt, length);
127 break;
128 }
129}
130
131void
132ipx_sap_print(const u_short *ipx, u_int length)
133{
134 int command, i;

--- 82 unchanged lines hidden ---
130 break;
131 }
132}
133
134void
135ipx_sap_print(const u_short *ipx, u_int length)
136{
137 int command, i;

--- 82 unchanged lines hidden ---