2 * Copyright (c) 1998-2007 The TCPDUMP project
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that: (1) source code
6 * distributions retain the above copyright notice and this paragraph
7 * in its entirety, and (2) distributions including binary code include
8 * the above copyright notice and this paragraph in its entirety in
9 * the documentation or other materials provided with the distribution.
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
11 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
12 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 * FOR A PARTICULAR PURPOSE.
15 * Original code by Hannes Gredler (hannes@juniper.net)
22 #include <tcpdump-stdinc.h>
28 #include "interface.h"
30 #include "addrtoname.h"
31 #include "ethertype.h"
34 #include "signature.h"
37 * RFC 2205 common header
40 * +-------------+-------------+-------------+-------------+
41 * | Vers | Flags| Msg Type | RSVP Checksum |
42 * +-------------+-------------+-------------+-------------+
43 * | Send_TTL | (Reserved) | RSVP Length |
44 * +-------------+-------------+-------------+-------------+
48 struct rsvp_common_header
{
49 u_int8_t version_flags
;
58 * RFC2205 object header
62 * +-------------+-------------+-------------+-------------+
63 * | Length (bytes) | Class-Num | C-Type |
64 * +-------------+-------------+-------------+-------------+
66 * // (Object contents) //
68 * +-------------+-------------+-------------+-------------+
71 struct rsvp_object_header
{
77 #define RSVP_VERSION 1
78 #define RSVP_EXTRACT_VERSION(x) (((x)&0xf0)>>4)
79 #define RSVP_EXTRACT_FLAGS(x) ((x)&0x0f)
81 #define RSVP_MSGTYPE_PATH 1
82 #define RSVP_MSGTYPE_RESV 2
83 #define RSVP_MSGTYPE_PATHERR 3
84 #define RSVP_MSGTYPE_RESVERR 4
85 #define RSVP_MSGTYPE_PATHTEAR 5
86 #define RSVP_MSGTYPE_RESVTEAR 6
87 #define RSVP_MSGTYPE_RESVCONF 7
88 #define RSVP_MSGTYPE_AGGREGATE 12
89 #define RSVP_MSGTYPE_ACK 13
90 #define RSVP_MSGTYPE_HELLO_OLD 14 /* ancient Hellos */
91 #define RSVP_MSGTYPE_SREFRESH 15
92 #define RSVP_MSGTYPE_HELLO 20
94 static const struct tok rsvp_msg_type_values
[] = {
95 { RSVP_MSGTYPE_PATH
, "Path" },
96 { RSVP_MSGTYPE_RESV
, "Resv" },
97 { RSVP_MSGTYPE_PATHERR
, "PathErr" },
98 { RSVP_MSGTYPE_RESVERR
, "ResvErr" },
99 { RSVP_MSGTYPE_PATHTEAR
, "PathTear" },
100 { RSVP_MSGTYPE_RESVTEAR
, "ResvTear" },
101 { RSVP_MSGTYPE_RESVCONF
, "ResvConf" },
102 { RSVP_MSGTYPE_AGGREGATE
, "Aggregate" },
103 { RSVP_MSGTYPE_ACK
, "Acknowledgement" },
104 { RSVP_MSGTYPE_HELLO_OLD
, "Hello (Old)" },
105 { RSVP_MSGTYPE_SREFRESH
, "Refresh" },
106 { RSVP_MSGTYPE_HELLO
, "Hello" },
110 static const struct tok rsvp_header_flag_values
[] = {
111 { 0x01, "Refresh reduction capable" }, /* rfc2961 */
115 #define RSVP_OBJ_SESSION 1 /* rfc2205 */
116 #define RSVP_OBJ_RSVP_HOP 3 /* rfc2205, rfc3473 */
117 #define RSVP_OBJ_INTEGRITY 4 /* rfc2747 */
118 #define RSVP_OBJ_TIME_VALUES 5 /* rfc2205 */
119 #define RSVP_OBJ_ERROR_SPEC 6
120 #define RSVP_OBJ_SCOPE 7
121 #define RSVP_OBJ_STYLE 8 /* rfc2205 */
122 #define RSVP_OBJ_FLOWSPEC 9 /* rfc2215 */
123 #define RSVP_OBJ_FILTERSPEC 10 /* rfc2215 */
124 #define RSVP_OBJ_SENDER_TEMPLATE 11
125 #define RSVP_OBJ_SENDER_TSPEC 12 /* rfc2215 */
126 #define RSVP_OBJ_ADSPEC 13 /* rfc2215 */
127 #define RSVP_OBJ_POLICY_DATA 14
128 #define RSVP_OBJ_CONFIRM 15 /* rfc2205 */
129 #define RSVP_OBJ_LABEL 16 /* rfc3209 */
130 #define RSVP_OBJ_LABEL_REQ 19 /* rfc3209 */
131 #define RSVP_OBJ_ERO 20 /* rfc3209 */
132 #define RSVP_OBJ_RRO 21 /* rfc3209 */
133 #define RSVP_OBJ_HELLO 22 /* rfc3209 */
134 #define RSVP_OBJ_MESSAGE_ID 23 /* rfc2961 */
135 #define RSVP_OBJ_MESSAGE_ID_ACK 24 /* rfc2961 */
136 #define RSVP_OBJ_MESSAGE_ID_LIST 25 /* rfc2961 */
137 #define RSVP_OBJ_RECOVERY_LABEL 34 /* rfc3473 */
138 #define RSVP_OBJ_UPSTREAM_LABEL 35 /* rfc3473 */
139 #define RSVP_OBJ_LABEL_SET 36 /* rfc3473 */
140 #define RSVP_OBJ_PROTECTION 37 /* rfc3473 */
141 #define RSVP_OBJ_S2L 50 /* rfc4875 */
142 #define RSVP_OBJ_DETOUR 63 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
143 #define RSVP_OBJ_CLASSTYPE 66 /* rfc4124 */
144 #define RSVP_OBJ_CLASSTYPE_OLD 125 /* draft-ietf-tewg-diff-te-proto-07 */
145 #define RSVP_OBJ_SUGGESTED_LABEL 129 /* rfc3473 */
146 #define RSVP_OBJ_ACCEPT_LABEL_SET 130 /* rfc3473 */
147 #define RSVP_OBJ_RESTART_CAPABILITY 131 /* rfc3473 */
148 #define RSVP_OBJ_NOTIFY_REQ 195 /* rfc3473 */
149 #define RSVP_OBJ_ADMIN_STATUS 196 /* rfc3473 */
150 #define RSVP_OBJ_PROPERTIES 204 /* juniper proprietary */
151 #define RSVP_OBJ_FASTREROUTE 205 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
152 #define RSVP_OBJ_SESSION_ATTRIBUTE 207 /* rfc3209 */
153 #define RSVP_OBJ_GENERALIZED_UNI 229 /* OIF RSVP extensions UNI 1.0 Signaling, Rel. 2 */
154 #define RSVP_OBJ_CALL_ID 230 /* rfc3474 */
155 #define RSVP_OBJ_CALL_OPS 236 /* rfc3474 */
157 static const struct tok rsvp_obj_values
[] = {
158 { RSVP_OBJ_SESSION
, "Session" },
159 { RSVP_OBJ_RSVP_HOP
, "RSVP Hop" },
160 { RSVP_OBJ_INTEGRITY
, "Integrity" },
161 { RSVP_OBJ_TIME_VALUES
, "Time Values" },
162 { RSVP_OBJ_ERROR_SPEC
, "Error Spec" },
163 { RSVP_OBJ_SCOPE
, "Scope" },
164 { RSVP_OBJ_STYLE
, "Style" },
165 { RSVP_OBJ_FLOWSPEC
, "Flowspec" },
166 { RSVP_OBJ_FILTERSPEC
, "FilterSpec" },
167 { RSVP_OBJ_SENDER_TEMPLATE
, "Sender Template" },
168 { RSVP_OBJ_SENDER_TSPEC
, "Sender TSpec" },
169 { RSVP_OBJ_ADSPEC
, "Adspec" },
170 { RSVP_OBJ_POLICY_DATA
, "Policy Data" },
171 { RSVP_OBJ_CONFIRM
, "Confirm" },
172 { RSVP_OBJ_LABEL
, "Label" },
173 { RSVP_OBJ_LABEL_REQ
, "Label Request" },
174 { RSVP_OBJ_ERO
, "ERO" },
175 { RSVP_OBJ_RRO
, "RRO" },
176 { RSVP_OBJ_HELLO
, "Hello" },
177 { RSVP_OBJ_MESSAGE_ID
, "Message ID" },
178 { RSVP_OBJ_MESSAGE_ID_ACK
, "Message ID Ack" },
179 { RSVP_OBJ_MESSAGE_ID_LIST
, "Message ID List" },
180 { RSVP_OBJ_RECOVERY_LABEL
, "Recovery Label" },
181 { RSVP_OBJ_UPSTREAM_LABEL
, "Upstream Label" },
182 { RSVP_OBJ_LABEL_SET
, "Label Set" },
183 { RSVP_OBJ_ACCEPT_LABEL_SET
, "Acceptable Label Set" },
184 { RSVP_OBJ_DETOUR
, "Detour" },
185 { RSVP_OBJ_CLASSTYPE
, "Class Type" },
186 { RSVP_OBJ_CLASSTYPE_OLD
, "Class Type (old)" },
187 { RSVP_OBJ_SUGGESTED_LABEL
, "Suggested Label" },
188 { RSVP_OBJ_PROPERTIES
, "Properties" },
189 { RSVP_OBJ_FASTREROUTE
, "Fast Re-Route" },
190 { RSVP_OBJ_SESSION_ATTRIBUTE
, "Session Attribute" },
191 { RSVP_OBJ_GENERALIZED_UNI
, "Generalized UNI" },
192 { RSVP_OBJ_CALL_ID
, "Call-ID" },
193 { RSVP_OBJ_CALL_OPS
, "Call Capability" },
194 { RSVP_OBJ_RESTART_CAPABILITY
, "Restart Capability" },
195 { RSVP_OBJ_NOTIFY_REQ
, "Notify Request" },
196 { RSVP_OBJ_PROTECTION
, "Protection" },
197 { RSVP_OBJ_ADMIN_STATUS
, "Administrative Status" },
198 { RSVP_OBJ_S2L
, "Sub-LSP to LSP" },
202 #define RSVP_CTYPE_IPV4 1
203 #define RSVP_CTYPE_IPV6 2
204 #define RSVP_CTYPE_TUNNEL_IPV4 7
205 #define RSVP_CTYPE_TUNNEL_IPV6 8
206 #define RSVP_CTYPE_UNI_IPV4 11 /* OIF RSVP extensions UNI 1.0 Signaling Rel. 2 */
207 #define RSVP_CTYPE_1 1
208 #define RSVP_CTYPE_2 2
209 #define RSVP_CTYPE_3 3
210 #define RSVP_CTYPE_4 4
211 #define RSVP_CTYPE_12 12
212 #define RSVP_CTYPE_13 13
213 #define RSVP_CTYPE_14 14
216 * the ctypes are not globally unique so for
217 * translating it to strings we build a table based
218 * on objects offsetted by the ctype
221 static const struct tok rsvp_ctype_values
[] = {
222 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_IPV4
, "IPv4" },
223 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_IPV6
, "IPv6" },
224 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_3
, "IPv4 plus opt. TLVs" },
225 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_4
, "IPv6 plus opt. TLVs" },
226 { 256*RSVP_OBJ_NOTIFY_REQ
+RSVP_CTYPE_IPV4
, "IPv4" },
227 { 256*RSVP_OBJ_NOTIFY_REQ
+RSVP_CTYPE_IPV6
, "IPv6" },
228 { 256*RSVP_OBJ_CONFIRM
+RSVP_CTYPE_IPV4
, "IPv4" },
229 { 256*RSVP_OBJ_CONFIRM
+RSVP_CTYPE_IPV6
, "IPv6" },
230 { 256*RSVP_OBJ_TIME_VALUES
+RSVP_CTYPE_1
, "1" },
231 { 256*RSVP_OBJ_FLOWSPEC
+RSVP_CTYPE_1
, "obsolete" },
232 { 256*RSVP_OBJ_FLOWSPEC
+RSVP_CTYPE_2
, "IntServ" },
233 { 256*RSVP_OBJ_SENDER_TSPEC
+RSVP_CTYPE_2
, "IntServ" },
234 { 256*RSVP_OBJ_ADSPEC
+RSVP_CTYPE_2
, "IntServ" },
235 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_IPV4
, "IPv4" },
236 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_IPV6
, "IPv6" },
237 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_3
, "IPv6 Flow-label" },
238 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
239 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_12
, "IPv4 P2MP LSP Tunnel" },
240 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_13
, "IPv6 P2MP LSP Tunnel" },
241 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_IPV4
, "IPv4" },
242 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_IPV6
, "IPv6" },
243 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
244 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_UNI_IPV4
, "UNI IPv4" },
245 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_13
, "IPv4 P2MP LSP Tunnel" },
246 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_14
, "IPv6 P2MP LSP Tunnel" },
247 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_IPV4
, "IPv4" },
248 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_IPV6
, "IPv6" },
249 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
250 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_12
, "IPv4 P2MP LSP Tunnel" },
251 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_13
, "IPv6 P2MP LSP Tunnel" },
252 { 256*RSVP_OBJ_MESSAGE_ID
+RSVP_CTYPE_1
, "1" },
253 { 256*RSVP_OBJ_MESSAGE_ID_ACK
+RSVP_CTYPE_1
, "Message id ack" },
254 { 256*RSVP_OBJ_MESSAGE_ID_ACK
+RSVP_CTYPE_2
, "Message id nack" },
255 { 256*RSVP_OBJ_MESSAGE_ID_LIST
+RSVP_CTYPE_1
, "1" },
256 { 256*RSVP_OBJ_STYLE
+RSVP_CTYPE_1
, "1" },
257 { 256*RSVP_OBJ_HELLO
+RSVP_CTYPE_1
, "Hello Request" },
258 { 256*RSVP_OBJ_HELLO
+RSVP_CTYPE_2
, "Hello Ack" },
259 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_1
, "without label range" },
260 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_2
, "with ATM label range" },
261 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_3
, "with FR label range" },
262 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_4
, "Generalized Label" },
263 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_1
, "Label" },
264 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
265 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
266 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_1
, "Label" },
267 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
268 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
269 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_1
, "Label" },
270 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
271 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
272 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_1
, "Label" },
273 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
274 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
275 { 256*RSVP_OBJ_ERO
+RSVP_CTYPE_IPV4
, "IPv4" },
276 { 256*RSVP_OBJ_RRO
+RSVP_CTYPE_IPV4
, "IPv4" },
277 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_IPV4
, "IPv4" },
278 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_IPV6
, "IPv6" },
279 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_3
, "IPv4 plus opt. TLVs" },
280 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_4
, "IPv6 plus opt. TLVs" },
281 { 256*RSVP_OBJ_RESTART_CAPABILITY
+RSVP_CTYPE_1
, "IPv4" },
282 { 256*RSVP_OBJ_SESSION_ATTRIBUTE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
283 { 256*RSVP_OBJ_FASTREROUTE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" }, /* old style*/
284 { 256*RSVP_OBJ_FASTREROUTE
+RSVP_CTYPE_1
, "1" }, /* new style */
285 { 256*RSVP_OBJ_DETOUR
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
286 { 256*RSVP_OBJ_PROPERTIES
+RSVP_CTYPE_1
, "1" },
287 { 256*RSVP_OBJ_ADMIN_STATUS
+RSVP_CTYPE_1
, "1" },
288 { 256*RSVP_OBJ_CLASSTYPE
+RSVP_CTYPE_1
, "1" },
289 { 256*RSVP_OBJ_CLASSTYPE_OLD
+RSVP_CTYPE_1
, "1" },
290 { 256*RSVP_OBJ_LABEL_SET
+RSVP_CTYPE_1
, "1" },
291 { 256*RSVP_OBJ_GENERALIZED_UNI
+RSVP_CTYPE_1
, "1" },
292 { 256*RSVP_OBJ_S2L
+RSVP_CTYPE_IPV4
, "IPv4 sub-LSP" },
293 { 256*RSVP_OBJ_S2L
+RSVP_CTYPE_IPV6
, "IPv6 sub-LSP" },
297 struct rsvp_obj_integrity_t
{
301 u_int8_t sequence
[8];
305 static const struct tok rsvp_obj_integrity_flag_values
[] = {
306 { 0x80, "Handshake" },
310 struct rsvp_obj_frr_t
{
315 u_int8_t bandwidth
[4];
316 u_int8_t include_any
[4];
317 u_int8_t exclude_any
[4];
318 u_int8_t include_all
[4];
322 #define RSVP_OBJ_XRO_MASK_SUBOBJ(x) ((x)&0x7f)
323 #define RSVP_OBJ_XRO_MASK_LOOSE(x) ((x)&0x80)
325 #define RSVP_OBJ_XRO_RES 0
326 #define RSVP_OBJ_XRO_IPV4 1
327 #define RSVP_OBJ_XRO_IPV6 2
328 #define RSVP_OBJ_XRO_LABEL 3
329 #define RSVP_OBJ_XRO_ASN 32
330 #define RSVP_OBJ_XRO_MPLS 64
332 static const struct tok rsvp_obj_xro_values
[] = {
333 { RSVP_OBJ_XRO_RES
, "Reserved" },
334 { RSVP_OBJ_XRO_IPV4
, "IPv4 prefix" },
335 { RSVP_OBJ_XRO_IPV6
, "IPv6 prefix" },
336 { RSVP_OBJ_XRO_LABEL
, "Label" },
337 { RSVP_OBJ_XRO_ASN
, "Autonomous system number" },
338 { RSVP_OBJ_XRO_MPLS
, "MPLS label switched path termination" },
342 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07.txt */
343 static const struct tok rsvp_obj_rro_flag_values
[] = {
344 { 0x01, "Local protection available" },
345 { 0x02, "Local protection in use" },
346 { 0x04, "Bandwidth protection" },
347 { 0x08, "Node protection" },
352 static const struct tok rsvp_obj_rro_label_flag_values
[] = {
357 static const struct tok rsvp_resstyle_values
[] = {
358 { 17, "Wildcard Filter" },
359 { 10, "Fixed Filter" },
360 { 18, "Shared Explicit" },
364 #define RSVP_OBJ_INTSERV_GUARANTEED_SERV 2
365 #define RSVP_OBJ_INTSERV_CONTROLLED_LOAD 5
367 static const struct tok rsvp_intserv_service_type_values
[] = {
368 { 1, "Default/Global Information" },
369 { RSVP_OBJ_INTSERV_GUARANTEED_SERV
, "Guaranteed Service" },
370 { RSVP_OBJ_INTSERV_CONTROLLED_LOAD
, "Controlled Load" },
374 static const struct tok rsvp_intserv_parameter_id_values
[] = {
376 { 6, "Path b/w estimate" },
377 { 8, "Minimum path latency" },
378 { 10, "Composed MTU" },
379 { 127, "Token Bucket TSpec" },
380 { 130, "Guaranteed Service RSpec" },
381 { 133, "End-to-end composed value for C" },
382 { 134, "End-to-end composed value for D" },
383 { 135, "Since-last-reshaping point composed C" },
384 { 136, "Since-last-reshaping point composed D" },
388 static const struct tok rsvp_session_attribute_flag_values
[] = {
389 { 0x01, "Local Protection" },
390 { 0x02, "Label Recording" },
391 { 0x04, "SE Style" },
392 { 0x08, "Bandwidth protection" }, /* RFC4090 */
393 { 0x10, "Node protection" }, /* RFC4090 */
397 static const struct tok rsvp_obj_prop_tlv_values
[] = {
399 { 0x02, "Metric 1" },
400 { 0x04, "Metric 2" },
401 { 0x08, "CCC Status" },
402 { 0x10, "Path Type" },
406 #define RSVP_OBJ_ERROR_SPEC_CODE_ROUTING 24
407 #define RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY 25
408 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 28
409 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD 125
411 static const struct tok rsvp_obj_error_code_values
[] = {
412 { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
, "Routing Problem" },
413 { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY
, "Notify Error" },
414 { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE
, "Diffserv TE Error" },
415 { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD
, "Diffserv TE Error (Old)" },
419 static const struct tok rsvp_obj_error_code_routing_values
[] = {
420 { 1, "Bad EXPLICIT_ROUTE object" },
421 { 2, "Bad strict node" },
422 { 3, "Bad loose node" },
423 { 4, "Bad initial subobject" },
424 { 5, "No route available toward destination" },
425 { 6, "Unacceptable label value" },
426 { 7, "RRO indicated routing loops" },
427 { 8, "non-RSVP-capable router in the path" },
428 { 9, "MPLS label allocation failure" },
429 { 10, "Unsupported L3PID" },
433 static const struct tok rsvp_obj_error_code_diffserv_te_values
[] = {
434 { 1, "Unexpected CT object" },
435 { 2, "Unsupported CT" },
436 { 3, "Invalid CT value" },
437 { 4, "CT/setup priority do not form a configured TE-Class" },
438 { 5, "CT/holding priority do not form a configured TE-Class" },
439 { 6, "CT/setup priority and CT/holding priority do not form a configured TE-Class" },
440 { 7, "Inconsistency between signaled PSC and signaled CT" },
441 { 8, "Inconsistency between signaled PHBs and signaled CT" },
445 /* rfc3473 / rfc 3471 */
446 static const struct tok rsvp_obj_admin_status_flag_values
[] = {
447 { 0x80000000, "Reflect" },
448 { 0x00000004, "Testing" },
449 { 0x00000002, "Admin-down" },
450 { 0x00000001, "Delete-in-progress" },
454 /* label set actions - rfc3471 */
455 #define LABEL_SET_INCLUSIVE_LIST 0
456 #define LABEL_SET_EXCLUSIVE_LIST 1
457 #define LABEL_SET_INCLUSIVE_RANGE 2
458 #define LABEL_SET_EXCLUSIVE_RANGE 3
460 static const struct tok rsvp_obj_label_set_action_values
[] = {
461 { LABEL_SET_INCLUSIVE_LIST
, "Inclusive list" },
462 { LABEL_SET_EXCLUSIVE_LIST
, "Exclusive list" },
463 { LABEL_SET_INCLUSIVE_RANGE
, "Inclusive range" },
464 { LABEL_SET_EXCLUSIVE_RANGE
, "Exclusive range" },
468 /* OIF RSVP extensions UNI 1.0 Signaling, release 2 */
469 #define RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS 1
470 #define RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS 2
471 #define RSVP_GEN_UNI_SUBOBJ_DIVERSITY 3
472 #define RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL 4
473 #define RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL 5
475 static const struct tok rsvp_obj_generalized_uni_values
[] = {
476 { RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS
, "Source TNA address" },
477 { RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS
, "Destination TNA address" },
478 { RSVP_GEN_UNI_SUBOBJ_DIVERSITY
, "Diversity" },
479 { RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL
, "Egress label" },
480 { RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL
, "Service level" },
484 static int rsvp_intserv_print(const u_char
*, u_short
);
487 * this is a dissector for all the intserv defined
488 * specs as defined per rfc2215
489 * it is called from various rsvp objects;
490 * returns the amount of bytes being processed
493 rsvp_intserv_print(const u_char
*tptr
, u_short obj_tlen
) {
495 int parameter_id
,parameter_length
;
503 parameter_id
= *(tptr
);
504 parameter_length
= EXTRACT_16BITS(tptr
+2)<<2; /* convert wordcount to bytecount */
506 printf("\n\t Parameter ID: %s (%u), length: %u, Flags: [0x%02x]",
507 tok2str(rsvp_intserv_parameter_id_values
,"unknown",parameter_id
),
512 if (obj_tlen
< parameter_length
+4)
514 switch(parameter_id
) { /* parameter_id */
518 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
519 * | 4 (e) | (f) | 1 (g) |
520 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
521 * | IS hop cnt (32-bit unsigned integer) |
522 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
524 if (parameter_length
== 4)
525 printf("\n\t\tIS hop count: %u", EXTRACT_32BITS(tptr
+4));
530 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
531 * | 6 (h) | (i) | 1 (j) |
532 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
533 * | Path b/w estimate (32-bit IEEE floating point number) |
534 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
536 if (parameter_length
== 4) {
537 bw
.i
= EXTRACT_32BITS(tptr
+4);
538 printf("\n\t\tPath b/w estimate: %.10g Mbps", bw
.f
/125000);
544 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
545 * | 8 (k) | (l) | 1 (m) |
546 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
547 * | Minimum path latency (32-bit integer) |
548 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
550 if (parameter_length
== 4) {
551 printf("\n\t\tMinimum path latency: ");
552 if (EXTRACT_32BITS(tptr
+4) == 0xffffffff)
553 printf("don't care");
555 printf("%u", EXTRACT_32BITS(tptr
+4));
562 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
563 * | 10 (n) | (o) | 1 (p) |
564 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
565 * | Composed MTU (32-bit unsigned integer) |
566 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
568 if (parameter_length
== 4)
569 printf("\n\t\tComposed MTU: %u bytes", EXTRACT_32BITS(tptr
+4));
573 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
574 * | 127 (e) | 0 (f) | 5 (g) |
575 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
576 * | Token Bucket Rate [r] (32-bit IEEE floating point number) |
577 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
578 * | Token Bucket Size [b] (32-bit IEEE floating point number) |
579 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
580 * | Peak Data Rate [p] (32-bit IEEE floating point number) |
581 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
582 * | Minimum Policed Unit [m] (32-bit integer) |
583 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
584 * | Maximum Packet Size [M] (32-bit integer) |
585 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
588 if (parameter_length
== 20) {
589 bw
.i
= EXTRACT_32BITS(tptr
+4);
590 printf("\n\t\tToken Bucket Rate: %.10g Mbps", bw
.f
/125000);
591 bw
.i
= EXTRACT_32BITS(tptr
+8);
592 printf("\n\t\tToken Bucket Size: %.10g bytes", bw
.f
);
593 bw
.i
= EXTRACT_32BITS(tptr
+12);
594 printf("\n\t\tPeak Data Rate: %.10g Mbps", bw
.f
/125000);
595 printf("\n\t\tMinimum Policed Unit: %u bytes", EXTRACT_32BITS(tptr
+16));
596 printf("\n\t\tMaximum Packet Size: %u bytes", EXTRACT_32BITS(tptr
+20));
602 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
603 * | 130 (h) | 0 (i) | 2 (j) |
604 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
605 * | Rate [R] (32-bit IEEE floating point number) |
606 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
607 * | Slack Term [S] (32-bit integer) |
608 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
611 if (parameter_length
== 8) {
612 bw
.i
= EXTRACT_32BITS(tptr
+4);
613 printf("\n\t\tRate: %.10g Mbps", bw
.f
/125000);
614 printf("\n\t\tSlack Term: %u", EXTRACT_32BITS(tptr
+8));
622 if (parameter_length
== 4)
623 printf("\n\t\tValue: %u", EXTRACT_32BITS(tptr
+4));
628 print_unknown_data(gndo
,tptr
+4,"\n\t\t",parameter_length
);
630 return (parameter_length
+4); /* header length 4 bytes */
634 rsvp_obj_print (const u_char
*pptr
635 #ifndef HAVE_LIBCRYPTO
639 #ifndef HAVE_LIBCRYPTO
642 , const u_char
*tptr
,
643 const char *ident
, u_int tlen
) {
645 const struct rsvp_object_header
*rsvp_obj_header
;
646 const u_char
*obj_tptr
;
648 const struct rsvp_obj_integrity_t
*rsvp_obj_integrity
;
649 const struct rsvp_obj_frr_t
*rsvp_obj_frr
;
652 u_short rsvp_obj_len
,rsvp_obj_ctype
,obj_tlen
,intserv_serv_tlen
;
653 int hexdump
,processed
,padbytes
,error_code
,error_value
,i
,sigcheck
;
660 u_int action
, subchannel
;
662 while(tlen
>=sizeof(struct rsvp_object_header
)) {
663 /* did we capture enough for fully decoding the object header ? */
664 if (!TTEST2(*tptr
, sizeof(struct rsvp_object_header
)))
667 rsvp_obj_header
= (const struct rsvp_object_header
*)tptr
;
668 rsvp_obj_len
=EXTRACT_16BITS(rsvp_obj_header
->length
);
669 rsvp_obj_ctype
=rsvp_obj_header
->ctype
;
671 if(rsvp_obj_len
% 4) {
672 printf("%sERROR: object header size %u not a multiple of 4", ident
, rsvp_obj_len
);
675 if(rsvp_obj_len
< sizeof(struct rsvp_object_header
)) {
676 printf("%sERROR: object header too short %u < %lu", ident
, rsvp_obj_len
,
677 (unsigned long)sizeof(const struct rsvp_object_header
));
681 printf("%s%s Object (%u) Flags: [%s",
683 tok2str(rsvp_obj_values
,
685 rsvp_obj_header
->class_num
),
686 rsvp_obj_header
->class_num
,
687 ((rsvp_obj_header
->class_num
)&0x80) ? "ignore" : "reject");
689 if (rsvp_obj_header
->class_num
> 128)
691 ((rsvp_obj_header
->class_num
)&0x40) ? "and forward" : "silently");
693 printf(" if unknown], Class-Type: %s (%u), length: %u",
694 tok2str(rsvp_ctype_values
,
696 ((rsvp_obj_header
->class_num
)<<8)+rsvp_obj_ctype
),
700 if(tlen
< rsvp_obj_len
) {
701 printf("%sERROR: object goes past end of objects TLV", ident
);
705 obj_tptr
=tptr
+sizeof(struct rsvp_object_header
);
706 obj_tlen
=rsvp_obj_len
-sizeof(struct rsvp_object_header
);
708 /* did we capture enough for fully decoding the object ? */
709 if (!TTEST2(*tptr
, rsvp_obj_len
))
713 switch(rsvp_obj_header
->class_num
) {
714 case RSVP_OBJ_SESSION
:
715 switch(rsvp_obj_ctype
) {
716 case RSVP_CTYPE_IPV4
:
719 printf("%s IPv4 DestAddress: %s, Protocol ID: 0x%02x",
721 ipaddr_string(obj_tptr
),
722 *(obj_tptr
+sizeof(struct in_addr
)));
723 printf("%s Flags: [0x%02x], DestPort %u",
726 EXTRACT_16BITS(obj_tptr
+6));
731 case RSVP_CTYPE_IPV6
:
734 printf("%s IPv6 DestAddress: %s, Protocol ID: 0x%02x",
736 ip6addr_string(obj_tptr
),
737 *(obj_tptr
+sizeof(struct in6_addr
)));
738 printf("%s Flags: [0x%02x], DestPort %u",
740 *(obj_tptr
+sizeof(struct in6_addr
)+1),
741 EXTRACT_16BITS(obj_tptr
+sizeof(struct in6_addr
)+2));
746 case RSVP_CTYPE_TUNNEL_IPV6
:
749 printf("%s IPv6 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
751 ip6addr_string(obj_tptr
),
752 EXTRACT_16BITS(obj_tptr
+18),
753 ip6addr_string(obj_tptr
+20));
758 case RSVP_CTYPE_14
: /* IPv6 p2mp LSP Tunnel */
761 printf("%s IPv6 P2MP LSP ID: 0x%08x, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
763 EXTRACT_32BITS(obj_tptr
),
764 EXTRACT_16BITS(obj_tptr
+6),
765 ip6addr_string(obj_tptr
+8));
770 case RSVP_CTYPE_13
: /* IPv4 p2mp LSP Tunnel */
773 printf("%s IPv4 P2MP LSP ID: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
775 ipaddr_string(obj_tptr
),
776 EXTRACT_16BITS(obj_tptr
+6),
777 ipaddr_string(obj_tptr
+8));
781 case RSVP_CTYPE_TUNNEL_IPV4
:
782 case RSVP_CTYPE_UNI_IPV4
:
785 printf("%s IPv4 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
787 ipaddr_string(obj_tptr
),
788 EXTRACT_16BITS(obj_tptr
+6),
789 ipaddr_string(obj_tptr
+8));
798 case RSVP_OBJ_CONFIRM
:
799 switch(rsvp_obj_ctype
) {
800 case RSVP_CTYPE_IPV4
:
801 if (obj_tlen
< sizeof(struct in_addr
))
803 printf("%s IPv4 Receiver Address: %s",
805 ipaddr_string(obj_tptr
));
806 obj_tlen
-=sizeof(struct in_addr
);
807 obj_tptr
+=sizeof(struct in_addr
);
810 case RSVP_CTYPE_IPV6
:
811 if (obj_tlen
< sizeof(struct in6_addr
))
813 printf("%s IPv6 Receiver Address: %s",
815 ip6addr_string(obj_tptr
));
816 obj_tlen
-=sizeof(struct in6_addr
);
817 obj_tptr
+=sizeof(struct in6_addr
);
825 case RSVP_OBJ_NOTIFY_REQ
:
826 switch(rsvp_obj_ctype
) {
827 case RSVP_CTYPE_IPV4
:
828 if (obj_tlen
< sizeof(struct in_addr
))
830 printf("%s IPv4 Notify Node Address: %s",
832 ipaddr_string(obj_tptr
));
833 obj_tlen
-=sizeof(struct in_addr
);
834 obj_tptr
+=sizeof(struct in_addr
);
837 case RSVP_CTYPE_IPV6
:
838 if (obj_tlen
< sizeof(struct in6_addr
))
840 printf("%s IPv6 Notify Node Address: %s",
842 ip6addr_string(obj_tptr
));
843 obj_tlen
-=sizeof(struct in6_addr
);
844 obj_tptr
+=sizeof(struct in6_addr
);
852 case RSVP_OBJ_SUGGESTED_LABEL
: /* fall through */
853 case RSVP_OBJ_UPSTREAM_LABEL
: /* fall through */
854 case RSVP_OBJ_RECOVERY_LABEL
: /* fall through */
856 switch(rsvp_obj_ctype
) {
858 while(obj_tlen
>= 4 ) {
859 printf("%s Label: %u", ident
, EXTRACT_32BITS(obj_tptr
));
867 printf("%s Generalized Label: %u",
869 EXTRACT_32BITS(obj_tptr
));
876 printf("%s Waveband ID: %u%s Start Label: %u, Stop Label: %u",
878 EXTRACT_32BITS(obj_tptr
),
880 EXTRACT_32BITS(obj_tptr
+4),
881 EXTRACT_32BITS(obj_tptr
+8));
891 switch(rsvp_obj_ctype
) {
895 printf("%s Reservation Style: %s, Flags: [0x%02x]",
897 tok2str(rsvp_resstyle_values
,
899 EXTRACT_24BITS(obj_tptr
+1)),
909 case RSVP_OBJ_SENDER_TEMPLATE
:
910 switch(rsvp_obj_ctype
) {
911 case RSVP_CTYPE_IPV4
:
914 printf("%s Source Address: %s, Source Port: %u",
916 ipaddr_string(obj_tptr
),
917 EXTRACT_16BITS(obj_tptr
+6));
922 case RSVP_CTYPE_IPV6
:
925 printf("%s Source Address: %s, Source Port: %u",
927 ip6addr_string(obj_tptr
),
928 EXTRACT_16BITS(obj_tptr
+18));
932 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
935 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
936 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
938 ip6addr_string(obj_tptr
),
939 EXTRACT_16BITS(obj_tptr
+18),
941 ip6addr_string(obj_tptr
+20),
942 EXTRACT_16BITS(obj_tptr
+38));
947 case RSVP_CTYPE_TUNNEL_IPV4
:
950 printf("%s IPv4 Tunnel Sender Address: %s, LSP-ID: 0x%04x",
952 ipaddr_string(obj_tptr
),
953 EXTRACT_16BITS(obj_tptr
+6));
957 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
960 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
961 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
963 ipaddr_string(obj_tptr
),
964 EXTRACT_16BITS(obj_tptr
+6),
966 ipaddr_string(obj_tptr
+8),
967 EXTRACT_16BITS(obj_tptr
+12));
976 case RSVP_OBJ_LABEL_REQ
:
977 switch(rsvp_obj_ctype
) {
979 while(obj_tlen
>= 4 ) {
980 printf("%s L3 Protocol ID: %s",
982 tok2str(ethertype_values
,
983 "Unknown Protocol (0x%04x)",
984 EXTRACT_16BITS(obj_tptr
+2)));
992 printf("%s L3 Protocol ID: %s",
994 tok2str(ethertype_values
,
995 "Unknown Protocol (0x%04x)",
996 EXTRACT_16BITS(obj_tptr
+2)));
997 printf(",%s merge capability",((*(obj_tptr
+4))&0x80) ? "no" : "" );
998 printf("%s Minimum VPI/VCI: %u/%u",
1000 (EXTRACT_16BITS(obj_tptr
+4))&0xfff,
1001 (EXTRACT_16BITS(obj_tptr
+6))&0xfff);
1002 printf("%s Maximum VPI/VCI: %u/%u",
1004 (EXTRACT_16BITS(obj_tptr
+8))&0xfff,
1005 (EXTRACT_16BITS(obj_tptr
+10))&0xfff);
1012 printf("%s L3 Protocol ID: %s",
1014 tok2str(ethertype_values
,
1015 "Unknown Protocol (0x%04x)",
1016 EXTRACT_16BITS(obj_tptr
+2)));
1017 printf("%s Minimum/Maximum DLCI: %u/%u, %s%s bit DLCI",
1019 (EXTRACT_32BITS(obj_tptr
+4))&0x7fffff,
1020 (EXTRACT_32BITS(obj_tptr
+8))&0x7fffff,
1021 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 0 ) ? "10" : "",
1022 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 2 ) ? "23" : "");
1029 printf("%s LSP Encoding Type: %s (%u)",
1031 tok2str(gmpls_encoding_values
,
1035 printf("%s Switching Type: %s (%u), Payload ID: %s (0x%04x)",
1037 tok2str(gmpls_switch_cap_values
,
1041 tok2str(gmpls_payload_values
,
1043 EXTRACT_16BITS(obj_tptr
+2)),
1044 EXTRACT_16BITS(obj_tptr
+2));
1055 switch(rsvp_obj_ctype
) {
1056 case RSVP_CTYPE_IPV4
:
1057 while(obj_tlen
>= 4 ) {
1058 printf("%s Subobject Type: %s, length %u",
1060 tok2str(rsvp_obj_xro_values
,
1062 RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)),
1065 if (*(obj_tptr
+1) == 0) { /* prevent infinite loops */
1066 printf("%s ERROR: zero length ERO subtype",ident
);
1070 switch(RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)) {
1071 case RSVP_OBJ_XRO_IPV4
:
1072 printf(", %s, %s/%u, Flags: [%s]",
1073 RSVP_OBJ_XRO_MASK_LOOSE(*obj_tptr
) ? "Loose" : "Strict",
1074 ipaddr_string(obj_tptr
+2),
1076 bittok2str(rsvp_obj_rro_flag_values
,
1078 *(obj_tptr
+7))); /* rfc3209 says that this field is rsvd. */
1080 case RSVP_OBJ_XRO_LABEL
:
1081 printf(", Flags: [%s] (%#x), Class-Type: %s (%u), %u",
1082 bittok2str(rsvp_obj_rro_label_flag_values
,
1086 tok2str(rsvp_ctype_values
,
1088 *(obj_tptr
+3) + 256*RSVP_OBJ_RRO
),
1090 EXTRACT_32BITS(obj_tptr
+4));
1092 obj_tlen
-=*(obj_tptr
+1);
1093 obj_tptr
+=*(obj_tptr
+1);
1101 case RSVP_OBJ_HELLO
:
1102 switch(rsvp_obj_ctype
) {
1107 printf("%s Source Instance: 0x%08x, Destination Instance: 0x%08x",
1109 EXTRACT_32BITS(obj_tptr
),
1110 EXTRACT_32BITS(obj_tptr
+4));
1119 case RSVP_OBJ_RESTART_CAPABILITY
:
1120 switch(rsvp_obj_ctype
) {
1124 printf("%s Restart Time: %ums, Recovery Time: %ums",
1126 EXTRACT_32BITS(obj_tptr
),
1127 EXTRACT_32BITS(obj_tptr
+4));
1136 case RSVP_OBJ_SESSION_ATTRIBUTE
:
1137 switch(rsvp_obj_ctype
) {
1138 case RSVP_CTYPE_TUNNEL_IPV4
:
1141 namelen
= *(obj_tptr
+3);
1142 if (obj_tlen
< 4+namelen
)
1144 printf("%s Session Name: ", ident
);
1145 for (i
= 0; i
< namelen
; i
++)
1146 safeputchar(*(obj_tptr
+4+i
));
1147 printf("%s Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
1151 bittok2str(rsvp_session_attribute_flag_values
,
1155 obj_tlen
-=4+*(obj_tptr
+3);
1156 obj_tptr
+=4+*(obj_tptr
+3);
1163 case RSVP_OBJ_GENERALIZED_UNI
:
1164 switch(rsvp_obj_ctype
) {
1165 int subobj_type
,af
,subobj_len
,total_subobj_len
;
1172 /* read variable length subobjects */
1173 total_subobj_len
= obj_tlen
;
1174 while(total_subobj_len
> 0) {
1175 subobj_len
= EXTRACT_16BITS(obj_tptr
);
1176 subobj_type
= (EXTRACT_16BITS(obj_tptr
+2))>>8;
1177 af
= (EXTRACT_16BITS(obj_tptr
+2))&0x00FF;
1179 printf("%s Subobject Type: %s (%u), AF: %s (%u), length: %u",
1181 tok2str(rsvp_obj_generalized_uni_values
, "Unknown", subobj_type
),
1183 tok2str(af_values
, "Unknown", af
), af
,
1186 switch(subobj_type
) {
1187 case RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS
:
1188 case RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS
:
1194 printf("%s UNI IPv4 TNA address: %s",
1195 ident
, ipaddr_string(obj_tptr
+4));
1199 if (subobj_len
< 20)
1201 printf("%s UNI IPv6 TNA address: %s",
1202 ident
, ip6addr_string(obj_tptr
+4));
1207 /* unless we have a TLV parser lets just hexdump */
1214 case RSVP_GEN_UNI_SUBOBJ_DIVERSITY
:
1216 /* unless we have a TLV parser lets just hexdump */
1221 case RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL
:
1222 if (subobj_len
< 16) {
1226 printf("%s U-bit: %x, Label type: %u, Logical port id: %u, Label: %u",
1228 ((EXTRACT_32BITS(obj_tptr
+4))>>31),
1229 ((EXTRACT_32BITS(obj_tptr
+4))&0xFF),
1230 EXTRACT_32BITS(obj_tptr
+8),
1231 EXTRACT_32BITS(obj_tptr
+12));
1234 case RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL
:
1235 if (subobj_len
< 8) {
1239 printf("%s Service level: %u",
1240 ident
, (EXTRACT_32BITS(obj_tptr
+4))>>24);
1247 total_subobj_len
-=subobj_len
;
1248 obj_tptr
+=subobj_len
;
1249 obj_tlen
+=subobj_len
;
1252 if (total_subobj_len
) {
1253 /* unless we have a TLV parser lets just hexdump */
1263 case RSVP_OBJ_RSVP_HOP
:
1264 switch(rsvp_obj_ctype
) {
1265 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1266 case RSVP_CTYPE_IPV4
:
1269 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1271 ipaddr_string(obj_tptr
),
1272 EXTRACT_32BITS(obj_tptr
+4));
1276 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1279 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1280 case RSVP_CTYPE_IPV6
:
1283 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1285 ip6addr_string(obj_tptr
),
1286 EXTRACT_32BITS(obj_tptr
+16));
1289 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1297 case RSVP_OBJ_TIME_VALUES
:
1298 switch(rsvp_obj_ctype
) {
1302 printf("%s Refresh Period: %ums",
1304 EXTRACT_32BITS(obj_tptr
));
1313 /* those three objects do share the same semantics */
1314 case RSVP_OBJ_SENDER_TSPEC
:
1315 case RSVP_OBJ_ADSPEC
:
1316 case RSVP_OBJ_FLOWSPEC
:
1317 switch(rsvp_obj_ctype
) {
1321 printf("%s Msg-Version: %u, length: %u",
1323 (*obj_tptr
& 0xf0) >> 4,
1324 EXTRACT_16BITS(obj_tptr
+2)<<2);
1325 obj_tptr
+=4; /* get to the start of the service header */
1328 while (obj_tlen
>= 4) {
1329 intserv_serv_tlen
=EXTRACT_16BITS(obj_tptr
+2)<<2;
1330 printf("%s Service Type: %s (%u), break bit %s set, Service length: %u",
1332 tok2str(rsvp_intserv_service_type_values
,"unknown",*(obj_tptr
)),
1334 (*(obj_tptr
+1)&0x80) ? "" : "not",
1337 obj_tptr
+=4; /* get to the start of the parameter list */
1340 while (intserv_serv_tlen
>=4) {
1341 processed
= rsvp_intserv_print(obj_tptr
, obj_tlen
);
1344 obj_tlen
-=processed
;
1345 intserv_serv_tlen
-=processed
;
1346 obj_tptr
+=processed
;
1355 case RSVP_OBJ_FILTERSPEC
:
1356 switch(rsvp_obj_ctype
) {
1357 case RSVP_CTYPE_IPV4
:
1360 printf("%s Source Address: %s, Source Port: %u",
1362 ipaddr_string(obj_tptr
),
1363 EXTRACT_16BITS(obj_tptr
+6));
1368 case RSVP_CTYPE_IPV6
:
1371 printf("%s Source Address: %s, Source Port: %u",
1373 ip6addr_string(obj_tptr
),
1374 EXTRACT_16BITS(obj_tptr
+18));
1381 printf("%s Source Address: %s, Flow Label: %u",
1383 ip6addr_string(obj_tptr
),
1384 EXTRACT_24BITS(obj_tptr
+17));
1388 case RSVP_CTYPE_TUNNEL_IPV6
:
1391 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1393 ipaddr_string(obj_tptr
),
1394 EXTRACT_16BITS(obj_tptr
+18));
1398 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
1401 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1402 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1404 ip6addr_string(obj_tptr
),
1405 EXTRACT_16BITS(obj_tptr
+18),
1407 ip6addr_string(obj_tptr
+20),
1408 EXTRACT_16BITS(obj_tptr
+38));
1413 case RSVP_CTYPE_TUNNEL_IPV4
:
1416 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1418 ipaddr_string(obj_tptr
),
1419 EXTRACT_16BITS(obj_tptr
+6));
1423 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
1426 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1427 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1429 ipaddr_string(obj_tptr
),
1430 EXTRACT_16BITS(obj_tptr
+6),
1432 ipaddr_string(obj_tptr
+8),
1433 EXTRACT_16BITS(obj_tptr
+12));
1442 case RSVP_OBJ_FASTREROUTE
:
1443 /* the differences between c-type 1 and 7 are minor */
1444 obj_ptr
.rsvp_obj_frr
= (const struct rsvp_obj_frr_t
*)obj_tptr
;
1445 bw
.i
= EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->bandwidth
);
1447 switch(rsvp_obj_ctype
) {
1448 case RSVP_CTYPE_1
: /* new style */
1449 if (obj_tlen
< sizeof(struct rsvp_obj_frr_t
))
1451 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1453 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1454 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1455 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1457 printf("%s Include-any: 0x%08x, Exclude-any: 0x%08x, Include-all: 0x%08x",
1459 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1460 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
),
1461 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_all
));
1462 obj_tlen
-=sizeof(struct rsvp_obj_frr_t
);
1463 obj_tptr
+=sizeof(struct rsvp_obj_frr_t
);
1466 case RSVP_CTYPE_TUNNEL_IPV4
: /* old style */
1469 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1471 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1472 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1473 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1475 printf("%s Include Colors: 0x%08x, Exclude Colors: 0x%08x",
1477 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1478 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
));
1488 case RSVP_OBJ_DETOUR
:
1489 switch(rsvp_obj_ctype
) {
1490 case RSVP_CTYPE_TUNNEL_IPV4
:
1491 while(obj_tlen
>= 8) {
1492 printf("%s PLR-ID: %s, Avoid-Node-ID: %s",
1494 ipaddr_string(obj_tptr
),
1495 ipaddr_string(obj_tptr
+4));
1505 case RSVP_OBJ_CLASSTYPE
:
1506 case RSVP_OBJ_CLASSTYPE_OLD
: /* fall through */
1507 switch(rsvp_obj_ctype
) {
1511 EXTRACT_32BITS(obj_tptr
)&0x7);
1520 case RSVP_OBJ_ERROR_SPEC
:
1521 switch(rsvp_obj_ctype
) {
1522 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1523 case RSVP_CTYPE_IPV4
:
1526 error_code
=*(obj_tptr
+5);
1527 error_value
=EXTRACT_16BITS(obj_tptr
+6);
1528 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1530 ipaddr_string(obj_tptr
),
1533 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1535 switch (error_code
) {
1536 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1537 printf(", Error Value: %s (%u)",
1538 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1541 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE
: /* fall through */
1542 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD
:
1543 printf(", Error Value: %s (%u)",
1544 tok2str(rsvp_obj_error_code_diffserv_te_values
,"unknown",error_value
),
1548 printf(", Unknown Error Value (%u)", error_value
);
1555 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1556 case RSVP_CTYPE_IPV6
:
1559 error_code
=*(obj_tptr
+17);
1560 error_value
=EXTRACT_16BITS(obj_tptr
+18);
1561 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1563 ip6addr_string(obj_tptr
),
1566 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1569 switch (error_code
) {
1570 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1571 printf(", Error Value: %s (%u)",
1572 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1587 case RSVP_OBJ_PROPERTIES
:
1588 switch(rsvp_obj_ctype
) {
1592 padbytes
= EXTRACT_16BITS(obj_tptr
+2);
1593 printf("%s TLV count: %u, padding bytes: %u",
1595 EXTRACT_16BITS(obj_tptr
),
1599 /* loop through as long there is anything longer than the TLV header (2) */
1600 while(obj_tlen
>= 2 + padbytes
) {
1601 printf("%s %s TLV (0x%02x), length: %u", /* length includes header */
1603 tok2str(rsvp_obj_prop_tlv_values
,"unknown",*obj_tptr
),
1606 if (obj_tlen
< *(obj_tptr
+1))
1608 if (*(obj_tptr
+1) < 2)
1610 print_unknown_data(gndo
,obj_tptr
+2,"\n\t\t",*(obj_tptr
+1)-2);
1611 obj_tlen
-=*(obj_tptr
+1);
1612 obj_tptr
+=*(obj_tptr
+1);
1620 case RSVP_OBJ_MESSAGE_ID
: /* fall through */
1621 case RSVP_OBJ_MESSAGE_ID_ACK
: /* fall through */
1622 case RSVP_OBJ_MESSAGE_ID_LIST
:
1623 switch(rsvp_obj_ctype
) {
1628 printf("%s Flags [0x%02x], epoch: %u",
1631 EXTRACT_24BITS(obj_tptr
+1));
1634 /* loop through as long there are no messages left */
1635 while(obj_tlen
>= 4) {
1636 printf("%s Message-ID 0x%08x (%u)",
1638 EXTRACT_32BITS(obj_tptr
),
1639 EXTRACT_32BITS(obj_tptr
));
1649 case RSVP_OBJ_INTEGRITY
:
1650 switch(rsvp_obj_ctype
) {
1652 if (obj_tlen
< sizeof(struct rsvp_obj_integrity_t
))
1654 obj_ptr
.rsvp_obj_integrity
= (const struct rsvp_obj_integrity_t
*)obj_tptr
;
1655 printf("%s Key-ID 0x%04x%08x, Sequence 0x%08x%08x, Flags [%s]",
1657 EXTRACT_16BITS(obj_ptr
.rsvp_obj_integrity
->key_id
),
1658 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->key_id
+2),
1659 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
),
1660 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
+4),
1661 bittok2str(rsvp_obj_integrity_flag_values
,
1663 obj_ptr
.rsvp_obj_integrity
->flags
));
1664 printf("%s MD5-sum 0x%08x%08x%08x%08x ",
1666 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
),
1667 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+4),
1668 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+8),
1669 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+12));
1671 #ifdef HAVE_LIBCRYPTO
1672 sigcheck
= signature_verify(pptr
, plen
, (unsigned char *)obj_ptr
.\
1673 rsvp_obj_integrity
->digest
);
1675 sigcheck
= CANT_CHECK_SIGNATURE
;
1677 printf(" (%s)", tok2str(signature_check_values
, "Unknown", sigcheck
));
1679 obj_tlen
+=sizeof(struct rsvp_obj_integrity_t
);
1680 obj_tptr
+=sizeof(struct rsvp_obj_integrity_t
);
1687 case RSVP_OBJ_ADMIN_STATUS
:
1688 switch(rsvp_obj_ctype
) {
1692 printf("%s Flags [%s]", ident
,
1693 bittok2str(rsvp_obj_admin_status_flag_values
, "none",
1694 EXTRACT_32BITS(obj_tptr
)));
1703 case RSVP_OBJ_LABEL_SET
:
1704 switch(rsvp_obj_ctype
) {
1708 action
= (EXTRACT_16BITS(obj_tptr
)>>8);
1710 printf("%s Action: %s (%u), Label type: %u", ident
,
1711 tok2str(rsvp_obj_label_set_action_values
, "Unknown", action
),
1712 action
, ((EXTRACT_32BITS(obj_tptr
) & 0x7F)));
1715 case LABEL_SET_INCLUSIVE_RANGE
:
1716 case LABEL_SET_EXCLUSIVE_RANGE
: /* fall through */
1718 /* only a couple of subchannels are expected */
1721 printf("%s Start range: %u, End range: %u", ident
,
1722 EXTRACT_32BITS(obj_tptr
+4),
1723 EXTRACT_32BITS(obj_tptr
+8));
1732 while(obj_tlen
>= 4 ) {
1733 printf("%s Subchannel #%u: %u", ident
, subchannel
,
1734 EXTRACT_32BITS(obj_tptr
));
1747 switch (rsvp_obj_ctype
) {
1748 case RSVP_CTYPE_IPV4
:
1751 printf("%s Sub-LSP destination address: %s",
1752 ident
, ipaddr_string(obj_tptr
));
1758 case RSVP_CTYPE_IPV6
:
1761 printf("%s Sub-LSP destination address: %s",
1762 ident
, ip6addr_string(obj_tptr
));
1773 * FIXME those are the defined objects that lack a decoder
1774 * you are welcome to contribute code ;-)
1777 case RSVP_OBJ_SCOPE
:
1778 case RSVP_OBJ_POLICY_DATA
:
1779 case RSVP_OBJ_ACCEPT_LABEL_SET
:
1780 case RSVP_OBJ_PROTECTION
:
1783 print_unknown_data(gndo
,obj_tptr
,"\n\t ",obj_tlen
); /* FIXME indentation */
1786 /* do we also want to see a hex dump ? */
1787 if (vflag
> 1 || hexdump
==TRUE
)
1788 print_unknown_data(gndo
,tptr
+sizeof(struct rsvp_object_header
),"\n\t ", /* FIXME indentation */
1789 rsvp_obj_len
-sizeof(struct rsvp_object_header
));
1796 printf("\n\t\t packet exceeded snapshot");
1802 rsvp_print(register const u_char
*pptr
, register u_int len
) {
1804 struct rsvp_common_header
*rsvp_com_header
;
1805 const u_char
*tptr
,*subtptr
;
1806 u_short plen
, tlen
, subtlen
;
1810 rsvp_com_header
= (struct rsvp_common_header
*)pptr
;
1811 TCHECK(*rsvp_com_header
);
1814 * Sanity checking of the header.
1816 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1817 printf("ERROR: RSVP version %u packet not supported",
1818 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1822 /* in non-verbose mode just lets print the basic Message Type*/
1824 printf("RSVPv%u %s Message, length: %u",
1825 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1826 tok2str(rsvp_msg_type_values
, "unknown (%u)",rsvp_com_header
->msg_type
),
1831 /* ok they seem to want to know everything - lets fully decode it */
1833 plen
= tlen
= EXTRACT_16BITS(rsvp_com_header
->length
);
1835 printf("\n\tRSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1836 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1837 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1838 rsvp_com_header
->msg_type
,
1839 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1841 rsvp_com_header
->ttl
,
1842 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1845 * Clear checksum prior to signature verification.
1847 rsvp_com_header
->checksum
[0] = 0;
1848 rsvp_com_header
->checksum
[1] = 0;
1850 if (tlen
< sizeof(const struct rsvp_common_header
)) {
1851 printf("ERROR: common header too short %u < %lu", tlen
,
1852 (unsigned long)sizeof(const struct rsvp_common_header
));
1856 tptr
+=sizeof(const struct rsvp_common_header
);
1857 tlen
-=sizeof(const struct rsvp_common_header
);
1859 switch(rsvp_com_header
->msg_type
) {
1861 case RSVP_MSGTYPE_AGGREGATE
:
1864 rsvp_com_header
= (struct rsvp_common_header
*)subtptr
;
1865 TCHECK(*rsvp_com_header
);
1868 * Sanity checking of the header.
1870 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1871 printf("ERROR: RSVP version %u packet not supported",
1872 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1875 subtlen
=EXTRACT_16BITS(rsvp_com_header
->length
);
1877 printf("\n\t RSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1878 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1879 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1880 rsvp_com_header
->msg_type
,
1881 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1883 rsvp_com_header
->ttl
,
1884 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1887 * Clear checksum prior to signature verification.
1889 rsvp_com_header
->checksum
[0] = 0;
1890 rsvp_com_header
->checksum
[1] = 0;
1892 if (subtlen
< sizeof(const struct rsvp_common_header
)) {
1893 printf("ERROR: common header too short %u < %lu", subtlen
,
1894 (unsigned long)sizeof(const struct rsvp_common_header
));
1898 if (tlen
< subtlen
) {
1899 printf("ERROR: common header too large %u > %u", subtlen
,
1904 subtptr
+=sizeof(const struct rsvp_common_header
);
1905 subtlen
-=sizeof(const struct rsvp_common_header
);
1907 if (rsvp_obj_print(pptr
, plen
, subtptr
,"\n\t ", subtlen
) == -1)
1910 tptr
+=subtlen
+sizeof(const struct rsvp_common_header
);
1911 tlen
-=subtlen
+sizeof(const struct rsvp_common_header
);
1916 case RSVP_MSGTYPE_PATH
:
1917 case RSVP_MSGTYPE_RESV
:
1918 case RSVP_MSGTYPE_PATHERR
:
1919 case RSVP_MSGTYPE_RESVERR
:
1920 case RSVP_MSGTYPE_PATHTEAR
:
1921 case RSVP_MSGTYPE_RESVTEAR
:
1922 case RSVP_MSGTYPE_RESVCONF
:
1923 case RSVP_MSGTYPE_HELLO_OLD
:
1924 case RSVP_MSGTYPE_HELLO
:
1925 case RSVP_MSGTYPE_ACK
:
1926 case RSVP_MSGTYPE_SREFRESH
:
1927 if (rsvp_obj_print(pptr
, plen
, tptr
,"\n\t ", tlen
) == -1)
1932 print_unknown_data(gndo
,tptr
,"\n\t ",tlen
);
1938 printf("\n\t\t packet exceeded snapshot");