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)
19 static const char rcsid
[] _U_
=
20 "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.50 2008-08-16 11:36:20 hannes Exp $";
27 #include <tcpdump-stdinc.h>
33 #include "interface.h"
35 #include "addrtoname.h"
36 #include "ethertype.h"
39 #include "signature.h"
42 * RFC 2205 common header
45 * +-------------+-------------+-------------+-------------+
46 * | Vers | Flags| Msg Type | RSVP Checksum |
47 * +-------------+-------------+-------------+-------------+
48 * | Send_TTL | (Reserved) | RSVP Length |
49 * +-------------+-------------+-------------+-------------+
53 struct rsvp_common_header
{
54 u_int8_t version_flags
;
63 * RFC2205 object header
67 * +-------------+-------------+-------------+-------------+
68 * | Length (bytes) | Class-Num | C-Type |
69 * +-------------+-------------+-------------+-------------+
71 * // (Object contents) //
73 * +-------------+-------------+-------------+-------------+
76 struct rsvp_object_header
{
82 #define RSVP_VERSION 1
83 #define RSVP_EXTRACT_VERSION(x) (((x)&0xf0)>>4)
84 #define RSVP_EXTRACT_FLAGS(x) ((x)&0x0f)
86 #define RSVP_MSGTYPE_PATH 1
87 #define RSVP_MSGTYPE_RESV 2
88 #define RSVP_MSGTYPE_PATHERR 3
89 #define RSVP_MSGTYPE_RESVERR 4
90 #define RSVP_MSGTYPE_PATHTEAR 5
91 #define RSVP_MSGTYPE_RESVTEAR 6
92 #define RSVP_MSGTYPE_RESVCONF 7
93 #define RSVP_MSGTYPE_AGGREGATE 12
94 #define RSVP_MSGTYPE_ACK 13
95 #define RSVP_MSGTYPE_HELLO_OLD 14 /* ancient Hellos */
96 #define RSVP_MSGTYPE_SREFRESH 15
97 #define RSVP_MSGTYPE_HELLO 20
99 static const struct tok rsvp_msg_type_values
[] = {
100 { RSVP_MSGTYPE_PATH
, "Path" },
101 { RSVP_MSGTYPE_RESV
, "Resv" },
102 { RSVP_MSGTYPE_PATHERR
, "PathErr" },
103 { RSVP_MSGTYPE_RESVERR
, "ResvErr" },
104 { RSVP_MSGTYPE_PATHTEAR
, "PathTear" },
105 { RSVP_MSGTYPE_RESVTEAR
, "ResvTear" },
106 { RSVP_MSGTYPE_RESVCONF
, "ResvConf" },
107 { RSVP_MSGTYPE_AGGREGATE
, "Aggregate" },
108 { RSVP_MSGTYPE_ACK
, "Acknowledgement" },
109 { RSVP_MSGTYPE_HELLO_OLD
, "Hello (Old)" },
110 { RSVP_MSGTYPE_SREFRESH
, "Refresh" },
111 { RSVP_MSGTYPE_HELLO
, "Hello" },
115 static const struct tok rsvp_header_flag_values
[] = {
116 { 0x01, "Refresh reduction capable" }, /* rfc2961 */
120 #define RSVP_OBJ_SESSION 1 /* rfc2205 */
121 #define RSVP_OBJ_RSVP_HOP 3 /* rfc2205, rfc3473 */
122 #define RSVP_OBJ_INTEGRITY 4 /* rfc2747 */
123 #define RSVP_OBJ_TIME_VALUES 5 /* rfc2205 */
124 #define RSVP_OBJ_ERROR_SPEC 6
125 #define RSVP_OBJ_SCOPE 7
126 #define RSVP_OBJ_STYLE 8 /* rfc2205 */
127 #define RSVP_OBJ_FLOWSPEC 9 /* rfc2215 */
128 #define RSVP_OBJ_FILTERSPEC 10 /* rfc2215 */
129 #define RSVP_OBJ_SENDER_TEMPLATE 11
130 #define RSVP_OBJ_SENDER_TSPEC 12 /* rfc2215 */
131 #define RSVP_OBJ_ADSPEC 13 /* rfc2215 */
132 #define RSVP_OBJ_POLICY_DATA 14
133 #define RSVP_OBJ_CONFIRM 15 /* rfc2205 */
134 #define RSVP_OBJ_LABEL 16 /* rfc3209 */
135 #define RSVP_OBJ_LABEL_REQ 19 /* rfc3209 */
136 #define RSVP_OBJ_ERO 20 /* rfc3209 */
137 #define RSVP_OBJ_RRO 21 /* rfc3209 */
138 #define RSVP_OBJ_HELLO 22 /* rfc3209 */
139 #define RSVP_OBJ_MESSAGE_ID 23 /* rfc2961 */
140 #define RSVP_OBJ_MESSAGE_ID_ACK 24 /* rfc2961 */
141 #define RSVP_OBJ_MESSAGE_ID_LIST 25 /* rfc2961 */
142 #define RSVP_OBJ_RECOVERY_LABEL 34 /* rfc3473 */
143 #define RSVP_OBJ_UPSTREAM_LABEL 35 /* rfc3473 */
144 #define RSVP_OBJ_LABEL_SET 36 /* rfc3473 */
145 #define RSVP_OBJ_PROTECTION 37 /* rfc3473 */
146 #define RSVP_OBJ_S2L 50 /* rfc4875 */
147 #define RSVP_OBJ_DETOUR 63 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
148 #define RSVP_OBJ_CLASSTYPE 66 /* rfc4124 */
149 #define RSVP_OBJ_CLASSTYPE_OLD 125 /* draft-ietf-tewg-diff-te-proto-07 */
150 #define RSVP_OBJ_SUGGESTED_LABEL 129 /* rfc3473 */
151 #define RSVP_OBJ_ACCEPT_LABEL_SET 130 /* rfc3473 */
152 #define RSVP_OBJ_RESTART_CAPABILITY 131 /* rfc3473 */
153 #define RSVP_OBJ_NOTIFY_REQ 195 /* rfc3473 */
154 #define RSVP_OBJ_ADMIN_STATUS 196 /* rfc3473 */
155 #define RSVP_OBJ_PROPERTIES 204 /* juniper proprietary */
156 #define RSVP_OBJ_FASTREROUTE 205 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
157 #define RSVP_OBJ_SESSION_ATTRIBUTE 207 /* rfc3209 */
158 #define RSVP_OBJ_GENERALIZED_UNI 229 /* OIF RSVP extensions UNI 1.0 Signaling, Rel. 2 */
159 #define RSVP_OBJ_CALL_ID 230 /* rfc3474 */
160 #define RSVP_OBJ_CALL_OPS 236 /* rfc3474 */
162 static const struct tok rsvp_obj_values
[] = {
163 { RSVP_OBJ_SESSION
, "Session" },
164 { RSVP_OBJ_RSVP_HOP
, "RSVP Hop" },
165 { RSVP_OBJ_INTEGRITY
, "Integrity" },
166 { RSVP_OBJ_TIME_VALUES
, "Time Values" },
167 { RSVP_OBJ_ERROR_SPEC
, "Error Spec" },
168 { RSVP_OBJ_SCOPE
, "Scope" },
169 { RSVP_OBJ_STYLE
, "Style" },
170 { RSVP_OBJ_FLOWSPEC
, "Flowspec" },
171 { RSVP_OBJ_FILTERSPEC
, "FilterSpec" },
172 { RSVP_OBJ_SENDER_TEMPLATE
, "Sender Template" },
173 { RSVP_OBJ_SENDER_TSPEC
, "Sender TSpec" },
174 { RSVP_OBJ_ADSPEC
, "Adspec" },
175 { RSVP_OBJ_POLICY_DATA
, "Policy Data" },
176 { RSVP_OBJ_CONFIRM
, "Confirm" },
177 { RSVP_OBJ_LABEL
, "Label" },
178 { RSVP_OBJ_LABEL_REQ
, "Label Request" },
179 { RSVP_OBJ_ERO
, "ERO" },
180 { RSVP_OBJ_RRO
, "RRO" },
181 { RSVP_OBJ_HELLO
, "Hello" },
182 { RSVP_OBJ_MESSAGE_ID
, "Message ID" },
183 { RSVP_OBJ_MESSAGE_ID_ACK
, "Message ID Ack" },
184 { RSVP_OBJ_MESSAGE_ID_LIST
, "Message ID List" },
185 { RSVP_OBJ_RECOVERY_LABEL
, "Recovery Label" },
186 { RSVP_OBJ_UPSTREAM_LABEL
, "Upstream Label" },
187 { RSVP_OBJ_LABEL_SET
, "Label Set" },
188 { RSVP_OBJ_ACCEPT_LABEL_SET
, "Acceptable Label Set" },
189 { RSVP_OBJ_DETOUR
, "Detour" },
190 { RSVP_OBJ_CLASSTYPE
, "Class Type" },
191 { RSVP_OBJ_CLASSTYPE_OLD
, "Class Type (old)" },
192 { RSVP_OBJ_SUGGESTED_LABEL
, "Suggested Label" },
193 { RSVP_OBJ_PROPERTIES
, "Properties" },
194 { RSVP_OBJ_FASTREROUTE
, "Fast Re-Route" },
195 { RSVP_OBJ_SESSION_ATTRIBUTE
, "Session Attribute" },
196 { RSVP_OBJ_GENERALIZED_UNI
, "Generalized UNI" },
197 { RSVP_OBJ_CALL_ID
, "Call-ID" },
198 { RSVP_OBJ_CALL_OPS
, "Call Capability" },
199 { RSVP_OBJ_RESTART_CAPABILITY
, "Restart Capability" },
200 { RSVP_OBJ_NOTIFY_REQ
, "Notify Request" },
201 { RSVP_OBJ_PROTECTION
, "Protection" },
202 { RSVP_OBJ_ADMIN_STATUS
, "Administrative Status" },
203 { RSVP_OBJ_S2L
, "Sub-LSP to LSP" },
207 #define RSVP_CTYPE_IPV4 1
208 #define RSVP_CTYPE_IPV6 2
209 #define RSVP_CTYPE_TUNNEL_IPV4 7
210 #define RSVP_CTYPE_TUNNEL_IPV6 8
211 #define RSVP_CTYPE_UNI_IPV4 11 /* OIF RSVP extensions UNI 1.0 Signaling Rel. 2 */
212 #define RSVP_CTYPE_1 1
213 #define RSVP_CTYPE_2 2
214 #define RSVP_CTYPE_3 3
215 #define RSVP_CTYPE_4 4
216 #define RSVP_CTYPE_12 12
217 #define RSVP_CTYPE_13 13
218 #define RSVP_CTYPE_14 14
221 * the ctypes are not globally unique so for
222 * translating it to strings we build a table based
223 * on objects offsetted by the ctype
226 static const struct tok rsvp_ctype_values
[] = {
227 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_IPV4
, "IPv4" },
228 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_IPV6
, "IPv6" },
229 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_3
, "IPv4 plus opt. TLVs" },
230 { 256*RSVP_OBJ_RSVP_HOP
+RSVP_CTYPE_4
, "IPv6 plus opt. TLVs" },
231 { 256*RSVP_OBJ_NOTIFY_REQ
+RSVP_CTYPE_IPV4
, "IPv4" },
232 { 256*RSVP_OBJ_NOTIFY_REQ
+RSVP_CTYPE_IPV6
, "IPv6" },
233 { 256*RSVP_OBJ_CONFIRM
+RSVP_CTYPE_IPV4
, "IPv4" },
234 { 256*RSVP_OBJ_CONFIRM
+RSVP_CTYPE_IPV6
, "IPv6" },
235 { 256*RSVP_OBJ_TIME_VALUES
+RSVP_CTYPE_1
, "1" },
236 { 256*RSVP_OBJ_FLOWSPEC
+RSVP_CTYPE_1
, "obsolete" },
237 { 256*RSVP_OBJ_FLOWSPEC
+RSVP_CTYPE_2
, "IntServ" },
238 { 256*RSVP_OBJ_SENDER_TSPEC
+RSVP_CTYPE_2
, "IntServ" },
239 { 256*RSVP_OBJ_ADSPEC
+RSVP_CTYPE_2
, "IntServ" },
240 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_IPV4
, "IPv4" },
241 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_IPV6
, "IPv6" },
242 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_3
, "IPv6 Flow-label" },
243 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
244 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_12
, "IPv4 P2MP LSP Tunnel" },
245 { 256*RSVP_OBJ_FILTERSPEC
+RSVP_CTYPE_13
, "IPv6 P2MP LSP Tunnel" },
246 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_IPV4
, "IPv4" },
247 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_IPV6
, "IPv6" },
248 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
249 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_UNI_IPV4
, "UNI IPv4" },
250 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_13
, "IPv4 P2MP LSP Tunnel" },
251 { 256*RSVP_OBJ_SESSION
+RSVP_CTYPE_14
, "IPv6 P2MP LSP Tunnel" },
252 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_IPV4
, "IPv4" },
253 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_IPV6
, "IPv6" },
254 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
255 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_12
, "IPv4 P2MP LSP Tunnel" },
256 { 256*RSVP_OBJ_SENDER_TEMPLATE
+RSVP_CTYPE_13
, "IPv6 P2MP LSP Tunnel" },
257 { 256*RSVP_OBJ_MESSAGE_ID
+RSVP_CTYPE_1
, "1" },
258 { 256*RSVP_OBJ_MESSAGE_ID_ACK
+RSVP_CTYPE_1
, "Message id ack" },
259 { 256*RSVP_OBJ_MESSAGE_ID_ACK
+RSVP_CTYPE_2
, "Message id nack" },
260 { 256*RSVP_OBJ_MESSAGE_ID_LIST
+RSVP_CTYPE_1
, "1" },
261 { 256*RSVP_OBJ_STYLE
+RSVP_CTYPE_1
, "1" },
262 { 256*RSVP_OBJ_HELLO
+RSVP_CTYPE_1
, "Hello Request" },
263 { 256*RSVP_OBJ_HELLO
+RSVP_CTYPE_2
, "Hello Ack" },
264 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_1
, "without label range" },
265 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_2
, "with ATM label range" },
266 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_3
, "with FR label range" },
267 { 256*RSVP_OBJ_LABEL_REQ
+RSVP_CTYPE_4
, "Generalized Label" },
268 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_1
, "Label" },
269 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
270 { 256*RSVP_OBJ_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
271 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_1
, "Label" },
272 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
273 { 256*RSVP_OBJ_SUGGESTED_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
274 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_1
, "Label" },
275 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
276 { 256*RSVP_OBJ_UPSTREAM_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
277 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_1
, "Label" },
278 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_2
, "Generalized Label" },
279 { 256*RSVP_OBJ_RECOVERY_LABEL
+RSVP_CTYPE_3
, "Waveband Switching" },
280 { 256*RSVP_OBJ_ERO
+RSVP_CTYPE_IPV4
, "IPv4" },
281 { 256*RSVP_OBJ_RRO
+RSVP_CTYPE_IPV4
, "IPv4" },
282 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_IPV4
, "IPv4" },
283 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_IPV6
, "IPv6" },
284 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_3
, "IPv4 plus opt. TLVs" },
285 { 256*RSVP_OBJ_ERROR_SPEC
+RSVP_CTYPE_4
, "IPv6 plus opt. TLVs" },
286 { 256*RSVP_OBJ_RESTART_CAPABILITY
+RSVP_CTYPE_1
, "IPv4" },
287 { 256*RSVP_OBJ_SESSION_ATTRIBUTE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
288 { 256*RSVP_OBJ_FASTREROUTE
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" }, /* old style*/
289 { 256*RSVP_OBJ_FASTREROUTE
+RSVP_CTYPE_1
, "1" }, /* new style */
290 { 256*RSVP_OBJ_DETOUR
+RSVP_CTYPE_TUNNEL_IPV4
, "Tunnel IPv4" },
291 { 256*RSVP_OBJ_PROPERTIES
+RSVP_CTYPE_1
, "1" },
292 { 256*RSVP_OBJ_ADMIN_STATUS
+RSVP_CTYPE_1
, "1" },
293 { 256*RSVP_OBJ_CLASSTYPE
+RSVP_CTYPE_1
, "1" },
294 { 256*RSVP_OBJ_CLASSTYPE_OLD
+RSVP_CTYPE_1
, "1" },
295 { 256*RSVP_OBJ_LABEL_SET
+RSVP_CTYPE_1
, "1" },
296 { 256*RSVP_OBJ_GENERALIZED_UNI
+RSVP_CTYPE_1
, "1" },
297 { 256*RSVP_OBJ_S2L
+RSVP_CTYPE_IPV4
, "IPv4 sub-LSP" },
298 { 256*RSVP_OBJ_S2L
+RSVP_CTYPE_IPV6
, "IPv6 sub-LSP" },
302 struct rsvp_obj_integrity_t
{
306 u_int8_t sequence
[8];
310 static const struct tok rsvp_obj_integrity_flag_values
[] = {
311 { 0x80, "Handshake" },
315 struct rsvp_obj_frr_t
{
320 u_int8_t bandwidth
[4];
321 u_int8_t include_any
[4];
322 u_int8_t exclude_any
[4];
323 u_int8_t include_all
[4];
327 #define RSVP_OBJ_XRO_MASK_SUBOBJ(x) ((x)&0x7f)
328 #define RSVP_OBJ_XRO_MASK_LOOSE(x) ((x)&0x80)
330 #define RSVP_OBJ_XRO_RES 0
331 #define RSVP_OBJ_XRO_IPV4 1
332 #define RSVP_OBJ_XRO_IPV6 2
333 #define RSVP_OBJ_XRO_LABEL 3
334 #define RSVP_OBJ_XRO_ASN 32
335 #define RSVP_OBJ_XRO_MPLS 64
337 static const struct tok rsvp_obj_xro_values
[] = {
338 { RSVP_OBJ_XRO_RES
, "Reserved" },
339 { RSVP_OBJ_XRO_IPV4
, "IPv4 prefix" },
340 { RSVP_OBJ_XRO_IPV6
, "IPv6 prefix" },
341 { RSVP_OBJ_XRO_LABEL
, "Label" },
342 { RSVP_OBJ_XRO_ASN
, "Autonomous system number" },
343 { RSVP_OBJ_XRO_MPLS
, "MPLS label switched path termination" },
347 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07.txt */
348 static const struct tok rsvp_obj_rro_flag_values
[] = {
349 { 0x01, "Local protection available" },
350 { 0x02, "Local protection in use" },
351 { 0x04, "Bandwidth protection" },
352 { 0x08, "Node protection" },
357 static const struct tok rsvp_obj_rro_label_flag_values
[] = {
362 static const struct tok rsvp_resstyle_values
[] = {
363 { 17, "Wildcard Filter" },
364 { 10, "Fixed Filter" },
365 { 18, "Shared Explicit" },
369 #define RSVP_OBJ_INTSERV_GUARANTEED_SERV 2
370 #define RSVP_OBJ_INTSERV_CONTROLLED_LOAD 5
372 static const struct tok rsvp_intserv_service_type_values
[] = {
373 { 1, "Default/Global Information" },
374 { RSVP_OBJ_INTSERV_GUARANTEED_SERV
, "Guaranteed Service" },
375 { RSVP_OBJ_INTSERV_CONTROLLED_LOAD
, "Controlled Load" },
379 static const struct tok rsvp_intserv_parameter_id_values
[] = {
381 { 6, "Path b/w estimate" },
382 { 8, "Minimum path latency" },
383 { 10, "Composed MTU" },
384 { 127, "Token Bucket TSpec" },
385 { 130, "Guaranteed Service RSpec" },
386 { 133, "End-to-end composed value for C" },
387 { 134, "End-to-end composed value for D" },
388 { 135, "Since-last-reshaping point composed C" },
389 { 136, "Since-last-reshaping point composed D" },
393 static struct tok rsvp_session_attribute_flag_values
[] = {
394 { 0x01, "Local Protection" },
395 { 0x02, "Label Recording" },
396 { 0x04, "SE Style" },
397 { 0x08, "Bandwidth protection" }, /* RFC4090 */
398 { 0x10, "Node protection" }, /* RFC4090 */
402 static struct tok rsvp_obj_prop_tlv_values
[] = {
404 { 0x02, "Metric 1" },
405 { 0x04, "Metric 2" },
406 { 0x08, "CCC Status" },
407 { 0x10, "Path Type" },
411 #define RSVP_OBJ_ERROR_SPEC_CODE_ROUTING 24
412 #define RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY 25
413 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 28
414 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD 125
416 static struct tok rsvp_obj_error_code_values
[] = {
417 { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
, "Routing Problem" },
418 { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY
, "Notify Error" },
419 { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE
, "Diffserv TE Error" },
420 { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD
, "Diffserv TE Error (Old)" },
424 static struct tok rsvp_obj_error_code_routing_values
[] = {
425 { 1, "Bad EXPLICIT_ROUTE object" },
426 { 2, "Bad strict node" },
427 { 3, "Bad loose node" },
428 { 4, "Bad initial subobject" },
429 { 5, "No route available toward destination" },
430 { 6, "Unacceptable label value" },
431 { 7, "RRO indicated routing loops" },
432 { 8, "non-RSVP-capable router in the path" },
433 { 9, "MPLS label allocation failure" },
434 { 10, "Unsupported L3PID" },
438 static struct tok rsvp_obj_error_code_diffserv_te_values
[] = {
439 { 1, "Unexpected CT object" },
440 { 2, "Unsupported CT" },
441 { 3, "Invalid CT value" },
442 { 4, "CT/setup priority do not form a configured TE-Class" },
443 { 5, "CT/holding priority do not form a configured TE-Class" },
444 { 6, "CT/setup priority and CT/holding priority do not form a configured TE-Class" },
445 { 7, "Inconsistency between signaled PSC and signaled CT" },
446 { 8, "Inconsistency between signaled PHBs and signaled CT" },
450 /* rfc3473 / rfc 3471 */
451 static const struct tok rsvp_obj_admin_status_flag_values
[] = {
452 { 0x80000000, "Reflect" },
453 { 0x00000004, "Testing" },
454 { 0x00000002, "Admin-down" },
455 { 0x00000001, "Delete-in-progress" },
459 /* label set actions - rfc3471 */
460 #define LABEL_SET_INCLUSIVE_LIST 0
461 #define LABEL_SET_EXCLUSIVE_LIST 1
462 #define LABEL_SET_INCLUSIVE_RANGE 2
463 #define LABEL_SET_EXCLUSIVE_RANGE 3
465 static const struct tok rsvp_obj_label_set_action_values
[] = {
466 { LABEL_SET_INCLUSIVE_LIST
, "Inclusive list" },
467 { LABEL_SET_EXCLUSIVE_LIST
, "Exclusive list" },
468 { LABEL_SET_INCLUSIVE_RANGE
, "Inclusive range" },
469 { LABEL_SET_EXCLUSIVE_RANGE
, "Exclusive range" },
473 /* OIF RSVP extensions UNI 1.0 Signaling, release 2 */
474 #define RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS 1
475 #define RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS 2
476 #define RSVP_GEN_UNI_SUBOBJ_DIVERSITY 3
477 #define RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL 4
478 #define RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL 5
480 static const struct tok rsvp_obj_generalized_uni_values
[] = {
481 { RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS
, "Source TNA address" },
482 { RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS
, "Destination TNA address" },
483 { RSVP_GEN_UNI_SUBOBJ_DIVERSITY
, "Diversity" },
484 { RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL
, "Egress label" },
485 { RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL
, "Service level" },
489 static int rsvp_intserv_print(const u_char
*, u_short
);
492 * this is a dissector for all the intserv defined
493 * specs as defined per rfc2215
494 * it is called from various rsvp objects;
495 * returns the amount of bytes being processed
498 rsvp_intserv_print(const u_char
*tptr
, u_short obj_tlen
) {
500 int parameter_id
,parameter_length
;
508 parameter_id
= *(tptr
);
509 parameter_length
= EXTRACT_16BITS(tptr
+2)<<2; /* convert wordcount to bytecount */
511 printf("\n\t Parameter ID: %s (%u), length: %u, Flags: [0x%02x]",
512 tok2str(rsvp_intserv_parameter_id_values
,"unknown",parameter_id
),
517 if (obj_tlen
< parameter_length
+4)
519 switch(parameter_id
) { /* parameter_id */
523 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
524 * | 4 (e) | (f) | 1 (g) |
525 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
526 * | IS hop cnt (32-bit unsigned integer) |
527 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
529 if (parameter_length
== 4)
530 printf("\n\t\tIS hop count: %u", EXTRACT_32BITS(tptr
+4));
535 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
536 * | 6 (h) | (i) | 1 (j) |
537 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
538 * | Path b/w estimate (32-bit IEEE floating point number) |
539 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
541 if (parameter_length
== 4) {
542 bw
.i
= EXTRACT_32BITS(tptr
+4);
543 printf("\n\t\tPath b/w estimate: %.10g Mbps", bw
.f
/125000);
549 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
550 * | 8 (k) | (l) | 1 (m) |
551 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
552 * | Minimum path latency (32-bit integer) |
553 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
555 if (parameter_length
== 4) {
556 printf("\n\t\tMinimum path latency: ");
557 if (EXTRACT_32BITS(tptr
+4) == 0xffffffff)
558 printf("don't care");
560 printf("%u", EXTRACT_32BITS(tptr
+4));
567 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
568 * | 10 (n) | (o) | 1 (p) |
569 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
570 * | Composed MTU (32-bit unsigned integer) |
571 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
573 if (parameter_length
== 4)
574 printf("\n\t\tComposed MTU: %u bytes", EXTRACT_32BITS(tptr
+4));
578 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
579 * | 127 (e) | 0 (f) | 5 (g) |
580 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
581 * | Token Bucket Rate [r] (32-bit IEEE floating point number) |
582 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
583 * | Token Bucket Size [b] (32-bit IEEE floating point number) |
584 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
585 * | Peak Data Rate [p] (32-bit IEEE floating point number) |
586 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
587 * | Minimum Policed Unit [m] (32-bit integer) |
588 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
589 * | Maximum Packet Size [M] (32-bit integer) |
590 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
593 if (parameter_length
== 20) {
594 bw
.i
= EXTRACT_32BITS(tptr
+4);
595 printf("\n\t\tToken Bucket Rate: %.10g Mbps", bw
.f
/125000);
596 bw
.i
= EXTRACT_32BITS(tptr
+8);
597 printf("\n\t\tToken Bucket Size: %.10g bytes", bw
.f
);
598 bw
.i
= EXTRACT_32BITS(tptr
+12);
599 printf("\n\t\tPeak Data Rate: %.10g Mbps", bw
.f
/125000);
600 printf("\n\t\tMinimum Policed Unit: %u bytes", EXTRACT_32BITS(tptr
+16));
601 printf("\n\t\tMaximum Packet Size: %u bytes", EXTRACT_32BITS(tptr
+20));
607 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
608 * | 130 (h) | 0 (i) | 2 (j) |
609 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
610 * | Rate [R] (32-bit IEEE floating point number) |
611 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
612 * | Slack Term [S] (32-bit integer) |
613 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
616 if (parameter_length
== 8) {
617 bw
.i
= EXTRACT_32BITS(tptr
+4);
618 printf("\n\t\tRate: %.10g Mbps", bw
.f
/125000);
619 printf("\n\t\tSlack Term: %u", EXTRACT_32BITS(tptr
+8));
627 if (parameter_length
== 4)
628 printf("\n\t\tValue: %u", EXTRACT_32BITS(tptr
+4));
633 print_unknown_data(tptr
+4,"\n\t\t",parameter_length
);
635 return (parameter_length
+4); /* header length 4 bytes */
639 rsvp_obj_print (const u_char
*pptr
640 #ifndef HAVE_LIBCRYPTO
644 #ifndef HAVE_LIBCRYPTO
647 , const u_char
*tptr
,
648 const char *ident
, u_int tlen
) {
650 const struct rsvp_object_header
*rsvp_obj_header
;
651 const u_char
*obj_tptr
;
653 const struct rsvp_obj_integrity_t
*rsvp_obj_integrity
;
654 const struct rsvp_obj_frr_t
*rsvp_obj_frr
;
657 u_short rsvp_obj_len
,rsvp_obj_ctype
,obj_tlen
,intserv_serv_tlen
;
658 int hexdump
,processed
,padbytes
,error_code
,error_value
,i
,sigcheck
;
665 u_int action
, subchannel
;
667 while(tlen
>=sizeof(struct rsvp_object_header
)) {
668 /* did we capture enough for fully decoding the object header ? */
669 if (!TTEST2(*tptr
, sizeof(struct rsvp_object_header
)))
672 rsvp_obj_header
= (const struct rsvp_object_header
*)tptr
;
673 rsvp_obj_len
=EXTRACT_16BITS(rsvp_obj_header
->length
);
674 rsvp_obj_ctype
=rsvp_obj_header
->ctype
;
676 if(rsvp_obj_len
% 4) {
677 printf("%sERROR: object header size %u not a multiple of 4", ident
, rsvp_obj_len
);
680 if(rsvp_obj_len
< sizeof(struct rsvp_object_header
)) {
681 printf("%sERROR: object header too short %u < %lu", ident
, rsvp_obj_len
,
682 (unsigned long)sizeof(const struct rsvp_object_header
));
686 printf("%s%s Object (%u) Flags: [%s",
688 tok2str(rsvp_obj_values
,
690 rsvp_obj_header
->class_num
),
691 rsvp_obj_header
->class_num
,
692 ((rsvp_obj_header
->class_num
)&0x80) ? "ignore" : "reject");
694 if (rsvp_obj_header
->class_num
> 128)
696 ((rsvp_obj_header
->class_num
)&0x40) ? "and forward" : "silently");
698 printf(" if unknown], Class-Type: %s (%u), length: %u",
699 tok2str(rsvp_ctype_values
,
701 ((rsvp_obj_header
->class_num
)<<8)+rsvp_obj_ctype
),
705 if(tlen
< rsvp_obj_len
) {
706 printf("%sERROR: object goes past end of objects TLV", ident
);
710 obj_tptr
=tptr
+sizeof(struct rsvp_object_header
);
711 obj_tlen
=rsvp_obj_len
-sizeof(struct rsvp_object_header
);
713 /* did we capture enough for fully decoding the object ? */
714 if (!TTEST2(*tptr
, rsvp_obj_len
))
718 switch(rsvp_obj_header
->class_num
) {
719 case RSVP_OBJ_SESSION
:
720 switch(rsvp_obj_ctype
) {
721 case RSVP_CTYPE_IPV4
:
724 printf("%s IPv4 DestAddress: %s, Protocol ID: 0x%02x",
726 ipaddr_string(obj_tptr
),
727 *(obj_tptr
+sizeof(struct in_addr
)));
728 printf("%s Flags: [0x%02x], DestPort %u",
731 EXTRACT_16BITS(obj_tptr
+6));
736 case RSVP_CTYPE_IPV6
:
739 printf("%s IPv6 DestAddress: %s, Protocol ID: 0x%02x",
741 ip6addr_string(obj_tptr
),
742 *(obj_tptr
+sizeof(struct in6_addr
)));
743 printf("%s Flags: [0x%02x], DestPort %u",
745 *(obj_tptr
+sizeof(struct in6_addr
)+1),
746 EXTRACT_16BITS(obj_tptr
+sizeof(struct in6_addr
)+2));
751 case RSVP_CTYPE_TUNNEL_IPV6
:
754 printf("%s IPv6 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
756 ip6addr_string(obj_tptr
),
757 EXTRACT_16BITS(obj_tptr
+18),
758 ip6addr_string(obj_tptr
+20));
763 case RSVP_CTYPE_14
: /* IPv6 p2mp LSP Tunnel */
766 printf("%s IPv6 P2MP LSP ID: 0x%08x, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
768 EXTRACT_32BITS(obj_tptr
),
769 EXTRACT_16BITS(obj_tptr
+6),
770 ip6addr_string(obj_tptr
+8));
775 case RSVP_CTYPE_13
: /* IPv4 p2mp LSP Tunnel */
778 printf("%s IPv4 P2MP LSP ID: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
780 ipaddr_string(obj_tptr
),
781 EXTRACT_16BITS(obj_tptr
+6),
782 ipaddr_string(obj_tptr
+8));
786 case RSVP_CTYPE_TUNNEL_IPV4
:
787 case RSVP_CTYPE_UNI_IPV4
:
790 printf("%s IPv4 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
792 ipaddr_string(obj_tptr
),
793 EXTRACT_16BITS(obj_tptr
+6),
794 ipaddr_string(obj_tptr
+8));
803 case RSVP_OBJ_CONFIRM
:
804 switch(rsvp_obj_ctype
) {
805 case RSVP_CTYPE_IPV4
:
806 if (obj_tlen
< sizeof(struct in_addr
))
808 printf("%s IPv4 Receiver Address: %s",
810 ipaddr_string(obj_tptr
));
811 obj_tlen
-=sizeof(struct in_addr
);
812 obj_tptr
+=sizeof(struct in_addr
);
815 case RSVP_CTYPE_IPV6
:
816 if (obj_tlen
< sizeof(struct in6_addr
))
818 printf("%s IPv6 Receiver Address: %s",
820 ip6addr_string(obj_tptr
));
821 obj_tlen
-=sizeof(struct in6_addr
);
822 obj_tptr
+=sizeof(struct in6_addr
);
830 case RSVP_OBJ_NOTIFY_REQ
:
831 switch(rsvp_obj_ctype
) {
832 case RSVP_CTYPE_IPV4
:
833 if (obj_tlen
< sizeof(struct in_addr
))
835 printf("%s IPv4 Notify Node Address: %s",
837 ipaddr_string(obj_tptr
));
838 obj_tlen
-=sizeof(struct in_addr
);
839 obj_tptr
+=sizeof(struct in_addr
);
842 case RSVP_CTYPE_IPV6
:
843 if (obj_tlen
< sizeof(struct in6_addr
))
845 printf("%s IPv6 Notify Node Address: %s",
847 ip6addr_string(obj_tptr
));
848 obj_tlen
-=sizeof(struct in6_addr
);
849 obj_tptr
+=sizeof(struct in6_addr
);
857 case RSVP_OBJ_SUGGESTED_LABEL
: /* fall through */
858 case RSVP_OBJ_UPSTREAM_LABEL
: /* fall through */
859 case RSVP_OBJ_RECOVERY_LABEL
: /* fall through */
861 switch(rsvp_obj_ctype
) {
863 while(obj_tlen
>= 4 ) {
864 printf("%s Label: %u", ident
, EXTRACT_32BITS(obj_tptr
));
872 printf("%s Generalized Label: %u",
874 EXTRACT_32BITS(obj_tptr
));
881 printf("%s Waveband ID: %u%s Start Label: %u, Stop Label: %u",
883 EXTRACT_32BITS(obj_tptr
),
885 EXTRACT_32BITS(obj_tptr
+4),
886 EXTRACT_32BITS(obj_tptr
+8));
896 switch(rsvp_obj_ctype
) {
900 printf("%s Reservation Style: %s, Flags: [0x%02x]",
902 tok2str(rsvp_resstyle_values
,
904 EXTRACT_24BITS(obj_tptr
+1)),
914 case RSVP_OBJ_SENDER_TEMPLATE
:
915 switch(rsvp_obj_ctype
) {
916 case RSVP_CTYPE_IPV4
:
919 printf("%s Source Address: %s, Source Port: %u",
921 ipaddr_string(obj_tptr
),
922 EXTRACT_16BITS(obj_tptr
+6));
927 case RSVP_CTYPE_IPV6
:
930 printf("%s Source Address: %s, Source Port: %u",
932 ip6addr_string(obj_tptr
),
933 EXTRACT_16BITS(obj_tptr
+18));
937 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
940 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
941 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
943 ip6addr_string(obj_tptr
),
944 EXTRACT_16BITS(obj_tptr
+18),
946 ip6addr_string(obj_tptr
+20),
947 EXTRACT_16BITS(obj_tptr
+38));
952 case RSVP_CTYPE_TUNNEL_IPV4
:
955 printf("%s IPv4 Tunnel Sender Address: %s, LSP-ID: 0x%04x",
957 ipaddr_string(obj_tptr
),
958 EXTRACT_16BITS(obj_tptr
+6));
962 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
965 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
966 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
968 ipaddr_string(obj_tptr
),
969 EXTRACT_16BITS(obj_tptr
+6),
971 ipaddr_string(obj_tptr
+8),
972 EXTRACT_16BITS(obj_tptr
+12));
981 case RSVP_OBJ_LABEL_REQ
:
982 switch(rsvp_obj_ctype
) {
984 while(obj_tlen
>= 4 ) {
985 printf("%s L3 Protocol ID: %s",
987 tok2str(ethertype_values
,
988 "Unknown Protocol (0x%04x)",
989 EXTRACT_16BITS(obj_tptr
+2)));
997 printf("%s L3 Protocol ID: %s",
999 tok2str(ethertype_values
,
1000 "Unknown Protocol (0x%04x)",
1001 EXTRACT_16BITS(obj_tptr
+2)));
1002 printf(",%s merge capability",((*(obj_tptr
+4))&0x80) ? "no" : "" );
1003 printf("%s Minimum VPI/VCI: %u/%u",
1005 (EXTRACT_16BITS(obj_tptr
+4))&0xfff,
1006 (EXTRACT_16BITS(obj_tptr
+6))&0xfff);
1007 printf("%s Maximum VPI/VCI: %u/%u",
1009 (EXTRACT_16BITS(obj_tptr
+8))&0xfff,
1010 (EXTRACT_16BITS(obj_tptr
+10))&0xfff);
1017 printf("%s L3 Protocol ID: %s",
1019 tok2str(ethertype_values
,
1020 "Unknown Protocol (0x%04x)",
1021 EXTRACT_16BITS(obj_tptr
+2)));
1022 printf("%s Minimum/Maximum DLCI: %u/%u, %s%s bit DLCI",
1024 (EXTRACT_32BITS(obj_tptr
+4))&0x7fffff,
1025 (EXTRACT_32BITS(obj_tptr
+8))&0x7fffff,
1026 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 0 ) ? "10" : "",
1027 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 2 ) ? "23" : "");
1034 printf("%s LSP Encoding Type: %s (%u)",
1036 tok2str(gmpls_encoding_values
,
1040 printf("%s Switching Type: %s (%u), Payload ID: %s (0x%04x)",
1042 tok2str(gmpls_switch_cap_values
,
1046 tok2str(gmpls_payload_values
,
1048 EXTRACT_16BITS(obj_tptr
+2)),
1049 EXTRACT_16BITS(obj_tptr
+2));
1060 switch(rsvp_obj_ctype
) {
1061 case RSVP_CTYPE_IPV4
:
1062 while(obj_tlen
>= 4 ) {
1063 printf("%s Subobject Type: %s, length %u",
1065 tok2str(rsvp_obj_xro_values
,
1067 RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)),
1070 if (*(obj_tptr
+1) == 0) { /* prevent infinite loops */
1071 printf("%s ERROR: zero length ERO subtype",ident
);
1075 switch(RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)) {
1076 case RSVP_OBJ_XRO_IPV4
:
1077 printf(", %s, %s/%u, Flags: [%s]",
1078 RSVP_OBJ_XRO_MASK_LOOSE(*obj_tptr
) ? "Loose" : "Strict",
1079 ipaddr_string(obj_tptr
+2),
1081 bittok2str(rsvp_obj_rro_flag_values
,
1083 *(obj_tptr
+7))); /* rfc3209 says that this field is rsvd. */
1085 case RSVP_OBJ_XRO_LABEL
:
1086 printf(", Flags: [%s] (%#x), Class-Type: %s (%u), %u",
1087 bittok2str(rsvp_obj_rro_label_flag_values
,
1091 tok2str(rsvp_ctype_values
,
1093 *(obj_tptr
+3) + 256*RSVP_OBJ_RRO
),
1095 EXTRACT_32BITS(obj_tptr
+4));
1097 obj_tlen
-=*(obj_tptr
+1);
1098 obj_tptr
+=*(obj_tptr
+1);
1106 case RSVP_OBJ_HELLO
:
1107 switch(rsvp_obj_ctype
) {
1112 printf("%s Source Instance: 0x%08x, Destination Instance: 0x%08x",
1114 EXTRACT_32BITS(obj_tptr
),
1115 EXTRACT_32BITS(obj_tptr
+4));
1124 case RSVP_OBJ_RESTART_CAPABILITY
:
1125 switch(rsvp_obj_ctype
) {
1129 printf("%s Restart Time: %ums, Recovery Time: %ums",
1131 EXTRACT_32BITS(obj_tptr
),
1132 EXTRACT_32BITS(obj_tptr
+4));
1141 case RSVP_OBJ_SESSION_ATTRIBUTE
:
1142 switch(rsvp_obj_ctype
) {
1143 case RSVP_CTYPE_TUNNEL_IPV4
:
1146 namelen
= *(obj_tptr
+3);
1147 if (obj_tlen
< 4+namelen
)
1149 printf("%s Session Name: ", ident
);
1150 for (i
= 0; i
< namelen
; i
++)
1151 safeputchar(*(obj_tptr
+4+i
));
1152 printf("%s Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
1156 bittok2str(rsvp_session_attribute_flag_values
,
1160 obj_tlen
-=4+*(obj_tptr
+3);
1161 obj_tptr
+=4+*(obj_tptr
+3);
1168 case RSVP_OBJ_GENERALIZED_UNI
:
1169 switch(rsvp_obj_ctype
) {
1170 int subobj_type
,af
,subobj_len
,total_subobj_len
;
1177 /* read variable length subobjects */
1178 total_subobj_len
= obj_tlen
;
1179 while(total_subobj_len
> 0) {
1180 subobj_len
= EXTRACT_16BITS(obj_tptr
);
1181 subobj_type
= (EXTRACT_16BITS(obj_tptr
+2))>>8;
1182 af
= (EXTRACT_16BITS(obj_tptr
+2))&0x00FF;
1184 printf("%s Subobject Type: %s (%u), AF: %s (%u), length: %u",
1186 tok2str(rsvp_obj_generalized_uni_values
, "Unknown", subobj_type
),
1188 tok2str(af_values
, "Unknown", af
), af
,
1191 switch(subobj_type
) {
1192 case RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS
:
1193 case RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS
:
1199 printf("%s UNI IPv4 TNA address: %s",
1200 ident
, ipaddr_string(obj_tptr
+4));
1204 if (subobj_len
< 20)
1206 printf("%s UNI IPv6 TNA address: %s",
1207 ident
, ip6addr_string(obj_tptr
+4));
1212 /* unless we have a TLV parser lets just hexdump */
1219 case RSVP_GEN_UNI_SUBOBJ_DIVERSITY
:
1221 /* unless we have a TLV parser lets just hexdump */
1226 case RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL
:
1227 if (subobj_len
< 16) {
1231 printf("%s U-bit: %x, Label type: %u, Logical port id: %u, Label: %u",
1233 ((EXTRACT_32BITS(obj_tptr
+4))>>31),
1234 ((EXTRACT_32BITS(obj_tptr
+4))&0xFF),
1235 EXTRACT_32BITS(obj_tptr
+8),
1236 EXTRACT_32BITS(obj_tptr
+12));
1239 case RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL
:
1240 if (subobj_len
< 8) {
1244 printf("%s Service level: %u",
1245 ident
, (EXTRACT_32BITS(obj_tptr
+4))>>24);
1252 total_subobj_len
-=subobj_len
;
1253 obj_tptr
+=subobj_len
;
1254 obj_tlen
+=subobj_len
;
1257 if (total_subobj_len
) {
1258 /* unless we have a TLV parser lets just hexdump */
1268 case RSVP_OBJ_RSVP_HOP
:
1269 switch(rsvp_obj_ctype
) {
1270 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1271 case RSVP_CTYPE_IPV4
:
1274 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1276 ipaddr_string(obj_tptr
),
1277 EXTRACT_32BITS(obj_tptr
+4));
1281 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1284 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1285 case RSVP_CTYPE_IPV6
:
1288 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1290 ip6addr_string(obj_tptr
),
1291 EXTRACT_32BITS(obj_tptr
+16));
1294 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1302 case RSVP_OBJ_TIME_VALUES
:
1303 switch(rsvp_obj_ctype
) {
1307 printf("%s Refresh Period: %ums",
1309 EXTRACT_32BITS(obj_tptr
));
1318 /* those three objects do share the same semantics */
1319 case RSVP_OBJ_SENDER_TSPEC
:
1320 case RSVP_OBJ_ADSPEC
:
1321 case RSVP_OBJ_FLOWSPEC
:
1322 switch(rsvp_obj_ctype
) {
1326 printf("%s Msg-Version: %u, length: %u",
1328 (*obj_tptr
& 0xf0) >> 4,
1329 EXTRACT_16BITS(obj_tptr
+2)<<2);
1330 obj_tptr
+=4; /* get to the start of the service header */
1333 while (obj_tlen
>= 4) {
1334 intserv_serv_tlen
=EXTRACT_16BITS(obj_tptr
+2)<<2;
1335 printf("%s Service Type: %s (%u), break bit %s set, Service length: %u",
1337 tok2str(rsvp_intserv_service_type_values
,"unknown",*(obj_tptr
)),
1339 (*(obj_tptr
+1)&0x80) ? "" : "not",
1342 obj_tptr
+=4; /* get to the start of the parameter list */
1345 while (intserv_serv_tlen
>=4) {
1346 processed
= rsvp_intserv_print(obj_tptr
, obj_tlen
);
1349 obj_tlen
-=processed
;
1350 intserv_serv_tlen
-=processed
;
1351 obj_tptr
+=processed
;
1360 case RSVP_OBJ_FILTERSPEC
:
1361 switch(rsvp_obj_ctype
) {
1362 case RSVP_CTYPE_IPV4
:
1365 printf("%s Source Address: %s, Source Port: %u",
1367 ipaddr_string(obj_tptr
),
1368 EXTRACT_16BITS(obj_tptr
+6));
1373 case RSVP_CTYPE_IPV6
:
1376 printf("%s Source Address: %s, Source Port: %u",
1378 ip6addr_string(obj_tptr
),
1379 EXTRACT_16BITS(obj_tptr
+18));
1386 printf("%s Source Address: %s, Flow Label: %u",
1388 ip6addr_string(obj_tptr
),
1389 EXTRACT_24BITS(obj_tptr
+17));
1393 case RSVP_CTYPE_TUNNEL_IPV6
:
1396 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1398 ipaddr_string(obj_tptr
),
1399 EXTRACT_16BITS(obj_tptr
+18));
1403 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
1406 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1407 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1409 ip6addr_string(obj_tptr
),
1410 EXTRACT_16BITS(obj_tptr
+18),
1412 ip6addr_string(obj_tptr
+20),
1413 EXTRACT_16BITS(obj_tptr
+38));
1418 case RSVP_CTYPE_TUNNEL_IPV4
:
1421 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1423 ipaddr_string(obj_tptr
),
1424 EXTRACT_16BITS(obj_tptr
+6));
1428 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
1431 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1432 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1434 ipaddr_string(obj_tptr
),
1435 EXTRACT_16BITS(obj_tptr
+6),
1437 ipaddr_string(obj_tptr
+8),
1438 EXTRACT_16BITS(obj_tptr
+12));
1447 case RSVP_OBJ_FASTREROUTE
:
1448 /* the differences between c-type 1 and 7 are minor */
1449 obj_ptr
.rsvp_obj_frr
= (const struct rsvp_obj_frr_t
*)obj_tptr
;
1450 bw
.i
= EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->bandwidth
);
1452 switch(rsvp_obj_ctype
) {
1453 case RSVP_CTYPE_1
: /* new style */
1454 if (obj_tlen
< sizeof(struct rsvp_obj_frr_t
))
1456 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1458 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1459 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1460 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1462 printf("%s Include-any: 0x%08x, Exclude-any: 0x%08x, Include-all: 0x%08x",
1464 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1465 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
),
1466 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_all
));
1467 obj_tlen
-=sizeof(struct rsvp_obj_frr_t
);
1468 obj_tptr
+=sizeof(struct rsvp_obj_frr_t
);
1471 case RSVP_CTYPE_TUNNEL_IPV4
: /* old style */
1474 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1476 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1477 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1478 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1480 printf("%s Include Colors: 0x%08x, Exclude Colors: 0x%08x",
1482 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1483 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
));
1493 case RSVP_OBJ_DETOUR
:
1494 switch(rsvp_obj_ctype
) {
1495 case RSVP_CTYPE_TUNNEL_IPV4
:
1496 while(obj_tlen
>= 8) {
1497 printf("%s PLR-ID: %s, Avoid-Node-ID: %s",
1499 ipaddr_string(obj_tptr
),
1500 ipaddr_string(obj_tptr
+4));
1510 case RSVP_OBJ_CLASSTYPE
:
1511 case RSVP_OBJ_CLASSTYPE_OLD
: /* fall through */
1512 switch(rsvp_obj_ctype
) {
1516 EXTRACT_32BITS(obj_tptr
)&0x7);
1525 case RSVP_OBJ_ERROR_SPEC
:
1526 switch(rsvp_obj_ctype
) {
1527 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1528 case RSVP_CTYPE_IPV4
:
1531 error_code
=*(obj_tptr
+5);
1532 error_value
=EXTRACT_16BITS(obj_tptr
+6);
1533 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1535 ipaddr_string(obj_tptr
),
1538 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1540 switch (error_code
) {
1541 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1542 printf(", Error Value: %s (%u)",
1543 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1546 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE
: /* fall through */
1547 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD
:
1548 printf(", Error Value: %s (%u)",
1549 tok2str(rsvp_obj_error_code_diffserv_te_values
,"unknown",error_value
),
1553 printf(", Unknown Error Value (%u)", error_value
);
1560 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1561 case RSVP_CTYPE_IPV6
:
1564 error_code
=*(obj_tptr
+17);
1565 error_value
=EXTRACT_16BITS(obj_tptr
+18);
1566 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1568 ip6addr_string(obj_tptr
),
1571 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1574 switch (error_code
) {
1575 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1576 printf(", Error Value: %s (%u)",
1577 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1592 case RSVP_OBJ_PROPERTIES
:
1593 switch(rsvp_obj_ctype
) {
1597 padbytes
= EXTRACT_16BITS(obj_tptr
+2);
1598 printf("%s TLV count: %u, padding bytes: %u",
1600 EXTRACT_16BITS(obj_tptr
),
1604 /* loop through as long there is anything longer than the TLV header (2) */
1605 while(obj_tlen
>= 2 + padbytes
) {
1606 printf("%s %s TLV (0x%02x), length: %u", /* length includes header */
1608 tok2str(rsvp_obj_prop_tlv_values
,"unknown",*obj_tptr
),
1611 if (obj_tlen
< *(obj_tptr
+1))
1613 if (*(obj_tptr
+1) < 2)
1615 print_unknown_data(obj_tptr
+2,"\n\t\t",*(obj_tptr
+1)-2);
1616 obj_tlen
-=*(obj_tptr
+1);
1617 obj_tptr
+=*(obj_tptr
+1);
1625 case RSVP_OBJ_MESSAGE_ID
: /* fall through */
1626 case RSVP_OBJ_MESSAGE_ID_ACK
: /* fall through */
1627 case RSVP_OBJ_MESSAGE_ID_LIST
:
1628 switch(rsvp_obj_ctype
) {
1633 printf("%s Flags [0x%02x], epoch: %u",
1636 EXTRACT_24BITS(obj_tptr
+1));
1639 /* loop through as long there are no messages left */
1640 while(obj_tlen
>= 4) {
1641 printf("%s Message-ID 0x%08x (%u)",
1643 EXTRACT_32BITS(obj_tptr
),
1644 EXTRACT_32BITS(obj_tptr
));
1654 case RSVP_OBJ_INTEGRITY
:
1655 switch(rsvp_obj_ctype
) {
1657 if (obj_tlen
< sizeof(struct rsvp_obj_integrity_t
))
1659 obj_ptr
.rsvp_obj_integrity
= (const struct rsvp_obj_integrity_t
*)obj_tptr
;
1660 printf("%s Key-ID 0x%04x%08x, Sequence 0x%08x%08x, Flags [%s]",
1662 EXTRACT_16BITS(obj_ptr
.rsvp_obj_integrity
->key_id
),
1663 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->key_id
+2),
1664 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
),
1665 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
+4),
1666 bittok2str(rsvp_obj_integrity_flag_values
,
1668 obj_ptr
.rsvp_obj_integrity
->flags
));
1669 printf("%s MD5-sum 0x%08x%08x%08x%08x ",
1671 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
),
1672 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+4),
1673 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+8),
1674 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+12));
1676 #ifdef HAVE_LIBCRYPTO
1677 sigcheck
= signature_verify(pptr
, plen
, (unsigned char *)obj_ptr
.\
1678 rsvp_obj_integrity
->digest
);
1680 sigcheck
= CANT_CHECK_SIGNATURE
;
1682 printf(" (%s)", tok2str(signature_check_values
, "Unknown", sigcheck
));
1684 obj_tlen
+=sizeof(struct rsvp_obj_integrity_t
);
1685 obj_tptr
+=sizeof(struct rsvp_obj_integrity_t
);
1692 case RSVP_OBJ_ADMIN_STATUS
:
1693 switch(rsvp_obj_ctype
) {
1697 printf("%s Flags [%s]", ident
,
1698 bittok2str(rsvp_obj_admin_status_flag_values
, "none",
1699 EXTRACT_32BITS(obj_tptr
)));
1708 case RSVP_OBJ_LABEL_SET
:
1709 switch(rsvp_obj_ctype
) {
1713 action
= (EXTRACT_16BITS(obj_tptr
)>>8);
1715 printf("%s Action: %s (%u), Label type: %u", ident
,
1716 tok2str(rsvp_obj_label_set_action_values
, "Unknown", action
),
1717 action
, ((EXTRACT_32BITS(obj_tptr
) & 0x7F)));
1720 case LABEL_SET_INCLUSIVE_RANGE
:
1721 case LABEL_SET_EXCLUSIVE_RANGE
: /* fall through */
1723 /* only a couple of subchannels are expected */
1726 printf("%s Start range: %u, End range: %u", ident
,
1727 EXTRACT_32BITS(obj_tptr
+4),
1728 EXTRACT_32BITS(obj_tptr
+8));
1737 while(obj_tlen
>= 4 ) {
1738 printf("%s Subchannel #%u: %u", ident
, subchannel
,
1739 EXTRACT_32BITS(obj_tptr
));
1752 switch (rsvp_obj_ctype
) {
1753 case RSVP_CTYPE_IPV4
:
1756 printf("%s Sub-LSP destination address: %s",
1757 ident
, ipaddr_string(obj_tptr
));
1763 case RSVP_CTYPE_IPV6
:
1766 printf("%s Sub-LSP destination address: %s",
1767 ident
, ip6addr_string(obj_tptr
));
1778 * FIXME those are the defined objects that lack a decoder
1779 * you are welcome to contribute code ;-)
1782 case RSVP_OBJ_SCOPE
:
1783 case RSVP_OBJ_POLICY_DATA
:
1784 case RSVP_OBJ_ACCEPT_LABEL_SET
:
1785 case RSVP_OBJ_PROTECTION
:
1788 print_unknown_data(obj_tptr
,"\n\t ",obj_tlen
); /* FIXME indentation */
1791 /* do we also want to see a hex dump ? */
1792 if (vflag
> 1 || hexdump
==TRUE
)
1793 print_unknown_data(tptr
+sizeof(struct rsvp_object_header
),"\n\t ", /* FIXME indentation */
1794 rsvp_obj_len
-sizeof(struct rsvp_object_header
));
1801 printf("\n\t\t packet exceeded snapshot");
1807 rsvp_print(register const u_char
*pptr
, register u_int len
) {
1809 struct rsvp_common_header
*rsvp_com_header
;
1810 const u_char
*tptr
,*subtptr
;
1811 u_short plen
, tlen
, subtlen
;
1815 rsvp_com_header
= (struct rsvp_common_header
*)pptr
;
1816 TCHECK(*rsvp_com_header
);
1819 * Sanity checking of the header.
1821 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1822 printf("ERROR: RSVP version %u packet not supported",
1823 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1827 /* in non-verbose mode just lets print the basic Message Type*/
1829 printf("RSVPv%u %s Message, length: %u",
1830 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1831 tok2str(rsvp_msg_type_values
, "unknown (%u)",rsvp_com_header
->msg_type
),
1836 /* ok they seem to want to know everything - lets fully decode it */
1838 plen
= tlen
= EXTRACT_16BITS(rsvp_com_header
->length
);
1840 printf("\n\tRSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1841 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1842 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1843 rsvp_com_header
->msg_type
,
1844 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1846 rsvp_com_header
->ttl
,
1847 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1850 * Clear checksum prior to signature verification.
1852 rsvp_com_header
->checksum
[0] = 0;
1853 rsvp_com_header
->checksum
[1] = 0;
1855 if (tlen
< sizeof(const struct rsvp_common_header
)) {
1856 printf("ERROR: common header too short %u < %lu", tlen
,
1857 (unsigned long)sizeof(const struct rsvp_common_header
));
1861 tptr
+=sizeof(const struct rsvp_common_header
);
1862 tlen
-=sizeof(const struct rsvp_common_header
);
1864 switch(rsvp_com_header
->msg_type
) {
1866 case RSVP_MSGTYPE_AGGREGATE
:
1869 rsvp_com_header
= (struct rsvp_common_header
*)subtptr
;
1870 TCHECK(*rsvp_com_header
);
1873 * Sanity checking of the header.
1875 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1876 printf("ERROR: RSVP version %u packet not supported",
1877 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1880 subtlen
=EXTRACT_16BITS(rsvp_com_header
->length
);
1882 printf("\n\t RSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1883 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1884 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1885 rsvp_com_header
->msg_type
,
1886 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1888 rsvp_com_header
->ttl
,
1889 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1892 * Clear checksum prior to signature verification.
1894 rsvp_com_header
->checksum
[0] = 0;
1895 rsvp_com_header
->checksum
[1] = 0;
1897 if (subtlen
< sizeof(const struct rsvp_common_header
)) {
1898 printf("ERROR: common header too short %u < %lu", subtlen
,
1899 (unsigned long)sizeof(const struct rsvp_common_header
));
1903 if (tlen
< subtlen
) {
1904 printf("ERROR: common header too large %u > %u", subtlen
,
1909 subtptr
+=sizeof(const struct rsvp_common_header
);
1910 subtlen
-=sizeof(const struct rsvp_common_header
);
1912 if (rsvp_obj_print(pptr
, plen
, subtptr
,"\n\t ", subtlen
) == -1)
1915 tptr
+=subtlen
+sizeof(const struct rsvp_common_header
);
1916 tlen
-=subtlen
+sizeof(const struct rsvp_common_header
);
1921 case RSVP_MSGTYPE_PATH
:
1922 case RSVP_MSGTYPE_RESV
:
1923 case RSVP_MSGTYPE_PATHERR
:
1924 case RSVP_MSGTYPE_RESVERR
:
1925 case RSVP_MSGTYPE_PATHTEAR
:
1926 case RSVP_MSGTYPE_RESVTEAR
:
1927 case RSVP_MSGTYPE_RESVCONF
:
1928 case RSVP_MSGTYPE_HELLO_OLD
:
1929 case RSVP_MSGTYPE_HELLO
:
1930 case RSVP_MSGTYPE_ACK
:
1931 case RSVP_MSGTYPE_SREFRESH
:
1932 if (rsvp_obj_print(pptr
, plen
, tptr
,"\n\t ", tlen
) == -1)
1937 print_unknown_data(tptr
,"\n\t ",tlen
);
1943 printf("\n\t\t packet exceeded snapshot");