2 * Routines for ACN packet disassembly
6 * Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
7 * Copyright (c) 2006 by Electronic Theatre Controls, Inc.
8 * Bill Florac <bflorac@etcconnect.com>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1999 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #ifndef PACKET_ACN_H__
30 #define PACKET_ACN_H__
33 #define ACN_PDU_FLAG_L 0x80
34 #define ACN_PDU_FLAG_V 0x40
35 #define ACN_PDU_FLAG_H 0x20
36 #define ACN_PDU_FLAG_D 0x10
38 #define ACN_DMP_ADT_FLAG_V 0x80 /* V = Specifies whether address is a virtual address or not. */
39 #define ACN_DMP_ADT_FLAG_R 0x40 /* R = Specifies whether address is relative to last valid address in packet or not. */
40 #define ACN_DMP_ADT_FLAG_D 0x30 /* D1, D0 = Specify non-range or range address, single data, equal size or mixed size data array */
41 #define ACN_DMP_ADT_EXTRACT_D(f) (((f) & ACN_DMP_ADT_FLAG_D) >> 4)
42 #define ACN_DMP_ADT_FLAG_X 0x0c /* X1, X0 = These bits are reserved and their values shall be set to 0 when encoded. Their values shall be ignored when decoding. */
43 #define ACN_DMP_ADT_FLAG_A 0x03 /* A1, A0 = Size of Address elements */
44 #define ACN_DMP_ADT_EXTRACT_A(f) ((f) & ACN_DMP_ADT_FLAG_A)
46 #define ACN_DMP_ADT_V_VIRTUAL 0
47 #define ACN_DMP_ADT_V_ACTUAL 1
49 #define ACN_DMP_ADT_R_ABSOLUTE 0
50 #define ACN_DMP_ADT_R_RELATIVE 1
52 #define ACN_DMP_ADT_D_NS 0
53 #define ACN_DMP_ADT_D_RS 1
54 #define ACN_DMP_ADT_D_RE 2
55 #define ACN_DMP_ADT_D_RM 3
57 #define ACN_DMP_ADT_A_1 0
58 #define ACN_DMP_ADT_A_2 1
59 #define ACN_DMP_ADT_A_4 2
60 #define ACN_DMP_ADT_A_R 3
62 #define ACN_PROTOCOL_ID_SDT 1
63 #define ACN_PROTOCOL_ID_DMP 2
64 #define ACN_PROTOCOL_ID_DMX 3
66 #define ACN_ADDR_NULL 0
67 #define ACN_ADDR_IPV4 1
68 #define ACN_ADDR_IPV6 2
69 #define ACN_ADDR_IPPORT 3
72 #define ACN_SDT_VECTOR_UNKNOWN 0
73 #define ACN_SDT_VECTOR_REL_WRAP 1
74 #define ACN_SDT_VECTOR_UNREL_WRAP 2
75 #define ACN_SDT_VECTOR_CHANNEL_PARAMS 3
76 #define ACN_SDT_VECTOR_JOIN 4
77 #define ACN_SDT_VECTOR_JOIN_REFUSE 5
78 #define ACN_SDT_VECTOR_JOIN_ACCEPT 6
79 #define ACN_SDT_VECTOR_LEAVE 7
80 #define ACN_SDT_VECTOR_LEAVING 8
81 #define ACN_SDT_VECTOR_CONNECT 9
82 #define ACN_SDT_VECTOR_CONNECT_ACCEPT 10
83 #define ACN_SDT_VECTOR_CONNECT_REFUSE 11
84 #define ACN_SDT_VECTOR_DISCONNECT 12
85 #define ACN_SDT_VECTOR_DISCONNECTING 13
86 #define ACN_SDT_VECTOR_ACK 14
87 #define ACN_SDT_VECTOR_NAK 15
88 #define ACN_SDT_VECTOR_GET_SESSION 16
89 #define ACN_SDT_VECTOR_SESSIONS 17
91 #define ACN_REFUSE_CODE_NONSPECIFIC 1
92 #define ACN_REFUSE_CODE_ILLEGAL_PARAMS 2
93 #define ACN_REFUSE_CODE_LOW_RESOURCES 3
94 #define ACN_REFUSE_CODE_ALREADY_MEMBER 4
95 #define ACN_REFUSE_CODE_BAD_ADDR_TYPE 5
96 #define ACN_REFUSE_CODE_NO_RECIP_CHAN 6
98 #define ACN_REASON_CODE_NONSPECIFIC 1
99 /*#define ACN_REASON_CODE_ 2 */
100 /*#define ACN_REASON_CODE_ 3 */
101 /*#define ACN_REASON_CODE_ 4 */
102 /*#define ACN_REASON_CODE_ 5 */
103 #define ACN_REASON_CODE_NO_RECIP_CHAN 6
104 #define ACN_REASON_CODE_CHANNEL_EXPIRED 7
105 #define ACN_REASON_CODE_LOST_SEQUENCE 8
106 #define ACN_REASON_CODE_SATURATED 9
107 #define ACN_REASON_CODE_TRANS_ADDR_CHANGING 10
108 #define ACN_REASON_CODE_ASKED_TO_LEAVE 11
109 #define ACN_REASON_CODE_NO_RECIPIENT 12
111 #define ACN_DMP_VECTOR_UNKNOWN 0
112 #define ACN_DMP_VECTOR_GET_PROPERTY 1
113 #define ACN_DMP_VECTOR_SET_PROPERTY 2
114 #define ACN_DMP_VECTOR_GET_PROPERTY_REPLY 3
115 #define ACN_DMP_VECTOR_EVENT 4
116 #define ACN_DMP_VECTOR_MAP_PROPERTY 5
117 #define ACN_DMP_VECTOR_UNMAP_PROPERTY 6
118 #define ACN_DMP_VECTOR_SUBSCRIBE 7
119 #define ACN_DMP_VECTOR_UNSUBSCRIBE 8
120 #define ACN_DMP_VECTOR_GET_PROPERTY_FAIL 9
121 #define ACN_DMP_VECTOR_SET_PROPERTY_FAIL 10
122 #define ACN_DMP_VECTOR_MAP_PROPERTY_FAIL 11
123 #define ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT 12
124 #define ACN_DMP_VECTOR_SUBSCRIBE_REJECT 13
125 #define ACN_DMP_VECTOR_ALLOCATE_MAP 14
126 #define ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY 15
127 #define ACN_DMP_VECTOR_DEALLOCATE_MAP 16
129 #define ACN_DMP_REASON_CODE_NONSPECIFIC 1
130 #define ACN_DMP_REASON_CODE_NOT_A_PROPERTY 2
131 #define ACN_DMP_REASON_CODE_WRITE_ONLY 3
132 #define ACN_DMP_REASON_CODE_NOT_WRITABLE 4
133 #define ACN_DMP_REASON_CODE_DATA_ERROR 5
134 #define ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED 6
135 #define ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE 7
136 #define ACN_DMP_REASON_CODE_PROP_NOT_MAPPABLE 8
137 #define ACN_DMP_REASON_CODE_MAP_NOT_ALLOCATED 9
138 #define ACN_DMP_REASON_CODE_SUBSCRIPTION_NOT_SUPPORTED 10
139 #define ACN_DMP_REASON_CODE_NO_SUBSCRIPTIONS_SUPPORTED 11
143 #define ACN_DMX_VECTOR 2
145 #define ACN_PREF_DMX_DISPLAY_HEX 0
146 #define ACN_PREF_DMX_DISPLAY_DEC 1
147 #define ACN_PREF_DMX_DISPLAY_PER 2
149 #define ACN_PREF_DMX_DISPLAY_20PL 0
150 #define ACN_PREF_DMX_DISPLAY_16PL 1
164 guint32 address; /* or first address */
171 #endif /* !PACKET_ACN_H */