4 * Copyright (c) 1988, 1989, 1990, 1993, 1994, 1995, 1996
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that: (1) source code distributions
9 * retain the above copyright notice and this paragraph in its entirety, (2)
10 * distributions including binary code include the above copyright notice and
11 * this paragraph in its entirety in the documentation or other materials
12 * provided with the distribution, and (3) all advertising materials mentioning
13 * features or use of this software display the following acknowledgement:
14 * ``This product includes software developed by the University of California,
15 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16 * the University nor the names of its contributors may be used to endorse
17 * or promote products derived from this software without specific prior
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 * AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX).
25 * @(#) Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004/05/01 09:41:50 hannes Exp (LBL)
33 #define lapShortDDP 1 /* short DDP type */
34 #define lapDDP 2 /* DDP type */
35 #define lapKLAP 'K' /* Kinetics KLAP type */
37 /* Datagram Delivery Protocol */
58 #define ddpMaxWKS 0x7F
59 #define ddpMaxData 586
60 #define ddpLengthMask 0x3FF
61 #define ddpHopShift 10
62 #define ddpSize 13 /* size of DDP header (avoid struct padding) */
64 #define ddpWKS 128 /* boundary of DDP well known sockets */
65 #define ddpRTMP 1 /* RTMP type */
66 #define ddpRTMPrequest 5 /* RTMP request type */
67 #define ddpNBP 2 /* NBP type */
68 #define ddpATP 3 /* ATP type */
69 #define ddpECHO 4 /* ECHO type */
70 #define ddpIP 22 /* IP type */
71 #define ddpARP 23 /* ARP type */
72 #define ddpEIGRP 88 /* EIGRP over Appletalk */
73 #define ddpKLAP 0x4b /* Kinetics KLAP type */
76 /* AppleTalk Transaction Protocol */
85 #define atpReqCode 0x40
86 #define atpRspCode 0x80
87 #define atpRelCode 0xC0
91 #define atpFlagMask 0x3F
92 #define atpControlMask 0xF8
94 #define atpMaxData 578
97 /* AppleTalk Echo Protocol */
100 u_int8_t echoFunction
;
104 #define echoSkt 4 /* the echoer socket */
105 #define echoSize 1 /* size of echo header */
106 #define echoRequest 1 /* echo request */
107 #define echoReply 2 /* echo request */
110 /* Name Binding Protocol */
126 #define nbpLkUpReply 0x30
129 #define nbpTupleMax 15
131 #define nbpHeaderSize 2
132 #define nbpTupleSize 5
134 #define nbpSkt 2 /* NIS */
137 /* Routing Table Maint. Protocol */
139 #define rtmpSkt 1 /* number of RTMP socket */
140 #define rtmpSize 4 /* minimum size */
141 #define rtmpTupleSize 3
144 /* Zone Information Protocol */
151 #define zipHeaderSize 2
154 #define zipTakedown 3
159 #define GetZoneList 8
162 * UDP port range used for ddp-in-udp encapsulation is 16512-16639
163 * for client sockets (128-255) and 200-327 for server sockets
164 * (0-127). We also try to recognize the pre-April 88 server
165 * socket range of 768-895.
167 #define atalk_port(p) \
168 (((unsigned)((p) - 16512) < 128) || \
169 ((unsigned)((p) - 200) < 128) || \
170 ((unsigned)((p) - 768) < 128))