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
, u_int plen
, const u_char
*tptr
,
640 const char *ident
, u_int tlen
) {
642 const struct rsvp_object_header
*rsvp_obj_header
;
643 const u_char
*obj_tptr
;
645 const struct rsvp_obj_integrity_t
*rsvp_obj_integrity
;
646 const struct rsvp_obj_frr_t
*rsvp_obj_frr
;
649 u_short rsvp_obj_len
,rsvp_obj_ctype
,obj_tlen
,intserv_serv_tlen
;
650 int hexdump
,processed
,padbytes
,error_code
,error_value
,i
,sigcheck
;
657 u_int action
, subchannel
;
659 while(tlen
>=sizeof(struct rsvp_object_header
)) {
660 /* did we capture enough for fully decoding the object header ? */
661 if (!TTEST2(*tptr
, sizeof(struct rsvp_object_header
)))
664 rsvp_obj_header
= (const struct rsvp_object_header
*)tptr
;
665 rsvp_obj_len
=EXTRACT_16BITS(rsvp_obj_header
->length
);
666 rsvp_obj_ctype
=rsvp_obj_header
->ctype
;
668 if(rsvp_obj_len
% 4) {
669 printf("%sERROR: object header size %u not a multiple of 4", ident
, rsvp_obj_len
);
672 if(rsvp_obj_len
< sizeof(struct rsvp_object_header
)) {
673 printf("%sERROR: object header too short %u < %lu", ident
, rsvp_obj_len
,
674 (unsigned long)sizeof(const struct rsvp_object_header
));
678 printf("%s%s Object (%u) Flags: [%s",
680 tok2str(rsvp_obj_values
,
682 rsvp_obj_header
->class_num
),
683 rsvp_obj_header
->class_num
,
684 ((rsvp_obj_header
->class_num
)&0x80) ? "ignore" : "reject");
686 if (rsvp_obj_header
->class_num
> 128)
688 ((rsvp_obj_header
->class_num
)&0x40) ? "and forward" : "silently");
690 printf(" if unknown], Class-Type: %s (%u), length: %u",
691 tok2str(rsvp_ctype_values
,
693 ((rsvp_obj_header
->class_num
)<<8)+rsvp_obj_ctype
),
697 if(tlen
< rsvp_obj_len
) {
698 printf("%sERROR: object goes past end of objects TLV", ident
);
702 obj_tptr
=tptr
+sizeof(struct rsvp_object_header
);
703 obj_tlen
=rsvp_obj_len
-sizeof(struct rsvp_object_header
);
705 /* did we capture enough for fully decoding the object ? */
706 if (!TTEST2(*tptr
, rsvp_obj_len
))
710 switch(rsvp_obj_header
->class_num
) {
711 case RSVP_OBJ_SESSION
:
712 switch(rsvp_obj_ctype
) {
713 case RSVP_CTYPE_IPV4
:
716 printf("%s IPv4 DestAddress: %s, Protocol ID: 0x%02x",
718 ipaddr_string(obj_tptr
),
719 *(obj_tptr
+sizeof(struct in_addr
)));
720 printf("%s Flags: [0x%02x], DestPort %u",
723 EXTRACT_16BITS(obj_tptr
+6));
728 case RSVP_CTYPE_IPV6
:
731 printf("%s IPv6 DestAddress: %s, Protocol ID: 0x%02x",
733 ip6addr_string(obj_tptr
),
734 *(obj_tptr
+sizeof(struct in6_addr
)));
735 printf("%s Flags: [0x%02x], DestPort %u",
737 *(obj_tptr
+sizeof(struct in6_addr
)+1),
738 EXTRACT_16BITS(obj_tptr
+sizeof(struct in6_addr
)+2));
743 case RSVP_CTYPE_TUNNEL_IPV6
:
746 printf("%s IPv6 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
748 ip6addr_string(obj_tptr
),
749 EXTRACT_16BITS(obj_tptr
+18),
750 ip6addr_string(obj_tptr
+20));
755 case RSVP_CTYPE_14
: /* IPv6 p2mp LSP Tunnel */
758 printf("%s IPv6 P2MP LSP ID: 0x%08x, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
760 EXTRACT_32BITS(obj_tptr
),
761 EXTRACT_16BITS(obj_tptr
+6),
762 ip6addr_string(obj_tptr
+8));
767 case RSVP_CTYPE_13
: /* IPv4 p2mp LSP Tunnel */
770 printf("%s IPv4 P2MP LSP ID: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
772 ipaddr_string(obj_tptr
),
773 EXTRACT_16BITS(obj_tptr
+6),
774 ipaddr_string(obj_tptr
+8));
778 case RSVP_CTYPE_TUNNEL_IPV4
:
779 case RSVP_CTYPE_UNI_IPV4
:
782 printf("%s IPv4 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
784 ipaddr_string(obj_tptr
),
785 EXTRACT_16BITS(obj_tptr
+6),
786 ipaddr_string(obj_tptr
+8));
795 case RSVP_OBJ_CONFIRM
:
796 switch(rsvp_obj_ctype
) {
797 case RSVP_CTYPE_IPV4
:
798 if (obj_tlen
< sizeof(struct in_addr
))
800 printf("%s IPv4 Receiver Address: %s",
802 ipaddr_string(obj_tptr
));
803 obj_tlen
-=sizeof(struct in_addr
);
804 obj_tptr
+=sizeof(struct in_addr
);
807 case RSVP_CTYPE_IPV6
:
808 if (obj_tlen
< sizeof(struct in6_addr
))
810 printf("%s IPv6 Receiver Address: %s",
812 ip6addr_string(obj_tptr
));
813 obj_tlen
-=sizeof(struct in6_addr
);
814 obj_tptr
+=sizeof(struct in6_addr
);
822 case RSVP_OBJ_NOTIFY_REQ
:
823 switch(rsvp_obj_ctype
) {
824 case RSVP_CTYPE_IPV4
:
825 if (obj_tlen
< sizeof(struct in_addr
))
827 printf("%s IPv4 Notify Node Address: %s",
829 ipaddr_string(obj_tptr
));
830 obj_tlen
-=sizeof(struct in_addr
);
831 obj_tptr
+=sizeof(struct in_addr
);
834 case RSVP_CTYPE_IPV6
:
835 if (obj_tlen
< sizeof(struct in6_addr
))
837 printf("%s IPv6 Notify Node Address: %s",
839 ip6addr_string(obj_tptr
));
840 obj_tlen
-=sizeof(struct in6_addr
);
841 obj_tptr
+=sizeof(struct in6_addr
);
849 case RSVP_OBJ_SUGGESTED_LABEL
: /* fall through */
850 case RSVP_OBJ_UPSTREAM_LABEL
: /* fall through */
851 case RSVP_OBJ_RECOVERY_LABEL
: /* fall through */
853 switch(rsvp_obj_ctype
) {
855 while(obj_tlen
>= 4 ) {
856 printf("%s Label: %u", ident
, EXTRACT_32BITS(obj_tptr
));
864 printf("%s Generalized Label: %u",
866 EXTRACT_32BITS(obj_tptr
));
873 printf("%s Waveband ID: %u%s Start Label: %u, Stop Label: %u",
875 EXTRACT_32BITS(obj_tptr
),
877 EXTRACT_32BITS(obj_tptr
+4),
878 EXTRACT_32BITS(obj_tptr
+8));
888 switch(rsvp_obj_ctype
) {
892 printf("%s Reservation Style: %s, Flags: [0x%02x]",
894 tok2str(rsvp_resstyle_values
,
896 EXTRACT_24BITS(obj_tptr
+1)),
906 case RSVP_OBJ_SENDER_TEMPLATE
:
907 switch(rsvp_obj_ctype
) {
908 case RSVP_CTYPE_IPV4
:
911 printf("%s Source Address: %s, Source Port: %u",
913 ipaddr_string(obj_tptr
),
914 EXTRACT_16BITS(obj_tptr
+6));
919 case RSVP_CTYPE_IPV6
:
922 printf("%s Source Address: %s, Source Port: %u",
924 ip6addr_string(obj_tptr
),
925 EXTRACT_16BITS(obj_tptr
+18));
929 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
932 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
933 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
935 ip6addr_string(obj_tptr
),
936 EXTRACT_16BITS(obj_tptr
+18),
938 ip6addr_string(obj_tptr
+20),
939 EXTRACT_16BITS(obj_tptr
+38));
944 case RSVP_CTYPE_TUNNEL_IPV4
:
947 printf("%s IPv4 Tunnel Sender Address: %s, LSP-ID: 0x%04x",
949 ipaddr_string(obj_tptr
),
950 EXTRACT_16BITS(obj_tptr
+6));
954 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
957 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
958 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
960 ipaddr_string(obj_tptr
),
961 EXTRACT_16BITS(obj_tptr
+6),
963 ipaddr_string(obj_tptr
+8),
964 EXTRACT_16BITS(obj_tptr
+12));
973 case RSVP_OBJ_LABEL_REQ
:
974 switch(rsvp_obj_ctype
) {
976 while(obj_tlen
>= 4 ) {
977 printf("%s L3 Protocol ID: %s",
979 tok2str(ethertype_values
,
980 "Unknown Protocol (0x%04x)",
981 EXTRACT_16BITS(obj_tptr
+2)));
989 printf("%s L3 Protocol ID: %s",
991 tok2str(ethertype_values
,
992 "Unknown Protocol (0x%04x)",
993 EXTRACT_16BITS(obj_tptr
+2)));
994 printf(",%s merge capability",((*(obj_tptr
+4))&0x80) ? "no" : "" );
995 printf("%s Minimum VPI/VCI: %u/%u",
997 (EXTRACT_16BITS(obj_tptr
+4))&0xfff,
998 (EXTRACT_16BITS(obj_tptr
+6))&0xfff);
999 printf("%s Maximum VPI/VCI: %u/%u",
1001 (EXTRACT_16BITS(obj_tptr
+8))&0xfff,
1002 (EXTRACT_16BITS(obj_tptr
+10))&0xfff);
1009 printf("%s L3 Protocol ID: %s",
1011 tok2str(ethertype_values
,
1012 "Unknown Protocol (0x%04x)",
1013 EXTRACT_16BITS(obj_tptr
+2)));
1014 printf("%s Minimum/Maximum DLCI: %u/%u, %s%s bit DLCI",
1016 (EXTRACT_32BITS(obj_tptr
+4))&0x7fffff,
1017 (EXTRACT_32BITS(obj_tptr
+8))&0x7fffff,
1018 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 0 ) ? "10" : "",
1019 (((EXTRACT_16BITS(obj_tptr
+4)>>7)&3) == 2 ) ? "23" : "");
1026 printf("%s LSP Encoding Type: %s (%u)",
1028 tok2str(gmpls_encoding_values
,
1032 printf("%s Switching Type: %s (%u), Payload ID: %s (0x%04x)",
1034 tok2str(gmpls_switch_cap_values
,
1038 tok2str(gmpls_payload_values
,
1040 EXTRACT_16BITS(obj_tptr
+2)),
1041 EXTRACT_16BITS(obj_tptr
+2));
1052 switch(rsvp_obj_ctype
) {
1053 case RSVP_CTYPE_IPV4
:
1054 while(obj_tlen
>= 4 ) {
1055 printf("%s Subobject Type: %s, length %u",
1057 tok2str(rsvp_obj_xro_values
,
1059 RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)),
1062 if (*(obj_tptr
+1) == 0) { /* prevent infinite loops */
1063 printf("%s ERROR: zero length ERO subtype",ident
);
1067 switch(RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr
)) {
1068 case RSVP_OBJ_XRO_IPV4
:
1069 printf(", %s, %s/%u, Flags: [%s]",
1070 RSVP_OBJ_XRO_MASK_LOOSE(*obj_tptr
) ? "Loose" : "Strict",
1071 ipaddr_string(obj_tptr
+2),
1073 bittok2str(rsvp_obj_rro_flag_values
,
1075 *(obj_tptr
+7))); /* rfc3209 says that this field is rsvd. */
1077 case RSVP_OBJ_XRO_LABEL
:
1078 printf(", Flags: [%s] (%#x), Class-Type: %s (%u), %u",
1079 bittok2str(rsvp_obj_rro_label_flag_values
,
1083 tok2str(rsvp_ctype_values
,
1085 *(obj_tptr
+3) + 256*RSVP_OBJ_RRO
),
1087 EXTRACT_32BITS(obj_tptr
+4));
1089 obj_tlen
-=*(obj_tptr
+1);
1090 obj_tptr
+=*(obj_tptr
+1);
1098 case RSVP_OBJ_HELLO
:
1099 switch(rsvp_obj_ctype
) {
1104 printf("%s Source Instance: 0x%08x, Destination Instance: 0x%08x",
1106 EXTRACT_32BITS(obj_tptr
),
1107 EXTRACT_32BITS(obj_tptr
+4));
1116 case RSVP_OBJ_RESTART_CAPABILITY
:
1117 switch(rsvp_obj_ctype
) {
1121 printf("%s Restart Time: %ums, Recovery Time: %ums",
1123 EXTRACT_32BITS(obj_tptr
),
1124 EXTRACT_32BITS(obj_tptr
+4));
1133 case RSVP_OBJ_SESSION_ATTRIBUTE
:
1134 switch(rsvp_obj_ctype
) {
1135 case RSVP_CTYPE_TUNNEL_IPV4
:
1138 namelen
= *(obj_tptr
+3);
1139 if (obj_tlen
< 4+namelen
)
1141 printf("%s Session Name: ", ident
);
1142 for (i
= 0; i
< namelen
; i
++)
1143 safeputchar(*(obj_tptr
+4+i
));
1144 printf("%s Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
1148 bittok2str(rsvp_session_attribute_flag_values
,
1152 obj_tlen
-=4+*(obj_tptr
+3);
1153 obj_tptr
+=4+*(obj_tptr
+3);
1160 case RSVP_OBJ_GENERALIZED_UNI
:
1161 switch(rsvp_obj_ctype
) {
1162 int subobj_type
,af
,subobj_len
,total_subobj_len
;
1169 /* read variable length subobjects */
1170 total_subobj_len
= obj_tlen
;
1171 while(total_subobj_len
> 0) {
1172 subobj_len
= EXTRACT_16BITS(obj_tptr
);
1173 subobj_type
= (EXTRACT_16BITS(obj_tptr
+2))>>8;
1174 af
= (EXTRACT_16BITS(obj_tptr
+2))&0x00FF;
1176 printf("%s Subobject Type: %s (%u), AF: %s (%u), length: %u",
1178 tok2str(rsvp_obj_generalized_uni_values
, "Unknown", subobj_type
),
1180 tok2str(af_values
, "Unknown", af
), af
,
1183 switch(subobj_type
) {
1184 case RSVP_GEN_UNI_SUBOBJ_SOURCE_TNA_ADDRESS
:
1185 case RSVP_GEN_UNI_SUBOBJ_DESTINATION_TNA_ADDRESS
:
1191 printf("%s UNI IPv4 TNA address: %s",
1192 ident
, ipaddr_string(obj_tptr
+4));
1196 if (subobj_len
< 20)
1198 printf("%s UNI IPv6 TNA address: %s",
1199 ident
, ip6addr_string(obj_tptr
+4));
1204 /* unless we have a TLV parser lets just hexdump */
1211 case RSVP_GEN_UNI_SUBOBJ_DIVERSITY
:
1213 /* unless we have a TLV parser lets just hexdump */
1218 case RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL
:
1219 if (subobj_len
< 16) {
1223 printf("%s U-bit: %x, Label type: %u, Logical port id: %u, Label: %u",
1225 ((EXTRACT_32BITS(obj_tptr
+4))>>31),
1226 ((EXTRACT_32BITS(obj_tptr
+4))&0xFF),
1227 EXTRACT_32BITS(obj_tptr
+8),
1228 EXTRACT_32BITS(obj_tptr
+12));
1231 case RSVP_GEN_UNI_SUBOBJ_SERVICE_LEVEL
:
1232 if (subobj_len
< 8) {
1236 printf("%s Service level: %u",
1237 ident
, (EXTRACT_32BITS(obj_tptr
+4))>>24);
1244 total_subobj_len
-=subobj_len
;
1245 obj_tptr
+=subobj_len
;
1246 obj_tlen
+=subobj_len
;
1249 if (total_subobj_len
) {
1250 /* unless we have a TLV parser lets just hexdump */
1260 case RSVP_OBJ_RSVP_HOP
:
1261 switch(rsvp_obj_ctype
) {
1262 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1263 case RSVP_CTYPE_IPV4
:
1266 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1268 ipaddr_string(obj_tptr
),
1269 EXTRACT_32BITS(obj_tptr
+4));
1273 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1276 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1277 case RSVP_CTYPE_IPV6
:
1280 printf("%s Previous/Next Interface: %s, Logical Interface Handle: 0x%08x",
1282 ip6addr_string(obj_tptr
),
1283 EXTRACT_32BITS(obj_tptr
+16));
1286 hexdump
=TRUE
; /* unless we have a TLV parser lets just hexdump */
1294 case RSVP_OBJ_TIME_VALUES
:
1295 switch(rsvp_obj_ctype
) {
1299 printf("%s Refresh Period: %ums",
1301 EXTRACT_32BITS(obj_tptr
));
1310 /* those three objects do share the same semantics */
1311 case RSVP_OBJ_SENDER_TSPEC
:
1312 case RSVP_OBJ_ADSPEC
:
1313 case RSVP_OBJ_FLOWSPEC
:
1314 switch(rsvp_obj_ctype
) {
1318 printf("%s Msg-Version: %u, length: %u",
1320 (*obj_tptr
& 0xf0) >> 4,
1321 EXTRACT_16BITS(obj_tptr
+2)<<2);
1322 obj_tptr
+=4; /* get to the start of the service header */
1325 while (obj_tlen
>= 4) {
1326 intserv_serv_tlen
=EXTRACT_16BITS(obj_tptr
+2)<<2;
1327 printf("%s Service Type: %s (%u), break bit %s set, Service length: %u",
1329 tok2str(rsvp_intserv_service_type_values
,"unknown",*(obj_tptr
)),
1331 (*(obj_tptr
+1)&0x80) ? "" : "not",
1334 obj_tptr
+=4; /* get to the start of the parameter list */
1337 while (intserv_serv_tlen
>=4) {
1338 processed
= rsvp_intserv_print(obj_tptr
, obj_tlen
);
1341 obj_tlen
-=processed
;
1342 intserv_serv_tlen
-=processed
;
1343 obj_tptr
+=processed
;
1352 case RSVP_OBJ_FILTERSPEC
:
1353 switch(rsvp_obj_ctype
) {
1354 case RSVP_CTYPE_IPV4
:
1357 printf("%s Source Address: %s, Source Port: %u",
1359 ipaddr_string(obj_tptr
),
1360 EXTRACT_16BITS(obj_tptr
+6));
1365 case RSVP_CTYPE_IPV6
:
1368 printf("%s Source Address: %s, Source Port: %u",
1370 ip6addr_string(obj_tptr
),
1371 EXTRACT_16BITS(obj_tptr
+18));
1378 printf("%s Source Address: %s, Flow Label: %u",
1380 ip6addr_string(obj_tptr
),
1381 EXTRACT_24BITS(obj_tptr
+17));
1385 case RSVP_CTYPE_TUNNEL_IPV6
:
1388 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1390 ipaddr_string(obj_tptr
),
1391 EXTRACT_16BITS(obj_tptr
+18));
1395 case RSVP_CTYPE_13
: /* IPv6 p2mp LSP tunnel */
1398 printf("%s IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1399 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1401 ip6addr_string(obj_tptr
),
1402 EXTRACT_16BITS(obj_tptr
+18),
1404 ip6addr_string(obj_tptr
+20),
1405 EXTRACT_16BITS(obj_tptr
+38));
1410 case RSVP_CTYPE_TUNNEL_IPV4
:
1413 printf("%s Source Address: %s, LSP-ID: 0x%04x",
1415 ipaddr_string(obj_tptr
),
1416 EXTRACT_16BITS(obj_tptr
+6));
1420 case RSVP_CTYPE_12
: /* IPv4 p2mp LSP tunnel */
1423 printf("%s IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
1424 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
1426 ipaddr_string(obj_tptr
),
1427 EXTRACT_16BITS(obj_tptr
+6),
1429 ipaddr_string(obj_tptr
+8),
1430 EXTRACT_16BITS(obj_tptr
+12));
1439 case RSVP_OBJ_FASTREROUTE
:
1440 /* the differences between c-type 1 and 7 are minor */
1441 obj_ptr
.rsvp_obj_frr
= (const struct rsvp_obj_frr_t
*)obj_tptr
;
1442 bw
.i
= EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->bandwidth
);
1444 switch(rsvp_obj_ctype
) {
1445 case RSVP_CTYPE_1
: /* new style */
1446 if (obj_tlen
< sizeof(struct rsvp_obj_frr_t
))
1448 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1450 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1451 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1452 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1454 printf("%s Include-any: 0x%08x, Exclude-any: 0x%08x, Include-all: 0x%08x",
1456 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1457 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
),
1458 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_all
));
1459 obj_tlen
-=sizeof(struct rsvp_obj_frr_t
);
1460 obj_tptr
+=sizeof(struct rsvp_obj_frr_t
);
1463 case RSVP_CTYPE_TUNNEL_IPV4
: /* old style */
1466 printf("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps",
1468 (int)obj_ptr
.rsvp_obj_frr
->setup_prio
,
1469 (int)obj_ptr
.rsvp_obj_frr
->hold_prio
,
1470 (int)obj_ptr
.rsvp_obj_frr
->hop_limit
,
1472 printf("%s Include Colors: 0x%08x, Exclude Colors: 0x%08x",
1474 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->include_any
),
1475 EXTRACT_32BITS(obj_ptr
.rsvp_obj_frr
->exclude_any
));
1485 case RSVP_OBJ_DETOUR
:
1486 switch(rsvp_obj_ctype
) {
1487 case RSVP_CTYPE_TUNNEL_IPV4
:
1488 while(obj_tlen
>= 8) {
1489 printf("%s PLR-ID: %s, Avoid-Node-ID: %s",
1491 ipaddr_string(obj_tptr
),
1492 ipaddr_string(obj_tptr
+4));
1502 case RSVP_OBJ_CLASSTYPE
:
1503 case RSVP_OBJ_CLASSTYPE_OLD
: /* fall through */
1504 switch(rsvp_obj_ctype
) {
1508 EXTRACT_32BITS(obj_tptr
)&0x7);
1517 case RSVP_OBJ_ERROR_SPEC
:
1518 switch(rsvp_obj_ctype
) {
1519 case RSVP_CTYPE_3
: /* fall through - FIXME add TLV parser */
1520 case RSVP_CTYPE_IPV4
:
1523 error_code
=*(obj_tptr
+5);
1524 error_value
=EXTRACT_16BITS(obj_tptr
+6);
1525 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1527 ipaddr_string(obj_tptr
),
1530 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1532 switch (error_code
) {
1533 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1534 printf(", Error Value: %s (%u)",
1535 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1538 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE
: /* fall through */
1539 case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD
:
1540 printf(", Error Value: %s (%u)",
1541 tok2str(rsvp_obj_error_code_diffserv_te_values
,"unknown",error_value
),
1545 printf(", Unknown Error Value (%u)", error_value
);
1552 case RSVP_CTYPE_4
: /* fall through - FIXME add TLV parser */
1553 case RSVP_CTYPE_IPV6
:
1556 error_code
=*(obj_tptr
+17);
1557 error_value
=EXTRACT_16BITS(obj_tptr
+18);
1558 printf("%s Error Node Address: %s, Flags: [0x%02x]%s Error Code: %s (%u)",
1560 ip6addr_string(obj_tptr
),
1563 tok2str(rsvp_obj_error_code_values
,"unknown",error_code
),
1566 switch (error_code
) {
1567 case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING
:
1568 printf(", Error Value: %s (%u)",
1569 tok2str(rsvp_obj_error_code_routing_values
,"unknown",error_value
),
1584 case RSVP_OBJ_PROPERTIES
:
1585 switch(rsvp_obj_ctype
) {
1589 padbytes
= EXTRACT_16BITS(obj_tptr
+2);
1590 printf("%s TLV count: %u, padding bytes: %u",
1592 EXTRACT_16BITS(obj_tptr
),
1596 /* loop through as long there is anything longer than the TLV header (2) */
1597 while(obj_tlen
>= 2 + padbytes
) {
1598 printf("%s %s TLV (0x%02x), length: %u", /* length includes header */
1600 tok2str(rsvp_obj_prop_tlv_values
,"unknown",*obj_tptr
),
1603 if (obj_tlen
< *(obj_tptr
+1))
1605 if (*(obj_tptr
+1) < 2)
1607 print_unknown_data(obj_tptr
+2,"\n\t\t",*(obj_tptr
+1)-2);
1608 obj_tlen
-=*(obj_tptr
+1);
1609 obj_tptr
+=*(obj_tptr
+1);
1617 case RSVP_OBJ_MESSAGE_ID
: /* fall through */
1618 case RSVP_OBJ_MESSAGE_ID_ACK
: /* fall through */
1619 case RSVP_OBJ_MESSAGE_ID_LIST
:
1620 switch(rsvp_obj_ctype
) {
1625 printf("%s Flags [0x%02x], epoch: %u",
1628 EXTRACT_24BITS(obj_tptr
+1));
1631 /* loop through as long there are no messages left */
1632 while(obj_tlen
>= 4) {
1633 printf("%s Message-ID 0x%08x (%u)",
1635 EXTRACT_32BITS(obj_tptr
),
1636 EXTRACT_32BITS(obj_tptr
));
1646 case RSVP_OBJ_INTEGRITY
:
1647 switch(rsvp_obj_ctype
) {
1649 if (obj_tlen
< sizeof(struct rsvp_obj_integrity_t
))
1651 obj_ptr
.rsvp_obj_integrity
= (const struct rsvp_obj_integrity_t
*)obj_tptr
;
1652 printf("%s Key-ID 0x%04x%08x, Sequence 0x%08x%08x, Flags [%s]",
1654 EXTRACT_16BITS(obj_ptr
.rsvp_obj_integrity
->key_id
),
1655 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->key_id
+2),
1656 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
),
1657 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->sequence
+4),
1658 bittok2str(rsvp_obj_integrity_flag_values
,
1660 obj_ptr
.rsvp_obj_integrity
->flags
));
1661 printf("%s MD5-sum 0x%08x%08x%08x%08x ",
1663 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
),
1664 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+4),
1665 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+8),
1666 EXTRACT_32BITS(obj_ptr
.rsvp_obj_integrity
->digest
+12));
1668 #ifdef HAVE_LIBCRYPTO
1669 sigcheck
= signature_verify(pptr
, plen
, (unsigned char *)obj_ptr
.\
1670 rsvp_obj_integrity
->digest
);
1672 sigcheck
= CANT_CHECK_SIGNATURE
;
1674 printf(" (%s)", tok2str(signature_check_values
, "Unknown", sigcheck
));
1676 obj_tlen
+=sizeof(struct rsvp_obj_integrity_t
);
1677 obj_tptr
+=sizeof(struct rsvp_obj_integrity_t
);
1684 case RSVP_OBJ_ADMIN_STATUS
:
1685 switch(rsvp_obj_ctype
) {
1689 printf("%s Flags [%s]", ident
,
1690 bittok2str(rsvp_obj_admin_status_flag_values
, "none",
1691 EXTRACT_32BITS(obj_tptr
)));
1700 case RSVP_OBJ_LABEL_SET
:
1701 switch(rsvp_obj_ctype
) {
1705 action
= (EXTRACT_16BITS(obj_tptr
)>>8);
1707 printf("%s Action: %s (%u), Label type: %u", ident
,
1708 tok2str(rsvp_obj_label_set_action_values
, "Unknown", action
),
1709 action
, ((EXTRACT_32BITS(obj_tptr
) & 0x7F)));
1712 case LABEL_SET_INCLUSIVE_RANGE
:
1713 case LABEL_SET_EXCLUSIVE_RANGE
: /* fall through */
1715 /* only a couple of subchannels are expected */
1718 printf("%s Start range: %u, End range: %u", ident
,
1719 EXTRACT_32BITS(obj_tptr
+4),
1720 EXTRACT_32BITS(obj_tptr
+8));
1729 while(obj_tlen
>= 4 ) {
1730 printf("%s Subchannel #%u: %u", ident
, subchannel
,
1731 EXTRACT_32BITS(obj_tptr
));
1744 switch (rsvp_obj_ctype
) {
1745 case RSVP_CTYPE_IPV4
:
1748 printf("%s Sub-LSP destination address: %s",
1749 ident
, ipaddr_string(obj_tptr
));
1755 case RSVP_CTYPE_IPV6
:
1758 printf("%s Sub-LSP destination address: %s",
1759 ident
, ip6addr_string(obj_tptr
));
1770 * FIXME those are the defined objects that lack a decoder
1771 * you are welcome to contribute code ;-)
1774 case RSVP_OBJ_SCOPE
:
1775 case RSVP_OBJ_POLICY_DATA
:
1776 case RSVP_OBJ_ACCEPT_LABEL_SET
:
1777 case RSVP_OBJ_PROTECTION
:
1780 print_unknown_data(obj_tptr
,"\n\t ",obj_tlen
); /* FIXME indentation */
1783 /* do we also want to see a hex dump ? */
1784 if (vflag
> 1 || hexdump
==TRUE
)
1785 print_unknown_data(tptr
+sizeof(sizeof(struct rsvp_object_header
)),"\n\t ", /* FIXME indentation */
1786 rsvp_obj_len
-sizeof(struct rsvp_object_header
));
1793 printf("\n\t\t packet exceeded snapshot");
1799 rsvp_print(register const u_char
*pptr
, register u_int len
) {
1801 struct rsvp_common_header
*rsvp_com_header
;
1802 const u_char
*tptr
,*subtptr
;
1803 u_short plen
, tlen
, subtlen
;
1807 rsvp_com_header
= (struct rsvp_common_header
*)pptr
;
1808 TCHECK(*rsvp_com_header
);
1811 * Sanity checking of the header.
1813 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1814 printf("ERROR: RSVP version %u packet not supported",
1815 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1819 /* in non-verbose mode just lets print the basic Message Type*/
1821 printf("RSVPv%u %s Message, length: %u",
1822 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1823 tok2str(rsvp_msg_type_values
, "unknown (%u)",rsvp_com_header
->msg_type
),
1828 /* ok they seem to want to know everything - lets fully decode it */
1830 plen
= tlen
= EXTRACT_16BITS(rsvp_com_header
->length
);
1832 printf("\n\tRSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1833 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1834 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1835 rsvp_com_header
->msg_type
,
1836 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1838 rsvp_com_header
->ttl
,
1839 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1842 * Clear checksum prior to signature verification.
1844 rsvp_com_header
->checksum
[0] = 0;
1845 rsvp_com_header
->checksum
[1] = 0;
1847 if (tlen
< sizeof(const struct rsvp_common_header
)) {
1848 printf("ERROR: common header too short %u < %lu", tlen
,
1849 (unsigned long)sizeof(const struct rsvp_common_header
));
1853 tptr
+=sizeof(const struct rsvp_common_header
);
1854 tlen
-=sizeof(const struct rsvp_common_header
);
1856 switch(rsvp_com_header
->msg_type
) {
1858 case RSVP_MSGTYPE_AGGREGATE
:
1861 rsvp_com_header
= (struct rsvp_common_header
*)subtptr
;
1862 TCHECK(*rsvp_com_header
);
1865 * Sanity checking of the header.
1867 if (RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
) != RSVP_VERSION
) {
1868 printf("ERROR: RSVP version %u packet not supported",
1869 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
));
1872 subtlen
=EXTRACT_16BITS(rsvp_com_header
->length
);
1874 printf("\n\t RSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
1875 RSVP_EXTRACT_VERSION(rsvp_com_header
->version_flags
),
1876 tok2str(rsvp_msg_type_values
, "unknown, type: %u",rsvp_com_header
->msg_type
),
1877 rsvp_com_header
->msg_type
,
1878 bittok2str(rsvp_header_flag_values
,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header
->version_flags
)),
1880 rsvp_com_header
->ttl
,
1881 EXTRACT_16BITS(rsvp_com_header
->checksum
));
1884 * Clear checksum prior to signature verification.
1886 rsvp_com_header
->checksum
[0] = 0;
1887 rsvp_com_header
->checksum
[1] = 0;
1889 if (subtlen
< sizeof(const struct rsvp_common_header
)) {
1890 printf("ERROR: common header too short %u < %lu", subtlen
,
1891 (unsigned long)sizeof(const struct rsvp_common_header
));
1895 if (tlen
< subtlen
) {
1896 printf("ERROR: common header too large %u > %u", subtlen
,
1901 subtptr
+=sizeof(const struct rsvp_common_header
);
1902 subtlen
-=sizeof(const struct rsvp_common_header
);
1904 if (rsvp_obj_print(pptr
, plen
, subtptr
,"\n\t ", subtlen
) == -1)
1907 tptr
+=subtlen
+sizeof(const struct rsvp_common_header
);
1908 tlen
-=subtlen
+sizeof(const struct rsvp_common_header
);
1913 case RSVP_MSGTYPE_PATH
:
1914 case RSVP_MSGTYPE_RESV
:
1915 case RSVP_MSGTYPE_PATHERR
:
1916 case RSVP_MSGTYPE_RESVERR
:
1917 case RSVP_MSGTYPE_PATHTEAR
:
1918 case RSVP_MSGTYPE_RESVTEAR
:
1919 case RSVP_MSGTYPE_RESVCONF
:
1920 case RSVP_MSGTYPE_HELLO_OLD
:
1921 case RSVP_MSGTYPE_HELLO
:
1922 case RSVP_MSGTYPE_ACK
:
1923 case RSVP_MSGTYPE_SREFRESH
:
1924 if (rsvp_obj_print(pptr
, plen
, tptr
,"\n\t ", tlen
) == -1)
1929 print_unknown_data(tptr
,"\n\t ",tlen
);
1935 printf("\n\t\t packet exceeded snapshot");