Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-pcep.c
blobfc34ed206d0208721c4bb3e3b33639470e9022aa
1 /* packet-pcep.c
2 * Routines for PCEP packet disassembly
3 * draft-ietf-pce-pcep-09
4 * draft-ietf-pce-pcep-xro-02
5 * See also RFC 4655, RFC 4657, RFC 5520, RFC 5521, RFC 5440 and RFC 5541
7 * (c) Copyright 2007 Silvia Cristina Tejedor <silviacristina.tejedor@gmail.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
15 * Added support of "A Set of Monitoring Tools for Path Computation Element
16 * (PCE)-Based Architecture" (RFC 5886)
17 * (c) Copyright 2012 Svetoslav Duhovnikov <duhovnikov[AT]gmail.com>
19 * Added support of "PCEP Extensions for Stateful PCE"
20 * (draft-ietf-pce-stateful-pce-09) and
21 * "PCEP Extensions for PCE-initiated LSP Setup in a Stateful PCE Model"
22 * (draft-ietf-pce-pce-initiated-lsp-01) and
23 * "Optimizations of Label Switched Path State Synchronization Procedures for a Stateful PCE"
24 * (draft-ietf-pce-stateful-sync-optimizations-01)
25 * (c) Copyright 2014 Simon Zhong <szhong[AT]juniper.net>
27 * Added support of "PCEP Extensions for Segment Routing"
28 * (draft-ietf-pce-segment-routing-03) and
29 * "Conveying path setup type in PCEP messages"
30 * (draft-ietf-pce-lsp-setup-type-02)
31 * (c) Copyright 2015 Francesco Fondelli <francesco.fondelli[AT]gmail.com>
33 * Added support of "Extensions to the Path Computation Element Communication Protocol (PCEP)
34 * for Point-to-Multipoint Traffic Engineering Label Switched Paths" (RFC 6006)
35 * (c) Copyright 2015 Francesco Paolucci <fr.paolucci[AT].sssup.it>,
36 * Oscar Gonzalez de Dios <oscar.gonzalezdedios@telefonica.com>,
37 * ICT EU PACE Project, www.ict-pace.net
39 * Added support of "PCEP Extensions for Establishing Relationships
40 * Between Sets of LSPs" (draft-ietf-pce-association-group-00)
41 * (c) Copyright 2015 Francesco Fondelli <francesco.fondelli[AT]gmail.com>
43 * Added support of "Conveying Vendor-Specific Constraints in the
44 * Path Computation Element Communication Protocol" (RFC 7470)
45 * Completed support of RFC 6006
46 * Added support of "PCE-Based Computation Procedure to Compute Shortest
47 Constrained Point-to-Multipoint (P2MP) Inter-Domain Traffic Engineering
48 Label Switched Paths" (RFC 7334)
49 * (c) Copyright 2016 Simon Zhong <szhong[AT]juniper.net>
51 * Added support of "Extensions to the Path Computation Element Communication Protocol (PCEP)
52 * to compute service aware Label Switched Path (LSP)." (draft-ietf-pce-pcep-service-aware-13)
53 * Updated support of "PCEP Extensions for Segment Routing" (draft-ietf-pce-segment-routing-08)
54 * (c) Copyright 2017 Simon Zhong <szhong[AT]juniper.net>
55 * Updated support from draft-ietf-pce-segment-routing-08 to RFC 8664 "PCEP Extensions for Segment Routing"
56 * Added support of draft-ietf-pce-segment-routing-policy-cp-05 "PCEP extension to support Segment Routing Policy Candidate Paths"
57 * (c) Copyright 2021 Oscar Gonzalez de Dios <oscar.gonzalezdedios[AT]telefonica.com>
60 #include "config.h"
62 #include <epan/packet.h>
63 #include <epan/expert.h>
64 #include <epan/addr_resolv.h>
65 #include <epan/tfs.h>
66 #include <wsutil/array.h>
67 #include "packet-tcp.h"
69 void proto_register_pcep(void);
70 void proto_reg_handoff_pcep(void);
72 static dissector_handle_t pcep_handle;
74 /* Object-Class */
75 #define PCEP_OPEN_OBJ 1 /* RFC 5440 */
76 #define PCEP_RP_OBJ 2 /* RFC 5440 */
77 #define PCEP_NO_PATH_OBJ 3 /* RFC 5440 */
78 #define PCEP_END_POINT_OBJ 4 /* RFC 5440, XXX extended by RFC 8306 */
79 #define PCEP_BANDWIDTH_OBJ 5 /* RFC 5440 */
80 #define PCEP_METRIC_OBJ 6 /* RFC 5440 */
81 #define PCEP_EXPLICIT_ROUTE_OBJ 7 /* RFC 5440 */
82 #define PCEP_RECORD_ROUTE_OBJ 8 /* RFC 5440 */
83 #define PCEP_LSPA_OBJ 9 /* RFC 5440 */
84 #define PCEP_IRO_OBJ 10 /* RFC 5440 */
85 #define PCEP_SVEC_OBJ 11 /* RFC 5440 */
86 #define PCEP_NOTIFICATION_OBJ 12 /* RFC 5440 */
87 #define PCEP_PCEP_ERROR_OBJ 13 /* RFC 5440 */
88 #define PCEP_LOAD_BALANCING_OBJ 14 /* RFC 5440 */
89 #define PCEP_CLOSE_OBJ 15 /* RFC 5440 */
90 #define PCEP_PATH_KEY_OBJ 16 /* RFC 5520 */
91 #define PCEP_XRO_OBJ 17 /* RFC 5521 */
92 /* 18 is unassigned */
93 #define PCEP_OBJ_MONITORING 19 /* RFC 5886 */
94 #define PCEP_OBJ_PCC_ID_REQ 20 /* RFC 5886 */
95 #define PCEP_OF_OBJ 21 /* RFC 5541 */
96 #define PCEP_CLASSTYPE_OBJ 22 /* RFC 5455 */
97 /* 23 is unassigned */
98 #define PCEP_GLOBAL_CONSTRAINTS_OBJ 24 /* RFC 5557 */
99 #define PCEP_OBJ_PCE_ID 25 /* RFC 5886 */
100 #define PCEP_OBJ_PROC_TIME 26 /* RFC 5886 */
101 #define PCEP_OBJ_OVERLOAD 27 /* RFC 5886 */
102 #define PCEP_OBJ_UNREACH_DESTINATION 28 /* RFC 6006 */
103 #define PCEP_SERO_OBJ 29 /* RFC 8306 */
104 #define PCEP_SRRO_OBJ 30 /* RFC 8306 */
105 #define PCEP_OBJ_BRANCH_NODE_CAPABILITY 31 /* RFC 6006 XXX RFC 8306 */
106 #define PCEP_OBJ_LSP 32 /* RFC 8231 */
107 #define PCEP_OBJ_SRP 33 /* RFC 8231 */
108 #define PCEP_OBJ_VENDOR_INFORMATION 34 /* RFC 7470 */
109 #define PCEP_OBJ_BU 35 /* draft-ietf-pce-pcep-service-aware XXX RFC 8233 */
110 #define PCEP_INTER_LAYER_OBJ 36 /* RFC 8282 */
111 #define PCEP_SWITCH_LAYER_OBJ 37 /* RFC 8282 */
112 #define PCEP_REQ_ADAP_CAP_OBJ 38 /* RFC 8282 */
113 #define PCEP_SERVER_IND_OBJ 39 /* RFC 8282 */
114 #define PCEP_ASSOCIATION_OBJ 40 /* RFC 8697 */
115 #define PCEP_S2LS_OBJ 41 /* RFC 8623 */
116 #define PCEP_WA_OBJ 42 /* RFC 8780 */
117 #define PCEP_FLOWSPEC_OBJ 43 /* RFC 9168 */
118 #define PCEP_CCI_TYPE_OBJ 44 /* RFC 9050 */
119 #define PCEP_PATH_ATTRIB_OBJ 45 /* draft-ietf-pce-multipath-05 */
121 /*Subobjects of EXPLICIT ROUTE Object*/
122 #define PCEP_SUB_IPv4 1
123 #define PCEP_SUB_IPv6 2
124 #define PCEP_SUB_LABEL_CONTROL 3
125 #define PCEP_SUB_UNNUMB_INTERFACE_ID 4
126 #define PCEP_SUB_SR_PRE_IANA 5 /* squatted, pre IANA assignment */
127 #define PCEP_SUB_AUTONOMOUS_SYS_NUM 32
128 #define PCEP_SUB_EXRS 33
129 #define PCEP_SUB_SRLG 34
130 #define PCEP_SUB_SR 36 /* IANA assigned code point */
131 #define PCEP_SUB_SRv6 40
132 #define PCEP_SUB_PKSv4 64
133 #define PCEP_SUB_PKSv6 65
135 /*Possible values of the NI in the NO-PATH object*/
136 #define NO_SATISFYING 0
137 #define CHAIN_BROKEN 1
139 /*Possible values of L in the ERO and IRO objects */
140 #define STRICT_HOP 0
141 #define LOOSE_HOP 1
143 /*Possible values of U in the ERO and RRO objects */
144 #define DOWNSTREAM_LABEL 0
145 #define UPSTREAM_LABEL 1
147 /*Possible values of Notification Type */
148 #define NOT_REQ_CANCEL 1
149 #define PCEP_CONGESTION 2
151 /*Possible values of Notification Value for NT=1*/
152 #define NOTI_PCC_CANCEL_REQ 1
153 #define NOTI_PCE_CANCEL_REQ 2
155 /*Possible values of Notification Value for NT=2*/
156 #define NOTI_PCE_CONGEST 1
157 #define NOTI_PCE_NO_CONGEST 2
159 /*Possible types of errors */
160 #define ESTABLISH_FAILURE 1
161 #define CAP_NOT_SUPPORTED 2
162 #define UNKNOWN_OBJ 3
163 #define NOT_SUPP_OBJ 4
164 #define POLICY_VIOLATION 5
165 #define MANDATORY_OBJ_MIS 6
166 #define SYNCH_PCREQ_MIS 7
167 #define UNKNOWN_REQ_REF 8
168 #define ATTEMPT_2_SESSION 9
169 #define INVALID_OBJ 10
170 #define UNRECO_EXRS_SUBOBJ 11
171 #define DIFFSERV_TE_ERROR 12
172 #define BRPC_FAILURE 13
173 #define GCO_ERROR 15
174 #define P2MP_CAPABILITY_ERROR 16
175 #define P2MP_END_POINTS_ERROR 17
176 #define P2MP_FRAGMENT_ERROR 18
177 #define INVALID_OPERATION 19
178 #define LSP_STATE_SYNCHRONIZATION_ERROR 20
179 #define INVALID_PATH_SETUP_TYPE 21
180 #define BAD_PARAMETER_VALUE 23
181 #define LSP_INSTANTIATION_ERROR 24
182 #define PCEP_STARTTLS_ERROR 25
183 #define ASSOCIATION_ERROR 26
184 #define WSON_RWA_ERROR 27
185 #define H_PCE_ERROR 28
186 #define PATH_COMPUTATION_FAILURE 29
187 #define FLOWSPEC_ERROR 30
188 #define PCECC_FAILURE 31
190 /*Different values of Reason in the CLOSE object */
191 #define NO_EXP_PROV 1
192 #define DEADTIME_PROV 2
193 #define RECEP_MALFORM_MSG 3
195 /*Different values of Attribute in the XRO object */
196 #define ATTR_INTERFACE 0
197 #define ATTR_NODE 1
198 #define ATTR_SRLG 2
200 /*Mask for the flags of HEADER of Messages*/
201 #define PCEP_HDR_MSG_RESERVED 0x1f
203 /*Mask for the type of HEADER of Objects*/
204 #define MASK_OBJ_TYPE 0xF0
206 /*Mask for the flags of HEADER of Objects*/
207 #define PCEP_HDR_OBJ_RESERVED 0xC
208 #define PCEP_HDR_OBJ_P 0x2
209 #define PCEP_HDR_OBJ_I 0x1
211 /*Mask for the flags of OPEN Object*/
212 #define PCEP_OPEN_RES 0x1F
214 /*Mask for the flags of RP Object*/
215 #define PCEP_RP_PRI 0x000007
216 #define PCEP_RP_R 0x000008
217 #define PCEP_RP_B 0x000010
218 #define PCEP_RP_O 0x000020
219 #define PCEP_RP_V 0x000040
220 #define PCEP_RP_S 0x000080
221 #define PCEP_RP_P 0x000100
222 #define PCEP_RP_D 0x000200
223 #define PCEP_RP_M 0x000400
224 #define PCEP_RP_E 0x000800
225 #define PCEP_RP_N 0x001000
226 #define PCEP_RP_F 0x002000
227 #define PCEP_RP_C 0x004000 /* RFC 7334 */
228 #define PCEP_RP_RESERVED 0xFF8000
230 /*Mask for the flags of NO PATH Object*/
231 #define PCEP_NO_PATH_C 0x8000
233 /*Mask for the flags of METRIC Object*/
234 #define PCEP_METRIC_B 0x01
235 #define PCEP_METRIC_C 0x02
237 /*Mask for the flags of LSPA Object*/
238 #define PCEP_LSPA_L 0x01
240 /* Mask to differentiate the value of L and Type (Explicit Object)*/
241 #define Mask_L 0x80
242 #define Mask_Type 0x7f
244 /* RFC 5440 */
245 #define TCP_PORT_PCEP 4189
247 #define IPv4 1
248 #define IPv6 2
250 /*RFC 6006*/
251 #define IPv4_P2MP 3
252 #define IPv6_P2MP 4
253 /*RFC 6006 - End Points Leaf Types */
254 #define EP_P2MP_NEW_LEAF_TYPE 1
255 #define EP_P2MP_OLD_REMOVE_LEAF_TYPE 2
256 #define EP_P2MP_OLD_MODIFY_LEAF_TYPE 3
257 #define EP_P2MP_OLD_UNCHANGED_LEAF_TYPE 4
259 /*Mask for the flags os SVEC Object*/
260 #define PCEP_SVEC_L 0x000001
261 #define PCEP_SVEC_N 0x000002
262 #define PCEP_SVEC_S 0x000004
263 #define PCEP_SVEC_D 0x000008
264 #define PCEP_SVEC_P 0x000010
266 /*Mask for the flags of XRO Object*/
267 #define PCEP_XRO_F 0x0001
269 /*Mask for the flags of MONITORING Object*/
270 #define PCEP_OBJ_MONITORING_FLAGS_L 0x000001
271 #define PCEP_OBJ_MONITORING_FLAGS_G 0x000002
272 #define PCEP_OBJ_MONITORING_FLAGS_P 0x000004
273 #define PCEP_OBJ_MONITORING_FLAGS_C 0x000008
274 #define PCEP_OBJ_MONITORING_FLAGS_I 0x000010
275 #define PCEP_OBJ_MONITORING_FLAGS_RESERVED 0xFFFFE0
277 /*Define types for PCC-ID-REQ Object*/
278 #define PCEP_OBJ_PCC_ID_REQ_IPv4 1
279 #define PCEP_OBJ_PCC_ID_REQ_IPv6 2
281 /*Define types for PCE-ID Object*/
282 #define PCEP_OBJ_PCE_ID_IPv4 1
283 #define PCEP_OBJ_PCE_ID_IPv6 2
285 /*Mask for the flags of PROC-TIME Object*/
286 #define PCEP_OBJ_PROC_TIME_FLAGS_E 0x0001
287 #define PCEP_OBJ_PROC_TIME_FLAGS_RESERVED 0xFFFE
289 /*Mask for the flags of IPv4, IPv6 and UNnumbered InterfaceID Subobjects of RRO Object*/
290 #define PCEP_SUB_LPA 0x01
291 #define PCEP_SUB_LPU 0x02
293 /*Mask for the flags of Label SubObject*/
294 #define PCEP_SUB_LABEL_GL 0x01
296 /* Mask for the flags of LSP Object */
297 #define PCEP_OBJ_LSP_PLSP_ID 0xFFFFF0
298 #define PCEP_OBJ_LSP_FLAGS_D 0x0001
299 #define PCEP_OBJ_LSP_FLAGS_S 0x0002
300 #define PCEP_OBJ_LSP_FLAGS_R 0x0004
301 #define PCEP_OBJ_LSP_FLAGS_A 0x0008
302 #define PCEP_OBJ_LSP_FLAGS_O 0x0070
303 #define PCEP_OBJ_LSP_FLAGS_C 0x0080
304 #define PCEP_OBJ_LSP_FLAGS_RESERVED 0x0F00
306 /* Mask for the flags of SRP Object */
307 #define PCEP_OBJ_SRP_FLAGS_R 0x00000001
309 /* Mask for the flags of Stateful PCE Capability TLV */
310 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_U 0x00000001
311 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_S 0x00000002
312 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_I 0x00000004
313 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_T 0x00000008
314 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_D 0x00000010
315 #define PCEP_TLV_STATEFUL_PCE_CAPABILITY_F 0x00000020
317 /* Mask for the flags of ASSOCIATION Object */
318 #define PCEP_OBJ_ASSOCIATION_FLAGS_R 0x0001
320 /* Mask for the flags of SR PCE Capability TLV */
321 #define PCEP_TLV_SR_PCE_CAPABILITY_L 0x01
323 /* Mask for the flags of Subobjevct SR*/
324 #define PCEP_SUBOBJ_SR_FLAGS_M 0x001
325 #define PCEP_SUBOBJ_SR_FLAGS_C 0x002
326 #define PCEP_SUBOBJ_SR_FLAGS_S 0x004
327 #define PCEP_SUBOBJ_SR_FLAGS_F 0x008
329 /* Mask for the flags of Subobject SRv6 */
330 #define PCEP_SUBOBJ_SRV6_FLAGS_S 0x001
331 #define PCEP_SUBOBJ_SRV6_FLAGS_F 0x002
332 #define PCEP_SUBOBJ_SRV6_FLAGS_T 0x004
333 #define PCEP_SUBOBJ_SRV6_FLAGS_V 0x008
335 static int proto_pcep;
337 static int hf_pcep_endpoint_p2mp_leaf;
338 static int hf_pcep_hdr_msg_flags_reserved;
339 static int hf_pcep_hdr_obj_flags;
340 static int hf_pcep_hdr_obj_flags_reserved;
341 static int hf_pcep_hdr_obj_flags_p;
342 static int hf_pcep_hdr_obj_flags_i;
343 static int hf_pcep_open_flags_res;
344 static int hf_pcep_rp_flags_pri;
345 static int hf_pcep_rp_flags_r;
346 static int hf_pcep_rp_flags_b;
347 static int hf_pcep_rp_flags_o;
348 static int hf_pcep_rp_flags_v;
349 static int hf_pcep_rp_flags_s;
350 static int hf_pcep_rp_flags_p;
351 static int hf_pcep_rp_flags_d;
352 static int hf_pcep_rp_flags_m;
353 static int hf_pcep_rp_flags_e;
354 static int hf_pcep_rp_flags_n;
355 static int hf_pcep_rp_flags_f;
356 static int hf_pcep_rp_flags_c;
357 static int hf_pcep_rp_flags_reserved;
358 static int hf_pcep_no_path_flags_c;
359 static int hf_pcep_metric_flags_c;
360 static int hf_pcep_metric_flags_b;
361 static int hf_pcep_lspa_flags_l;
362 static int hf_pcep_svec_flags_l;
363 static int hf_pcep_svec_flags_n;
364 static int hf_pcep_svec_flags_s;
365 static int hf_pcep_svec_flags_d;
366 static int hf_pcep_svec_flags_p;
367 static int hf_pcep_xro_flags_f;
368 static int hf_pcep_obj_monitoring_flags_reserved;
369 static int hf_pcep_obj_monitoring_flags_l;
370 static int hf_pcep_obj_monitoring_flags_g;
371 static int hf_pcep_obj_monitoring_flags_p;
372 static int hf_pcep_obj_monitoring_flags_c;
373 static int hf_pcep_obj_monitoring_flags_i;
374 static int hf_pcep_obj_monitoring_monitoring_id_number;
375 static int hf_pcep_obj_pcc_id_req_ipv4;
376 static int hf_pcep_obj_pcc_id_req_ipv6;
377 static int hf_pcep_obj_pce_id_ipv4;
378 static int hf_pcep_obj_pce_id_ipv6;
379 static int hf_pcep_obj_proc_time_flags_reserved;
380 static int hf_pcep_obj_proc_time_flags_e;
381 static int hf_pcep_obj_proc_time_cur_proc_time;
382 static int hf_pcep_obj_proc_time_min_proc_time;
383 static int hf_pcep_obj_proc_time_max_proc_time;
384 static int hf_pcep_obj_proc_time_ave_proc_time;
385 static int hf_pcep_obj_proc_time_var_proc_time;
386 static int hf_pcep_obj_overload_duration;
387 static int hf_pcep_subobj_flags_lpa;
388 static int hf_pcep_subobj_flags_lpu;
389 static int hf_pcep_subobj_label_flags_gl;
390 static int hf_pcep_no_path_tlvs_pce;
391 static int hf_pcep_no_path_tlvs_unk_dest;
392 static int hf_pcep_no_path_tlvs_unk_src;
393 static int hf_pcep_no_path_tlvs_brpc;
394 static int hf_pcep_no_path_tlvs_pks;
395 static int hf_pcep_no_path_tlvs_no_gco_migr;
396 static int hf_pcep_no_path_tlvs_no_gco_soln;
397 static int hf_pcep_no_path_tlvs_p2mp;
398 static int hf_PCEPF_MSG;
399 static int hf_PCEPF_OBJECT_CLASS;
400 static int hf_PCEPF_OBJ_OPEN;
401 static int hf_PCEPF_OBJ_RP;
402 static int hf_PCEPF_OBJ_NO_PATH;
403 static int hf_PCEPF_OBJ_END_POINT;
404 static int hf_PCEPF_OBJ_BANDWIDTH;
405 static int hf_PCEPF_OBJ_METRIC;
406 static int hf_PCEPF_OBJ_EXPLICIT_ROUTE;
407 static int hf_PCEPF_OBJ_RECORD_ROUTE;
408 static int hf_PCEPF_OBJ_LSPA;
409 static int hf_PCEPF_OBJ_IRO;
410 static int hf_PCEPF_OBJ_SVEC;
411 static int hf_PCEPF_OBJ_NOTIFICATION;
412 static int hf_PCEPF_OBJ_PCEP_ERROR;
413 static int hf_PCEPF_OBJ_LOAD_BALANCING;
414 static int hf_PCEPF_OBJ_CLOSE;
415 static int hf_PCEPF_OBJ_PATH_KEY;
416 static int hf_PCEPF_OBJ_XRO;
417 static int hf_PCEPF_OBJ_MONITORING;
418 static int hf_PCEPF_OBJ_PCC_ID_REQ;
419 static int hf_PCEPF_OBJ_OF;
420 static int hf_PCEPF_OBJ_CLASSTYPE;
421 static int hf_PCEPF_OBJ_GLOBAL_CONSTRAINTS;
422 static int hf_PCEPF_OBJ_PCE_ID;
423 static int hf_PCEPF_OBJ_PROC_TIME;
424 static int hf_PCEPF_OBJ_OVERLOAD;
425 static int hf_PCEPF_OBJ_UNREACH_DESTINATION;
426 static int hf_PCEPF_OBJ_SERO;
427 static int hf_PCEPF_OBJ_SRRO;
428 static int hf_PCEPF_OBJ_BRANCH_NODE_CAPABILITY;
429 static int hf_PCEPF_OBJ_LSP;
430 static int hf_PCEPF_OBJ_SRP;
431 static int hf_PCEPF_OBJ_VENDOR_INFORMATION;
432 static int hf_PCEPF_OBJ_BU;
433 static int hf_PCEPF_OBJ_INTER_LAYER;
434 static int hf_PCEPF_OBJ_SWITCH_LAYER;
435 static int hf_PCEPF_OBJ_REQ_ADAP_CAP;
436 static int hf_PCEPF_OBJ_SERVER_IND;
437 static int hf_PCEPF_OBJ_ASSOCIATION;
438 static int hf_PCEPF_OBJ_S2LS;
439 static int hf_PCEPF_OBJ_WA;
440 static int hf_PCEPF_OBJ_FLOWSPEC;
441 static int hf_PCEPF_OBJ_CCI_TYPE;
442 static int hf_PCEPF_OBJ_PATH_ATTRIB;
443 static int hf_PCEPF_OBJ_UNKNOWN_TYPE;
444 static int hf_PCEPF_NOTI_TYPE;
445 static int hf_PCEPF_NOTI_VAL1;
446 static int hf_PCEPF_NOTI_VAL2;
447 static int hf_PCEPF_ERROR_TYPE;
448 static int hf_PCEPF_ERROR_VALUE;
449 static int hf_PCEPF_SUBOBJ;
450 static int hf_PCEPF_SUBOBJ_7F;
451 static int hf_PCEPF_SUBOBJ_IPv4;
452 static int hf_PCEPF_SUBOBJ_IPv6;
453 static int hf_PCEPF_SUBOBJ_LABEL_CONTROL;
454 static int hf_PCEPF_SUBOBJ_UNNUM_INTERFACEID;
455 static int hf_PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM;
456 static int hf_PCEPF_SUBOBJ_SRLG;
457 static int hf_PCEPF_SUBOBJ_EXRS;
458 static int hf_PCEPF_SUBOBJ_PKSv4;
459 static int hf_PCEPF_SUBOBJ_PKSv6;
460 static int hf_PCEPF_SUBOBJ_XRO;
461 static int hf_PCEPF_SUBOBJ_SR;
462 static int hf_PCEPF_SUBOBJ_SRv6;
463 #if 0
464 static int hf_PCEPF_SUB_XRO_ATTRIB;
465 #endif
467 static int hf_pcep_obj_open_type;
468 static int hf_pcep_obj_rp_type;
469 static int hf_pcep_obj_no_path_type;
470 static int hf_pcep_obj_end_point_type;
471 static int hf_pcep_obj_bandwidth_type;
472 static int hf_pcep_obj_metric_type;
473 static int hf_pcep_obj_explicit_route_type;
474 static int hf_pcep_obj_record_route_type;
475 static int hf_pcep_obj_lspa_type;
476 static int hf_pcep_obj_iro_type;
477 static int hf_pcep_obj_svec_type;
478 static int hf_pcep_obj_notification_type;
479 static int hf_pcep_obj_pcep_error_type;
480 static int hf_pcep_obj_load_balancing_type;
481 static int hf_pcep_obj_close_type;
482 static int hf_pcep_obj_path_key_type;
483 static int hf_pcep_obj_xro_type;
484 static int hf_pcep_obj_monitoring_type;
485 static int hf_pcep_obj_pcc_id_req_type;
486 static int hf_pcep_obj_of_type;
487 static int hf_pcep_obj_classtype;
488 static int hf_pcep_obj_global_constraints;
489 static int hf_pcep_obj_pce_id_type;
490 static int hf_pcep_obj_proc_time_type;
491 static int hf_pcep_obj_overload_type;
492 static int hf_pcep_obj_unreach_destination_type;
493 static int hf_pcep_obj_sero_type;
494 static int hf_pcep_obj_srro_type;
495 static int hf_pcep_obj_branch_node_capability_type;
496 static int hf_pcep_obj_lsp_type;
497 static int hf_pcep_obj_srp_type;
498 static int hf_pcep_obj_vendor_information_type;
499 static int hf_pcep_obj_bu_type;
500 static int hf_pcep_obj_inter_layer_type;
501 static int hf_pcep_obj_switch_layer_type;
502 static int hf_pcep_obj_req_adap_cap_type;
503 static int hf_pcep_obj_server_ind_type;
504 static int hf_pcep_obj_association_type;
505 static int hf_pcep_obj_s2ls_type;
506 static int hf_pcep_obj_wa_type;
507 static int hf_pcep_obj_flowspec_type;
508 static int hf_pcep_obj_cci_type;
509 static int hf_pcep_obj_path_attrib_type;
511 /* Generated from convert_proto_tree_add_text.pl */
512 static int hf_pcep_xro_obj_flags;
513 static int hf_pcep_open_obj_keepalive;
514 static int hf_pcep_request_id;
515 static int hf_pcep_lspa_obj_reserved;
516 static int hf_pcep_rp_obj_reserved;
517 static int hf_pcep_svec_obj_reserved;
518 static int hf_pcep_rp_obj_flags;
519 static int hf_pcep_lspa_obj_exclude_any;
520 static int hf_pcep_subobj_srlg_attribute;
521 static int hf_pcep_end_point_obj_destination_ipv4_address;
522 static int hf_pcep_subobj_unnumb_interfaceID_reserved_xroobj;
523 static int hf_pcep_balancing_obj_flags;
524 static int hf_pcep_subobj_unnumb_interfaceID_reserved;
525 static int hf_pcep_lspa_obj_setup_priority;
526 static int hf_pcep_svec_obj_request_id_number;
527 static int hf_pcep_end_point_obj_source_ipv4_address;
528 static int hf_pcep_open_obj_sid;
529 static int hf_pcep_subobj_ipv6_padding;
530 static int hf_pcep_notification_obj_reserved;
531 static int hf_pcep_close_obj_reason;
532 static int hf_pcep_subobj_ipv4_attribute;
533 static int hf_pcep_obj_overload_flags;
534 static int hf_pcep_balancing_obj_maximum_number_of_te_lsps;
535 static int hf_pcep_subobj_exrs_reserved;
536 static int hf_pcep_subobj_label_control_length;
537 static int hf_pcep_subobj_ipv4_length;
538 static int hf_pcep_subobj_ipv6_ipv6;
539 static int hf_pcep_lspa_obj_holding_priority;
540 static int hf_pcep_rp_obj_requested_id_number;
541 static int hf_pcep_subobj_pksv6_path_key;
542 static int hf_pcep_subobj_unnumb_interfaceID_router_id;
543 static int hf_pcep_subobj_pksv6_pce_id;
544 static int hf_pcep_tlv_padding;
545 static int hf_pcep_subobj_unnumb_interfaceID_flags;
546 static int hf_pcep_subobj_unnumb_interfaceID_length;
547 static int hf_pcep_obj_proc_time_reserved;
548 static int hf_pcep_object_type;
549 static int hf_pcep_subobj_pksv4_length;
550 static int hf_pcep_subobj_ipv6_prefix_length;
551 static int hf_pcep_subobj_ipv6_length;
552 static int hf_pcep_flags;
553 static int hf_pcep_no_path_obj_reserved;
554 static int hf_pcep_subobj_unnumb_interfaceID_interface_id;
555 static int hf_pcep_close_obj_flags;
556 static int hf_pcep_error_obj_flags;
557 static int hf_pcep_metric_obj_flags;
558 static int hf_pcep_subobj_autonomous_sys_num_reserved;
559 static int hf_pcep_subobj_pksv4_path_key;
560 static int hf_pcep_subobj_label_control_flags;
561 static int hf_pcep_notification_obj_value;
562 static int hf_pcep_subobj_label_control_label;
563 static int hf_pcep_metric_obj_metric_value;
564 static int hf_pcep_no_path_obj_flags;
565 static int hf_pcep_obj_monitoring_reserved;
566 static int hf_pcep_obj_of_code;
567 static int hf_pcep_subobj_label_control_u;
568 static int hf_pcep_subobj_autonomous_sys_num_length;
569 static int hf_pcep_message_length;
570 static int hf_pcep_subobj_ipv4_prefix_length;
571 static int hf_pcep_xro_obj_reserved;
572 static int hf_pcep_subobj_pksv4_pce_id;
573 static int hf_pcep_subobj_pksv6_length;
574 static int hf_pcep_end_point_obj_destination_ipv6_address;
575 static int hf_pcep_subobj_autonomous_sys_num_as_number;
576 static int hf_pcep_notification_obj_flags;
577 static int hf_pcep_subobj_unnumb_interfaceID_attribute;
578 static int hf_pcep_object_length;
579 static int hf_pcep_tlv_data;
580 static int hf_pcep_balancing_obj_reserved;
581 static int hf_pcep_subobj_ipv4_flags;
582 static int hf_pcep_subobj_ipv6_attribute;
583 static int hf_pcep_subobj_srlg_id;
584 static int hf_pcep_balancing_obj_minimum_bandwidth;
585 static int hf_pcep_subobj_unnumb_interfaceID_reserved_rrobj;
586 static int hf_pcep_error_obj_reserved;
587 static int hf_pcep_obj_overload_reserved;
588 static int hf_pcep_notification_obj_type;
589 static int hf_pcep_subobj_ipv6_flags;
590 static int hf_pcep_obj_monitoring_flags;
591 static int hf_pcep_subobj_exrs_length;
592 static int hf_pcep_obj_proc_time_flags;
593 static int hf_pcep_subobj_label_control_reserved;
594 static int hf_pcep_version;
595 static int hf_pcep_lspa_obj_flags;
596 static int hf_pcep_subobj_ipv4_ipv4;
597 static int hf_pcep_tlv_type;
598 static int hf_pcep_subobj_autonomous_sys_num_optional_as_number_high_octets;
599 static int hf_pcep_open_obj_deadtime;
600 static int hf_pcep_bandwidth;
601 static int hf_pcep_tlv_length;
602 static int hf_pcep_subobj_srlg_reserved;
603 static int hf_pcep_metric_obj_type;
604 static int hf_pcep_metric_obj_reserved;
605 static int hf_pcep_svec_obj_flags;
606 static int hf_pcep_open_obj_pcep_version;
607 static int hf_pcep_open_obj_flags;
608 static int hf_pcep_end_point_obj_source_ipv6_address;
609 static int hf_pcep_lspa_obj_include_any;
610 static int hf_pcep_lspa_obj_include_all;
611 static int hf_pcep_subobj_ipv4_padding;
612 static int hf_pcep_subobj_srlg_length;
613 static int hf_pcep_subobj_autonomous_sys_num_attribute;
614 static int hf_pcep_close_obj_reserved;
615 static int hf_pcep_subobj_label_control_c_type;
616 static int hf_pcep_subobj_iro_autonomous_sys_num_l;
617 static int hf_pcep_subobj_autonomous_sys_num_x;
618 static int hf_pcep_subobj_label_control_l;
619 static int hf_pcep_subobj_exrs_l;
620 static int hf_pcep_subobj_unnumb_interfaceID_x;
621 static int hf_pcep_subobj_autonomous_sys_num_l;
622 static int hf_pcep_subobj_pksv6_l;
623 static int hf_pcep_subobj_srlg_x;
624 static int hf_pcep_subobj_ipv4_x;
625 static int hf_pcep_subobj_iro_unnumb_interfaceID_l;
626 static int hf_pcep_subobj_exrs_type;
627 static int hf_pcep_subobj_ipv4_l;
628 static int hf_pcep_of_code;
629 static int hf_pcep_subobj_ipv6_x;
630 static int hf_pcep_no_path_obj_nature_of_issue;
631 static int hf_pcep_subobj_ipv6_l;
632 static int hf_pcep_subobj_pksv4_l;
633 static int hf_pcep_subobj_iro_ipv6_l;
634 static int hf_pcep_subobj_unnumb_interfaceID_l;
635 static int hf_pcep_subobj_iro_ipv4_l;
636 static int hf_pcep_subobj_sr_l;
637 static int hf_pcep_subobj_sr_length;
638 static int hf_pcep_subobj_sr_nt;
639 static int hf_pcep_subobj_sr_flags;
640 static int hf_pcep_subobj_sr_flags_m;
641 static int hf_pcep_subobj_sr_flags_c;
642 static int hf_pcep_subobj_sr_flags_s;
643 static int hf_pcep_subobj_sr_flags_f;
644 static int hf_pcep_subobj_sr_sid;
645 static int hf_pcep_subobj_sr_sid_label;
646 static int hf_pcep_subobj_sr_sid_tc;
647 static int hf_pcep_subobj_sr_sid_s;
648 static int hf_pcep_subobj_sr_sid_ttl;
649 static int hf_pcep_subobj_sr_nai_ipv4_node;
650 static int hf_pcep_subobj_sr_nai_ipv6_node;
651 static int hf_pcep_subobj_sr_nai_local_ipv4_addr;
652 static int hf_pcep_subobj_sr_nai_remote_ipv4_addr;
653 static int hf_pcep_subobj_sr_nai_local_ipv6_addr;
654 static int hf_pcep_subobj_sr_nai_remote_ipv6_addr;
655 static int hf_pcep_subobj_sr_nai_local_node_id;
656 static int hf_pcep_subobj_sr_nai_local_interface_id;
657 static int hf_pcep_subobj_sr_nai_remote_node_id;
658 static int hf_pcep_subobj_sr_nai_remote_interface_id;
659 static int hf_pcep_subobj_srv6_l;
660 static int hf_pcep_subobj_srv6_length;
661 static int hf_pcep_subobj_srv6_nt;
662 static int hf_pcep_subobj_srv6_flags;
663 static int hf_pcep_subobj_srv6_flags_s;
664 static int hf_pcep_subobj_srv6_flags_f;
665 static int hf_pcep_subobj_srv6_flags_t;
666 static int hf_pcep_subobj_srv6_flags_v;
667 static int hf_pcep_subobj_srv6_reserved;
668 static int hf_pcep_subobj_srv6_endpoint_behavior;
669 static int hf_pcep_subobj_srv6_sid;
670 static int hf_pcep_subobj_srv6_nai;
671 static int hf_pcep_subobj_srv6_nai_ipv6_node;
672 static int hf_pcep_subobj_srv6_nai_local_ipv6_addr;
673 static int hf_pcep_subobj_srv6_nai_remote_ipv6_addr;
674 static int hf_pcep_subobj_srv6_nai_local_interface_id;
675 static int hf_pcep_subobj_srv6_nai_remote_interface_id;
676 static int hf_pcep_subobj_srv6_sid_struct;
677 static int hf_pcep_subobj_srv6_sid_struct_lb_len;
678 static int hf_pcep_subobj_srv6_sid_struct_ln_len;
679 static int hf_pcep_subobj_srv6_sid_struct_fun_len;
680 static int hf_pcep_subobj_srv6_sid_struct_arg_len;
681 static int hf_pcep_subobj_srv6_sid_struct_reserved;
682 static int hf_pcep_subobj_srv6_sid_struct_flags;
684 static int hf_pcep_stateful_pce_capability_flags;
685 static int hf_pcep_lsp_update_capability;
686 static int hf_pcep_include_db_version;
687 static int hf_pcep_lsp_instantiation_capability;
688 static int hf_pcep_triggered_resync;
689 static int hf_pcep_delta_lsp_sync_capability;
690 static int hf_pcep_triggered_initial_sync;
691 static int hf_pcep_obj_lsp_flags;
692 static int hf_pcep_obj_lsp_plsp_id;
693 static int hf_pcep_obj_lsp_flags_d;
694 static int hf_pcep_obj_lsp_flags_s;
695 static int hf_pcep_obj_lsp_flags_r;
696 static int hf_pcep_obj_lsp_flags_a;
697 static int hf_pcep_obj_lsp_flags_o;
698 static int hf_pcep_obj_lsp_flags_c;
699 static int hf_pcep_obj_lsp_flags_reserved;
700 static int hf_pcep_obj_srp_flags;
701 static int hf_pcep_obj_srp_flags_r;
702 static int hf_pcep_obj_srp_id_number;
703 static int hf_pcep_symbolic_path_name;
704 static int hf_pcep_ipv4_lsp_id_tunnel_sender_address;
705 static int hf_pcep_ipv4_lsp_id_lsp_id;
706 static int hf_pcep_ipv4_lsp_id_tunnel_id;
707 static int hf_pcep_ipv4_lsp_id_extended_tunnel_id;
708 static int hf_pcep_ipv4_lsp_id_tunnel_endpoint_address;
709 static int hf_pcep_ipv6_lsp_id_tunnel_sender_address;
710 static int hf_pcep_ipv6_lsp_id_lsp_id;
711 static int hf_pcep_ipv6_lsp_id_tunnel_id;
712 static int hf_pcep_ipv6_lsp_id_extended_tunnel_id;
713 static int hf_pcep_ipv6_lsp_id_tunnel_endpoint_address;
714 static int hf_pcep_lsp_error_code;
715 static int hf_pcep_rsvp_user_error_spec;
716 static int hf_pcep_lsp_state_db_version_number;
717 static int hf_pcep_speaker_entity_id;
718 static int hf_pcep_path_setup_type_reserved24;
719 static int hf_pcep_path_setup_type;
720 static int hf_pcep_path_setup_type_capability_reserved24;
721 static int hf_pcep_path_setup_type_capability_psts;
722 static int hf_pcep_path_setup_type_capability_pst;
723 static int hf_pcep_sr_pce_capability_reserved; //deprecated
724 static int hf_pcep_sr_pce_capability_sub_tlv_reserved;
725 static int hf_pcep_sr_pce_capability_flags; //deprecated
726 static int hf_pcep_sr_pce_capability_sub_tlv_flags;
727 static int hf_pcep_sr_pce_capability_flags_l; //deprecated
728 static int hf_pcep_sr_pce_capability_sub_tlv_flags_x;
729 static int hf_pcep_sr_pce_capability_sub_tlv_flags_n;
730 static int hf_pcep_sr_pce_capability_msd; //deprecated
731 static int hf_pcep_sr_pce_capability_sub_tlv_msd;
732 static int hf_pcep_association_reserved;
733 static int hf_pcep_association_flags;
734 static int hf_pcep_association_flags_r;
735 static int hf_pcep_association_type;
736 static int hf_pcep_association_id;
737 static int hf_pcep_association_source_ipv4;
738 static int hf_pcep_association_source_ipv6;
739 static int hf_pcep_association_source_global;
740 static int hf_pcep_association_id_extended;
742 static int hf_pcep_association_id_extended_color;
743 static int hf_pcep_association_id_extended_ipv4_endpoint;
744 static int hf_pcep_association_id_extended_ipv6_endpoint;
745 static int hf_pcep_unreach_destination_obj_ipv4_address;
746 static int hf_pcep_unreach_destination_obj_ipv6_address;
748 static int hf_pcep_op_conf_assoc_range_reserved;
749 static int hf_pcep_op_conf_assoc_range_assoc_type;
750 static int hf_pcep_op_conf_assoc_range_start_assoc;
751 static int hf_pcep_op_conf_assoc_range_range;
753 static int hf_pcep_srcpag_info_color;
754 static int hf_pcep_srcpag_info_destination_endpoint;
755 static int hf_pcep_srcpag_info_preference;
758 static int hf_pcep_sr_policy_name;
759 static int hf_pcep_sr_policy_cpath_id_proto_origin;
760 static int hf_pcep_sr_policy_cpath_id_originator_asn;
761 static int hf_pcep_sr_policy_cpath_id_originator_address;
762 static int hf_pcep_sr_policy_cpath_id_discriminator;
763 static int hf_pcep_sr_policy_cpath_name;
764 static int hf_pcep_sr_policy_cpath_preference;
766 static int hf_pcep_enterprise_number;
767 static int hf_pcep_enterprise_specific_info;
768 static int hf_pcep_tlv_enterprise_number;
769 static int hf_pcep_tlv_enterprise_specific_info;
771 static int hf_pcep_bu_reserved;
772 static int hf_pcep_bu_butype;
773 static int hf_pcep_bu_utilization;
775 static int hf_pcep_path_setup_type_capability_sub_tlv_type;
776 static int hf_pcep_path_setup_type_capability_sub_tlv_length;
778 static int ett_pcep;
779 static int ett_pcep_hdr;
780 static int ett_pcep_obj_open;
781 static int ett_pcep_obj_request_parameters;
782 static int ett_pcep_obj_no_path;
783 static int ett_pcep_obj_end_point;
784 static int ett_pcep_obj_bandwidth;
785 static int ett_pcep_obj_metric;
786 static int ett_pcep_obj_explicit_route;
787 static int ett_pcep_obj_record_route;
788 static int ett_pcep_obj_lspa;
789 static int ett_pcep_obj_iro;
790 static int ett_pcep_obj_svec;
791 static int ett_pcep_obj_notification;
792 static int ett_pcep_obj_error;
793 static int ett_pcep_obj_load_balancing;
794 static int ett_pcep_obj_close;
795 static int ett_pcep_obj_path_key;
796 static int ett_pcep_obj_xro;
797 static int ett_pcep_obj_monitoring;
798 static int ett_pcep_obj_pcc_id_req;
799 static int ett_pcep_obj_of;
800 static int ett_pcep_obj_classtype;
801 static int ett_pcep_obj_global_constraints;
802 static int ett_pcep_obj_pce_id;
803 static int ett_pcep_obj_proc_time;
804 static int ett_pcep_obj_overload;
805 static int ett_pcep_obj_unreach_destination;
806 static int ett_pcep_obj_sero;
807 static int ett_pcep_obj_srro;
808 static int ett_pcep_obj_branch_node_capability;
809 static int ett_pcep_obj_lsp;
810 static int ett_pcep_obj_srp;
811 static int ett_pcep_obj_vendor_information;
812 static int ett_pcep_obj_bu;
813 static int ett_pcep_obj_inter_layer;
814 static int ett_pcep_obj_switch_layer;
815 static int ett_pcep_obj_req_adap_cap;
816 static int ett_pcep_obj_server_ind;
817 static int ett_pcep_obj_association;
818 static int ett_pcep_obj_s2ls;
819 static int ett_pcep_obj_wa;
820 static int ett_pcep_obj_flowspec;
821 static int ett_pcep_obj_cci_type;
822 static int ett_pcep_obj_path_attrib;
823 static int ett_pcep_obj_unknown;
825 /* Generated from convert_proto_tree_add_text.pl */
826 static expert_field ei_pcep_pcep_object_body_non_defined;
827 static expert_field ei_pcep_non_defined_object;
828 static expert_field ei_pcep_object_length;
829 static expert_field ei_pcep_subobject_bad_length;
830 static expert_field ei_pcep_non_defined_subobject;
831 static expert_field ei_pcep_unknown_type_object;
833 /* PCEP message types.*/
834 typedef enum {
835 PCEP_MSG_NO_VALID,
836 PCEP_MSG_OPEN,
837 PCEP_MSG_KEEPALIVE,
838 PCEP_MSG_PATH_COMPUTATION_REQUEST,
839 PCEP_MSG_PATH_COMPUTATION_REPLY,
840 PCEP_MSG_NOTIFICATION,
841 PCEP_MSG_ERROR,
842 PCEP_MSG_CLOSE,
843 PCEP_MSG_PATH_COMPUTATION_MONITORING_REQUEST,
844 PCEP_MSG_PATH_COMPUTATION_MONITORING_REPLY,
845 PCEP_MSG_PATH_COMPUTATION_LSP_STATE_REPORT,
846 PCEP_MSG_PATH_COMPUTATION_LSP_UPDATE_REQUEST,
847 PCEP_MSG_INITIATE,
848 PCEP_MSG_STARTTLS
849 } pcep_message_types;
851 static const value_string message_type_vals[] = {
852 {PCEP_MSG_OPEN, "Open" },
853 {PCEP_MSG_KEEPALIVE, "Keepalive" },
854 {PCEP_MSG_PATH_COMPUTATION_REQUEST, "Path Computation Request (PCReq)" },
855 {PCEP_MSG_PATH_COMPUTATION_REPLY, "Path Computation Reply (PCRep)" },
856 {PCEP_MSG_NOTIFICATION, "Notification (PCNtf)" },
857 {PCEP_MSG_ERROR, "Error (PCErr)" },
858 {PCEP_MSG_CLOSE, "Close" },
859 {PCEP_MSG_PATH_COMPUTATION_MONITORING_REQUEST, "Path Computation Monitoring Request (PCMonReq)" },
860 {PCEP_MSG_PATH_COMPUTATION_MONITORING_REPLY, "Path Computation Monitoring Reply (PCMonRep)" },
861 {PCEP_MSG_PATH_COMPUTATION_LSP_STATE_REPORT, "Path Computation LSP State Report (PCRpt)" },
862 {PCEP_MSG_PATH_COMPUTATION_LSP_UPDATE_REQUEST, "Path Computation LSP Update Request (PCUpd)" },
863 {PCEP_MSG_INITIATE, "Path Computation LSP Initiate (PCInitiate)" },
864 {PCEP_MSG_STARTTLS, "StartTLS" },
865 {0, NULL }
868 static const value_string pcep_class_vals[] = {
869 {PCEP_OPEN_OBJ, "OPEN OBJECT" },
870 {PCEP_RP_OBJ, "RP OBJECT" },
871 {PCEP_NO_PATH_OBJ, "NO-PATH OBJECT" },
872 {PCEP_END_POINT_OBJ, "END-POINT OBJECT" },
873 {PCEP_BANDWIDTH_OBJ, "BANDWIDTH OBJECT" },
874 {PCEP_METRIC_OBJ, "METRIC OBJECT" },
875 {PCEP_EXPLICIT_ROUTE_OBJ, "EXPLICIT ROUTE OBJECT (ERO)" },
876 {PCEP_RECORD_ROUTE_OBJ, "RECORD ROUTE OBJECT (RRO)" },
877 {PCEP_LSPA_OBJ, "LSPA OBJECT" },
878 {PCEP_IRO_OBJ, "IRO OBJECT" },
879 {PCEP_SVEC_OBJ, "SVEC OBJECT" },
880 {PCEP_NOTIFICATION_OBJ, "NOTIFICATION OBJECT" },
881 {PCEP_PCEP_ERROR_OBJ, "PCEP ERROR OBJECT" },
882 {PCEP_LOAD_BALANCING_OBJ, "LOAD BALANCING OBJECT" },
883 {PCEP_CLOSE_OBJ, "CLOSE OBJECT" },
884 {PCEP_PATH_KEY_OBJ, "PATH-KEY OBJECT" },
885 {PCEP_XRO_OBJ, "EXCLUDE ROUTE OBJECT (XRO)" },
886 {PCEP_OBJ_MONITORING, "MONITORING OBJECT" },
887 {PCEP_OBJ_PCC_ID_REQ, "PCC-ID-REQ OBJECT" },
888 {PCEP_OF_OBJ, "OBJECTIVE FUNCTION OBJECT (OF)" },
889 {PCEP_CLASSTYPE_OBJ, "CLASSTYPE OBJECT" },
890 {PCEP_GLOBAL_CONSTRAINTS_OBJ, "GLOBAL-CONSTRAINTS OBJECT" },
891 {PCEP_OBJ_PCE_ID, "PCE-ID OBJECT" },
892 {PCEP_OBJ_PROC_TIME, "PROC-TIME OBJECT" },
893 {PCEP_OBJ_OVERLOAD, "OVERLOAD OBJECT" },
894 {PCEP_OBJ_UNREACH_DESTINATION, "UNREACH-DESTINATION OBJECT" },
895 {PCEP_SERO_OBJ, "SECONDARY EXPLICIT ROUTE OBJECT (SERO)" },
896 {PCEP_SRRO_OBJ, "SECONDARY RECORD ROUTE OBJECT (SRRO)" },
897 {PCEP_OBJ_BRANCH_NODE_CAPABILITY, "BRANCH NODE CAPABILITY OBJECT (BNC)" },
898 {PCEP_OBJ_LSP, "LSP OBJECT" },
899 {PCEP_OBJ_SRP, "SRP OBJECT" },
900 {PCEP_OBJ_VENDOR_INFORMATION, "VENDOR-INFORMATION OBJECT" },
901 {PCEP_OBJ_BU, "BU OBJECT" },
902 {PCEP_INTER_LAYER_OBJ, "INTER-LAYER OBJECT" },
903 {PCEP_SWITCH_LAYER_OBJ, "SWITCH-LAYER OBJECT" },
904 {PCEP_REQ_ADAP_CAP_OBJ, "REQ-ADAP-CAP OBJECT" },
905 {PCEP_SERVER_IND_OBJ, "SERVER-INDICATION OBJECT" },
906 {PCEP_ASSOCIATION_OBJ, "ASSOCIATION OBJECT" },
907 {PCEP_S2LS_OBJ, "S2LS OBJECT" },
908 {PCEP_WA_OBJ, "WA OBJECT" },
909 {PCEP_FLOWSPEC_OBJ, "FLOWSPEC OBJECT" },
910 {PCEP_CCI_TYPE_OBJ, "CCI OBJECT-TYPE" },
911 {PCEP_PATH_ATTRIB_OBJ, "PATH-ATTRIB OBJECT" },
912 {0, NULL }
914 static value_string_ext pcep_class_vals_ext = VALUE_STRING_EXT_INIT(pcep_class_vals);
916 static const value_string pcep_obj_open_type_vals[] = {
917 {1, "Open"},
918 {0, NULL }
921 static const value_string pcep_obj_rp_type_vals[] = {
922 {1, "Request Parameters"},
923 {0, NULL }
926 static const value_string pcep_obj_no_path_type_vals[] = {
927 {1, "No Path"},
928 {0, NULL }
931 static const value_string pcep_obj_end_point_type_vals[] = {
932 {1, "IPv4 addresses"},
933 {2, "IPv6 addresses"},
934 {3, "IPv4" },
935 {4, "IPv6" },
936 {0, NULL }
939 static const value_string pcep_obj_bandwidth_type_vals[] = {
940 {1, "Requested bandwidth" },
941 {2, "Bandwidth of an existing TE LSP for which a reoptimization is requested" },
942 {0, NULL }
945 static const value_string pcep_obj_metric_type_vals[] = {
946 {1, "Metric"},
947 {0, NULL }
950 static const value_string pcep_obj_explicit_route_type_vals[] = {
951 {1, "Explicit Route"},
952 {0, NULL }
955 static const value_string pcep_obj_record_route_type_vals[] = {
956 {1, "Recorded Route"},
957 {0, NULL }
960 static const value_string pcep_obj_lspa_type_vals[] = {
961 {1, "LSP Attributes"},
962 {0, NULL }
965 static const value_string pcep_obj_iro_type_vals[] = {
966 {1, "Include Route"},
967 {0, NULL }
970 static const value_string pcep_obj_svec_type_vals[] = {
971 {1, "Synchronization Vector"},
972 {0, NULL }
975 static const value_string pcep_obj_notification_type_vals[] = {
976 {1, "Notification"},
977 {0, NULL }
980 static const value_string pcep_obj_pcep_error_type_vals[] = {
981 {1, "PCEP Error"},
982 {0, NULL }
985 static const value_string pcep_obj_load_balancing_type_vals[] = {
986 {1, "Load Balancing"},
987 {0, NULL }
990 static const value_string pcep_obj_close_type_vals[] = {
991 {1, "Close"},
992 {0, NULL }
995 static const value_string pcep_obj_path_key_type_vals[] = {
996 {1, "Path Key"},
997 {0, NULL }
1000 static const value_string pcep_obj_xro_type_vals[] = {
1001 {1, "Route exclusion"},
1002 {0, NULL }
1005 static const value_string pcep_obj_monitoring_type_vals[] = {
1006 {1, "Monitoring"},
1007 {0, NULL }
1010 static const value_string pcep_obj_pcc_id_req_type_vals[] = {
1011 {1, "IPv4 addresses"},
1012 {2, "IPv6 addresses"},
1013 {0, NULL }
1016 static const value_string pcep_obj_of_type_vals[] = {
1017 {1, "Objective Function"},
1018 {0, NULL }
1021 static const value_string pcep_obj_pce_id_type_vals[] = {
1022 {1, "IPv4 addresses"},
1023 {2, "IPv6 addresses"},
1024 {0, NULL }
1027 static const value_string pcep_obj_proc_time_type_vals[] = {
1028 {1, "PROC-TIME"},
1029 {0, NULL }
1032 static const value_string pcep_obj_overload_type_vals[] = {
1033 {1, "overload"},
1034 {0, NULL }
1037 static const value_string pcep_obj_unreach_destination_type_vals[] = {
1038 {1, "IPv4"},
1039 {2, "IPv6"},
1040 {0, NULL }
1043 static const value_string pcep_obj_sero_type_vals[] = {
1044 {1, "SERO"},
1045 {0, NULL }
1048 static const value_string pcep_obj_srro_type_vals[] = {
1049 {1, "SRRO"},
1050 {0, NULL }
1053 static const value_string pcep_obj_branch_node_capability_type_vals[] = {
1054 {1, "Branch node list"},
1055 {2, "Non-branch node list"},
1056 {0, NULL }
1059 static const value_string pcep_obj_lsp_type_vals[] = {
1060 {1, "LSP"},
1061 {0, NULL }
1064 static const value_string pcep_obj_srp_type_vals[] = {
1065 {1, "SRP"},
1066 {0, NULL }
1069 static const value_string pcep_obj_vendor_information_type_vals[] = {
1070 {1, "Vendor-Specific Constraints"},
1071 {0, NULL }
1074 static const value_string pcep_obj_bu_type_vals[] = {
1075 {1, "BU"},
1076 {0, NULL }
1079 static const value_string pcep_obj_association_type_vals[] = {
1080 {1, "IPv4"},
1081 {2, "IPv6"},
1082 {0, NULL }
1085 static const value_string pcep_subobj_vals[] = {
1086 {PCEP_SUB_IPv4, "SUBOBJECT IPv4" },
1087 {PCEP_SUB_IPv6, "SUBOBJECT IPv6" },
1088 {PCEP_SUB_LABEL_CONTROL, "SUBOBJECT LABEL" },
1089 {PCEP_SUB_UNNUMB_INTERFACE_ID, "SUBOBJECT UNNUMBERED INTERFACE-ID" },
1090 {PCEP_SUB_AUTONOMOUS_SYS_NUM, "SUBOBJECT AUTONOMOUS SYSTEM NUMBER" },
1091 {PCEP_SUB_SRLG, "SUBOBJECT SRLG" },
1092 {PCEP_SUB_SR_PRE_IANA, "SUBOBJECT SR" },
1093 {PCEP_SUB_PKSv4, "SUBOBJECT PATH KEY (IPv4)" },
1094 {PCEP_SUB_PKSv6, "SUBOBJECT PATH KEY (IPv6)" },
1095 {PCEP_SUB_SR, "SUBOBJECT SR" },
1096 {PCEP_SUB_SRv6, "SUBOBJECT SRv6" },
1097 {0, NULL }
1101 static const value_string pcep_subobj_xro_vals[] = {
1102 {PCEP_SUB_IPv4, "SUBOBJECT IPv4" },
1103 {PCEP_SUB_IPv6, "SUBOBJECT IPv6" },
1104 {PCEP_SUB_UNNUMB_INTERFACE_ID, "SUBOBJECT UNNUMBERED INTERFACE-ID" },
1105 {PCEP_SUB_AUTONOMOUS_SYS_NUM, "SUBOBJECT AUTONOMOUS SYSTEM NUMBER" },
1106 {PCEP_SUB_SRLG, "SUBOBJECT SRLG" },
1107 {0, NULL }
1110 /*In the NO-PATH Object the two different possibilities that NI can have*/
1111 static const value_string pcep_no_path_obj_vals[] = {
1112 {NO_SATISFYING, "No path satisfying the set of constraints could be found" },
1113 {CHAIN_BROKEN, "PCEP Chain Broken" },
1114 {0, NULL }
1117 /*Different values of "Type (T)" in the METRIC Obj */
1118 static const value_string pcep_metric_obj_vals[] = {
1119 { 0, "Reserved" },
1120 { 1, "IGP Metric" },
1121 { 2, "TE Metric" },
1122 { 3, "Hop Counts" },
1123 { 4, "Aggregate bandwidth consumption" },
1124 { 5, "Load of the most loaded link" },
1125 { 6, "Cumulative IGP cost" },
1126 { 7, "Cumulative TE cost" },
1127 { 8, "P2MP IGM metric" },
1128 { 9, "P2MP TE metric" },
1129 {10, "P2MP hop count metric" },
1130 {11, "Segment-ID (SID) Depth" }, /* RFC 8664 */
1131 {12, "Path Delay metric" }, /* draft-ietf-pce-pcep-service-aware */
1132 {13, "Path Delay Variation metric" }, /* draft-ietf-pce-pcep-service-aware */
1133 {14, "Path Loss metric" }, /* draft-ietf-pce-pcep-service-aware */
1134 {15, "P2MP Path Delay metric" }, /* draft-ietf-pce-pcep-service-aware */
1135 {16, "P2MP Path Delay variation metric"}, /* draft-ietf-pce-pcep-service-aware */
1136 {17, "P2MP Path Loss metric" }, /* draft-ietf-pce-pcep-service-aware */
1137 {18, "Number of adaptations on a path" }, /* RFC8282 */
1138 {19, "Number of layers on a path" }, /* RFC8282 */
1139 {20, "Domain Count metric" }, /* RFC8685 */
1140 {21, "Border Node Count metric" }, /* RFC8685 */
1141 {0, NULL }
1144 /*Different values for (L) in the ERO and IRO Objs */
1145 static const value_string pcep_route_l_obj_vals[] = {
1146 {STRICT_HOP, "Strict Hop" },
1147 {LOOSE_HOP, "Loose Hop" },
1148 {0, NULL }
1151 /*Different values of the direction of the label (U) in the ERO and RRO Objs */
1152 static const value_string pcep_route_u_obj_vals[] = {
1153 {DOWNSTREAM_LABEL, "Downstream Label" },
1154 {UPSTREAM_LABEL, "Upstream Label" },
1155 {0, NULL }
1158 /*Values of Notification type*/
1159 static const value_string pcep_notification_types_vals[] = {
1160 {NOT_REQ_CANCEL, "Pending Request Cancelled" },
1161 {PCEP_CONGESTION, "PCE Congestion" },
1162 {0, NULL }
1165 /*Values of Notification value for Notification Type=1*/
1166 static const value_string pcep_notification_values1_vals[] = {
1167 {NOTI_PCC_CANCEL_REQ, "PCC Cancels a set of Pending Request (s)" },
1168 {NOTI_PCE_CANCEL_REQ, "PCE Cancels a set of Pending Request (s)" },
1169 {0, NULL }
1172 /*Values of Notification value for Notification Type=2*/
1173 static const value_string pcep_notification_values2_vals[] = {
1174 {NOTI_PCE_CONGEST, "PCE in Congested State" },
1175 {NOTI_PCE_NO_CONGEST, "PCE no Longer in Congested state" },
1176 {0, NULL }
1180 /* PCEP TLVs */
1181 static const value_string pcep_tlvs_vals[] = {
1182 {1, "NO-PATH-VECTOR TLV" },
1183 {2, "OVERLOAD-DURATION TLV" },
1184 {3, "REQ-MISSING TLV" },
1185 {4, "OF-list TLV" },
1186 {5, "Order TLV" },
1187 {6, "P2MP Capable" },
1188 {7, "VENDOR-INFORMATION-TLV" },
1189 {8, "Wavelength Selection" },
1190 {9, "Wavelength Restriction" },
1191 {10, "Wavelength Allocation" },
1192 {11, "Optical Interface Class List" },
1193 {12, "Client Signal Information" },
1194 {13, "H-PCE-CAPABILITY" },
1195 {14, "Domain-ID" },
1196 {15, "H-PCE-FLAG" },
1197 {16, "STATEFUL-PCE-CAPABILITY" },
1198 {17, "SYMBOLIC-PATH-NAME" },
1199 {18, "IPV4-LSP-IDENTIFIERS" },
1200 {19, "IPV6-LSP-IDENTIFIERS" },
1201 {20, "LSP-ERROR-CODE" },
1202 {21, "RSVP-ERROR-SPEC" },
1203 {23, "LSP-DB-VERSION" },
1204 {24, "SPEAKER-ENTITY-ID" },
1205 {26, "SR-PCE-CAPABILITY (deprecated)" },
1206 {27, "PATH-SETUP-TYPE (PRE-IANA)" },
1207 {28, "PATH-SETUP-TYPE" },
1208 {29, "OP-CONF-ASSOC-RANGE" },
1209 {30, "GLOBAL-ASSOCIATION-SOURCE" },
1210 {31, "EXTENDED-ASSOCIATION-ID" },
1211 {32, "P2MP-IPV4-LSP-IDENTIFIERS" },
1212 {33, "P2MP-IPV6-LSP-IDENTIFIERS" },
1213 {34, "PATH-SETUP-TYPE-CAPABILITY" },
1214 {35, "ASSOC-Type-List" },
1215 {36, "AUTO-BANDWIDTH-CAPABILITY" },
1216 {37, "AUTO-BANDWIDTH-ATTRIBUTES" },
1217 {38, "Path Protection Association Group TLV" },
1218 {39, "IPV4-ADDRESS" },
1219 {40, "IPV6-ADDRESS" },
1220 {41, "UNNUMBERED-ENDPOINT" },
1221 {42, "LABEL-REQUEST" },
1222 {43, "LABEL-SET" },
1223 {44, "PROTECTION-ATTRIBUTE" },
1224 {45, "GMPLS-CAPABILITY" },
1225 {46, "DISJOINTNESS-CONFIGURATION" },
1226 {47, "DISJOINTNESS-STATUS" },
1227 {48, "POLICY-PARAMETERS-TLV" },
1228 {49, "SCHED-LSP-ATTRIBUTE" },
1229 {50, "SCHED-PD-LSP-ATTRIBUTE" },
1230 {51, "PCE-FLOWSPEC-CAPABILITY TLV" },
1231 {52, "FLOW FILTER TLV" },
1232 {53, "L2 FLOW FILTER TLV" },
1233 {54, "Bidirectional LSP Association Group TLV" },
1234 {55, "TE-PATH-BINDING" }, /* TEMPORARY - registered 2021-03-29, expires 2022-03-29 draft-ietf-pce-binding-label-sid-07 */
1235 {56, "SRPOLICY-POL-NAME" }, /* TEMPORARY - registered 2021-03-30, expires 2022-03-30 draft-ietf-pce-segment-routing-policy-cp-04 */
1236 {57, "SRPOLICY-CPATH-ID" }, /* TEMPORARY - registered 2021-03-30, expires 2022-03-30 draft-ietf-pce-segment-routing-policy-cp-04 */
1237 {58, "SRPOLICY-CPATH-NAME" }, /* TEMPORARY - registered 2021-03-30, expires 2022-03-30 draft-ietf-pce-segment-routing-policy-cp-04 */
1238 {59, "SRPOLICY-CPATH-PREFERENCE" }, /* TEMPORARY - registered 2021-03-30, expires 2022-03-30 draft-ietf-pce-segment-routing-policy-cp-04 */
1239 {64, "LSP-EXTENDED-FLAG" },
1240 {65, "VIRTUAL-NETWORK-TLV" },
1241 {0, NULL }
1245 /*Values of Objective Functions*/
1246 static const value_string pcep_of_vals[] = {
1247 { 1, "Minimum Cost Path (MCP)" },
1248 { 2, "Minimum Load Path (MLP)" },
1249 { 3, "Maximum residual Bandwidth Path (MBP)" },
1250 { 4, "Minimize aggregate Bandwidth Consumption (MBC)" },
1251 { 5, "Minimize the Load of the most loaded Link (MLL)" },
1252 { 6, "Minimize the Cumulative Cost of a set of paths (MCC)" },
1253 { 7, "Shortest Path Tree (SPT)" }, /* RFC 6006 */
1254 { 8, "Minimum Cost Tree (MCT)" }, /* RFC 6006 */
1255 { 9, "Minimum Packet Loss Path (MPLP)" }, /* draft-ietf-pce-pcep-service-aware */
1256 {10, "Maximum Under-Utilized Path (MUP)" }, /* draft-ietf-pce-pcep-service-aware */
1257 {11, "Maximum Reserved Under-Utilized Path (MRUP)" }, /* draft-ietf-pce-pcep-service-aware */
1258 {0, NULL }
1262 /*Values of Bandwidth Utilization (BU) Object bandwidth utilization Type */
1263 static const value_string pcep_bu_butype_vals[] = {
1264 {0, "Reserved" }, /* draft-ietf-pce-pcep-service-aware */
1265 {1, "LBU (Link Bandwidth Utilization)" }, /* draft-ietf-pce-pcep-service-aware */
1266 {2, "LRBU (Link Residual Bandwidth Utilization)" }, /* draft-ietf-pce-pcep-service-aware */
1267 {0, NULL }
1271 /*Values of different types of errors*/
1272 static const value_string pcep_error_types_obj_vals[] = {
1273 {ESTABLISH_FAILURE, "PCEP Session Establishment Failure" },
1274 {CAP_NOT_SUPPORTED, "Capability non supported" },
1275 {UNKNOWN_OBJ, "Unknown Object" },
1276 {NOT_SUPP_OBJ, "Not Supported Object" },
1277 {POLICY_VIOLATION, "Policy Violation" },
1278 {MANDATORY_OBJ_MIS, "Mandatory Object Missing" },
1279 {SYNCH_PCREQ_MIS, "Synchronized Path Computation Request Missing" },
1280 {UNKNOWN_REQ_REF, "Unknown Request Reference" },
1281 {ATTEMPT_2_SESSION, "Attempt to Establish a Second PCEP Session" },
1282 {INVALID_OBJ, "Reception of an invalid object" },
1283 {UNRECO_EXRS_SUBOBJ, "Unrecognized EXRS Subobject" },
1284 {DIFFSERV_TE_ERROR, "Diffserv-aware TE error" },
1285 {BRPC_FAILURE, "BRPC procedure completion failure" },
1286 {GCO_ERROR, "Global Concurrent Optimization error" },
1287 {P2MP_CAPABILITY_ERROR, "P2PM capability error" },
1288 {P2MP_END_POINTS_ERROR, "P2PM END-POINTS error" },
1289 {P2MP_FRAGMENT_ERROR, "P2PM Fragmentation error" },
1290 {INVALID_OPERATION, "Invalid Operation" },
1291 {LSP_STATE_SYNCHRONIZATION_ERROR, "LSP State synchronization error" },
1292 {BAD_PARAMETER_VALUE, "Bad parameter value" },
1293 {LSP_INSTANTIATION_ERROR, "LSP instantiation error" },
1294 {ASSOCIATION_ERROR, "Association instantiation error" },
1295 {WSON_RWA_ERROR, "WSON RWA error" },
1296 {H_PCE_ERROR, "H-PCE error" },
1297 {PATH_COMPUTATION_FAILURE, "Path computation failure" },
1298 {0, NULL }
1300 static value_string_ext pcep_error_types_obj_vals_ext = VALUE_STRING_EXT_INIT(pcep_error_types_obj_vals);
1302 /*Error values for error type 1*/
1303 static const value_string pcep_error_value_1_vals[] = {
1304 {1, "Reception of an invalid Open msg or a non Open msg"},
1305 {2, "No Open Message received before the expiration of the OpenWait Timer "},
1306 {3, "Unacceptable and non Negotiable session characteristics"},
1307 {4, "Unacceptable but Negotiable session characteristics"},
1308 {5, "Reception of a second Open Message with still Unacceptable Session characteristics"},
1309 {6, "Reception of a PCEPrr message proposing unacceptable session characteristics"},
1310 {7, "NO Keepalive or PCEPrr message received before the expiration of the Keepwait timer supported"},
1311 {8, "PCEP version not supported"},
1312 {0, NULL}
1315 /*Error values for error type 3*/
1316 static const value_string pcep_error_value_3_vals[] = {
1317 {1, "Unrecognized object class"},
1318 {2, "Unrecognized object type"},
1319 {0, NULL}
1322 /*Error values for error type 4*/
1323 static const value_string pcep_error_value_4_vals[] = {
1324 {1, "Not supported object class"},
1325 {2, "Not supported object type"},
1326 {4, "Not supported parameter"},
1327 {5, "Unsupported network performance constraint"},
1328 {6, "BANDWIDTH object type 3 or 4 not supported"},
1329 {7, "Unsupported endpoint type in END-POINTS Generalized Endpoint object type"},
1330 {8, "Unsupported TLV present in END-POINTS Generalized Endpoint object type"},
1331 {9, "Unsupported granularity in the RP object flags"},
1332 {0, NULL}
1335 /*Error values for error type 5*/
1336 static const value_string pcep_error_value_5_vals[] = {
1337 {1, "C bit of the METRIC object set (Request Rejected)"},
1338 {2, "O bit of the RP object set (Request Rejected)"},
1339 {3, "Objective Function not allowed (Request Rejected)"},
1340 {4, "OF bit of the RP object set (Request Rejected)"},
1341 {5, "Global concurrent optimization not allowed"},
1342 {6, "Monitoring message supported but rejected due to policy violation"},
1343 {7, "P2MP path computation is not allowed"},
1344 {8, "Not allowed network performance constraint"}, /* draft-ietf-pce-pcep-service-aware*/
1345 {0, NULL}
1349 /*Error values for error type 6*/
1350 static const value_string pcep_error_value_6_vals[] = {
1351 {1, "RP object missing"},
1352 {2, "RRO object missing for a reoptimization request (R bit of the RP Object set)"},
1353 {3, "END-POINTS object missing"},
1354 {4, "MONITORINS object missing"},
1355 {8, "LSP Object missing"},
1356 {9, "ERO Object missing"},
1357 {10, "SRP Object missing"},
1358 {11, "LSP-IDENTIFIERS TLV missing"},
1359 {12, "LSP-DB-VERSION TLV missing"},
1360 {13, "LSP cleanup TLV missing"},
1361 {14, "SYMBOLIC-PATH-NAME TLV missing"},
1362 {15, "DISJOINTNESS-CONFIGURATION TLV missing"},
1363 {16, "Scheduled TLV missing"},
1364 {17, "CCI object missing"},
1365 {18, "VIRTUAL-NETWORK-TLV missing"},
1366 {0, NULL}
1369 /*Error values for error type 10*/
1370 static const value_string pcep_error_value_10_vals[] = {
1371 {1, "Reception of an object with P flag not set although the P-flag must be set"}, /*RFC 5440*/
1372 {2, "Bad label value"}, /* RFC 8664 */
1373 {3, "Unsupported number of SR-ERO subobjects"}, /* RFC 8664 */
1374 {4, "Bad label format"}, /* RFC 8664 */
1375 {5, "ERO mixes SR-ERO subobjects with other subobject types"}, /* RFC 8664 */
1376 {6, "Both SID and NAI are absent in ERO subobject"}, /* RFC 8664 */
1377 {7, "Both SID and NAI are absent in RRO subobject"}, /* RFC 8664 */
1378 {8, "SYMBOLIC-PATH-NAME TLV missing"}, /* RFC 8281 */
1379 {9, "MSD exceeds the default for the PCEP session"}, /* RFC 8664 */
1380 {10, "RRO mixes SR-RRO subobjects with other object types"}, /* RFC 8664 */
1381 {11, "Malformed object"}, /* RFC 8408 */
1382 {12, "Missing PCE-SR-CAPABILITY sub-TLV"}, /* RFC 8664 */
1383 {13, "Unsupported NAI Type in the SR-ERO/SR-RRO subobject"}, /* RFC 8664 */
1384 {14, "Unknown SID"}, /* RFC 8664 */
1385 {15, "NAI cannot be resolved to a SID"}, /* RFC 8664 */
1386 {16, "Could not find SRGB"}, /* RFC 8664 */
1387 {17, "SID index exceeds SRGB size"}, /* RFC 8664 */
1388 {18, "Could not find SRLB"}, /* RFC 8664 */
1389 {19, "SID index exceeds SRLB size"}, /* RFC 8664 */
1390 {20, "Inconsistent SIDs in SR-ERO/SR-RRO subobjects"}, /* RFC 8664 */
1391 {21, "MSD must be nonzero"}, /* RFC 8664 */
1392 {22, "Mismatch of O field in S2LS and LSP object"}, /* RFC 8623 */
1393 {23, "Incompatible OF codes in H-PCE"}, /* RFC 8685 */
1394 {24, "Bad BANDWIDTH object type 3 or 4"}, /* RFC 8779 */
1395 {25, "Unsupported LSP Protection Flags in PROTECTION-ATTRIBUTE TLV"}, /* RFC 8779 */
1396 {26, "Unsupported Secondary LSP Protection Flags in PROTECTION-ATTRIBUTE TLV"}, /* RFC 8779 */
1397 {27, "Unsupported Link Protection Type in PROTECTION-ATTRIBUTE TLV"}, /* RFC 8779 */
1398 {28, "LABEL-SET TLV present with O bit set but without R bit set in RP"}, /* RFC 8779 */
1399 {29, "Wrong LABEL-SET TLV present with O and L bits set"}, /* RFC 8779 */
1400 {30, "Wrong LABEL-SET TLV present with O bit set and wrong format"}, /* RFC 8779 */
1401 {31, "Missing GMPLS-CAPABILITY TLV"}, /* RFC 8779 */
1402 {32, "Incompatible OF code"}, /* RFC 8800 */
1403 {33, "Missing PCECC Capability sub-TLV"}, /* RFC 9050 */
1404 {34, "Missing PCE-SRv6-CAPABILITY sub-TLV"}, /* draft-ietf-pce-segment-routing-ipv6-13 */
1405 {35, "Both SID and NAI are absent in SRv6-RRO subobject "}, /* draft-ietf-pce-segment-routing-ipv6-13 */
1406 {36, "RRO mixes SRv6-RRO subobjects with other subobject types"}, /* draft-ietf-pce-segment-routing-ipv6-13 */
1407 {37, "Invalid SRv6 SID Structure "}, /* draft-ietf-pce-segment-routing-ipv6-13 */
1408 {38, "Conflicting Path ID"}, /* draft-ietf-pce-multipath-07 */
1409 {0, NULL}
1412 /*Error values for error type 12*/
1413 static const value_string pcep_error_value_12_vals[] = {
1414 {1, "Unsupported class-type"},
1415 {2, "Invalid class-type"},
1416 {3, "Class-type ans setup priority do not form a configured TE-class"},
1417 {0, NULL}
1420 /*Error values for error type 13*/
1421 static const value_string pcep_error_value_13_vals[] = {
1422 {1, "BRPC procedure not supported by one or more PCEs along the domain path"},
1423 {0, NULL}
1426 /*Error values for error type 15*/
1427 static const value_string pcep_error_value_15_vals[] = {
1428 {1, "Insufficient memory"},
1429 {2, "Global concurrent optimization not supported"},
1430 {0, NULL}
1433 /*Error values for error type 16*/
1434 static const value_string pcep_error_value_16_vals[] = {
1435 {1, "The PCE cannot satisfy the request due to insufficient memory"},
1436 {2, "The PCE is not capable of P2MP computation"},
1437 {0, NULL}
1440 /*Error values for error type 17*/
1441 static const value_string pcep_error_value_17_vals[] = {
1442 {1, "The PCE cannot satisfy the request due to no END-POINTS with leaf type 2"},
1443 {2, "The PCE cannot satisfy the request due to no END-POINTS with leaf type 3"},
1444 {3, "The PCE cannot satisfy the request due to no END-POINTS with leaf type 4"},
1445 {4, "The PCE cannot satisfy the request due to inconsistent END-POINTS"},
1446 {0, NULL}
1449 /*Error values for error type 18*/
1450 static const value_string pcep_error_value_18_vals[] = {
1451 {1, "Fragmented request failure"},
1452 {2, "Fragmented Report failure"},
1453 {3, "Fragmented Update failure"},
1454 {4, "Fragmented Instantiation failure"},
1455 {0, NULL}
1458 /*Error values for error type 19*/
1459 static const value_string pcep_error_value_19_vals[] = {
1460 {1, "Attempted LSP Update Request for a non-delegated LSP. The PCEP-ERROR Object is followed by the LSP Object that identifies the LSP"},
1461 {2, "Attempted LSP Update Request if active stateful PCE capability was not advertised"},
1462 {3, "Attempted LSP Update Request for an LSP identified by an unknown PLSP-ID"},
1463 {4, "Unassigned"},
1464 {5, "Attempted LSP State Report if active stateful PCE capability was not advertised"},
1465 {6, "PCE-initiated LSP limit reached"}, /* draft-ietf-pce-pce-initiated-lsp */
1466 {7, "Delegation for PCE-initiated LSP cannot be revoked"}, /* draft-ietf-pce-pce-initiated-lsp */
1467 {8, "Non-zero PLSP-ID in LSP initiation request"}, /* draft-ietf-pce-pce-initiated-lsp */
1468 {9, "LSP is not PCE-initiated"}, /* draft-ietf-pce-pce-initiated-lsp */
1469 {10, "PCE-initiated operation-frequency limit reached"}, /* draft-ietf-pce-pce-initiated-lsp */
1470 {11, "Attempted LSP State Report for P2MP if stateful PCE capability for P2MP was not advertised"},
1471 {12, "Attempted LSP Update Request for P2MP if active stateful PCE capability for P2MP was not advertised"},
1472 {13, "Attempted LSP Instantiation Request for P2MP if stateful PCE instantiation capability for P2MP was not advertised"},
1473 {14, "Auto-Bandwidth capability was not advertised"},
1474 {15, "Attempted LSP scheduling while the scheduling capability was not advertised"},
1475 {16, "Attempted PCECC operations when PCECC capability was not advertised"},
1476 {17, "Stateful PCE capability was not advertised"},
1477 {18, "Unknown Label"},
1478 {19, "Attempted SRv6 when the capability was not advertised"},
1479 {20, "Not supported path backup"},
1480 {21, "Non-empty path"},
1481 {0, NULL}
1484 /*Error values for error type 20*/
1485 static const value_string pcep_error_value_20_vals[] = {
1486 {1, "A PCE indicates to a PCC that it cannot process (an otherwise valid) LSP State Report. The PCEP-ERROR Object is followed by the LSP Object that identifies the LSP"},
1487 {2, "LSP Database version mismatch."},
1488 {3, "The LSP-DB-VERSION TLV Missing when state synchronization avoidance is enabled."},
1489 {4, "Attempt to trigger a synchronization when the TRIGGERED-SYNC capability has not been advertised."},
1490 {5, "A PCC indicates to a PCE that it cannot complete the state synchronization"},
1491 {6, "No sufficient LSP change information for incremental LSP state synchronization."},
1492 {7, "Received an invalid LSP DB Version Number"},
1493 {0, NULL}
1496 /* Error values for error type 21 */
1497 static const value_string pcep_error_value_21_vals[] = {
1498 {1, "Unsupported path setup type"},
1499 {2, "Mismatched path setup type"},
1500 {0, NULL}
1503 /*Error values for error type 23*/
1504 static const value_string pcep_error_value_23_vals[] = {
1505 {1, "SYMBOLIC-PATH-NAME in use"}, /* draft-ietf-pce-pce-initiated-lsp */
1506 {2, "Speaker identity included for an LSP that is not PCE-initiated"}, /* draft-ietf-pce-pce-initiated-lsp */
1507 {0, NULL}
1510 /*Error values for error type 24*/
1511 static const value_string pcep_error_value_24_vals[] = {
1512 {1, "Unacceptable instantiation parameters"}, /* draft-ietf-pce-pce-initiated-lsp */
1513 {2, "Internal error"}, /* draft-ietf-pce-pce-initiated-lsp */
1514 {3, "Signaling error"}, /* draft-ietf-pce-pce-initiated-lsp */
1515 {0, NULL}
1518 /*Error values for error type 25*/
1519 static const value_string pcep_error_value_25_vals[] = {
1520 {1, "Reception of StartTLS after any PCEP exchange"},
1521 {2, "Reception of any other message apart from StartTLS, Open, or PCErr"},
1522 {3, "Failure, connection without TLS is not possible"},
1523 {4, "Failure, connection without TLS is possible"},
1524 {5, "No StartTLS message (nor PCErr/Open) before StartTLSWait timer expiry"},
1525 {0, NULL}
1528 /*Error values for error type 26*/
1529 static const value_string pcep_error_value_26_vals[] = {
1530 {1, "Association-type is not supported"}, /* [RFC8697] */
1531 {2, "Too many LSPs in the association group"}, /* [RFC8697] */
1532 {3, "Too many association groups"}, /* [RFC8697] */
1533 {4, "Association unknown"}, /* [RFC8697] */
1534 {5, "Operator-configured association information mismatch "}, /* [RFC8697] */
1535 {6, "Association information mismatch"}, /* [RFC8697] */
1536 {7, "Cannot join the association group"}, /* [RFC8697] */
1537 {8, "Association ID not in range"}, /* [RFC8697] */
1538 {9, "Tunnel ID or End points mismatch for Path Protection Association"}, /* [RFC8745] */
1539 {10, "Attempt to add another working/protection LSP for Path Protection Association"}, /* [RFC8745] */
1540 {11, "Protection type is not supported"}, /* [RFC8745] */
1541 {12, "Not expecting policy parameters"}, /* [RFC9005] */
1542 {13, "Unacceptable policy parameters"}, /* [RFC9005] */
1543 {14, "Association group mismatch"}, /* [RFC9059] */
1544 {15, "Tunnel mismatch in the association group"}, /* [RFC9059] */
1545 {16, "Path Setup Type not supported"}, /* [RFC9059] */
1546 {17, "Bidirectional LSP direction mismatch"}, /* [RFC9059] */
1547 {18, "Bidirectional LSP co-routed mismatch"}, /* [RFC9059] */
1548 {19, "Endpoint mismatch in the association group"}, /* [RFC9059] */
1549 {0, NULL}
1552 /*Error values for error type 27*/
1553 static const value_string pcep_error_value_27_vals[] = {
1554 {1, "Insufficient memory"}, /* [RFC8780] */
1555 {2, "RWA computation not supported"}, /* [RFC8780] */
1556 {3, "Syntactical encoding error"}, /* [RFC8780] */
1557 {0, NULL}
1560 /*Error values for error type 28*/
1561 static const value_string pcep_error_value_28_vals[] = {
1562 {1, "H-PCE Capability not advertised"}, /* [RFC8685] */
1563 {2, "Parent PCE Capability cannot be provided"}, /* [RFC8685] */
1564 {0, NULL}
1567 /*Error values for error type 29*/
1568 static const value_string pcep_error_value_29_vals[] = {
1569 {1, "Unacceptable request message"}, /* [RFC8779] */
1570 {2, "Generalized bandwidth value not supported"}, /* [RFC8779] */
1571 {3, "Label set constraint could not be met"}, /* [RFC8779] */
1572 {4, "Label constraint could not be met"}, /* [RFC8779] */
1573 {5, "Constraints could not be met for some intervals"}, /* [RFC8934] */
1574 {0, NULL}
1577 /*Error values for error type 30*/
1578 static const value_string pcep_error_value_30_vals[] = {
1579 {1, "Unsupported FlowSpec"}, /* [RFC9168] */
1580 {2, "Malformed FlowSpec"}, /* [RFC9168] */
1581 {3, "Unresolvable Conflict"}, /* [RFC9168] */
1582 {4, "Unknown FlowSpec"}, /* [RFC9168] */
1583 {5, "Unsupported LPM Route"}, /* [RFC9168] */
1584 {0, NULL}
1587 /*Error values for error type 31*/
1588 static const value_string pcep_error_value_31_vals[] = {
1589 {1, "Label out of range"}, /* [RFC9050] */
1590 {2, "Instruction failed"}, /* [RFC9050] */
1591 {3, "Invalid CCI"}, /* [RFC9050] */
1592 {4, "Unable to allocate the specified CCI"}, /* [RFC9050] */
1593 {5, "Invalid next-hop information"}, /* [RFC9050] */
1594 {0, NULL}
1597 static const value_string pcep_close_reason_obj_vals[] = {
1598 {0, "Not defined" },
1599 {NO_EXP_PROV, "No Explanation Provided" },
1600 {DEADTIME_PROV, "Deadtime Expired" },
1601 {RECEP_MALFORM_MSG, "Reception of a Malformed PCEP Message" },
1602 {0, NULL }
1605 static const value_string pcep_xro_attribute_obj_vals[] = {
1606 {ATTR_INTERFACE, "Interface" },
1607 {ATTR_NODE, "Node" },
1608 {ATTR_SRLG, "SRLG" },
1609 {0, NULL }
1612 static const value_string pcep_object_lsp_flags_operational_vals[] = {
1613 {0, "DOWN" },
1614 {1, "UP" },
1615 {2, "ACTIVE" },
1616 {3, "GOING-DOWN" },
1617 {4, "GOING-UP" },
1618 {5, "Reserved" },
1619 {6, "Reserved" },
1620 {7, "Reserved" },
1621 {0, NULL }
1624 static const value_string pcep_tlv_lsp_error_code_vals[] = {
1625 {1, "Unknown reason" },
1626 {2, "Limit reached for PCE-controlled LSPs" },
1627 {3, "Too many pending LSP update requests" },
1628 {4, "Unacceptable parameters" },
1629 {5, "Internal error" },
1630 {6, "LSP administratively brought down" },
1631 {7, "LSP preempted" },
1632 {8, "RSVP signaling error" },
1633 {0, NULL }
1636 static const value_string pcep_pst_vals[] = {
1637 {0, "Path is setup via RSVP-TE signaling (default)" },
1638 {1, "Path is setup using Segment Routing" },
1639 {3, "Path is setup using SRv6" },
1640 {0, NULL }
1643 static const value_string pcep_sr_nt_vals[] = {
1644 {0, "NAI is absent" },
1645 {1, "IPv4 Node ID" },
1646 {2, "IPv6 Node ID" },
1647 {3, "IPv4 Adjacency" },
1648 {4, "IPv6 Adjacency with global IPv6 addresses" },
1649 {5, "Unnumbered Adjacency with IPv4 NodeIDs" },
1650 {6, "IPv6 Adjacency with link-local IPv6 addresses" },
1651 {0, NULL }
1654 /* types of leaves in a P2MP request */
1655 static const value_string pcep_p2mp_leaf_type_vals[] = {
1656 {EP_P2MP_NEW_LEAF_TYPE, "New leaves to add" },
1657 {EP_P2MP_OLD_REMOVE_LEAF_TYPE , "Old leaves to remove" },
1658 {EP_P2MP_OLD_MODIFY_LEAF_TYPE, "Old leaves whose path can be modified/reoptimized" },
1659 {EP_P2MP_OLD_UNCHANGED_LEAF_TYPE, "Old leaves whose path must be left unchanged" },
1660 {0, NULL }
1663 /* Association Type Fields. */
1664 /* https://www.iana.org/assignments/pcep/pcep.xhtml#association-type-field */
1665 static const value_string pcep_association_type_field_vals[] = {
1666 {0, "Reserved"}, /* RFC 8697*/
1667 {1, "Path Protection Association"}, /* RFC 8745 */
1668 {2, "Disjoint Association"}, /* RFC 8800 */
1669 {3, "Policy Association"}, /* RFC 9005 */
1670 {4, "Single-Sided Bidirectional LSP Association"}, /* RFC 9059 */
1671 {5, "Double-Sided Bidirectional LSP Association"}, /* RFC 9059 */
1672 {6, "SR Policy Association"}, /* TEMPORARY registered 2021-03-30 expires 2022-03-30 draft-ietf-pce-segment-routing-policy-cp-04 */
1673 {7, "VN Association"}, /* RFC 9358 */
1674 {0, NULL }
1677 /* Path Setup Type Capability Sub TLV Type Indicators */
1678 static const value_string pcep_path_setup_type_capability_sub_tlv_vals[] = {
1679 {0, "Reserved" }, /* RFC 8664*/
1680 {1, "PCECC-CAPABILITY" }, /* RFC 9050*/
1681 {26, "SR-PCE-CAPABILITY" }, /* RFC 8664*/
1682 {0, NULL }
1686 /* Protocol Origin values in SR Policy Candidate Path Identifiers TLV*/
1687 static const value_string pcep_sr_policy_id_proto_origin_vals[] = {
1688 {10, "PCEP" }, /* draft-ietf-spring-segment-routing-policy section 2.3 */
1689 {20, "BGP SR Policy" }, /* draft-ietf-spring-segment-routing-policy section 2.3 */
1690 {30, "Via Configuration" }, /* draft-ietf-spring-segment-routing-policy section 2.3 */
1691 {0, NULL }
1694 /* SRv6 Endpoint behavior */
1695 /* https://www.iana.org/assignments/segment-routing/segment-routing.xhtml */
1696 static const value_string srv6_endpoint_behavior_vals[] = {
1697 {1, "End" },
1698 {2, "End with PSP" },
1699 {3, "End with USP" },
1700 {4, "End with PSP & USP" },
1701 {5, "End.X" },
1702 {6, "End.X with PSP" },
1703 {7, "End.X with USP" },
1704 {8, "End.X with PSP & USP" },
1705 {9, "End.T" },
1706 {10, "End.T with PSP" },
1707 {11, "End.T with USP" },
1708 {12, "End.T with PSP & USP" },
1709 {13, "Unassigned" },
1710 {14, "End.B6.Encaps" },
1711 {15, "End.BM" },
1712 {16, "End.DX6" },
1713 {17, "End.DX4" },
1714 {18, "End.DT6" },
1715 {19, "End.DT4" },
1716 {20, "End.DT46" },
1717 {21, "End.DX2" },
1718 {22, "End.DX2V" },
1719 {23, "End.DT2U" },
1720 {24, "End.DT2M" },
1721 {25, "Reserved" },
1722 {26, "Unassigned" },
1723 {27, "End.B6.Encaps.Red" },
1724 {28, "End with USD" },
1725 {29, "End with PSP & USD" },
1726 {30, "End with USP & USD" },
1727 {31, "End with PSP, USP & USD" },
1728 {32, "End.X with USD" },
1729 {33, "End.X with PSP & USD" },
1730 {34, "End.X with USP & USD" },
1731 {35, "End.X with PSP, USP & USD" },
1732 {36, "End.T with USD" },
1733 {37, "End.T with PSP & USD" },
1734 {38, "End.T with USP & USD" },
1735 {39, "End.T with PSP, USP & USD" },
1736 {40, "End.MAP" },
1737 {41, "End.Limit" },
1738 {42, "End with NEXT-ONLY-CSID" },
1739 {43, "End with NEXT-CSID" },
1740 {44, "End with NEXT-CSID & PSP" },
1741 {45, "End with NEXT-CSID & USP" },
1742 {46, "End with NEXT-CSID, PSP & USP" },
1743 {47, "End with NEXT-CSID & USD" },
1744 {48, "End with NEXT-CSID, PSP & USD" },
1745 {49, "End with NEXT-CSID, USP & USD" },
1746 {50, "End with NEXT-CSID, PSP, USP & USD" },
1747 {51, "End.X with NEXT-ONLY-CSID" },
1748 {52, "End.X with NEXT-CSID" },
1749 {53, "End.X with NEXT-CSID & PSP" },
1750 {54, "End.X with NEXT-CSID & USP" },
1751 {55, "End.X with NEXT-CSID, PSP & USP" },
1752 {56, "End.X with NEXT-CSID & USD" },
1753 {57, "End.X with NEXT-CSID, PSP & USD" },
1754 {58, "End.X with NEXT-CSID, USP & USD" },
1755 {59, "End.X with NEXT-CSID, PSP, USP & USD" },
1756 {60, "End.DX6 with NEXT-CSID" },
1757 {61, "End.DX4 with NEXT-CSID" },
1758 {62, "End.DT6 with NEXT-CSID" },
1759 {63, "End.DT4 with NEXT-CSID" },
1760 {64, "End.DT46 with NEXT-CSID" },
1761 {65, "End.DX2 with NEXT-CSID" },
1762 {66, "End.DX2V with NEXT-CSID" },
1763 {67, "End.DT2U with NEXT-CSID" },
1764 {68, "End.DT2M with NEXT-CSID" },
1765 {69, "End.M.GTP6.D" },
1766 {70, "End.M.GTP6.Di" },
1767 {71, "End.M.GTP6.E" },
1768 {72, "End.M.GTP4.E" },
1769 { 0, NULL }
1772 #define OBJ_HDR_LEN 4 /* length of object header */
1774 /*------------------------------------------------------------
1775 * SUB-TLVS
1776 * ----------------------------------------------------------------*/
1777 static void
1778 dissect_pcep_path_setup_capabilities_sub_tlvs(proto_tree *pcep_tlv, tvbuff_t *tvb, int offset, int length, int ett_pcep_obj)
1780 proto_tree *sub_tlv;
1781 uint16_t sub_tlv_length, sub_tlv_type;
1782 int j;
1783 int padding = 0;
1785 static int * const sr_pce_capability_sub_tlv_flags[] = {
1786 &hf_pcep_sr_pce_capability_sub_tlv_flags_n,
1787 &hf_pcep_sr_pce_capability_sub_tlv_flags_x,
1788 NULL
1791 for (j = 0; j < length; j += 4 + sub_tlv_length + padding) {
1792 sub_tlv_type = tvb_get_ntohs(tvb, offset+j);
1793 sub_tlv_length = tvb_get_ntohs(tvb, offset + j + 2);
1794 sub_tlv = proto_tree_add_subtree(pcep_tlv, tvb, offset + j, sub_tlv_length+4,
1795 ett_pcep_obj, NULL, val_to_str(sub_tlv_type, pcep_path_setup_type_capability_sub_tlv_vals, "Unknown SubTLV (%u). "));
1796 proto_tree_add_item(sub_tlv, hf_pcep_path_setup_type_capability_sub_tlv_type, tvb, offset + j, 2, ENC_BIG_ENDIAN);
1797 proto_tree_add_item(sub_tlv, hf_pcep_path_setup_type_capability_sub_tlv_length, tvb, offset + 2 + j, 2, ENC_BIG_ENDIAN);
1798 switch (sub_tlv_type)
1800 case 1: /* PCECC-CAPABILITY */
1801 //TODO
1802 break;
1804 case 26: /* SR PCE CAPABILITY */
1805 proto_tree_add_item(sub_tlv, hf_pcep_sr_pce_capability_sub_tlv_reserved, tvb, offset + 4 + j, 2, ENC_NA);
1806 proto_tree_add_bitmask(sub_tlv, tvb, offset+4+j+2, hf_pcep_sr_pce_capability_sub_tlv_flags, ett_pcep_obj, sr_pce_capability_sub_tlv_flags, ENC_NA);
1807 proto_tree_add_item(sub_tlv, hf_pcep_sr_pce_capability_sub_tlv_msd, tvb, offset + 4 + j + 3, 1, ENC_NA);
1808 break;
1814 /*------------------------------------------------------------
1815 * PCEP TLVS
1816 *----------------------------------------------------------------*/
1818 /* The content of Extended Association ID TLV, type = 31 is scoped
1819 * on the association type. The TLV dissection receives such
1820 * information to be able to decode properly the TLV
1821 * All the other TLVs do not need scope at the moment.
1823 static void
1824 dissect_pcep_tlvs_with_scope(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, int length, int ett_pcep_obj, uint16_t association_type)
1826 proto_tree *tlv;
1827 uint16_t tlv_length, tlv_type, of_code, assoc_type;
1828 uint32_t psts;
1829 int i, j;
1830 int padding = 0;
1832 static int * const tlv_stateful_pce_capability_flags[] = {
1833 &hf_pcep_lsp_update_capability,
1834 &hf_pcep_include_db_version,
1835 &hf_pcep_lsp_instantiation_capability,
1836 &hf_pcep_triggered_resync,
1837 &hf_pcep_delta_lsp_sync_capability,
1838 &hf_pcep_triggered_initial_sync,
1839 NULL
1842 static int * const tlv_sr_pce_capability_flags[] = {
1843 &hf_pcep_sr_pce_capability_flags_l,
1844 NULL
1847 for (j = 0; j < length; j += 4 + tlv_length + padding) {
1848 tlv_type = tvb_get_ntohs(tvb, offset+j);
1849 tlv_length = tvb_get_ntohs(tvb, offset + j + 2);
1850 tlv = proto_tree_add_subtree(pcep_obj, tvb, offset + j, tlv_length+4,
1851 ett_pcep_obj, NULL, val_to_str(tlv_type, pcep_tlvs_vals, "Unknown TLV (%u). "));
1852 proto_tree_add_item(tlv, hf_pcep_tlv_type, tvb, offset + j, 2, ENC_BIG_ENDIAN);
1853 proto_tree_add_item(tlv, hf_pcep_tlv_length, tvb, offset + 2 + j, 2, ENC_BIG_ENDIAN);
1854 switch (tlv_type)
1856 case 1: /* NO-PATH TLV */
1857 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_pce, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5440 */
1858 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_unk_dest, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5440 */
1859 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_unk_src, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5440 */
1860 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_brpc, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5441 */
1861 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_pks, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5520 */
1862 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_no_gco_migr, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5557 */
1863 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_no_gco_soln, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 5557 */
1864 proto_tree_add_item(tlv, hf_pcep_no_path_tlvs_p2mp, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN); /* RFC 6006 */
1865 break;
1867 case 3: /* REQ-MISSING TLV */
1868 proto_tree_add_item(tlv, hf_pcep_request_id, tvb, offset+4+j, tlv_length, ENC_BIG_ENDIAN);
1869 break;
1871 case 4: /* OF TLV */
1872 for (i=0; i<tlv_length/2; i++) {
1873 of_code = tvb_get_ntohs(tvb, offset+4+j+i*2);
1874 proto_tree_add_uint_format(tlv, hf_pcep_of_code, tvb, offset+4+j+i*2, 2, of_code, "OF-Code #%d: %s (%u)",
1875 i+1, val_to_str_const(of_code, pcep_of_vals, "Unknown"), of_code);
1877 break;
1879 case 7: /* VENDOR-INFORMATION-TLV (RFC7470)*/
1880 proto_tree_add_item(tlv, hf_pcep_tlv_enterprise_number, tvb, offset+4+j, 4, ENC_BIG_ENDIAN);
1881 proto_tree_add_item(tlv, hf_pcep_tlv_enterprise_specific_info, tvb, offset+4+j + 4, tlv_length - 4, ENC_STR_HEX);
1882 break;
1884 case 16: /* STATEFUL-PCE-CAPABILITY TLV */
1885 proto_tree_add_bitmask(tlv, tvb, offset+4+j, hf_pcep_stateful_pce_capability_flags, ett_pcep_obj, tlv_stateful_pce_capability_flags, ENC_NA);
1886 break;
1888 case 17: /* SYMBOLIC-PATH-NAME TLV */
1889 proto_tree_add_item(tlv, hf_pcep_symbolic_path_name, tvb, offset+4+j, tlv_length, ENC_ASCII);
1890 break;
1892 case 18: /* IPV4-LSP-IDENTIFIERS TLV */
1893 proto_tree_add_item(tlv, hf_pcep_ipv4_lsp_id_tunnel_sender_address, tvb, offset+4+j, 4, ENC_BIG_ENDIAN);
1894 proto_tree_add_item(tlv, hf_pcep_ipv4_lsp_id_lsp_id, tvb, offset+4+j + 4, 2, ENC_BIG_ENDIAN);
1895 proto_tree_add_item(tlv, hf_pcep_ipv4_lsp_id_tunnel_id, tvb, offset+4+j + 6, 2, ENC_BIG_ENDIAN);
1896 proto_tree_add_item(tlv, hf_pcep_ipv4_lsp_id_extended_tunnel_id, tvb, offset+4+j + 8, 4, ENC_NA);
1897 proto_tree_add_item(tlv, hf_pcep_ipv4_lsp_id_tunnel_endpoint_address, tvb, offset+4+j + 12, 4, ENC_BIG_ENDIAN);
1898 break;
1900 case 19: /* IPV6-LSP-IDENTIFIERS TLV */
1901 proto_tree_add_item(tlv, hf_pcep_ipv6_lsp_id_tunnel_sender_address, tvb, offset+4+j, 16, ENC_NA);
1902 proto_tree_add_item(tlv, hf_pcep_ipv6_lsp_id_lsp_id, tvb, offset+4+j + 16, 2, ENC_BIG_ENDIAN);
1903 proto_tree_add_item(tlv, hf_pcep_ipv6_lsp_id_tunnel_id, tvb, offset+4+j + 18, 2, ENC_BIG_ENDIAN);
1904 proto_tree_add_item(tlv, hf_pcep_ipv6_lsp_id_extended_tunnel_id, tvb, offset+4+j + 20, 16, ENC_NA);
1905 proto_tree_add_item(tlv, hf_pcep_ipv6_lsp_id_tunnel_endpoint_address, tvb, offset+4+j + 36, 16, ENC_NA);
1906 break;
1908 case 20: /* LSP-ERROR-CODE TLV */
1909 proto_tree_add_item(tlv, hf_pcep_lsp_error_code, tvb, offset+4+j, 4, ENC_BIG_ENDIAN);
1910 break;
1912 case 21: /* RSVP-ERROR-SPEC TLV */
1913 proto_tree_add_item(tlv, hf_pcep_rsvp_user_error_spec, tvb, offset+4+j, tlv_length, ENC_ASCII);
1914 break;
1916 case 23: /* LSP-DB-VERSION TLV */
1917 proto_tree_add_item(tlv, hf_pcep_lsp_state_db_version_number, tvb, offset+4+j, 8, ENC_BIG_ENDIAN);
1918 break;
1920 case 24: /* SPEAKER-ENTITY-ID TLV */
1921 proto_tree_add_item(tlv, hf_pcep_speaker_entity_id, tvb, offset+4+j, tlv_length, ENC_ASCII);
1922 break;
1924 case 26: /* SR-PCE-CAPABILITY TLV Deprecated */
1925 proto_tree_add_item(tlv, hf_pcep_sr_pce_capability_reserved, tvb, offset + 4 + j, 2, ENC_NA);
1926 proto_tree_add_bitmask(tlv, tvb, offset+4+j+2, hf_pcep_sr_pce_capability_flags, ett_pcep_obj, tlv_sr_pce_capability_flags, ENC_NA);
1927 proto_tree_add_item(tlv, hf_pcep_sr_pce_capability_msd, tvb, offset + 4 + j + 3, 1, ENC_NA);
1928 break;
1930 case 27: /* PATH-SETUP-TYPE TLV (FF: squatted pre IANA assignment) */
1931 case 28: /* PATH-SETUP-TYPE TLV (FF: IANA code point) */
1932 proto_tree_add_item(tlv, hf_pcep_path_setup_type_reserved24, tvb, offset + 4 + j, 3, ENC_BIG_ENDIAN);
1933 proto_tree_add_item(tlv, hf_pcep_path_setup_type, tvb, offset + 4 + j + 3, 1, ENC_NA);
1934 break;
1936 case 29: /* OP-CONF-ASSOC-RANGE */
1937 offset += 4 + j;
1938 while(tlv_length > 0) {
1939 proto_tree_add_item(tlv, hf_pcep_op_conf_assoc_range_reserved, tvb, offset, 2, ENC_NA);
1940 offset += 2;
1941 tlv_length -= 2;
1942 proto_tree_add_item(tlv, hf_pcep_op_conf_assoc_range_assoc_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1943 offset += 2;
1944 tlv_length -= 2;
1945 proto_tree_add_item(tlv, hf_pcep_op_conf_assoc_range_start_assoc, tvb, offset, 2, ENC_BIG_ENDIAN);
1946 offset += 2;
1947 tlv_length -= 2;
1948 proto_tree_add_item(tlv, hf_pcep_op_conf_assoc_range_range, tvb, offset, 2, ENC_BIG_ENDIAN);
1949 offset += 2;
1950 tlv_length -= 2;
1952 break;
1954 case 30: /* GLOBAL-ASSOCIATION-SOURCE */
1955 proto_tree_add_item(tlv, hf_pcep_association_source_global, tvb, offset + 4 + j, 4, ENC_BIG_ENDIAN);
1956 break;
1958 case 31: /* EXTENDED-ASSOCIATION-ID TLV */
1959 /* The extend association ID is scoped depending on the association type of the object
1960 in which the TLV is present */
1961 if (association_type==6) {
1962 if (tlv_length==8) {
1963 proto_tree_add_item(tlv, hf_pcep_association_id_extended_color, tvb, offset + 4 + j, 4, ENC_NA);
1964 proto_tree_add_item(tlv, hf_pcep_association_id_extended_ipv4_endpoint, tvb, offset + 8 + j, 4, ENC_NA);
1965 } else if (tlv_length==20) {
1966 proto_tree_add_item(tlv, hf_pcep_association_id_extended_color, tvb, offset + 4 + j, 4, ENC_NA);
1967 proto_tree_add_item(tlv, hf_pcep_association_id_extended_ipv6_endpoint, tvb, offset + 8 + j, 16, ENC_NA);
1968 } else {
1969 proto_tree_add_item(tlv, hf_pcep_association_id_extended, tvb, offset + 4 + j, tlv_length, ENC_NA);
1971 } else {
1972 proto_tree_add_item(tlv, hf_pcep_association_id_extended, tvb, offset + 4 + j, tlv_length, ENC_NA);
1974 break;
1976 case 34: /* PATH-SETUP-TYPE-CAPABILITY TLV */
1977 proto_tree_add_item(tlv, hf_pcep_path_setup_type_capability_reserved24, tvb, offset + 4 + j, 3, ENC_BIG_ENDIAN);
1978 proto_tree_add_item_ret_uint(tlv, hf_pcep_path_setup_type_capability_psts, tvb, offset + 4 + j + 3, 1, ENC_NA, &psts);
1979 for (i = 0; i < (int)psts; i++) {
1980 proto_tree_add_item(tlv, hf_pcep_path_setup_type_capability_pst, tvb, offset + 4 + j + 4 + i, 1, ENC_NA);
1983 padding = (4 - (psts % 4)) % 4;
1984 if (padding != 0) {
1985 proto_tree_add_item(tlv, hf_pcep_tlv_padding, tvb, offset + 4 + j + 4 + psts, padding, ENC_NA);
1987 if (tlv_length>8+psts+padding) {
1988 //There are sub-TLVs to decode
1989 dissect_pcep_path_setup_capabilities_sub_tlvs(tlv, tvb, offset+j+8+psts+padding, tlv_length -psts- padding-4, ett_pcep_obj);
1991 break;
1993 case 35: /* ASSOC-Type-List TLV */
1994 for (i=0; i<tlv_length/2; i++) {
1995 assoc_type = tvb_get_ntohs(tvb, offset+4+j+i*2);
1996 proto_tree_add_uint_format(tlv, hf_pcep_association_type, tvb, offset+4+j+i*2, 2, assoc_type, "Assoc-Type #%d: %s (%u)",
1997 i+1, val_to_str_const(assoc_type, pcep_association_type_field_vals, "Unknown"), assoc_type);
1999 break;
2001 case 40: /* SRCPAG-INFO TLV */
2002 proto_tree_add_item(tlv, hf_pcep_srcpag_info_color, tvb, offset + 4 + j, 4, ENC_BIG_ENDIAN);
2003 proto_tree_add_item(tlv, hf_pcep_srcpag_info_destination_endpoint, tvb, offset + 4 + j + 4, 4, ENC_NA);
2004 proto_tree_add_item(tlv, hf_pcep_srcpag_info_preference, tvb, offset + 4 + j + 8, 4, ENC_NA);
2005 break;
2007 case 56: /* SRPOLICY-POL-NAME */
2008 proto_tree_add_item(tlv, hf_pcep_sr_policy_name, tvb, offset+4+j, tlv_length, ENC_ASCII);
2009 break;
2011 case 57: /* SRPOLICY-CPATH-ID */
2012 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_id_proto_origin, tvb, offset + 4 + j, 1, ENC_BIG_ENDIAN);
2013 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_id_originator_asn, tvb, offset + 8 + j, 4, ENC_BIG_ENDIAN);
2014 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_id_originator_address, tvb, offset + 24+ j, 4, ENC_BIG_ENDIAN);
2015 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_id_discriminator, tvb, offset + 28 + j, 4, ENC_BIG_ENDIAN);
2016 break;
2018 case 58: /* SRPOLICY-CPATH-NAME */
2019 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_name, tvb, offset+4+j, tlv_length, ENC_ASCII);
2020 break;
2022 case 59: /* SRPOLICY-CPATH-PREFERENCE */
2023 proto_tree_add_item(tlv, hf_pcep_sr_policy_cpath_preference, tvb, offset + 4 + j, 4, ENC_BIG_ENDIAN);
2024 break;
2026 default:
2027 proto_tree_add_item(tlv, hf_pcep_tlv_data, tvb, offset+4+j, tlv_length, ENC_NA);
2030 padding = (4 - (tlv_length % 4)) % 4;
2031 if (padding != 0) {
2032 proto_tree_add_item(tlv, hf_pcep_tlv_padding, tvb, offset+4+j+tlv_length, padding, ENC_NA);
2037 static void
2038 dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, int length, int ett_pcep_obj)
2040 dissect_pcep_tlvs_with_scope(pcep_obj, tvb, offset, length, ett_pcep_obj,0);
2043 /*------------------------------------------------------------------------------
2044 *SUBOBJECTS
2045 *------------------------------------------------------------------------------*/
2046 static void
2047 dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2049 proto_tree *pcep_subobj_ipv4;
2050 proto_tree *pcep_subobj_ipv4_flags;
2051 proto_item *ti;
2052 uint8_t prefix_length;
2054 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_IPv4, tvb, offset, length, ENC_NA);
2055 pcep_subobj_ipv4 = proto_item_add_subtree(ti, ett_pcep_obj);
2057 if (length != 8) {
2058 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2059 "Bad IPv4 subobject: length %u != 8", length);
2060 return;
2063 prefix_length = tvb_get_uint8(tvb, offset+6);
2064 proto_item_append_text(ti, ": %s/%u", tvb_ip_to_str(pinfo->pool, tvb, offset+2),
2065 prefix_length);
2067 switch (obj_class) {
2069 case PCEP_EXPLICIT_ROUTE_OBJ:
2070 case PCEP_SERO_OBJ:
2071 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_l, tvb, offset, 1, ENC_NA);
2072 proto_tree_add_item(pcep_subobj_ipv4, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2073 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_length, tvb, offset+1, 1, ENC_NA);
2074 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_ipv4, tvb, offset+2, 4, ENC_BIG_ENDIAN);
2075 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_prefix_length, tvb, offset+6, 1, ENC_NA);
2076 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_padding, tvb, offset+7, 1, ENC_NA);
2077 break;
2079 case PCEP_RECORD_ROUTE_OBJ:
2080 case PCEP_SRRO_OBJ:
2081 proto_tree_add_item(pcep_subobj_ipv4, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2082 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_length, tvb, offset+1, 1, ENC_NA);
2083 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_ipv4, tvb, offset+2, 4, ENC_BIG_ENDIAN);
2084 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_prefix_length, tvb, offset+6, 1, ENC_NA);
2085 ti = proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_flags, tvb, offset+7, 1, ENC_NA);
2086 pcep_subobj_ipv4_flags = proto_item_add_subtree(ti, ett_pcep_obj);
2087 proto_tree_add_item(pcep_subobj_ipv4_flags, hf_pcep_subobj_flags_lpa, tvb, offset+7, 1, ENC_NA);
2088 proto_tree_add_item(pcep_subobj_ipv4_flags, hf_pcep_subobj_flags_lpu, tvb, offset+7, 1, ENC_NA);
2089 break;
2091 case PCEP_IRO_OBJ:
2092 case PCEP_OBJ_BRANCH_NODE_CAPABILITY:
2093 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_iro_ipv4_l, tvb, offset, 1, ENC_NA);
2094 proto_tree_add_item(pcep_subobj_ipv4, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2095 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_length, tvb, offset+1, 1, ENC_NA);
2096 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_ipv4, tvb, offset+2, 4, ENC_BIG_ENDIAN);
2097 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_prefix_length, tvb, offset+6, 1, ENC_NA);
2098 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_padding, tvb, offset+7, 1, ENC_NA);
2099 break;
2101 case PCEP_XRO_OBJ:
2102 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_x, tvb, offset, 1, ENC_NA);
2103 proto_tree_add_item(pcep_subobj_ipv4, hf_PCEPF_SUBOBJ_XRO, tvb, offset, 1, ENC_NA);
2104 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_length, tvb, offset+1, 1, ENC_NA);
2105 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_ipv4, tvb, offset+2, 4, ENC_BIG_ENDIAN);
2106 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_prefix_length, tvb, offset+6, 1, ENC_NA);
2107 proto_tree_add_item(pcep_subobj_ipv4, hf_pcep_subobj_ipv4_attribute, tvb, offset+7, 1, ENC_NA);
2108 break;
2110 default:
2111 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject,
2112 "Non defined subobject for this object");
2113 break;
2117 static void
2118 dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2120 proto_tree *pcep_subobj_ipv6;
2121 proto_tree *pcep_subobj_ipv6_flags;
2122 proto_item *ti;
2123 uint8_t prefix_length;
2125 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_IPv6, tvb, offset, length, ENC_NA);
2126 pcep_subobj_ipv6 = proto_item_add_subtree(ti, ett_pcep_obj);
2128 if (length != 20) {
2129 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2130 "Bad IPv6 subobject: length %u != 20", length);
2131 return;
2134 prefix_length = tvb_get_uint8(tvb, offset+18);
2135 proto_item_append_text(ti, ": %s/%u", tvb_ip6_to_str(pinfo->pool, tvb, offset+2),
2136 prefix_length);
2138 switch (obj_class) {
2139 case PCEP_EXPLICIT_ROUTE_OBJ:
2140 case PCEP_SERO_OBJ:
2141 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_l, tvb, offset, 1, ENC_NA);
2142 proto_tree_add_item(pcep_subobj_ipv6, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2143 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_length, tvb, offset+1, 1, ENC_NA);
2144 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_ipv6, tvb, offset+2, 16, ENC_NA);
2145 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_prefix_length, tvb, offset+18, 1, ENC_NA);
2146 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_padding, tvb, offset+19, 1, ENC_NA);
2147 break;
2149 case PCEP_RECORD_ROUTE_OBJ:
2150 case PCEP_SRRO_OBJ:
2151 proto_tree_add_item(pcep_subobj_ipv6, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2152 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_length, tvb, offset+1, 1, ENC_NA);
2153 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_ipv6, tvb, offset+2, 16, ENC_NA);
2154 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_prefix_length, tvb, offset+18, 1, ENC_NA);
2155 ti = proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_flags, tvb, offset+19, 1, ENC_NA);
2156 pcep_subobj_ipv6_flags = proto_item_add_subtree(ti, ett_pcep_obj);
2157 proto_tree_add_item(pcep_subobj_ipv6_flags, hf_pcep_subobj_flags_lpa, tvb, offset+19, 1, ENC_NA);
2158 proto_tree_add_item(pcep_subobj_ipv6_flags, hf_pcep_subobj_flags_lpu, tvb, offset+19, 1, ENC_NA);
2159 break;
2161 case PCEP_IRO_OBJ:
2162 case PCEP_OBJ_BRANCH_NODE_CAPABILITY:
2163 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_iro_ipv6_l, tvb, offset, 1, ENC_NA);
2164 proto_tree_add_item(pcep_subobj_ipv6, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2165 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_length, tvb, offset+1, 1, ENC_NA);
2166 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_ipv6, tvb, offset+2, 16, ENC_NA);
2167 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_prefix_length, tvb, offset+18, 1, ENC_NA);
2168 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_padding, tvb, offset+19, 1, ENC_NA);
2169 break;
2171 case PCEP_XRO_OBJ:
2172 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_x, tvb, offset, 1, ENC_NA);
2173 proto_tree_add_item(pcep_subobj_ipv6, hf_PCEPF_SUBOBJ_XRO, tvb, offset, 1, ENC_NA);
2174 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_length, tvb, offset+1, 1, ENC_NA);
2175 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_ipv6, tvb, offset+2, 16, ENC_NA);
2176 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_prefix_length, tvb, offset+18, 1, ENC_NA);
2177 proto_tree_add_item(pcep_subobj_ipv6, hf_pcep_subobj_ipv6_attribute, tvb, offset+19, 1, ENC_NA);
2178 break;
2180 default:
2181 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject,
2182 "Non defined subobject for this object");
2183 break;
2187 static void
2188 dissect_subobj_label_control(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2190 proto_tree *pcep_subobj_label_control;
2191 proto_tree *pcep_subobj_label_flags;
2192 proto_item *ti;
2194 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_LABEL_CONTROL, tvb, offset, length, ENC_NA);
2195 pcep_subobj_label_control = proto_item_add_subtree(ti, ett_pcep_obj);
2197 if (length < 5) {
2198 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2199 "Bad label control subobject: length %u < 5", length);
2200 return;
2203 switch (obj_class) {
2205 case PCEP_EXPLICIT_ROUTE_OBJ:
2206 case PCEP_SERO_OBJ:
2207 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_l, tvb, offset, 1, ENC_NA);
2208 proto_tree_add_item(pcep_subobj_label_control, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2209 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_length, tvb, offset+1, 1, ENC_NA);
2210 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_u, tvb, offset+2, 1, ENC_NA);
2211 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_reserved, tvb, offset+2, 1, ENC_NA);
2212 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_c_type, tvb, offset+3, 1, ENC_NA);
2213 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_label, tvb, offset+4, length-4, ENC_NA);
2214 break;
2216 case PCEP_RECORD_ROUTE_OBJ:
2217 case PCEP_SRRO_OBJ:
2218 proto_tree_add_item(pcep_subobj_label_control, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2219 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_length, tvb, offset+1, 1, ENC_NA);
2220 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_u, tvb, offset+2, 1, ENC_NA);
2222 ti = proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_flags, tvb, offset+2, 1, ENC_NA);
2223 pcep_subobj_label_flags = proto_item_add_subtree(ti, ett_pcep_obj);
2224 proto_tree_add_item(pcep_subobj_label_flags, hf_pcep_subobj_label_flags_gl, tvb, offset+2, 1, ENC_NA);
2225 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_c_type, tvb, offset+3, 1, ENC_NA);
2226 proto_tree_add_item(pcep_subobj_label_control, hf_pcep_subobj_label_control_label, tvb, offset+4, length-4, ENC_NA);
2227 break;
2229 default:
2230 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject,
2231 "Non defined subobject for this object");
2232 break;
2236 static void
2237 dissect_subobj_sr(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2239 proto_tree *pcep_subobj_sr_tree = NULL;
2240 proto_item *ti = NULL;
2241 proto_tree *sid_tree = NULL;
2242 proto_item *sid_item = NULL;
2243 uint16_t flags;
2244 uint8_t j = 0, nt = 0;
2245 uint8_t octet0, octet1, octet2;
2246 uint32_t label;
2247 uint8_t tc, bos, ttl;
2249 static int * const subobj_sr_flags[] = {
2250 &hf_pcep_subobj_sr_flags_m,
2251 &hf_pcep_subobj_sr_flags_c,
2252 &hf_pcep_subobj_sr_flags_s,
2253 &hf_pcep_subobj_sr_flags_f,
2254 NULL
2257 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_SR, tvb, offset, length, ENC_NA);
2258 pcep_subobj_sr_tree = proto_item_add_subtree(ti, ett_pcep_obj);
2260 if (length < 8) {
2261 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2262 "Bad SR subobject: length %u < 8", length);
2263 return;
2266 flags = tvb_get_uint16(tvb, offset+2, ENC_NA);
2267 nt = ((tvb_get_uint8(tvb, offset + 2)) >> 4);
2269 if (obj_class == PCEP_EXPLICIT_ROUTE_OBJ || obj_class == PCEP_RECORD_ROUTE_OBJ) {
2270 if (obj_class == PCEP_EXPLICIT_ROUTE_OBJ) {
2271 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_l, tvb, offset, 1, ENC_NA);
2272 proto_tree_add_item(pcep_subobj_sr_tree, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2274 else {
2275 proto_tree_add_item(pcep_subobj_sr_tree, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2278 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_length, tvb, offset + 1, 1, ENC_NA);
2279 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nt, tvb, offset + 2, 1, ENC_NA);
2280 proto_tree_add_bitmask(pcep_subobj_sr_tree, tvb, offset + 2, hf_pcep_subobj_sr_flags, ett_pcep_obj, subobj_sr_flags, ENC_NA);
2282 if ( ! (flags & PCEP_SUBOBJ_SR_FLAGS_S) ) { /* S flag is not set, SID exists */
2283 j = 4;
2284 sid_item = proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_sid, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
2286 if (flags & PCEP_SUBOBJ_SR_FLAGS_M) { /* M flag is set, SID represents MPLS label stack */
2287 sid_tree = proto_item_add_subtree(sid_item, ett_pcep_obj);
2288 proto_tree_add_item(sid_tree, hf_pcep_subobj_sr_sid_label, tvb, offset+4, 4, ENC_BIG_ENDIAN);
2289 proto_tree_add_item(sid_tree, hf_pcep_subobj_sr_sid_tc, tvb, offset+4, 4, ENC_BIG_ENDIAN);
2290 proto_tree_add_item(sid_tree, hf_pcep_subobj_sr_sid_s , tvb, offset+4, 4, ENC_BIG_ENDIAN);
2291 proto_tree_add_item(sid_tree, hf_pcep_subobj_sr_sid_ttl, tvb, offset+4, 4, ENC_BIG_ENDIAN);
2293 octet0 = tvb_get_uint8(tvb, offset+4);
2294 octet1 = tvb_get_uint8(tvb, offset+5);
2295 octet2 = tvb_get_uint8(tvb, offset+6);
2296 label = (octet0 << 12) + (octet1 << 4) + ((octet2 >> 4) & 0xff);
2297 tc = (octet2 >> 1) & 0x7;
2298 bos = (octet2 & 0x1);
2299 ttl = tvb_get_uint8(tvb, offset+7);
2300 proto_item_append_text(sid_tree, " (Label: %u, TC: %u, S: %u, TTL: %u)", label, tc, bos, ttl);
2304 if ( ! (flags & PCEP_SUBOBJ_SR_FLAGS_F) ) { /* F flag is not set, NAI exists */
2305 switch (nt) {
2306 case 1: /* IPv4 Node ID */
2307 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_ipv4_node, tvb, offset+j+4, 4, ENC_BIG_ENDIAN);
2308 break;
2310 case 2: /* IPv6 Node ID */
2311 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_ipv6_node, tvb, offset+j+4, 16, ENC_NA);
2312 break;
2314 case 3: /* IPv4 Adjacency */
2315 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_ipv4_addr, tvb, offset+j+4, 4, ENC_BIG_ENDIAN);
2316 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_ipv4_addr, tvb, offset+j+8, 4, ENC_BIG_ENDIAN);
2317 break;
2319 case 4: /* IPv6 Adjacency with global IPv6 addresses */
2320 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_ipv6_addr, tvb, offset+j+4, 16, ENC_NA);
2321 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_ipv6_addr, tvb, offset+j+20, 16, ENC_NA);
2322 break;
2324 case 5: /* Unnumbered Adjacency with IPv4 Node IDs */
2325 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_node_id, tvb, offset+j+4, 4, ENC_BIG_ENDIAN);
2326 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_interface_id, tvb, offset+j+8, 4, ENC_BIG_ENDIAN);
2327 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_node_id, tvb, offset+j+12, 4, ENC_BIG_ENDIAN);
2328 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_interface_id, tvb, offset+j+16, 4, ENC_BIG_ENDIAN);
2329 break;
2331 case 6: /* IPv6 Adjacency with link-local IPv6 addresses */
2332 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_ipv6_addr, tvb, offset+j+4, 16, ENC_NA);
2333 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_local_interface_id, tvb, offset+j+20, 4, ENC_BIG_ENDIAN);
2334 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_ipv6_addr, tvb, offset+j+24, 16, ENC_NA);
2335 proto_tree_add_item(pcep_subobj_sr_tree, hf_pcep_subobj_sr_nai_remote_interface_id, tvb, offset+j+40, 4, ENC_BIG_ENDIAN);
2337 default:
2338 break;
2342 else {
2343 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object");
2347 static void
2348 dissect_subobj_srv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2350 proto_tree *subtree = NULL;
2351 proto_tree *subsub_tree = NULL;
2352 proto_item *ti = NULL, *ti_nai = NULL;
2353 uint16_t flags;
2354 uint8_t j = 0, nt = 0;
2355 uint32_t lb_len = 0, ln_len = 0, fun_len = 0, arg_len = 0;
2357 static int * const subobj_srv6_flags[] = {
2358 &hf_pcep_subobj_srv6_flags_s,
2359 &hf_pcep_subobj_srv6_flags_f,
2360 &hf_pcep_subobj_srv6_flags_t,
2361 &hf_pcep_subobj_srv6_flags_v,
2362 NULL
2365 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_SRv6, tvb, offset, length, ENC_NA);
2366 subtree = proto_item_add_subtree(ti, ett_pcep_obj);
2368 if (length < 8) {
2369 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2370 "Bad SRv6 subobject: length %u < 8", length);
2371 return;
2374 flags = tvb_get_uint16(tvb, offset+2, ENC_NA);
2375 nt = ((tvb_get_uint8(tvb, offset + 2)) >> 4);
2377 if (obj_class != PCEP_EXPLICIT_ROUTE_OBJ && obj_class != PCEP_RECORD_ROUTE_OBJ) {
2378 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object");
2379 return;
2381 if (obj_class == PCEP_EXPLICIT_ROUTE_OBJ) {
2382 proto_tree_add_item(subtree, hf_pcep_subobj_srv6_l, tvb, offset, 1, ENC_NA);
2383 proto_tree_add_item(subtree, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2385 else {
2386 proto_tree_add_item(subtree, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2389 proto_tree_add_item(subtree, hf_pcep_subobj_srv6_length, tvb, offset + 1, 1, ENC_NA);
2390 ti_nai = proto_tree_add_item(subtree, hf_pcep_subobj_srv6_nt, tvb, offset + 2, 1, ENC_NA);
2391 proto_tree_add_bitmask(subtree, tvb, offset + 2, hf_pcep_subobj_srv6_flags, ett_pcep_obj, subobj_srv6_flags, ENC_NA);
2392 proto_tree_add_item(subtree, hf_pcep_subobj_srv6_reserved, tvb, offset + 4, 2, ENC_BIG_ENDIAN);
2393 proto_tree_add_item(subtree, hf_pcep_subobj_srv6_endpoint_behavior, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
2395 if ( ! (flags & PCEP_SUBOBJ_SRV6_FLAGS_S) ) { /* S flag is not set, SID exists */
2396 proto_tree_add_item(subtree, hf_pcep_subobj_srv6_sid, tvb, offset + 8, 16, ENC_NA);
2397 j += 16;
2400 if ( ! (flags & PCEP_SUBOBJ_SR_FLAGS_F) ) { /* F flag is not set, NAI exists */
2401 switch (nt) {
2402 case 2: /* IPv6 Node ID */
2403 ti = proto_tree_add_item(subtree, hf_pcep_subobj_srv6_nai, tvb, offset+j+8, 16, ENC_NA);
2404 subsub_tree = proto_item_add_subtree(ti, ett_pcep_obj);
2405 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_ipv6_node, tvb, offset+j+8, 16, ENC_NA);
2406 j += 16;
2407 break;
2409 case 4: /* IPv6 Adjacency with global IPv6 addresses */
2410 ti = proto_tree_add_item(subtree, hf_pcep_subobj_srv6_nai, tvb, offset+j+8, 32, ENC_NA);
2411 subsub_tree = proto_item_add_subtree(ti, ett_pcep_obj);
2412 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_local_ipv6_addr, tvb, offset+j+8, 16, ENC_NA);
2413 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_remote_ipv6_addr, tvb, offset+j+24, 16, ENC_NA);
2414 j += 32;
2415 break;
2417 case 6: /* IPv6 Adjacency with link-local IPv6 addresses */
2418 ti = proto_tree_add_item(subtree, hf_pcep_subobj_srv6_nai, tvb, offset+j+8, 40, ENC_NA);
2419 subsub_tree = proto_item_add_subtree(ti, ett_pcep_obj);
2420 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_local_ipv6_addr, tvb, offset+j+8, 16, ENC_NA);
2421 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_local_interface_id, tvb, offset+j+24, 4, ENC_BIG_ENDIAN);
2422 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_remote_ipv6_addr, tvb, offset+j+28, 16, ENC_NA);
2423 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_nai_remote_interface_id, tvb, offset+j+44, 4, ENC_BIG_ENDIAN);
2424 j += 40;
2425 break;
2427 default:
2428 expert_add_info_format(pinfo, ti_nai, &ei_pcep_non_defined_subobject,
2429 "Non defined NAI type (%u) for this subobject", nt);
2430 return;
2434 if (flags & PCEP_SUBOBJ_SRV6_FLAGS_T) { /* T flag is set, SID Structure exists */
2435 ti = proto_tree_add_item(subtree, hf_pcep_subobj_srv6_sid_struct, tvb, offset+j+8, 8, ENC_NA);
2436 subsub_tree = proto_item_add_subtree(ti, ett_pcep_obj);
2437 proto_tree_add_item_ret_uint(subsub_tree, hf_pcep_subobj_srv6_sid_struct_lb_len, tvb, offset+j+8, 1, ENC_NA, &lb_len);
2438 proto_tree_add_item_ret_uint(subsub_tree, hf_pcep_subobj_srv6_sid_struct_ln_len, tvb, offset+j+8+1, 1, ENC_NA, &ln_len);
2439 proto_tree_add_item_ret_uint(subsub_tree, hf_pcep_subobj_srv6_sid_struct_fun_len, tvb, offset+j+8+2, 1, ENC_NA, &fun_len);
2440 proto_tree_add_item_ret_uint(subsub_tree, hf_pcep_subobj_srv6_sid_struct_arg_len, tvb, offset+j+8+3, 1, ENC_NA, &arg_len);
2441 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_sid_struct_reserved, tvb, offset+j+8+4, 3, ENC_BIG_ENDIAN);
2442 proto_tree_add_item(subsub_tree, hf_pcep_subobj_srv6_sid_struct_flags, tvb, offset+j+8+7, 1, ENC_NA);
2443 proto_item_append_text(ti, " (LB: %u, LN: %u, Fun: %u, Arg: %u)", lb_len, ln_len, fun_len, arg_len);
2447 static void
2448 dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, int ett_pcep_obj, unsigned length)
2450 proto_tree *pcep_subobj_unnumb_interfaceID;
2451 proto_item *ti;
2452 uint32_t interface_ID;
2454 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_UNNUM_INTERFACEID, tvb, offset, length, ENC_NA);
2455 pcep_subobj_unnumb_interfaceID = proto_item_add_subtree(ti, ett_pcep_obj);
2457 if (length != 12) {
2458 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2459 "Bad unnumbered interface ID subobject: length %u != 12", length);
2460 return;
2463 interface_ID = tvb_get_ntohl(tvb, offset+8);
2464 proto_item_append_text(ti, ": %s:%u", tvb_ip_to_str(pinfo->pool, tvb, offset+4),
2465 interface_ID);
2467 switch (obj_class) {
2469 case PCEP_EXPLICIT_ROUTE_OBJ:
2470 case PCEP_SERO_OBJ:
2471 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_l, tvb, offset, 1, ENC_NA);
2472 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2473 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_length, tvb, offset+1, 1, ENC_NA);
2474 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2475 break;
2477 case PCEP_RECORD_ROUTE_OBJ:
2478 case PCEP_SRRO_OBJ:
2480 static int * const flags[] = {
2481 &hf_pcep_subobj_flags_lpa,
2482 &hf_pcep_subobj_flags_lpu,
2483 NULL
2486 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
2487 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_length, tvb, offset+1, 1, ENC_NA);
2488 proto_tree_add_bitmask(pcep_subobj_unnumb_interfaceID, tvb, offset+2, hf_pcep_subobj_unnumb_interfaceID_flags, ett_pcep_obj, flags, ENC_BIG_ENDIAN);
2489 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved_rrobj, tvb, offset+3, 1, ENC_NA);
2491 break;
2493 case PCEP_IRO_OBJ:
2494 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_iro_unnumb_interfaceID_l, tvb, offset, 1, ENC_NA);
2495 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2496 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_length, tvb, offset+1, 1, ENC_NA);
2497 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2498 break;
2500 case PCEP_XRO_OBJ:
2501 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_x, tvb, offset, 1, ENC_NA);
2502 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ_XRO, tvb, offset, 1, ENC_NA);
2503 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved_xroobj, tvb, offset+2, 1, ENC_NA);
2504 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_attribute, tvb, offset+3, 1, ENC_NA);
2505 break;
2507 default:
2508 expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject,
2509 "Non defined subobject for this object");
2510 break;
2513 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_router_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
2514 proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_interface_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
2517 static void
2518 dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, unsigned ett_pcep_obj, unsigned length)
2520 proto_tree *pcep_subobj_autonomous_sys_num;
2521 proto_item *ti;
2523 if (obj_class == PCEP_XRO_OBJ) {
2524 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM, tvb, offset, length, ENC_NA);
2525 pcep_subobj_autonomous_sys_num = proto_item_add_subtree(ti, ett_pcep_obj);
2526 if (length != 8) {
2527 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2528 "Bad autonomous system number subobject: length %u != 8", length);
2529 return;
2532 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_x, tvb, offset, 1, ENC_NA);
2533 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_PCEPF_SUBOBJ_XRO, tvb, offset, 1, ENC_NA);
2534 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_length, tvb, offset+1, 1, ENC_NA);
2536 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_reserved, tvb, offset+2, 1, ENC_NA);
2537 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_attribute, tvb, offset+3, 1, ENC_NA);
2538 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_optional_as_number_high_octets, tvb, offset+4, 2, ENC_BIG_ENDIAN);
2539 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_as_number, tvb, offset+6, 2, ENC_BIG_ENDIAN);
2540 } else {
2541 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM, tvb, offset, length, ENC_NA);
2542 pcep_subobj_autonomous_sys_num = proto_item_add_subtree(ti, ett_pcep_obj);
2544 if (length != 4) {
2545 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2546 "Bad autonomous system number subobject: length %u != 4", length);
2547 return;
2550 if (obj_class == PCEP_IRO_OBJ)
2551 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_iro_autonomous_sys_num_l, tvb, offset, 1, ENC_NA);
2552 else
2553 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_l, tvb, offset, 1, ENC_NA);
2554 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2555 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_length, tvb, offset+1, 1, ENC_NA);
2556 proto_tree_add_item(pcep_subobj_autonomous_sys_num, hf_pcep_subobj_autonomous_sys_num_as_number, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2560 static void
2561 dissect_subobj_srlg(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, unsigned ett_pcep_obj, unsigned length)
2563 proto_tree *pcep_subobj_srlg;
2564 proto_item *ti;
2566 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_SRLG, tvb, offset, length, ENC_NA);
2567 pcep_subobj_srlg = proto_item_add_subtree(ti, ett_pcep_obj);
2569 if (length != 8) {
2570 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2571 "Bad SRLG subobject: length %u != 8", length);
2572 return;
2575 proto_tree_add_item(pcep_subobj_srlg, hf_pcep_subobj_srlg_x, tvb, offset, 1, ENC_NA);
2576 proto_tree_add_item(pcep_subobj_srlg, hf_PCEPF_SUBOBJ_XRO, tvb, offset, 1, ENC_NA);
2577 proto_tree_add_item(pcep_subobj_srlg, hf_pcep_subobj_srlg_length, tvb, offset+1, 1, ENC_NA);
2579 proto_tree_add_item(pcep_subobj_srlg, hf_pcep_subobj_srlg_id, tvb, offset+2, 4, ENC_BIG_ENDIAN);
2580 proto_tree_add_item(pcep_subobj_srlg, hf_pcep_subobj_srlg_reserved, tvb, offset+6, 1, ENC_NA);
2581 proto_tree_add_item(pcep_subobj_srlg, hf_pcep_subobj_srlg_attribute, tvb, offset+7, 1, ENC_NA);
2584 static void
2585 dissect_subobj_exrs(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, unsigned ett_pcep_obj, unsigned type_iro, unsigned length)
2587 proto_tree *pcep_subobj_exrs;
2588 proto_item *ti;
2589 uint8_t l_type;
2590 uint8_t length2;
2591 unsigned type_exrs;
2592 unsigned offset_exrs = 0;
2594 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_EXRS, tvb, offset, length, ENC_NA);
2595 pcep_subobj_exrs = proto_item_add_subtree(ti, ett_pcep_obj);
2597 if (length < 4) {
2598 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2599 "Bad EXRS subobject: length %u < 4", length);
2600 return;
2603 proto_tree_add_item(pcep_subobj_exrs, hf_pcep_subobj_exrs_l, tvb, offset, 1, ENC_NA);
2604 proto_tree_add_item(pcep_subobj_exrs, hf_pcep_subobj_exrs_type, tvb, offset, 1, ENC_NA);
2605 proto_tree_add_item(pcep_subobj_exrs, hf_pcep_subobj_exrs_length, tvb, offset+1, 1, ENC_NA);
2607 proto_tree_add_item(pcep_subobj_exrs, hf_pcep_subobj_exrs_reserved, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2609 offset += 4;
2611 while (offset_exrs<length-4) {
2613 l_type = tvb_get_uint8(tvb, offset);
2614 length2 = tvb_get_uint8(tvb, offset+1);
2616 if (length2 < 2) {
2617 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2618 "Bad packet: subobject length %u < 2", length2);
2619 break;
2622 type_exrs = (l_type & Mask_Type);
2624 if (type_iro == PCEP_SUB_EXRS)
2625 obj_class = PCEP_XRO_OBJ;
2627 switch (type_exrs) {
2629 case PCEP_SUB_IPv4:
2630 dissect_subobj_ipv4(pcep_subobj_exrs, pinfo, tvb, offset, obj_class, ett_pcep_obj, length2);
2631 break;
2632 case PCEP_SUB_IPv6:
2633 dissect_subobj_ipv6(pcep_subobj_exrs, pinfo, tvb, offset, obj_class, ett_pcep_obj, length2);
2634 break;
2635 case PCEP_SUB_UNNUMB_INTERFACE_ID:
2636 dissect_subobj_unnumb_interfaceID(pcep_subobj_exrs, pinfo, tvb, offset, obj_class, ett_pcep_obj, length2);
2637 break;
2638 case PCEP_SUB_AUTONOMOUS_SYS_NUM:
2639 dissect_subobj_autonomous_sys_num(pcep_subobj_exrs, pinfo, tvb, offset, obj_class, ett_pcep_obj, length2);
2640 break;
2641 case PCEP_SUB_SRLG:
2642 dissect_subobj_srlg(pcep_subobj_exrs, pinfo, tvb, offset, ett_pcep_obj, length2);
2643 break;
2644 default:
2645 proto_tree_add_expert_format(pcep_subobj_exrs, pinfo, &ei_pcep_non_defined_subobject,
2646 tvb, offset+2, length-2,
2647 "Non defined subobject (%d)", type_exrs);
2648 break;
2650 offset_exrs += length2;
2651 offset += length2;
2655 static void
2656 dissect_subobj_pksv4(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int ett_pcep_obj, unsigned length)
2658 proto_tree *pcep_subobj_pksv4;
2659 proto_item *ti;
2660 uint16_t path_key;
2662 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_PKSv4, tvb, offset, length, ENC_NA);
2663 pcep_subobj_pksv4 = proto_item_add_subtree(ti, ett_pcep_obj);
2665 if (length != 8) {
2666 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2667 "Bad path key subobject: length %u != 8", length);
2668 return;
2671 path_key = tvb_get_ntohs(tvb, offset+2);
2672 proto_item_append_text(ti, ": %s, Path Key %u", tvb_ip_to_str(pinfo->pool, tvb, offset+4), path_key);
2673 proto_tree_add_item(pcep_subobj_pksv4, hf_pcep_subobj_pksv4_l, tvb, offset, 1, ENC_NA);
2674 proto_tree_add_item(pcep_subobj_pksv4, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2675 proto_tree_add_item(pcep_subobj_pksv4, hf_pcep_subobj_pksv4_length, tvb, offset+1, 1, ENC_NA);
2676 proto_tree_add_item(pcep_subobj_pksv4, hf_pcep_subobj_pksv4_path_key, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2677 proto_tree_add_item(pcep_subobj_pksv4, hf_pcep_subobj_pksv4_pce_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
2680 static void
2681 dissect_subobj_pksv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int ett_pcep_obj, unsigned length)
2683 proto_tree *pcep_subobj_pksv6;
2684 proto_item *ti;
2685 uint16_t path_key;
2687 ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_PKSv6, tvb, offset, length, ENC_NA);
2688 pcep_subobj_pksv6 = proto_item_add_subtree(ti, ett_pcep_obj);
2690 if (length != 20) {
2691 expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length,
2692 "Bad path key subobject: length %u != 20", length);
2693 return;
2696 path_key = tvb_get_ntohs(tvb, offset+2);
2697 proto_item_append_text(ti, ": %s, Path Key %u", tvb_ip6_to_str(pinfo->pool, tvb, offset+4), path_key);
2699 proto_tree_add_item(pcep_subobj_pksv6, hf_pcep_subobj_pksv6_l, tvb, offset, 1, ENC_NA);
2700 proto_tree_add_item(pcep_subobj_pksv6, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);
2701 proto_tree_add_item(pcep_subobj_pksv6, hf_pcep_subobj_pksv6_length, tvb, offset+1, 1, ENC_NA);
2702 proto_tree_add_item(pcep_subobj_pksv6, hf_pcep_subobj_pksv6_path_key, tvb, offset+2, 2, ENC_BIG_ENDIAN);
2703 proto_tree_add_item(pcep_subobj_pksv6, hf_pcep_subobj_pksv6_pce_id, tvb, offset+4, 4, ENC_NA);
2706 /*------------------------------------------------------------------------------
2707 * Pointer to an object dissector function.
2708 * All functions which dissect a single object type must match this signature.
2709 *------------------------------------------------------------------------------*/
2710 typedef void (pcep_obj_dissector_t)(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type);
2712 /*------------------------------------------------------------------------------
2713 * OPEN OBJECT
2714 *------------------------------------------------------------------------------*/
2715 #define OPEN_OBJ_MIN_LEN 4
2717 static void
2718 dissect_pcep_open_obj (proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
2720 proto_tree *pcep_open_obj_flags;
2721 proto_item *ti;
2723 if (obj_length < OBJ_HDR_LEN+OPEN_OBJ_MIN_LEN) {
2724 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2725 tvb, offset2, obj_length,
2726 "Bad OPEN object length %u, should be >= %u",
2727 obj_length, OBJ_HDR_LEN+OPEN_OBJ_MIN_LEN);
2728 return;
2731 proto_tree_add_item(pcep_object_tree, hf_pcep_open_obj_pcep_version, tvb, offset2, 1, ENC_NA);
2733 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_open_obj_flags, tvb, offset2, 1, ENC_NA);
2734 pcep_open_obj_flags = proto_item_add_subtree(ti, ett_pcep_obj_open);
2735 proto_tree_add_item(pcep_open_obj_flags, hf_pcep_open_flags_res, tvb, offset2, 1, ENC_NA);
2737 proto_tree_add_item(pcep_object_tree, hf_pcep_open_obj_keepalive, tvb, offset2+1, 1, ENC_NA);
2738 proto_tree_add_item(pcep_object_tree, hf_pcep_open_obj_deadtime, tvb, offset2+2, 1, ENC_NA);
2739 proto_tree_add_item(pcep_object_tree, hf_pcep_open_obj_sid, tvb, offset2+3, 1, ENC_NA);
2741 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
2742 offset2 += OPEN_OBJ_MIN_LEN;
2743 obj_length -= OBJ_HDR_LEN+OPEN_OBJ_MIN_LEN;
2744 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_open);
2747 /*------------------------------------------------------------------------------
2748 * RP OBJECT
2749 *------------------------------------------------------------------------------*/
2750 #define RP_OBJ_MIN_LEN 8
2752 static void
2753 dissect_pcep_rp_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
2754 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
2756 proto_tree *pcep_rp_obj_flags;
2757 proto_item *ti;
2759 if (obj_length < OBJ_HDR_LEN+RP_OBJ_MIN_LEN) {
2760 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2761 tvb, offset2, obj_length,
2762 "Bad RP object length %u, should be >= %u",
2763 obj_length, OBJ_HDR_LEN+RP_OBJ_MIN_LEN);
2764 return;
2767 proto_tree_add_item(pcep_object_tree, hf_pcep_rp_obj_reserved, tvb, offset2, 1, ENC_NA);
2769 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_rp_obj_flags, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2770 pcep_rp_obj_flags = proto_item_add_subtree(ti, ett_pcep_obj_request_parameters);
2772 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_reserved, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2773 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_c, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2774 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_f, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2775 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_n, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2776 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_e, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2777 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_m, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2778 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_d, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2779 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_p, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2780 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_s, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2781 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_v, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2782 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_o, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2783 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_b, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2784 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_r, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2785 proto_tree_add_item(pcep_rp_obj_flags, hf_pcep_rp_flags_pri, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
2787 proto_tree_add_item(pcep_object_tree, hf_pcep_rp_obj_requested_id_number, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
2789 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
2790 offset2 += RP_OBJ_MIN_LEN;
2791 obj_length -= OBJ_HDR_LEN+RP_OBJ_MIN_LEN;
2792 /* RFC 8408 allows PATH_SETUP_TYPE TLV in the RP object */
2793 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_request_parameters);
2796 /*------------------------------------------------------------------------------
2797 * NO PATH OBJECT
2798 *------------------------------------------------------------------------------*/
2799 #define NO_PATH_OBJ_MIN_LEN 4
2801 static void
2802 dissect_pcep_no_path_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
2803 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
2805 proto_tree *pcep_no_path_obj_flags;
2806 proto_item *ti;
2808 if (obj_length < OBJ_HDR_LEN+NO_PATH_OBJ_MIN_LEN) {
2809 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2810 tvb, offset2, obj_length,
2811 "Bad NO-PATH object length %u, should be >= %u",
2812 obj_length, OBJ_HDR_LEN+NO_PATH_OBJ_MIN_LEN);
2813 return;
2816 proto_tree_add_item(pcep_object_tree, hf_pcep_no_path_obj_nature_of_issue, tvb, offset2, 1, ENC_NA);
2818 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_no_path_obj_flags, tvb, offset2+1, 2, ENC_BIG_ENDIAN);
2819 pcep_no_path_obj_flags = proto_item_add_subtree(ti, ett_pcep_obj_no_path);
2820 proto_tree_add_item(pcep_no_path_obj_flags, hf_pcep_no_path_flags_c, tvb, offset2+1, 2, ENC_BIG_ENDIAN);
2822 proto_tree_add_item(pcep_object_tree, hf_pcep_no_path_obj_reserved, tvb, offset2+3, 1, ENC_NA);
2824 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
2825 offset2 += NO_PATH_OBJ_MIN_LEN;
2826 obj_length -= OBJ_HDR_LEN+NO_PATH_OBJ_MIN_LEN;
2827 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_no_path);
2830 /*------------------------------------------------------------------------------
2831 * END POINT OBJECT
2832 *------------------------------------------------------------------------------*/
2833 #define END_POINT_IPV4_OBJ_LEN 8
2834 #define END_POINT_IPV6_OBJ_LEN 32
2836 static void
2837 dissect_pcep_end_point_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
2838 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type)
2840 int dest_leafs;
2841 int i=0;
2842 switch (obj_type)
2844 case IPv4:
2845 if (obj_length != OBJ_HDR_LEN+END_POINT_IPV4_OBJ_LEN) {
2846 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2847 tvb, offset2, obj_length,
2848 "Bad IPv4 END-POINTS object length %u, should be %u",
2849 obj_length, OBJ_HDR_LEN+END_POINT_IPV4_OBJ_LEN);
2850 return;
2853 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_source_ipv4_address, tvb, offset2, 4, ENC_BIG_ENDIAN);
2854 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_destination_ipv4_address, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
2855 break;
2857 case IPv6:
2858 if (obj_length != OBJ_HDR_LEN+END_POINT_IPV6_OBJ_LEN) {
2859 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2860 tvb, offset2, obj_length,
2861 "Bad IPv6 END-POINTS object length %u, should be %u",
2862 obj_length, OBJ_HDR_LEN+END_POINT_IPV6_OBJ_LEN);
2863 return;
2866 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_source_ipv6_address, tvb, offset2, 16, ENC_NA);
2867 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_destination_ipv6_address, tvb, offset2+16, 16, ENC_NA);
2868 break;
2870 case IPv4_P2MP:
2871 proto_tree_add_item(pcep_object_tree, hf_pcep_endpoint_p2mp_leaf, tvb, offset2, 4, ENC_BIG_ENDIAN);
2872 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_source_ipv4_address, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
2873 dest_leafs = (obj_length - OBJ_HDR_LEN - 8)/4;
2874 for (i=0; i<dest_leafs; i++)
2875 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_destination_ipv4_address, tvb, offset2+8+(4*i), 4, ENC_BIG_ENDIAN);
2876 break;
2878 case IPv6_P2MP:
2879 proto_tree_add_item(pcep_object_tree, hf_pcep_endpoint_p2mp_leaf, tvb, offset2, 4, ENC_BIG_ENDIAN);
2880 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_source_ipv6_address, tvb, offset2+4, 16, ENC_NA);
2881 dest_leafs = (obj_length - OBJ_HDR_LEN - 20)/16;
2882 for (i=0; i<dest_leafs; i++)
2883 proto_tree_add_item(pcep_object_tree, hf_pcep_end_point_obj_destination_ipv6_address, tvb, (offset2+20+i*16), 16, ENC_NA);
2884 break;
2886 default:
2887 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_unknown_type_object,
2888 tvb, offset2, obj_length-OBJ_HDR_LEN,
2889 "UNKNOWN Type Object (%u)", obj_type);
2890 break;
2896 /*------------------------------------------------------------------------------
2897 * BANDWIDTH OBJECT
2898 *------------------------------------------------------------------------------*/
2899 #define BANDWIDTH_OBJ_LEN 4
2901 static void
2902 dissect_pcep_bandwidth_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
2904 if (obj_length != OBJ_HDR_LEN+BANDWIDTH_OBJ_LEN) {
2905 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2906 tvb, offset2, obj_length,
2907 "Bad BANDWIDTH object length %u, should be %u",
2908 obj_length, OBJ_HDR_LEN+BANDWIDTH_OBJ_LEN);
2909 return;
2912 proto_tree_add_item(pcep_object_tree, hf_pcep_bandwidth, tvb, offset2, 4, ENC_BIG_ENDIAN);
2915 /*------------------------------------------------------------------------------
2916 * METRIC OBJECT
2917 *------------------------------------------------------------------------------*/
2918 #define METRIC_OBJ_LEN 8
2920 static void
2921 dissect_pcep_metric_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
2922 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
2924 proto_tree *pcep_metric_obj_flags;
2925 proto_item *ti;
2927 if (obj_length != OBJ_HDR_LEN+METRIC_OBJ_LEN) {
2928 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2929 tvb, offset2, obj_length,
2930 "Bad METRIC object length %u, should be %u",
2931 obj_length, OBJ_HDR_LEN+METRIC_OBJ_LEN);
2932 return;
2935 proto_tree_add_item(pcep_object_tree, hf_pcep_metric_obj_reserved, tvb, offset2, 2, ENC_BIG_ENDIAN);
2937 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_metric_obj_flags, tvb, offset2+2, 1, ENC_NA);
2938 pcep_metric_obj_flags = proto_item_add_subtree(ti, ett_pcep_obj_metric);
2939 proto_tree_add_item(pcep_metric_obj_flags, hf_pcep_metric_flags_c, tvb, offset2+2, 1, ENC_NA);
2940 proto_tree_add_item(pcep_metric_obj_flags, hf_pcep_metric_flags_b, tvb, offset2+2, 1, ENC_NA);
2942 proto_tree_add_item(pcep_object_tree, hf_pcep_metric_obj_type, tvb, offset2+3, 1, ENC_NA);
2943 proto_tree_add_item(pcep_object_tree, hf_pcep_metric_obj_metric_value, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
2946 /*------------------------------------------------------------------------------
2947 * EXPLICIT ROUTE OBJECT (ERO)
2948 *------------------------------------------------------------------------------*/
2949 static void
2950 dissect_pcep_explicit_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
2951 tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type _U_)
2953 uint8_t l_type;
2954 uint8_t length;
2955 unsigned type_exp_route;
2956 unsigned body_obj_len;
2958 body_obj_len = obj_length - OBJ_HDR_LEN;
2960 while (body_obj_len) {
2961 if (body_obj_len < 2) {
2962 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
2963 "Bad ERO object: subobject goes past end of object");
2964 break;
2967 l_type = tvb_get_uint8(tvb, offset2);
2968 length = tvb_get_uint8(tvb, offset2+1);
2970 if (length < 2) {
2971 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
2972 "Bad ERO object: subobject length %u < 2", length);
2973 break;
2976 type_exp_route = (l_type & Mask_Type);
2977 if (body_obj_len <length) {
2978 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
2979 tvb, offset2, length,
2980 "Bad ERO object: subobject length %u > remaining length %u",
2981 length, body_obj_len);
2982 break;
2985 switch (type_exp_route) {
2987 case PCEP_SUB_IPv4:
2988 dissect_subobj_ipv4(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
2989 break;
2990 case PCEP_SUB_IPv6:
2991 dissect_subobj_ipv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
2992 break;
2993 case PCEP_SUB_LABEL_CONTROL:
2994 dissect_subobj_label_control(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
2995 break;
2996 case PCEP_SUB_UNNUMB_INTERFACE_ID:
2997 dissect_subobj_unnumb_interfaceID(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
2998 break;
2999 case PCEP_SUB_AUTONOMOUS_SYS_NUM:
3000 dissect_subobj_autonomous_sys_num(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
3001 break;
3002 case PCEP_SUB_PKSv4:
3003 dissect_subobj_pksv4(pcep_object_tree, pinfo, tvb, offset2, ett_pcep_obj_explicit_route, length);
3004 break;
3005 case PCEP_SUB_SR_PRE_IANA:
3006 case PCEP_SUB_SR:
3007 dissect_subobj_sr(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
3008 break;
3009 case PCEP_SUB_SRv6:
3010 dissect_subobj_srv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_explicit_route, length);
3011 break;
3012 default:
3013 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3014 tvb, offset2, length,
3015 "Non defined subobject (%d)", type_exp_route);
3016 break;
3018 offset2 += length;
3019 body_obj_len -= length;
3023 /*------------------------------------------------------------------------------
3024 * RECORD ROUTE OBJECT (RRO)
3025 *------------------------------------------------------------------------------*/
3026 static void
3027 dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type _U_)
3029 uint8_t type_rro;
3030 uint8_t length;
3031 unsigned body_obj_len;
3033 body_obj_len = obj_length - OBJ_HDR_LEN;
3035 while (body_obj_len) {
3036 if (body_obj_len < 2) {
3037 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3038 "Bad RRO object: subobject goes past end of object");
3039 break;
3042 type_rro = tvb_get_uint8(tvb, offset2);
3043 length = tvb_get_uint8(tvb, offset2+1);
3045 if (length < 2) {
3046 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3047 "Bad RRO object: subobject length %u < 2", length);
3048 break;
3051 if (body_obj_len <length) {
3052 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3053 tvb, offset2, length,
3054 "Bad RRO subobject: subobject length %u > remaining length %u",
3055 length, body_obj_len);
3056 break;
3059 switch (type_rro) {
3061 case PCEP_SUB_IPv4:
3062 dissect_subobj_ipv4(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3063 break;
3064 case PCEP_SUB_IPv6:
3065 dissect_subobj_ipv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3066 break;
3067 case PCEP_SUB_LABEL_CONTROL:
3068 dissect_subobj_label_control(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3069 break;
3070 case PCEP_SUB_UNNUMB_INTERFACE_ID:
3071 dissect_subobj_unnumb_interfaceID(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3072 break;
3073 case PCEP_SUB_SR_PRE_IANA:
3074 case PCEP_SUB_SR: /* draft-ietf-pce-segment-routing-08 section 5.4 */
3075 dissect_subobj_sr(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3076 break;
3077 case PCEP_SUB_SRv6:
3078 dissect_subobj_srv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_record_route, length);
3079 break;
3080 default:
3081 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3082 tvb, offset2, length,
3083 "Non defined subobject (%d)", type_rro);
3084 break;
3086 offset2 += length;
3087 body_obj_len -= length;
3091 /*------------------------------------------------------------------------------
3092 * LSPA OBJECT
3093 *------------------------------------------------------------------------------*/
3094 #define LSPA_OBJ_MIN_LEN 16
3096 static void
3097 dissect_pcep_lspa_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3099 proto_tree *pcep_lspa_obj_flags;
3100 proto_item *ti;
3102 if (obj_length < OBJ_HDR_LEN+LSPA_OBJ_MIN_LEN) {
3103 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3104 tvb, offset2, obj_length,
3105 "Bad LSPA object length %u, should be >= %u",
3106 obj_length, OBJ_HDR_LEN+LSPA_OBJ_MIN_LEN);
3107 return;
3110 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_exclude_any, tvb, offset2, 4, ENC_BIG_ENDIAN);
3111 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_include_any, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3112 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_include_all, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3113 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_setup_priority, tvb, offset2+12, 1, ENC_NA);
3114 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_holding_priority, tvb, offset2+13, 1, ENC_NA);
3116 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_flags, tvb, offset2+14, 1, ENC_NA);
3117 pcep_lspa_obj_flags = proto_item_add_subtree(ti, ett_pcep_obj_metric);
3118 proto_tree_add_item(pcep_lspa_obj_flags, hf_pcep_lspa_flags_l, tvb, offset2+14, 1, ENC_NA);
3120 proto_tree_add_item(pcep_object_tree, hf_pcep_lspa_obj_reserved, tvb, offset2+15, 1, ENC_NA);
3122 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
3123 offset2 += LSPA_OBJ_MIN_LEN;
3124 obj_length -= OBJ_HDR_LEN+LSPA_OBJ_MIN_LEN;
3125 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_lspa);
3128 /*------------------------------------------------------------------------------
3129 * INCLUDE ROUTE OBJECT (IRO)
3130 *------------------------------------------------------------------------------*/
3131 static void
3132 dissect_pcep_iro_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
3133 tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type _U_)
3135 uint8_t l_type;
3136 uint8_t length;
3137 int type_iro;
3138 unsigned body_obj_len;
3140 body_obj_len = obj_length - OBJ_HDR_LEN;
3142 while (body_obj_len) {
3143 if (body_obj_len < 2) {
3144 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3145 "Bad IRO object: subobject goes past end of object");
3146 break;
3149 l_type = tvb_get_uint8(tvb, offset2);
3150 length = tvb_get_uint8(tvb, offset2+1);
3152 if (length < 2) {
3153 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3154 "Bad IRO object: subobject length %u < 2", length);
3155 break;
3158 type_iro = (l_type & Mask_Type);
3160 if (body_obj_len <length) {
3161 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3162 tvb, offset2, length,
3163 "Bad IRO object: subobject length %u > remaining length %u",
3164 length, body_obj_len);
3165 break;
3168 switch (type_iro) {
3170 case PCEP_SUB_IPv4:
3171 dissect_subobj_ipv4(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_iro, length);
3172 break;
3173 case PCEP_SUB_IPv6:
3174 dissect_subobj_ipv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_iro, length);
3175 break;
3176 case PCEP_SUB_UNNUMB_INTERFACE_ID:
3177 dissect_subobj_unnumb_interfaceID(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_iro, length);
3178 break;
3179 case PCEP_SUB_AUTONOMOUS_SYS_NUM:
3180 dissect_subobj_autonomous_sys_num(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_iro, length);
3181 break;
3182 case PCEP_SUB_EXRS:
3183 dissect_subobj_exrs(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_iro, type_iro, length);
3184 break;
3185 default:
3186 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3187 tvb, offset2, length,
3188 "Non defined subobject (%d)", type_iro);
3189 break;
3191 offset2 += length;
3192 body_obj_len -= length;
3196 /*------------------------------------------------------------------------------
3197 * SVEC OBJECT
3198 *------------------------------------------------------------------------------*/
3199 #define SVEC_OBJ_MIN_LEN 4
3201 static void
3202 dissect_pcep_svec_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
3203 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3205 proto_item *ti;
3206 proto_tree *pcep_svec_flags_obj;
3207 int m;
3208 int i;
3209 uint32_t requestID;
3211 if (obj_length < OBJ_HDR_LEN+SVEC_OBJ_MIN_LEN) {
3212 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3213 tvb, offset2, obj_length,
3214 "Bad SVEC object length %u, should be >= %u",
3215 obj_length, OBJ_HDR_LEN+SVEC_OBJ_MIN_LEN);
3216 return;
3219 proto_tree_add_item(pcep_object_tree, hf_pcep_svec_obj_reserved, tvb, offset2, 1, ENC_NA);
3221 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_svec_obj_flags, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
3222 pcep_svec_flags_obj = proto_item_add_subtree(ti, ett_pcep_obj_svec);
3223 proto_tree_add_item(pcep_svec_flags_obj, hf_pcep_svec_flags_l, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3224 proto_tree_add_item(pcep_svec_flags_obj, hf_pcep_svec_flags_n, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3225 proto_tree_add_item(pcep_svec_flags_obj, hf_pcep_svec_flags_s, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3226 proto_tree_add_item(pcep_svec_flags_obj, hf_pcep_svec_flags_d, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN); /* RFC 6006 */
3227 proto_tree_add_item(pcep_svec_flags_obj, hf_pcep_svec_flags_p, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN); /* RFC 6006 */
3229 m = 1;
3230 for ( i=4 ; i<(obj_length-OBJ_HDR_LEN) ; ) {
3231 requestID = tvb_get_ntohl(tvb, offset2+i);
3232 proto_tree_add_uint_format(pcep_object_tree, hf_pcep_svec_obj_request_id_number, tvb, offset2+i, 4, requestID,
3233 "Request-ID-Number %u: 0x%x", m++, requestID);
3234 i += 4;
3238 /*------------------------------------------------------------------------------
3239 * NOTIFICATION OBJECT
3240 *------------------------------------------------------------------------------*/
3241 #define NOTIFICATION_OBJ_MIN_LEN 4
3243 static void
3244 dissect_pcep_notification_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3246 uint8_t nt;
3248 if (obj_length < OBJ_HDR_LEN+NOTIFICATION_OBJ_MIN_LEN) {
3249 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3250 tvb, offset2, obj_length,
3251 "Bad NOTIFICATION object length %u, should be >= %u",
3252 obj_length, OBJ_HDR_LEN+NOTIFICATION_OBJ_MIN_LEN);
3253 return;
3256 proto_tree_add_item(pcep_object_tree, hf_pcep_notification_obj_reserved, tvb, offset2, 1, ENC_NA);
3258 proto_tree_add_item(pcep_object_tree, hf_pcep_notification_obj_flags, tvb, offset2+1, 1, ENC_NA);
3260 nt = tvb_get_uint8(tvb, offset2+2);
3261 proto_tree_add_item(pcep_object_tree, hf_PCEPF_NOTI_TYPE, tvb, offset2+2, 1, ENC_NA);
3263 switch (nt) {
3265 case 1:
3266 proto_tree_add_item(pcep_object_tree, hf_PCEPF_NOTI_VAL1, tvb, offset2+2, 1, ENC_NA);
3267 break;
3269 case 2:
3270 proto_tree_add_item(pcep_object_tree, hf_PCEPF_NOTI_VAL2, tvb, offset2+2, 1, ENC_NA);
3271 break;
3273 default:
3274 proto_tree_add_item(pcep_object_tree, hf_pcep_notification_obj_type, tvb, offset2+2, 1, ENC_NA);
3275 break;
3278 proto_tree_add_item(pcep_object_tree, hf_pcep_notification_obj_value, tvb, offset2+3, 1, ENC_NA);
3280 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
3281 offset2 += NOTIFICATION_OBJ_MIN_LEN;
3282 obj_length -= OBJ_HDR_LEN+NOTIFICATION_OBJ_MIN_LEN;
3283 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_notification);
3286 /*------------------------------------------------------------------------------
3287 * ERROR OBJECT
3288 *------------------------------------------------------------------------------*/
3289 #define ERROR_OBJ_MIN_LEN 4
3291 static void
3292 dissect_pcep_error_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3294 uint8_t error_type;
3295 uint8_t error_value;
3296 proto_item* type_item;
3297 const char *err_str = "Unassigned";
3299 if (obj_length < OBJ_HDR_LEN+ERROR_OBJ_MIN_LEN) {
3300 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3301 tvb, offset2, obj_length,
3302 "Bad ERROR object length %u, should be >= %u",
3303 obj_length, OBJ_HDR_LEN+ERROR_OBJ_MIN_LEN);
3304 return;
3307 proto_tree_add_item(pcep_object_tree, hf_pcep_error_obj_reserved, tvb, offset2, 1, ENC_NA);
3308 proto_tree_add_item(pcep_object_tree, hf_pcep_error_obj_flags, tvb, offset2+1, 1, ENC_NA);
3310 error_type = tvb_get_uint8(tvb, offset2+2);
3311 error_value = tvb_get_uint8(tvb, offset2+3);
3312 type_item = proto_tree_add_item(pcep_object_tree, hf_PCEPF_ERROR_TYPE, tvb, offset2+2, 1, ENC_NA);
3314 switch (error_type) {
3315 case ESTABLISH_FAILURE:
3316 err_str = val_to_str_const(error_value, pcep_error_value_1_vals, "Unknown");
3317 break;
3318 case CAP_NOT_SUPPORTED:
3319 break;
3320 case UNKNOWN_OBJ:
3321 err_str = val_to_str_const(error_value, pcep_error_value_3_vals, "Unknown");
3322 break;
3323 case NOT_SUPP_OBJ:
3324 err_str = val_to_str_const(error_value, pcep_error_value_4_vals, "Unknown");
3325 break;
3326 case POLICY_VIOLATION:
3327 err_str = val_to_str_const(error_value, pcep_error_value_5_vals, "Unknown");
3328 break;
3329 case MANDATORY_OBJ_MIS:
3330 err_str = val_to_str_const(error_value, pcep_error_value_6_vals, "Unknown");
3331 break;
3332 case SYNCH_PCREQ_MIS:
3333 break;
3334 case UNKNOWN_REQ_REF:
3335 break;
3336 case ATTEMPT_2_SESSION:
3337 break;
3338 case INVALID_OBJ:
3339 err_str = val_to_str_const(error_value, pcep_error_value_10_vals, "Unknown");
3340 break;
3341 case UNRECO_EXRS_SUBOBJ:
3342 break;
3343 case DIFFSERV_TE_ERROR:
3344 err_str = val_to_str_const(error_value, pcep_error_value_12_vals, "Unknown");
3345 break;
3346 case BRPC_FAILURE:
3347 err_str = val_to_str_const(error_value, pcep_error_value_13_vals, "Unknown");
3348 break;
3349 case GCO_ERROR:
3350 err_str = val_to_str_const(error_value, pcep_error_value_15_vals, "Unknown");
3351 break;
3352 case P2MP_CAPABILITY_ERROR:
3353 err_str = val_to_str_const(error_value, pcep_error_value_16_vals, "Unknown");
3354 break;
3355 case P2MP_END_POINTS_ERROR:
3356 err_str = val_to_str_const(error_value, pcep_error_value_17_vals, "Unknown");
3357 break;
3358 case P2MP_FRAGMENT_ERROR:
3359 err_str = val_to_str_const(error_value, pcep_error_value_18_vals, "Unknown");
3360 break;
3361 case INVALID_OPERATION:
3362 err_str = val_to_str_const(error_value, pcep_error_value_19_vals, "Unknown");
3363 break;
3364 case LSP_STATE_SYNCHRONIZATION_ERROR:
3365 err_str = val_to_str_const(error_value, pcep_error_value_20_vals, "Unknown");
3366 break;
3367 case INVALID_PATH_SETUP_TYPE:
3368 err_str = val_to_str_const(error_value, pcep_error_value_21_vals, "Unknown");
3369 break;
3370 case BAD_PARAMETER_VALUE:
3371 err_str = val_to_str_const(error_value, pcep_error_value_23_vals, "Unknown");
3372 break;
3373 case LSP_INSTANTIATION_ERROR:
3374 err_str = val_to_str_const(error_value, pcep_error_value_24_vals, "Unknown");
3375 break;
3376 case PCEP_STARTTLS_ERROR:
3377 err_str = val_to_str_const(error_value, pcep_error_value_25_vals, "Unknown");
3378 break;
3379 case ASSOCIATION_ERROR:
3380 err_str = val_to_str_const(error_value, pcep_error_value_26_vals, "Unknown");
3381 break;
3382 case WSON_RWA_ERROR:
3383 err_str = val_to_str_const(error_value, pcep_error_value_27_vals, "Unknown");
3384 break;
3385 case H_PCE_ERROR:
3386 err_str = val_to_str_const(error_value, pcep_error_value_28_vals, "Unknown");
3387 break;
3388 case PATH_COMPUTATION_FAILURE:
3389 err_str = val_to_str_const(error_value, pcep_error_value_29_vals, "Unknown");
3390 break;
3391 case FLOWSPEC_ERROR:
3392 err_str = val_to_str_const(error_value, pcep_error_value_30_vals, "Unknown");
3393 break;
3394 case PCECC_FAILURE:
3395 err_str = val_to_str_const(error_value, pcep_error_value_31_vals, "Unknown");
3396 break;
3397 default:
3398 proto_item_append_text(type_item, " (%u Non defined Error-Value)", error_type);
3400 proto_tree_add_uint_format_value(pcep_object_tree, hf_PCEPF_ERROR_VALUE, tvb, offset2+3, 1, error_value, "%s (%u)", err_str, error_value);
3402 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
3403 offset2 += ERROR_OBJ_MIN_LEN;
3404 obj_length -= OBJ_HDR_LEN+ERROR_OBJ_MIN_LEN;
3405 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_error);
3409 /*------------------------------------------------------------------------------
3410 * LOAD-BALANCING OBJECT
3411 *------------------------------------------------------------------------------*/
3412 #define LOAD_BALANCING_OBJ_LEN 8
3414 static void
3415 dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3417 if (obj_length != OBJ_HDR_LEN+LOAD_BALANCING_OBJ_LEN) {
3418 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3419 tvb, offset2, obj_length,
3420 "Bad LOAD-BALANCING object length %u, should be %u",
3421 obj_length, OBJ_HDR_LEN+LOAD_BALANCING_OBJ_LEN);
3422 return;
3425 proto_tree_add_item(pcep_object_tree, hf_pcep_balancing_obj_reserved, tvb, offset2, 2, ENC_BIG_ENDIAN);
3426 proto_tree_add_item(pcep_object_tree, hf_pcep_balancing_obj_flags, tvb, offset2+2, 1, ENC_NA);
3427 proto_tree_add_item(pcep_object_tree, hf_pcep_balancing_obj_maximum_number_of_te_lsps, tvb, offset2+3, 1, ENC_NA);
3428 proto_tree_add_item(pcep_object_tree, hf_pcep_balancing_obj_minimum_bandwidth, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3431 /*------------------------------------------------------------------------------
3432 * CLOSE OBJECT
3433 *------------------------------------------------------------------------------*/
3434 #define CLOSE_OBJ_MIN_LEN 4
3436 static void
3437 dissect_pcep_close_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3439 if (obj_length < OBJ_HDR_LEN+CLOSE_OBJ_MIN_LEN) {
3440 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3441 tvb, offset2, obj_length,
3442 "Bad CLOSE object length %u, should be >= %u",
3443 obj_length, OBJ_HDR_LEN+CLOSE_OBJ_MIN_LEN);
3444 return;
3447 proto_tree_add_item(pcep_object_tree, hf_pcep_close_obj_reserved, tvb, offset2, 2, ENC_BIG_ENDIAN);
3448 proto_tree_add_item(pcep_object_tree, hf_pcep_close_obj_flags, tvb, offset2+2, 1, ENC_NA);
3449 proto_tree_add_item(pcep_object_tree, hf_pcep_close_obj_reason, tvb, offset2+3, 1, ENC_NA);
3451 /*it's suppose that obj_length is a valid date. The object can have optional TLV(s)*/
3452 offset2 += CLOSE_OBJ_MIN_LEN;
3453 obj_length -= OBJ_HDR_LEN+CLOSE_OBJ_MIN_LEN;
3454 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_load_balancing);
3457 /*------------------------------------------------------------------------------
3458 * PATH-KEY OBJECT
3459 *------------------------------------------------------------------------------*/
3460 static void
3461 dissect_pcep_path_key_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
3462 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3464 uint8_t l_type;
3465 uint8_t length;
3466 unsigned type_exp_route;
3467 unsigned body_obj_len;
3469 body_obj_len = obj_length - OBJ_HDR_LEN;
3471 while (body_obj_len) {
3472 if (body_obj_len < 2) {
3473 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3474 "Bad PATH-KEY object: subobject goes past end of object");
3475 break;
3478 l_type = tvb_get_uint8(tvb, offset2);
3479 length = tvb_get_uint8(tvb, offset2+1);
3481 if (length < 2) {
3482 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3483 "Bad PATH-KEY object: subobject length %u < 2", length);
3484 break;
3487 type_exp_route = (l_type & Mask_Type);
3488 if (body_obj_len <length) {
3489 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3490 tvb, offset2, length,
3491 "Bad PATH-KEY object: subobject length %u > remaining length %u",
3492 length, body_obj_len);
3493 break;
3496 switch (type_exp_route) {
3497 case PCEP_SUB_PKSv4:
3498 dissect_subobj_pksv4(pcep_object_tree, pinfo, tvb, offset2, ett_pcep_obj_explicit_route, length);
3499 break;
3500 default:
3501 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3502 tvb, offset2, length,
3503 "Non defined subobject (%d)", type_exp_route);
3504 break;
3506 offset2 += length;
3507 body_obj_len -= length;
3511 /*------------------------------------------------------------------------------
3512 * XRO OBJECT
3513 *------------------------------------------------------------------------------*/
3514 #define XRO_OBJ_MIN_LEN 4
3516 static void
3517 dissect_pcep_xro_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type _U_)
3519 proto_tree *pcep_xro_flags_obj;
3520 proto_item *ti;
3521 uint8_t x_type;
3522 uint8_t length;
3523 unsigned type_xro;
3524 unsigned body_obj_len;
3526 body_obj_len = obj_length - OBJ_HDR_LEN;
3528 if (obj_length < OBJ_HDR_LEN+XRO_OBJ_MIN_LEN) {
3529 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3530 tvb, offset2, obj_length,
3531 "Bad XRO object length %u, should be >= %u",
3532 obj_length, OBJ_HDR_LEN+XRO_OBJ_MIN_LEN);
3533 return;
3536 proto_tree_add_item(pcep_object_tree, hf_pcep_xro_obj_reserved, tvb, offset2, 2, ENC_BIG_ENDIAN);
3538 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_xro_obj_flags, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3539 pcep_xro_flags_obj = proto_item_add_subtree(ti, ett_pcep_obj_xro);
3540 proto_tree_add_item(pcep_xro_flags_obj, hf_pcep_xro_flags_f, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
3542 offset2 += XRO_OBJ_MIN_LEN;
3543 body_obj_len -= XRO_OBJ_MIN_LEN;
3545 if (body_obj_len < 2) {
3546 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3547 "Bad XRO object: subobject goes past end of object");
3548 return;
3551 while (body_obj_len >= 2) {
3553 x_type = tvb_get_uint8(tvb, offset2);
3554 length = tvb_get_uint8(tvb, offset2+1);
3556 if (length < 2) {
3557 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3558 "Bad XRO object: object length %u < 2", length);
3559 break;
3562 type_xro = (x_type & Mask_Type);
3564 if (body_obj_len < length) {
3565 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3566 tvb, offset2, length,
3567 "Bad XRO object: object length %u > remaining length %u",
3568 length, body_obj_len);
3569 break;
3572 switch (type_xro) {
3574 case PCEP_SUB_IPv4:
3575 dissect_subobj_ipv4(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_xro, length);
3576 break;
3577 case PCEP_SUB_IPv6:
3578 dissect_subobj_ipv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_xro, length);
3579 break;
3580 case PCEP_SUB_UNNUMB_INTERFACE_ID:
3581 dissect_subobj_unnumb_interfaceID(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_xro, length);
3582 break;
3583 case PCEP_SUB_AUTONOMOUS_SYS_NUM:
3584 dissect_subobj_autonomous_sys_num(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_xro, length);
3585 break;
3586 case PCEP_SUB_SRLG:
3587 dissect_subobj_srlg(pcep_object_tree, pinfo, tvb, offset2, ett_pcep_obj_xro, length);
3588 break;
3589 case PCEP_SUB_PKSv4:
3590 dissect_subobj_pksv4(pcep_object_tree, pinfo, tvb, offset2, ett_pcep_obj_xro, length);
3591 break;
3592 case PCEP_SUB_PKSv6:
3593 dissect_subobj_pksv6(pcep_object_tree, pinfo, tvb, offset2, ett_pcep_obj_xro, length);
3594 break;
3595 default:
3596 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3597 tvb, offset2-4, length,
3598 "Non defined subobject (%d)", type_xro);
3599 break;
3601 offset2 += length;
3602 body_obj_len -= length;
3606 /*------------------------------------------------------------------------------
3607 * MONITORING OBJECT
3608 *------------------------------------------------------------------------------*/
3609 #define OBJ_MONITORING_MIN_LEN 8
3611 static void
3612 dissect_pcep_obj_monitoring(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3614 proto_item *ti;
3615 proto_tree *monitoring_flags;
3617 if (obj_length < OBJ_HDR_LEN + OBJ_MONITORING_MIN_LEN) {
3618 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3619 tvb, offset2, obj_length,
3620 "Bad MONITORING object length %u, should be >= %u",
3621 obj_length, OBJ_HDR_LEN + OBJ_MONITORING_MIN_LEN);
3622 return;
3625 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_monitoring_reserved, tvb, offset2, 1, ENC_NA);
3626 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_obj_monitoring_flags, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
3627 monitoring_flags = proto_item_add_subtree(ti, ett_pcep_obj_monitoring);
3628 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_reserved, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3629 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_i, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3630 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_c, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3631 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_p, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3632 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_g, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3633 proto_tree_add_item(monitoring_flags, hf_pcep_obj_monitoring_flags_l, tvb, offset2 + 1, 3, ENC_BIG_ENDIAN);
3634 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_monitoring_monitoring_id_number, tvb, offset2 + 4, 4, ENC_BIG_ENDIAN);
3636 /* The object can have optional TLV(s)*/
3637 offset2 += OBJ_MONITORING_MIN_LEN;
3638 obj_length -= OBJ_HDR_LEN + OBJ_MONITORING_MIN_LEN;
3639 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_monitoring);
3642 /*------------------------------------------------------------------------------
3643 * PCC-ID-REQ OBJECT
3644 *------------------------------------------------------------------------------*/
3645 #define OBJ_PCC_ID_REQ_IPV4_LEN 4
3646 #define OBJ_PCC_ID_REQ_IPV6_LEN 16
3648 static void
3649 dissect_pcep_obj_pcc_id_req(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type)
3651 switch (obj_type)
3653 case PCEP_OBJ_PCC_ID_REQ_IPv4:
3654 if (obj_length != OBJ_HDR_LEN + OBJ_PCC_ID_REQ_IPV4_LEN) {
3655 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3656 tvb, offset2, obj_length,
3657 "Bad IPv4 PCC-ID-REQ object length %u, should be %u",
3658 obj_length, OBJ_HDR_LEN + OBJ_PCC_ID_REQ_IPV4_LEN);
3659 return;
3661 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_pcc_id_req_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3662 break;
3664 case PCEP_OBJ_PCC_ID_REQ_IPv6:
3665 if (obj_length != OBJ_HDR_LEN + OBJ_PCC_ID_REQ_IPV6_LEN) {
3666 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3667 tvb, offset2, obj_length,
3668 "Bad IPv6 PCC-ID-REQ object length %u, should be %u",
3669 obj_length, OBJ_HDR_LEN + OBJ_PCC_ID_REQ_IPV6_LEN);
3670 return;
3672 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_pcc_id_req_ipv6, tvb, offset2, 16, ENC_NA);
3673 break;
3675 default:
3676 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3677 tvb, offset2, obj_length - OBJ_HDR_LEN,
3678 "UNKNOWN Type Object (%u)", obj_type);
3679 break;
3683 /*------------------------------------------------------------------------------
3684 * OF OBJECT
3685 *------------------------------------------------------------------------------*/
3686 #define OF_OBJ_MIN_LEN 4
3688 static void
3689 dissect_pcep_of_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3691 if (obj_length < OBJ_HDR_LEN+OF_OBJ_MIN_LEN) {
3692 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3693 tvb, offset2, obj_length,
3694 "Bad OF object length %u, should be >= %u",
3695 obj_length, OBJ_HDR_LEN+OF_OBJ_MIN_LEN);
3696 return;
3699 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_of_code, tvb, offset2, 2, ENC_BIG_ENDIAN);
3701 /*The object can have optional TLV(s)*/
3702 offset2 += OPEN_OBJ_MIN_LEN;
3703 obj_length -= OBJ_HDR_LEN+OF_OBJ_MIN_LEN;
3704 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_open);
3707 /*------------------------------------------------------------------------------
3708 * PCE-ID OBJECT
3709 *------------------------------------------------------------------------------*/
3710 #define OBJ_PCE_ID_IPV4_LEN 4
3711 #define OBJ_PCE_ID_IPV6_LEN 16
3713 static void
3714 dissect_pcep_obj_pce_id(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type)
3716 switch (obj_type)
3718 case PCEP_OBJ_PCE_ID_IPv4:
3719 if (obj_length != OBJ_HDR_LEN + OBJ_PCE_ID_IPV4_LEN) {
3720 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3721 tvb, offset2, obj_length,
3722 "Bad IPv4 PCE-ID object length %u, should be %u",
3723 obj_length, OBJ_HDR_LEN + OBJ_PCE_ID_IPV4_LEN);
3724 return;
3726 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_pce_id_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3727 break;
3729 case PCEP_OBJ_PCE_ID_IPv6:
3730 if (obj_length != OBJ_HDR_LEN + OBJ_PCE_ID_IPV6_LEN) {
3731 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3732 tvb, offset2, obj_length,
3733 "Bad IPv6 PCE-ID object length %u, should be %u",
3734 obj_length, OBJ_HDR_LEN + OBJ_PCE_ID_IPV6_LEN);
3735 return;
3737 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_pce_id_ipv6, tvb, offset2, 16, ENC_NA);
3738 break;
3740 default:
3741 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3742 tvb, offset2, obj_length - OBJ_HDR_LEN,
3743 "UNKNOWN Type Object (%u)", obj_type);
3744 break;
3748 /*------------------------------------------------------------------------------
3749 * PROC-TIME OBJECT
3750 *------------------------------------------------------------------------------*/
3751 #define OBJ_PROC_TIME_LEN 24
3753 static void
3754 dissect_pcep_obj_proc_time(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3756 proto_item *ti;
3757 proto_tree *proc_time_flags;
3759 if (obj_length != OBJ_HDR_LEN + OBJ_PROC_TIME_LEN) {
3760 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3761 tvb, offset2, obj_length,
3762 "Bad PROC-TIME object length %u, should be %u",
3763 obj_length, OBJ_HDR_LEN + OBJ_PROC_TIME_LEN);
3764 return;
3767 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_reserved, tvb, offset2, 2, ENC_BIG_ENDIAN);
3768 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_flags, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
3769 proc_time_flags = proto_item_add_subtree(ti, ett_pcep_obj_proc_time);
3770 proto_tree_add_item(proc_time_flags, hf_pcep_obj_proc_time_flags_reserved, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
3771 proto_tree_add_item(proc_time_flags, hf_pcep_obj_proc_time_flags_e, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
3772 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_cur_proc_time, tvb, offset2 + 4, 4, ENC_BIG_ENDIAN);
3773 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_min_proc_time, tvb, offset2 + 8, 4, ENC_BIG_ENDIAN);
3774 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_max_proc_time, tvb, offset2 + 12, 4, ENC_BIG_ENDIAN);
3775 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_ave_proc_time, tvb, offset2 + 16, 4, ENC_BIG_ENDIAN);
3776 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_proc_time_var_proc_time, tvb, offset2 + 20, 4, ENC_BIG_ENDIAN);
3779 /*------------------------------------------------------------------------------
3780 * OVERLOAD OBJECT
3781 *------------------------------------------------------------------------------*/
3782 #define OBJ_OVERLOAD_LEN 4
3784 static void
3785 dissect_pcep_obj_overload(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3787 if (obj_length != OBJ_HDR_LEN + OBJ_OVERLOAD_LEN) {
3788 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3789 tvb, offset2, obj_length,
3790 "Bad OVERLOAD object length %u, should be %u",
3791 obj_length, OBJ_HDR_LEN + OBJ_OVERLOAD_LEN);
3792 return;
3794 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_overload_flags, tvb, offset2, 1, ENC_NA);
3795 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_overload_reserved, tvb, offset2 + 1, 1, ENC_NA);
3796 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_overload_duration, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
3799 /*------------------------------------------------------------------------------
3800 * UNREACH-DESTINATION OBJECT
3801 *-----------------------------------------------------------------------------*/
3802 static void
3803 dissect_pcep_obj_unreach_destination(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type)
3805 int address_length = 4;
3807 int body_obj_len = obj_length-OBJ_HDR_LEN;
3809 switch (obj_type)
3811 case IPv4:
3812 address_length = 4;
3813 break;
3814 case IPv6:
3815 address_length = 16;
3816 break;
3819 while (body_obj_len > 0) {
3820 switch (obj_type) {
3821 case IPv4:
3822 if (body_obj_len < address_length) {
3823 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3824 tvb, offset2, body_obj_len,
3825 "Bad UNREACH-DESTINATION object IPv4 address length %u, should be %u",
3826 body_obj_len, address_length);
3827 return;
3829 proto_tree_add_item(pcep_object_tree, hf_pcep_unreach_destination_obj_ipv4_address,
3830 tvb, offset2, address_length, ENC_BIG_ENDIAN);
3831 break;
3832 case IPv6:
3833 if (body_obj_len < address_length) {
3834 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3835 tvb, offset2, body_obj_len,
3836 "Bad UNREACH-DESTINATION object IPv6 address length %u, should be %u",
3837 body_obj_len, address_length);
3838 return;
3840 proto_tree_add_item(pcep_object_tree, hf_pcep_unreach_destination_obj_ipv6_address,
3841 tvb, offset2, address_length, ENC_NA);
3842 break;
3844 offset2 += address_length;
3845 body_obj_len -= address_length;
3849 /*------------------------------------------------------------------------------
3850 * Branch Node Capability OBJECT
3852 The BNC Object has the same format as the Include Route Object (IRO) defined
3853 in [RFC5440], except that it only supports IPv4 and IPv6 prefix sub-objects.
3854 *------------------------------------------------------------------------------*/
3855 static void
3856 dissect_pcep_obj_branch_node_capability(proto_tree *pcep_object_tree, packet_info *pinfo,
3857 tvbuff_t *tvb, int offset2, int obj_length, int obj_class, int obj_type _U_)
3859 uint8_t l_type;
3860 uint8_t length;
3861 int type_bnco;
3862 unsigned body_obj_len;
3864 body_obj_len = obj_length - OBJ_HDR_LEN;
3866 while (body_obj_len) {
3867 if (body_obj_len < 2) {
3868 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3869 "Bad Branch Node Capability Object: subobject goes past end of object");
3870 break;
3873 l_type = tvb_get_uint8(tvb, offset2);
3874 length = tvb_get_uint8(tvb, offset2+1);
3876 if (length < 2) {
3877 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length,
3878 "Bad Branch Node Capability Object: subobject length %u < 2", length);
3879 break;
3882 type_bnco = (l_type & Mask_Type);
3884 if (body_obj_len <length) {
3885 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3886 tvb, offset2, length,
3887 "Bad Branch Node Capability Object: subobject length %u > remaining length %u",
3888 length, body_obj_len);
3889 break;
3892 switch (type_bnco) {
3893 case PCEP_SUB_IPv4:
3894 dissect_subobj_ipv4(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_branch_node_capability, length);
3895 break;
3896 case PCEP_SUB_IPv6:
3897 dissect_subobj_ipv6(pcep_object_tree, pinfo, tvb, offset2, obj_class, ett_pcep_obj_branch_node_capability, length);
3898 break;
3899 default:
3900 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_subobject,
3901 tvb, offset2, length,
3902 "Non defined subobject (%d)", type_bnco);
3903 break;
3905 offset2 += length;
3906 body_obj_len -= length;
3910 /*------------------------------------------------------------------------------
3911 * LSP OBJECT
3912 *------------------------------------------------------------------------------*/
3913 #define OBJ_LSP_MIN_LEN 4
3915 static void
3916 dissect_pcep_obj_lsp(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3918 proto_item *ti;
3919 proto_tree *lsp_flags;
3921 if (obj_length < OBJ_HDR_LEN + OBJ_LSP_MIN_LEN) {
3922 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3923 tvb, offset2, obj_length,
3924 "Bad LSP object length %u, should >= %u",
3925 obj_length, OBJ_HDR_LEN + OBJ_LSP_MIN_LEN);
3926 return;
3929 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_lsp_plsp_id, tvb, offset2, 3, ENC_BIG_ENDIAN);
3930 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_obj_lsp_flags, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3931 lsp_flags = proto_item_add_subtree(ti, ett_pcep_obj_lsp);
3932 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_d, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3933 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_s, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3934 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_r, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3935 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_a, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3936 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_o, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3937 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_c, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3938 proto_tree_add_item(lsp_flags, hf_pcep_obj_lsp_flags_reserved, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3940 /* The object can have optional TLV(s)*/
3941 offset2 += OBJ_LSP_MIN_LEN;
3942 obj_length -= OBJ_HDR_LEN + OBJ_LSP_MIN_LEN;
3943 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_lsp);
3946 /*------------------------------------------------------------------------------
3947 * SRP OBJECT
3948 *------------------------------------------------------------------------------*/
3949 #define OBJ_SRP_MIN_LEN 8
3951 static void
3952 dissect_pcep_obj_srp(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type _U_)
3954 proto_item *ti;
3955 proto_tree *srp_flags;
3957 if (obj_length < OBJ_HDR_LEN + OBJ_SRP_MIN_LEN) {
3958 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3959 tvb, offset2, obj_length,
3960 "Bad SRP object length %u, should >= %u",
3961 obj_length, OBJ_HDR_LEN + OBJ_SRP_MIN_LEN);
3962 return;
3964 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_obj_srp_flags, tvb, offset2, 4, ENC_BIG_ENDIAN);
3965 srp_flags = proto_item_add_subtree(ti, ett_pcep_obj_srp);
3966 proto_tree_add_item(srp_flags, hf_pcep_obj_srp_flags_r, tvb, offset2, 4, ENC_BIG_ENDIAN);
3967 proto_tree_add_item(pcep_object_tree, hf_pcep_obj_srp_id_number, tvb, offset2 + 4, 4, ENC_BIG_ENDIAN);
3969 /*The object can have optional TLV(s)*/
3970 offset2 += OBJ_SRP_MIN_LEN;
3971 obj_length -= OBJ_HDR_LEN + OBJ_SRP_MIN_LEN;
3972 dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_srp);
3975 /*------------------------------------------------------------------------------
3976 * VENDOR-INFORMATION OBJECT
3977 *------------------------------------------------------------------------------*/
3978 #define OBJ_VENDOR_INFORMATION_MIN_LEN 4
3980 static void
3981 dissect_pcep_obj_vendor_information(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2,
3982 int obj_length, int obj_class _U_, int obj_type _U_) {
3984 if (obj_length < OBJ_HDR_LEN + OBJ_VENDOR_INFORMATION_MIN_LEN) {
3985 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
3986 tvb, offset2, obj_length,
3987 "Bad VENDOR-INFORMATION object length %u, should >= %u",
3988 obj_length, OBJ_HDR_LEN + OBJ_VENDOR_INFORMATION_MIN_LEN);
3989 return;
3992 proto_tree_add_item(pcep_object_tree, hf_pcep_enterprise_number, tvb, offset2, 4, ENC_BIG_ENDIAN);
3993 proto_tree_add_item(pcep_object_tree, hf_pcep_enterprise_specific_info, tvb, offset2 + 4,
3994 obj_length - OBJ_HDR_LEN - 4, ENC_STR_HEX);
3997 /*------------------------------------------------------------------------------
3998 * BU OBJECT
3999 *------------------------------------------------------------------------------*/
4000 #define OBJ_BU_LEN 8 /* The BU object body has a fixed length of 8 bytes */
4002 static void
4003 dissect_pcep_obj_bu(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t *tvb, int offset2,
4004 int obj_length, int obj_class _U_, int obj_type _U_) {
4006 if (obj_length != OBJ_HDR_LEN + OBJ_BU_LEN) {
4007 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_subobject_bad_length,
4008 tvb, offset2, obj_length,
4009 "Bad BU object length %u, should be %u",
4010 obj_length, OBJ_HDR_LEN + OBJ_BU_LEN);
4011 return;
4014 proto_tree_add_item(pcep_object_tree, hf_pcep_bu_reserved, tvb, offset2, 3, ENC_BIG_ENDIAN);
4015 proto_tree_add_item(pcep_object_tree, hf_pcep_bu_butype, tvb, offset2+3, 1, ENC_BIG_ENDIAN);
4016 proto_tree_add_item(pcep_object_tree, hf_pcep_bu_utilization, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
4019 /*----------------------------------------------------------------------------
4020 * ASSOCIATION OBJECT
4021 *----------------------------------------------------------------------------*/
4022 #define ASSOCIATION_OBJ_v4_MIN_LEN 12
4023 #define ASSOCIATION_OBJ_v6_MIN_LEN 24
4024 static void
4025 dissect_pcep_association_obj(proto_tree *pcep_object_tree, packet_info *pinfo,
4026 tvbuff_t *tvb, int offset2, int obj_length, int obj_class _U_, int obj_type)
4028 proto_tree *pcep_association_flags = NULL;
4029 proto_item *ti = NULL;
4030 uint16_t association_type;
4032 /* object length sanity checks */
4033 if ((obj_type == 1) &&
4034 (obj_length < OBJ_HDR_LEN + ASSOCIATION_OBJ_v4_MIN_LEN)) {
4035 proto_tree_add_expert_format(pcep_object_tree, pinfo,
4036 &ei_pcep_subobject_bad_length,
4037 tvb, offset2, obj_length,
4038 "Bad ASSOCIATION IPv4 object length %u"
4039 ", should be >= %u",
4040 obj_length,
4041 OBJ_HDR_LEN + ASSOCIATION_OBJ_v4_MIN_LEN);
4042 return;
4044 if ((obj_type == 2) &&
4045 (obj_length < OBJ_HDR_LEN + ASSOCIATION_OBJ_v6_MIN_LEN)) {
4046 proto_tree_add_expert_format(pcep_object_tree, pinfo,
4047 &ei_pcep_subobject_bad_length,
4048 tvb, offset2, obj_length,
4049 "Bad ASSOCIATION IPv6 object length %u"
4050 ", should be >= %u",
4051 obj_length,
4052 OBJ_HDR_LEN + ASSOCIATION_OBJ_v4_MIN_LEN);
4053 return;
4056 proto_tree_add_item(pcep_object_tree, hf_pcep_association_reserved,
4057 tvb, offset2, 2, ENC_NA);
4058 offset2 += 2; /* consume reserved bytes */
4059 ti = proto_tree_add_item(pcep_object_tree, hf_pcep_association_flags,
4060 tvb, offset2, 2, ENC_NA);
4061 pcep_association_flags =
4062 proto_item_add_subtree(ti, ett_pcep_obj_association);
4063 proto_tree_add_item(pcep_association_flags, hf_pcep_association_flags_r,
4064 tvb, offset2, 2, ENC_NA);
4065 offset2 += 2; /* consume flags */
4066 proto_tree_add_item(pcep_object_tree, hf_pcep_association_type,
4067 tvb, offset2, 2, ENC_BIG_ENDIAN);
4068 association_type = tvb_get_ntohs(tvb, offset2);
4069 offset2 += 2; /* consume association type */
4070 proto_tree_add_item(pcep_object_tree, hf_pcep_association_id,
4071 tvb, offset2, 2, ENC_BIG_ENDIAN);
4072 offset2 += 2; /* consume association identifier */
4073 switch (obj_type) {
4074 case 1:
4075 proto_tree_add_item(pcep_object_tree,
4076 hf_pcep_association_source_ipv4,
4077 tvb, offset2, 4, ENC_BIG_ENDIAN);
4078 offset2 += 4; /* consume association source */
4079 obj_length -= OBJ_HDR_LEN + ASSOCIATION_OBJ_v4_MIN_LEN;
4080 break;
4081 case 2:
4082 proto_tree_add_item(pcep_object_tree,
4083 hf_pcep_association_source_ipv6,
4084 tvb, offset2, 16, ENC_NA);
4085 offset2 += 16; /* consume association source */
4086 obj_length -= OBJ_HDR_LEN + ASSOCIATION_OBJ_v6_MIN_LEN;
4087 break;
4088 default:
4089 proto_tree_add_expert_format(pcep_object_tree, pinfo,
4090 &ei_pcep_non_defined_subobject,
4091 tvb, offset2, obj_length - OBJ_HDR_LEN,
4092 "Unknown Association Type (%u)", obj_type);
4093 return;
4096 /* The ASSOCIATION object can have optional TLV(s) */
4097 /* The EXTENDED_ASSOCIATION_ID TLV is scoped to the ASSOCIATION TYPE*/
4098 dissect_pcep_tlvs_with_scope(pcep_object_tree, tvb,
4099 offset2, obj_length, ett_pcep_obj_association,association_type);
4102 /*------------------------------------------------------------------------------*/
4103 /* Dissect in Objects */
4104 /*------------------------------------------------------------------------------*/
4105 typedef struct {
4106 int *hf_outer;
4107 int *hf_inner;
4108 int *ett;
4109 pcep_obj_dissector_t *obj_func;
4110 } pcep_lut_t;
4112 static void
4113 dissect_pcep_obj_tree(proto_tree *pcep_tree, packet_info *pinfo, tvbuff_t *tvb, int len, int offset, int msg_length)
4115 uint8_t obj_class;
4116 uint8_t ot_res_p_i;
4117 uint16_t obj_length;
4118 int type;
4119 proto_tree *pcep_object_tree;
4120 proto_item *pcep_object_item;
4122 static int * const pcep_hdr_obj_flags[] = {
4123 &hf_pcep_hdr_obj_flags_i,
4124 &hf_pcep_hdr_obj_flags_p,
4125 &hf_pcep_hdr_obj_flags_reserved,
4126 NULL
4129 /* Lookup table for handling objects. Meant to reduce copy-pasting
4130 * and the likelihood of subtle errors happening for some objects and not
4131 * others caused by tpyos. Index number is Object-Class
4133 static const pcep_lut_t obj_lut[] = {
4134 /* 0 is reserved */ { NULL, NULL, NULL, NULL },
4135 /* 1 */ { &hf_PCEPF_OBJ_OPEN, &hf_pcep_obj_open_type, &ett_pcep_obj_open, dissect_pcep_open_obj },
4136 /* 2 */ { &hf_PCEPF_OBJ_RP, &hf_pcep_obj_rp_type, &ett_pcep_obj_request_parameters, dissect_pcep_rp_obj },
4137 /* 3 */ { &hf_PCEPF_OBJ_NO_PATH, &hf_pcep_obj_no_path_type, &ett_pcep_obj_no_path, dissect_pcep_no_path_obj },
4138 /* 4 */ { &hf_PCEPF_OBJ_END_POINT, &hf_pcep_obj_end_point_type, &ett_pcep_obj_end_point, dissect_pcep_end_point_obj },
4139 /* 5 */ { &hf_PCEPF_OBJ_BANDWIDTH, &hf_pcep_obj_bandwidth_type, &ett_pcep_obj_bandwidth, dissect_pcep_bandwidth_obj },
4140 /* 6 */ { &hf_PCEPF_OBJ_METRIC, &hf_pcep_obj_metric_type, &ett_pcep_obj_metric, dissect_pcep_metric_obj },
4141 /* 7 */ { &hf_PCEPF_OBJ_EXPLICIT_ROUTE, &hf_pcep_obj_explicit_route_type, &ett_pcep_obj_explicit_route, dissect_pcep_explicit_route_obj },
4142 /* 8 */ { &hf_PCEPF_OBJ_RECORD_ROUTE, &hf_pcep_obj_record_route_type, &ett_pcep_obj_record_route, dissect_pcep_record_route_obj },
4143 /* 9 */ { &hf_PCEPF_OBJ_LSPA, &hf_pcep_obj_lspa_type, &ett_pcep_obj_lspa, dissect_pcep_lspa_obj },
4144 /* 10 */ { &hf_PCEPF_OBJ_IRO, &hf_pcep_obj_iro_type, &ett_pcep_obj_iro, dissect_pcep_iro_obj },
4145 /* 11 */ { &hf_PCEPF_OBJ_SVEC, &hf_pcep_obj_svec_type, &ett_pcep_obj_svec, dissect_pcep_svec_obj },
4146 /* 12 */ { &hf_PCEPF_OBJ_NOTIFICATION, &hf_pcep_obj_notification_type, &ett_pcep_obj_notification, dissect_pcep_notification_obj },
4147 /* 13 */ { &hf_PCEPF_OBJ_PCEP_ERROR, &hf_pcep_obj_pcep_error_type, &ett_pcep_obj_error, dissect_pcep_error_obj },
4148 /* 14 */ { &hf_PCEPF_OBJ_LOAD_BALANCING, &hf_pcep_obj_load_balancing_type, &ett_pcep_obj_load_balancing, dissect_pcep_balancing_obj },
4149 /* 15 */ { &hf_PCEPF_OBJ_CLOSE, &hf_pcep_obj_close_type, &ett_pcep_obj_close, dissect_pcep_close_obj },
4150 /* 16 */ { &hf_PCEPF_OBJ_PATH_KEY, &hf_pcep_obj_path_key_type, &ett_pcep_obj_path_key, dissect_pcep_path_key_obj },
4151 /* 17 */ { &hf_PCEPF_OBJ_XRO, &hf_pcep_obj_xro_type, &ett_pcep_obj_xro, dissect_pcep_xro_obj },
4152 /* 18 is unassigned */ { NULL, NULL, NULL, NULL },
4153 /* 19 */ { &hf_PCEPF_OBJ_MONITORING, &hf_pcep_obj_monitoring_type, &ett_pcep_obj_monitoring, dissect_pcep_obj_monitoring },
4154 /* 20 */ { &hf_PCEPF_OBJ_PCC_ID_REQ, &hf_pcep_obj_pcc_id_req_type, &ett_pcep_obj_pcc_id_req, dissect_pcep_obj_pcc_id_req },
4155 /* 21 */ { &hf_PCEPF_OBJ_OF, &hf_pcep_obj_of_type, &ett_pcep_obj_of, dissect_pcep_of_obj },
4156 /* 22 */ { &hf_PCEPF_OBJ_CLASSTYPE, &hf_pcep_obj_classtype, &ett_pcep_obj_classtype, NULL /* XXX */ },
4157 /* 23 is unassigned */ { NULL, NULL, NULL, NULL },
4158 /* 24 */ { &hf_PCEPF_OBJ_GLOBAL_CONSTRAINTS, &hf_pcep_obj_global_constraints, &ett_pcep_obj_global_constraints, NULL /* XXX */ },
4159 /* 25 */ { &hf_PCEPF_OBJ_PCE_ID, &hf_pcep_obj_pce_id_type, &ett_pcep_obj_pce_id, dissect_pcep_obj_pce_id },
4160 /* 26 */ { &hf_PCEPF_OBJ_PROC_TIME, &hf_pcep_obj_proc_time_type, &ett_pcep_obj_proc_time, dissect_pcep_obj_proc_time },
4161 /* 27 */ { &hf_PCEPF_OBJ_OVERLOAD, &hf_pcep_obj_overload_type, &ett_pcep_obj_overload, dissect_pcep_obj_overload },
4162 /* 28 */ { &hf_PCEPF_OBJ_UNREACH_DESTINATION, &hf_pcep_obj_unreach_destination_type, &ett_pcep_obj_unreach_destination, dissect_pcep_obj_unreach_destination },
4163 /* 29 */ { &hf_PCEPF_OBJ_SERO, &hf_pcep_obj_sero_type, &ett_pcep_obj_sero, dissect_pcep_explicit_route_obj },
4164 /* 30 */ { &hf_PCEPF_OBJ_SRRO, &hf_pcep_obj_srro_type, &ett_pcep_obj_srro, dissect_pcep_record_route_obj },
4165 /* 31 */ { &hf_PCEPF_OBJ_BRANCH_NODE_CAPABILITY, &hf_pcep_obj_branch_node_capability_type, &ett_pcep_obj_branch_node_capability, dissect_pcep_obj_branch_node_capability },
4166 /* 32 */ { &hf_PCEPF_OBJ_LSP, &hf_pcep_obj_lsp_type, &ett_pcep_obj_lsp, dissect_pcep_obj_lsp },
4167 /* 33 */ { &hf_PCEPF_OBJ_SRP, &hf_pcep_obj_srp_type, &ett_pcep_obj_srp, dissect_pcep_obj_srp },
4168 /* 34 */ { &hf_PCEPF_OBJ_VENDOR_INFORMATION, &hf_pcep_obj_vendor_information_type, &ett_pcep_obj_vendor_information, dissect_pcep_obj_vendor_information },
4169 /* 35 */ { &hf_PCEPF_OBJ_BU, &hf_pcep_obj_bu_type, &ett_pcep_obj_bu, dissect_pcep_obj_bu },
4170 /* 36 */ { &hf_PCEPF_OBJ_INTER_LAYER, &hf_pcep_obj_inter_layer_type, &ett_pcep_obj_inter_layer, NULL /* XXX */ },
4171 /* 37 */ { &hf_PCEPF_OBJ_SWITCH_LAYER, &hf_pcep_obj_switch_layer_type, &ett_pcep_obj_switch_layer, NULL /* XXX */ },
4172 /* 38 */ { &hf_PCEPF_OBJ_REQ_ADAP_CAP, &hf_pcep_obj_req_adap_cap_type, &ett_pcep_obj_req_adap_cap, NULL /* XXX */ },
4173 /* 39 */ { &hf_PCEPF_OBJ_SERVER_IND, &hf_pcep_obj_server_ind_type, &ett_pcep_obj_server_ind, NULL /* XXX */ },
4174 /* 40 */ { &hf_PCEPF_OBJ_ASSOCIATION, &hf_pcep_obj_association_type, &ett_pcep_obj_association, dissect_pcep_association_obj },
4175 /* 41 */ { &hf_PCEPF_OBJ_S2LS, &hf_pcep_obj_s2ls_type, &ett_pcep_obj_s2ls, NULL /* XXX */ },
4176 /* 42 */ { &hf_PCEPF_OBJ_WA, &hf_pcep_obj_wa_type, &ett_pcep_obj_wa, NULL /* XXX */ },
4177 /* 43 */ { &hf_PCEPF_OBJ_FLOWSPEC, &hf_pcep_obj_flowspec_type, &ett_pcep_obj_flowspec, NULL /* XXX */ },
4178 /* 44 */ { &hf_PCEPF_OBJ_CCI_TYPE, &hf_pcep_obj_cci_type, &ett_pcep_obj_cci_type, NULL /* XXX */ },
4179 /* 45 */ { &hf_PCEPF_OBJ_PATH_ATTRIB, &hf_pcep_obj_path_attrib_type, &ett_pcep_obj_path_attrib, NULL /* XXX */ },
4181 pcep_lut_t lut_item;
4183 while (len < msg_length) {
4184 obj_class = tvb_get_uint8(tvb, offset);
4185 if (obj_class > 0 && obj_class < array_length(obj_lut)) {
4186 lut_item = obj_lut[obj_class];
4188 else {
4189 lut_item = obj_lut[0];
4191 if (lut_item.hf_outer != NULL) {
4192 pcep_object_item = proto_tree_add_item(pcep_tree, *lut_item.hf_outer, tvb, offset, -1, ENC_NA);
4193 pcep_object_tree = proto_item_add_subtree(pcep_object_item, *lut_item.ett);
4194 proto_tree_add_uint(pcep_object_tree, hf_PCEPF_OBJECT_CLASS, tvb, offset, 1, obj_class);
4195 proto_tree_add_item(pcep_object_tree, *lut_item.hf_inner, tvb, offset+1, 1, ENC_NA);
4197 else {
4198 pcep_object_item = proto_tree_add_item(pcep_tree, hf_PCEPF_OBJ_UNKNOWN_TYPE, tvb, offset, -1, ENC_NA);
4199 pcep_object_tree = proto_item_add_subtree(pcep_object_item, ett_pcep_obj_unknown);
4200 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_non_defined_object,
4201 tvb, offset, -1,
4202 "Unknown object (%u)", obj_class);
4203 proto_tree_add_uint(pcep_object_tree, hf_PCEPF_OBJECT_CLASS, tvb, offset, 1, obj_class);
4204 proto_tree_add_item(pcep_object_tree, hf_pcep_object_type, tvb, offset+1, 1, ENC_NA);
4206 ot_res_p_i = tvb_get_uint8(tvb, offset+1);
4207 type = (ot_res_p_i & MASK_OBJ_TYPE)>>4;
4209 proto_tree_add_bitmask(pcep_object_tree, tvb, offset+1, hf_pcep_hdr_obj_flags, ett_pcep_hdr, pcep_hdr_obj_flags, ENC_NA);
4211 proto_tree_add_item(pcep_object_tree, hf_pcep_object_length, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4213 obj_length = tvb_get_ntohs(tvb, offset+2);
4214 proto_item_set_len(pcep_object_item, obj_length);
4215 if (obj_length < 4) {
4216 expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_object_length,
4217 "Object Length: %u (bogus, must be >= 4)", obj_length);
4218 break;
4221 if (lut_item.hf_outer != NULL && lut_item.obj_func != NULL) {
4222 lut_item.obj_func(pcep_object_tree, pinfo, tvb, offset+4, obj_length, obj_class, type);
4224 else {
4225 proto_tree_add_expert_format(pcep_object_tree, pinfo, &ei_pcep_pcep_object_body_non_defined,
4226 tvb, offset+4, obj_length-OBJ_HDR_LEN,
4227 "PCEP Object BODY non defined (%u)", type);
4230 offset += obj_length;
4231 len += obj_length;
4236 /*------------------------------------------------------------------------------
4237 * Dissect a single PCEP message in a tree
4238 *------------------------------------------------------------------------------*/
4239 static void
4240 dissect_pcep_msg_tree(tvbuff_t *tvb, proto_tree *tree, unsigned tree_mode, packet_info *pinfo)
4242 proto_tree *pcep_tree, *pcep_header_tree, *pcep_header_msg_flags;
4243 proto_item *ti;
4245 int offset = 0;
4246 int len = 0;
4247 uint8_t message_type;
4248 uint16_t msg_length;
4250 message_type = tvb_get_uint8(tvb, 1);
4251 msg_length = tvb_get_ntohs(tvb, 2);
4253 col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_type, message_type_vals, "Unknown Message (%u). "));
4255 ti = proto_tree_add_item(tree, proto_pcep, tvb, offset, msg_length, ENC_NA);
4256 pcep_tree = proto_item_add_subtree(ti, tree_mode);
4258 pcep_header_tree = proto_tree_add_subtree_format(pcep_tree, tvb, offset, 4, ett_pcep_hdr, NULL,
4259 "%s Header", val_to_str(message_type, message_type_vals, "Unknown Message (%u). "));
4261 proto_tree_add_item(pcep_header_tree, hf_pcep_version, tvb, offset, 1, ENC_NA);
4263 ti = proto_tree_add_item(pcep_header_tree, hf_pcep_flags, tvb, offset, 1, ENC_NA);
4264 pcep_header_msg_flags = proto_item_add_subtree(ti, ett_pcep_hdr);
4265 proto_tree_add_item(pcep_header_msg_flags, hf_pcep_hdr_msg_flags_reserved, tvb, offset, 1, ENC_NA);
4266 proto_tree_add_item(pcep_header_tree, hf_PCEPF_MSG, tvb, offset+1, 1, ENC_NA);
4267 proto_tree_add_item(pcep_header_tree, hf_pcep_message_length, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4269 offset = 4;
4270 len = 4;
4272 dissect_pcep_obj_tree(pcep_tree, pinfo, tvb, len, offset, msg_length);
4276 static unsigned
4277 get_pcep_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
4279 uint16_t plen;
4281 /* Get the length of the PCEP packet.*/
4282 plen = tvb_get_ntohs(tvb, offset+2);
4284 return plen;
4287 static int
4288 dissect_pcep_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
4290 /* Set up structures needed to add the protocol subtree and manage it */
4291 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PCEP");
4293 /* Clear out stuff in the info column */
4294 col_clear(pinfo->cinfo, COL_INFO);
4296 dissect_pcep_msg_tree(tvb, tree, ett_pcep, pinfo);
4297 return tvb_captured_length(tvb);
4300 static int
4301 dissect_pcep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
4303 tcp_dissect_pdus(tvb, pinfo, tree, true, 4, get_pcep_message_len,
4304 dissect_pcep_pdu, data);
4305 return tvb_captured_length(tvb);
4308 /*Register the protocol with wireshark*/
4309 void
4310 proto_register_pcep(void)
4312 static hf_register_info pcepf_info[] = {
4314 /* Message type number */
4315 { &hf_PCEPF_MSG,
4316 { "Message Type", "pcep.msg",
4317 FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
4318 NULL, HFILL }
4320 { &hf_pcep_hdr_msg_flags_reserved,
4321 { "Reserved Flags", "pcep.msg.hdr.flags.reserved",
4322 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_HDR_MSG_RESERVED,
4323 NULL, HFILL }
4326 /*Object header*/
4327 { &hf_pcep_hdr_obj_flags,
4328 { "Object Header Flags", "pcep.obj.hdr.flags",
4329 FT_UINT8, BASE_HEX, NULL, 0x0F,
4330 NULL, HFILL }
4332 { &hf_pcep_hdr_obj_flags_reserved,
4333 { "Reserved Flags", "pcep.obj.hdr.flags.reserved",
4334 FT_BOOLEAN, 4, TFS(&tfs_set_notset), PCEP_HDR_OBJ_RESERVED,
4335 NULL, HFILL }
4337 { &hf_pcep_hdr_obj_flags_p,
4338 { "Processing-Rule (P)", "pcep.obj.hdr.flags.p",
4339 FT_BOOLEAN, 4, TFS(&tfs_set_notset), PCEP_HDR_OBJ_P,
4340 NULL, HFILL }
4342 { &hf_pcep_hdr_obj_flags_i,
4343 { "Ignore (I)", "pcep.obj.hdr.flags.i",
4344 FT_BOOLEAN, 4, TFS(&tfs_set_notset), PCEP_HDR_OBJ_I,
4345 NULL, HFILL }
4347 /* Object class */
4348 { &hf_PCEPF_OBJECT_CLASS,
4349 { "Object Class", "pcep.object",
4350 FT_UINT32, BASE_DEC | BASE_EXT_STRING, &pcep_class_vals_ext, 0x0,
4351 NULL, HFILL }
4354 /* Object types */
4355 { &hf_pcep_endpoint_p2mp_leaf,
4356 { "P2MP Leaf type", "pcep.obj.endpoint.p2mp.leaf",
4357 FT_UINT32, BASE_DEC, VALS(pcep_p2mp_leaf_type_vals), 0x0,
4358 NULL, HFILL }
4360 { &hf_PCEPF_OBJ_OPEN,
4361 { "OPEN object", "pcep.obj.open",
4362 FT_NONE, BASE_NONE, NULL, 0x0,
4363 NULL, HFILL }
4365 { &hf_pcep_open_flags_res,
4366 { "Reserved Flags", "pcep.open.flags.res",
4367 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_OPEN_RES,
4368 NULL, HFILL }
4370 { &hf_PCEPF_OBJ_RP,
4371 { "RP object", "pcep.obj.rp",
4372 FT_NONE, BASE_NONE, NULL, 0x0,
4373 NULL, HFILL }
4375 { &hf_pcep_rp_flags_reserved,
4376 { "Reserved Flags", "pcep.rp.flags.reserved",
4377 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_RESERVED,
4378 NULL, HFILL }
4380 { &hf_pcep_rp_flags_pri,
4381 { "(PRI) Priority", "pcep.rp.flags.pri",
4382 FT_BOOLEAN, 24, TFS(&tfs_on_off), PCEP_RP_PRI,
4383 NULL, HFILL }
4385 { &hf_pcep_rp_flags_r,
4386 { "(R) Reoptimization", "pcep.rp.flags.r",
4387 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_R,
4388 NULL, HFILL }
4390 { &hf_pcep_rp_flags_b,
4391 { "(B) Bi-directional", "pcep.rp.flags.b",
4392 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_B,
4393 NULL, HFILL }
4395 { &hf_pcep_rp_flags_o,
4396 { "(L) Strict/Loose", "pcep.rp.flags.o",
4397 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_O,
4398 NULL, HFILL }
4400 { &hf_pcep_rp_flags_v,
4401 { "(V) VSPT", "pcep.rp.flags.v",
4402 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_V,
4403 NULL, HFILL }
4405 { &hf_pcep_rp_flags_s,
4406 { "(S) Supply OF on response", "pcep.rp.flags.s",
4407 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_S,
4408 NULL, HFILL }
4410 { &hf_pcep_rp_flags_p,
4411 { "(P) Path Key", "pcep.rp.flags.p",
4412 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_P,
4413 NULL, HFILL }
4415 { &hf_pcep_rp_flags_d,
4416 { "(D) Report the request order", "pcep.rp.flags.d",
4417 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_D,
4418 NULL, HFILL }
4420 { &hf_pcep_rp_flags_m,
4421 { "(M) Make-before-break", "pcep.rp.flags.m",
4422 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_M,
4423 NULL, HFILL }
4425 { &hf_pcep_rp_flags_e,
4426 { "(E) ERO-compression", "pcep.rp.flags.e",
4427 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_E,
4428 NULL, HFILL }
4430 { &hf_pcep_rp_flags_n,
4431 { "(N) P2MP", "pcep.rp.flags.n",
4432 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_N,
4433 NULL, HFILL }
4435 { &hf_pcep_rp_flags_f,
4436 { "(F) Fragmentation", "pcep.rp.flags.f",
4437 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_F,
4438 NULL, HFILL }
4440 { &hf_pcep_rp_flags_c,
4441 { "(C) Core-tree computation", "pcep.rp.flags.c",
4442 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_RP_C,
4443 NULL, HFILL }
4445 { &hf_PCEPF_OBJ_NO_PATH,
4446 { "NO-PATH object", "pcep.obj.nopath",
4447 FT_NONE, BASE_NONE, NULL, 0x0,
4448 NULL, HFILL }
4450 { &hf_pcep_no_path_flags_c,
4451 { "C", "pcep.no.path.flags.c",
4452 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_NO_PATH_C,
4453 NULL, HFILL }
4455 { &hf_PCEPF_OBJ_END_POINT,
4456 { "END-POINT object", "pcep.obj.endpoint",
4457 FT_NONE, BASE_NONE, NULL, 0x0,
4458 NULL, HFILL }
4460 { &hf_PCEPF_OBJ_BANDWIDTH,
4461 { "BANDWIDTH object", "pcep.obj.bandwidth",
4462 FT_NONE, BASE_NONE, NULL, 0x0,
4463 NULL, HFILL }
4465 { &hf_PCEPF_OBJ_METRIC,
4466 { "METRIC object", "pcep.obj.metric",
4467 FT_NONE, BASE_NONE, NULL, 0x0,
4468 NULL, HFILL }
4470 { &hf_pcep_metric_flags_c,
4471 { "(C) Cost", "pcep.metric.flags.c",
4472 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_METRIC_C,
4473 NULL, HFILL }
4475 { &hf_pcep_metric_flags_b,
4476 { "(B) Bound", "pcep.metric.flags.b",
4477 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_METRIC_B,
4478 NULL, HFILL }
4480 { &hf_PCEPF_OBJ_EXPLICIT_ROUTE,
4481 { "EXPLICIT ROUTE object (ERO)", "pcep.obj.ero",
4482 FT_NONE, BASE_NONE, NULL, 0x0,
4483 NULL, HFILL }
4485 { &hf_PCEPF_OBJ_RECORD_ROUTE,
4486 { "RECORD ROUTE object (RRO)", "pcep.obj.rro",
4487 FT_NONE, BASE_NONE, NULL, 0x0,
4488 NULL, HFILL }
4490 { &hf_PCEPF_OBJ_LSPA,
4491 { "LSPA object", "pcep.obj.lspa",
4492 FT_NONE, BASE_NONE, NULL, 0x0,
4493 NULL, HFILL }
4495 { &hf_pcep_lspa_flags_l,
4496 { "Local Protection Desired (L)", "pcep.lspa.flags.l",
4497 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_LSPA_L,
4498 NULL, HFILL }
4500 { &hf_PCEPF_OBJ_IRO,
4501 { "IRO object", "pcep.obj.iro",
4502 FT_NONE, BASE_NONE, NULL, 0x0,
4503 NULL, HFILL }
4505 { &hf_PCEPF_OBJ_SVEC,
4506 { "SVEC object", "pcep.obj.svec",
4507 FT_NONE, BASE_NONE, NULL, 0x0,
4508 NULL, HFILL }
4511 { &hf_pcep_svec_flags_l,
4512 { "Link diverse (L)", "pcep.svec.flags.l",
4513 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_L,
4514 NULL, HFILL }
4517 { &hf_pcep_svec_flags_n,
4518 { "Node diverse (N)", "pcep.svec.flags.n",
4519 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_N,
4520 NULL, HFILL }
4523 { &hf_pcep_svec_flags_s,
4524 { "SRLG diverse (S)", "pcep.svec.flags.s",
4525 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_S,
4526 NULL, HFILL }
4529 { &hf_pcep_svec_flags_d,
4530 { "Link Direction Diverse (D)", "pcep.svec.flags.d",
4531 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_D,
4532 NULL, HFILL }
4535 { &hf_pcep_svec_flags_p,
4536 { "Partial Path Diverse (P)", "pcep.svec.flags.p",
4537 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_P,
4538 NULL, HFILL }
4541 { &hf_PCEPF_OBJ_NOTIFICATION,
4542 { "NOTIFICATION object", "pcep.obj.notification",
4543 FT_NONE, BASE_NONE, NULL, 0x0,
4544 NULL, HFILL }
4547 { &hf_PCEPF_NOTI_TYPE,
4548 { "Notification Value", "pcep.notification.value1",
4549 FT_UINT32, BASE_DEC, VALS(pcep_notification_types_vals), 0x0,
4550 NULL, HFILL }
4552 { &hf_PCEPF_NOTI_VAL1,
4553 { "Notification Type", "pcep.notification.type2",
4554 FT_UINT32, BASE_DEC, VALS(pcep_notification_values1_vals), 0x0,
4555 NULL, HFILL }
4557 { &hf_PCEPF_NOTI_VAL2,
4558 { "Notification Type", "pcep.notification.type",
4559 FT_UINT32, BASE_DEC, VALS(pcep_notification_values2_vals), 0x0,
4560 NULL, HFILL }
4563 { &hf_PCEPF_OBJ_PCEP_ERROR,
4564 { "ERROR object", "pcep.obj.error",
4565 FT_NONE, BASE_NONE, NULL, 0x0,
4566 NULL, HFILL }
4568 { &hf_PCEPF_ERROR_TYPE,
4569 { "Error-Type", "pcep.error.type",
4570 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &pcep_error_types_obj_vals_ext, 0x0,
4571 NULL, HFILL }
4573 { &hf_PCEPF_ERROR_VALUE,
4574 { "Error-Value", "pcep.error.value",
4575 FT_UINT8, BASE_DEC, NULL, 0x0,
4576 NULL, HFILL }
4578 { &hf_PCEPF_OBJ_LOAD_BALANCING,
4579 { "LOAD BALANCING object", "pcep.obj.loadbalancing",
4580 FT_NONE, BASE_NONE, NULL, 0x0,
4581 NULL, HFILL }
4583 { &hf_PCEPF_OBJ_CLOSE,
4584 { "CLOSE object", "pcep.obj.close",
4585 FT_NONE, BASE_NONE, NULL, 0x0,
4586 NULL, HFILL }
4588 { &hf_PCEPF_OBJ_PATH_KEY,
4589 { "PATH-KEY object", "pcep.obj.path_key",
4590 FT_NONE, BASE_NONE, NULL, 0x0,
4591 NULL, HFILL }
4593 { &hf_PCEPF_OBJ_XRO,
4594 { "EXCLUDE ROUTE object (XRO)", "pcep.obj.xro",
4595 FT_NONE, BASE_NONE, NULL, 0x0,
4596 NULL, HFILL }
4599 { &hf_PCEPF_OBJ_MONITORING,
4600 { "MONITORING object", "pcep.obj.monitoring",
4601 FT_NONE, BASE_NONE, NULL, 0x0,
4602 NULL, HFILL }
4604 { &hf_pcep_obj_monitoring_flags_reserved,
4605 { "Reserved Flags", "pcep.obj.monitoring.flags.reserved",
4606 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_RESERVED,
4607 NULL, HFILL }
4609 { &hf_pcep_obj_monitoring_flags_l,
4610 { "Liveness (L)", "pcep.obj.monitoring.flags.l",
4611 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_L,
4612 NULL, HFILL }
4614 { &hf_pcep_obj_monitoring_flags_g,
4615 { "General (G)", "pcep.obj.monitoring.flags.g",
4616 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_G,
4617 NULL, HFILL }
4619 { &hf_pcep_obj_monitoring_flags_p,
4620 { "Processing Time (P)", "pcep.obj.monitoring.flags.p",
4621 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_P,
4622 NULL, HFILL }
4624 { &hf_pcep_obj_monitoring_flags_c,
4625 { "Overload (C)", "pcep.obj.monitoring.flags.c",
4626 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_C,
4627 NULL, HFILL }
4629 { &hf_pcep_obj_monitoring_flags_i,
4630 { "Incomplete (I)", "pcep.obj.monitoring.flags.i",
4631 FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_OBJ_MONITORING_FLAGS_I,
4632 NULL, HFILL }
4634 { &hf_pcep_obj_monitoring_monitoring_id_number,
4635 { "Monitoring ID Number", "pcep.obj.monitoring.monidnumber",
4636 FT_UINT32, BASE_DEC, NULL, 0x0,
4637 NULL, HFILL }
4640 { &hf_PCEPF_OBJ_PCC_ID_REQ,
4641 { "PCC-ID-REQ object", "pcep.obj.pccidreq",
4642 FT_NONE, BASE_NONE, NULL, 0x0,
4643 NULL, HFILL }
4645 { &hf_pcep_obj_pcc_id_req_ipv4,
4646 { "IPv4 address", "pcep.obj.pccidreq.ipv4",
4647 FT_IPv4, BASE_NONE, NULL, 0x0,
4648 NULL, HFILL }
4650 { &hf_pcep_obj_pcc_id_req_ipv6,
4651 { "IPv6 address", "pcep.obj.pccidreq.ipv6",
4652 FT_IPv6, BASE_NONE, NULL, 0x0,
4653 NULL, HFILL }
4656 { &hf_PCEPF_OBJ_OF,
4657 { "OBJECTIVE FUNCTION object (OF)", "pcep.obj.of",
4658 FT_NONE, BASE_NONE, NULL, 0x0,
4659 NULL, HFILL }
4662 { &hf_PCEPF_OBJ_CLASSTYPE,
4663 { "CLASSTYPE object", "pcep.obj.classtype",
4664 FT_NONE, BASE_NONE, NULL, 0x0,
4665 NULL, HFILL }
4668 { &hf_PCEPF_OBJ_GLOBAL_CONSTRAINTS,
4669 { "GLOBAL-CONSTRAINTS object", "pcep.obj.global_constraints",
4670 FT_NONE, BASE_NONE, NULL, 0x0,
4671 NULL, HFILL }
4674 { &hf_PCEPF_OBJ_PCE_ID,
4675 { "PCE-ID object", "pcep.obj.pceid",
4676 FT_NONE, BASE_NONE, NULL, 0x0,
4677 NULL, HFILL }
4679 { &hf_pcep_obj_pce_id_ipv4,
4680 { "IPv4 address", "pcep.obj.pceid.ipv4",
4681 FT_IPv4, BASE_NONE, NULL, 0x0,
4682 NULL, HFILL }
4684 { &hf_pcep_obj_pce_id_ipv6,
4685 { "IPv6 address", "pcep.obj.pceid.ipv6",
4686 FT_IPv6, BASE_NONE, NULL, 0x0,
4687 NULL, HFILL }
4690 { &hf_PCEPF_OBJ_PROC_TIME,
4691 { "PROC-TIME object", "pcep.obj.proctime",
4692 FT_NONE, BASE_NONE, NULL, 0x0,
4693 NULL, HFILL }
4695 { &hf_pcep_obj_proc_time_flags_reserved,
4696 { "Reserved Flags", "pcep.obj.proctime.flags.reserved",
4697 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_PROC_TIME_FLAGS_RESERVED,
4698 NULL, HFILL }
4700 { &hf_pcep_obj_proc_time_flags_e,
4701 { "Estimated (E)", "pcep.obj.proctime.flags.e",
4702 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_PROC_TIME_FLAGS_E,
4703 NULL, HFILL }
4705 { &hf_pcep_obj_proc_time_cur_proc_time,
4706 { "Current processing time", "pcep.obj.proctime.curproctime",
4707 FT_UINT32, BASE_DEC, NULL, 0x0,
4708 NULL, HFILL }
4710 { &hf_pcep_obj_proc_time_min_proc_time,
4711 { "Minimum processing time", "pcep.obj.proctime.minproctime",
4712 FT_UINT32, BASE_DEC, NULL, 0x0,
4713 NULL, HFILL }
4715 { &hf_pcep_obj_proc_time_max_proc_time,
4716 { "Maximum processing time", "pcep.obj.proctime.maxproctime",
4717 FT_UINT32, BASE_DEC, NULL, 0x0,
4718 NULL, HFILL }
4720 { &hf_pcep_obj_proc_time_ave_proc_time,
4721 { "Average processing time", "pcep.obj.proctime.aveproctime",
4722 FT_UINT32, BASE_DEC, NULL, 0x0,
4723 NULL, HFILL }
4725 { &hf_pcep_obj_proc_time_var_proc_time,
4726 { "Variance processing time", "pcep.obj.proctime.varproctime",
4727 FT_UINT32, BASE_DEC, NULL, 0x0,
4728 NULL, HFILL }
4731 { &hf_PCEPF_OBJ_OVERLOAD,
4732 { "OVERLOAD object", "pcep.obj.overload",
4733 FT_NONE, BASE_NONE, NULL, 0x0,
4734 NULL, HFILL }
4736 { &hf_pcep_obj_overload_duration,
4737 { "Overload Duration", "pcep.obj.overload.duration",
4738 FT_UINT16, BASE_DEC, NULL, 0x0,
4739 NULL, HFILL }
4742 { &hf_PCEPF_OBJ_UNREACH_DESTINATION,
4743 { "UNREACH-DESTINATION object", "pcep.obj.unreach-destination",
4744 FT_NONE, BASE_NONE, NULL, 0x0,
4745 NULL, HFILL }
4748 { &hf_pcep_unreach_destination_obj_ipv4_address,
4749 { "Destination IPv4 Address", "pcep.obj.unreach-destination.ipv4-addr",
4750 FT_IPv4, BASE_NONE, NULL, 0x0,
4751 NULL, HFILL }
4754 { &hf_pcep_unreach_destination_obj_ipv6_address,
4755 { "Destination IPv6 address", "pcep.obj.unreach-destination.ipv6-addr",
4756 FT_IPv6, BASE_NONE, NULL, 0x0,
4757 NULL, HFILL }
4760 { &hf_PCEPF_OBJ_SERO,
4761 { "SECONDARY EXPLICIT ROUTE object (SERO)", "pcep.obj.sero",
4762 FT_NONE, BASE_NONE, NULL, 0x0,
4763 NULL, HFILL }
4765 { &hf_PCEPF_OBJ_SRRO,
4766 { "SECONDARY RECORD ROUTE object (SRRO)", "pcep.obj.srro",
4767 FT_NONE, BASE_NONE, NULL, 0x0,
4768 NULL, HFILL }
4771 { &hf_PCEPF_OBJ_BRANCH_NODE_CAPABILITY,
4772 { "Branch Node Capability object", "pcep.obj.branch-node-capability",
4773 FT_NONE, BASE_NONE, NULL, 0x0,
4774 NULL, HFILL }
4777 { &hf_PCEPF_OBJ_LSP,
4778 { "LSP object", "pcep.obj.lsp",
4779 FT_NONE, BASE_NONE, NULL, 0x0,
4780 NULL, HFILL }
4783 { &hf_PCEPF_OBJ_SRP,
4784 { "SRP object", "pcep.obj.srp",
4785 FT_NONE, BASE_NONE, NULL, 0x0,
4786 NULL, HFILL }
4789 { &hf_PCEPF_OBJ_VENDOR_INFORMATION,
4790 { "VENDOR-INFORMATION object", "pcep.obj.vendor-information",
4791 FT_NONE, BASE_NONE, NULL, 0x0,
4792 NULL, HFILL }
4795 { &hf_PCEPF_OBJ_BU,
4796 { "BU object", "pcep.obj.bu",
4797 FT_NONE, BASE_NONE, NULL, 0x0,
4798 NULL, HFILL }
4801 { &hf_PCEPF_OBJ_INTER_LAYER,
4802 { "INTER-LAYER object", "pcep.obj.inter_layer",
4803 FT_NONE, BASE_NONE, NULL, 0x0,
4804 NULL, HFILL }
4806 { &hf_PCEPF_OBJ_SWITCH_LAYER,
4807 { "SWITCH-LAYER object", "pcep.obj.switch_layer",
4808 FT_NONE, BASE_NONE, NULL, 0x0,
4809 NULL, HFILL }
4811 { &hf_PCEPF_OBJ_REQ_ADAP_CAP,
4812 { "REQ-ADAP-CAP object", "pcep.obj.req_adap_cap",
4813 FT_NONE, BASE_NONE, NULL, 0x0,
4814 NULL, HFILL }
4816 { &hf_PCEPF_OBJ_SERVER_IND,
4817 { "SERVER-INDICATION object", "pcep.obj.server_ind",
4818 FT_NONE, BASE_NONE, NULL, 0x0,
4819 NULL, HFILL }
4821 { &hf_PCEPF_OBJ_ASSOCIATION,
4822 { "ASSOCIATION object", "pcep.obj.association",
4823 FT_NONE, BASE_NONE, NULL, 0x0,
4824 NULL, HFILL }
4826 { &hf_PCEPF_OBJ_S2LS,
4827 { "S2LS object", "pcep.obj.s2ls",
4828 FT_NONE, BASE_NONE, NULL, 0x0,
4829 NULL, HFILL }
4831 { &hf_PCEPF_OBJ_WA,
4832 { "WAVELENGTH-ASSIGNMENT (WA) object", "pcep.obj.wa",
4833 FT_NONE, BASE_NONE, NULL, 0x0,
4834 NULL, HFILL }
4836 { &hf_PCEPF_OBJ_FLOWSPEC,
4837 { "FLOWSPEC object", "pcep.obj.flowspec",
4838 FT_NONE, BASE_NONE, NULL, 0x0,
4839 NULL, HFILL }
4841 { &hf_PCEPF_OBJ_CCI_TYPE,
4842 { "CCI Object-Type object", "pcep.obj.cci_type",
4843 FT_NONE, BASE_NONE, NULL, 0x0,
4844 NULL, HFILL }
4846 { &hf_PCEPF_OBJ_PATH_ATTRIB,
4847 { "PATH-ATTRIB object", "pcep.obj.path_attrib",
4848 FT_NONE, BASE_NONE, NULL, 0x0,
4849 NULL, HFILL }
4852 { &hf_PCEPF_OBJ_UNKNOWN_TYPE,
4853 { "Unknown object", "pcep.obj.unknown",
4854 FT_NONE, BASE_NONE, NULL, 0x0,
4855 NULL, HFILL }
4858 /*Subobjects*/
4859 { &hf_PCEPF_SUBOBJ,
4860 { "Type", "pcep.subobj",
4861 FT_UINT8, BASE_DEC, VALS(pcep_subobj_vals), 0,
4862 NULL, HFILL }
4864 { &hf_PCEPF_SUBOBJ_7F,
4865 { "Type", "pcep.subobj",
4866 FT_UINT8, BASE_DEC, VALS(pcep_subobj_vals), 0x7F,
4867 NULL, HFILL }
4870 { &hf_PCEPF_SUBOBJ_IPv4,
4871 { "SUBOBJECT: IPv4 Prefix", "pcep.subobj.ipv4",
4872 FT_NONE, BASE_NONE, NULL, 0x0,
4873 NULL, HFILL }
4875 { &hf_PCEPF_SUBOBJ_IPv6,
4876 { "SUBOBJECT: IPv6 Prefix", "pcep.subobj.ipv6",
4877 FT_NONE, BASE_NONE, NULL, 0x0,
4878 NULL, HFILL }
4880 { &hf_PCEPF_SUBOBJ_LABEL_CONTROL,
4881 { "SUBOBJECT: Label Control", "pcep.subobj.label.control",
4882 FT_NONE, BASE_NONE, NULL, 0x0,
4883 NULL, HFILL }
4885 { &hf_PCEPF_SUBOBJ_UNNUM_INTERFACEID,
4886 { "SUBOBJECT: Unnumbered Interface ID", "pcep.subobj.unnum.interfaceid",
4887 FT_NONE, BASE_NONE, NULL, 0x0,
4888 NULL, HFILL }
4890 { &hf_PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM,
4891 { "SUBOBJECT: Autonomous System Number", "pcep.subobj.autonomous.sys.num",
4892 FT_NONE, BASE_NONE, NULL, 0x0,
4893 NULL, HFILL }
4895 { &hf_PCEPF_SUBOBJ_SRLG,
4896 { "SUBOBJECT: SRLG", "pcep.subobj.srlg",
4897 FT_NONE, BASE_NONE, NULL, 0x0,
4898 NULL, HFILL }
4900 { &hf_PCEPF_SUBOBJ_EXRS,
4901 { "SUBOBJECT: EXRS", "pcep.subobj.exrs",
4902 FT_NONE, BASE_NONE, NULL, 0x0,
4903 NULL, HFILL }
4905 { &hf_PCEPF_SUBOBJ_PKSv4,
4906 { "SUBOBJECT: Path Key (IPv4)", "pcep.subobj.path_key.ipv4",
4907 FT_NONE, BASE_NONE, NULL, 0x0,
4908 NULL, HFILL }
4910 { &hf_PCEPF_SUBOBJ_PKSv6,
4911 { "SUBOBJECT: Path Key (IPv6)", "pcep.subobj.path_key.ipv6",
4912 FT_NONE, BASE_NONE, NULL, 0x0,
4913 NULL, HFILL }
4915 { &hf_PCEPF_SUBOBJ_XRO,
4916 { "Type", "pcep.subobj.label",
4917 FT_UINT32, BASE_DEC, VALS(pcep_subobj_xro_vals), 0x7F,
4918 NULL, HFILL }
4920 { &hf_pcep_xro_flags_f,
4921 { "Fail (F)", "pcep.xro.flags.f",
4922 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_XRO_F,
4923 NULL, HFILL }
4925 #if 0
4926 { &hf_PCEPF_SUB_XRO_ATTRIB,
4927 { "Attribute", "pcep.xro.sub.attribute",
4928 FT_UINT32, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
4929 NULL, HFILL }
4931 #endif
4932 { &hf_pcep_subobj_flags_lpa,
4933 { "Local Protection Available", "pcep.subobj.flags.lpa",
4934 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_SUB_LPA,
4935 NULL, HFILL }
4937 { &hf_pcep_subobj_flags_lpu,
4938 { "Local protection in Use", "pcep.subobj.flags.lpu",
4939 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_SUB_LPU,
4940 NULL, HFILL }
4943 { &hf_pcep_subobj_label_flags_gl,
4944 { "Global Label", "pcep.subobj.label.flags.gl",
4945 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_SUB_LABEL_GL,
4946 NULL, HFILL }
4948 { &hf_pcep_no_path_tlvs_pce,
4949 { "PCE currently unavailable", "pcep.no_path_tlvs.pce",
4950 FT_BOOLEAN, 32, NULL, 0x00000001,
4951 NULL, HFILL }
4953 { &hf_pcep_no_path_tlvs_unk_dest,
4954 { "Unknown destination", "pcep.no_path_tlvs.unk_dest",
4955 FT_BOOLEAN, 32, NULL, 0x00000002,
4956 NULL, HFILL }
4958 { &hf_pcep_no_path_tlvs_unk_src,
4959 { "Unknown source", "pcep.no_path_tlvs.unk_src",
4960 FT_BOOLEAN, 32, NULL, 0x00000004,
4961 NULL, HFILL }
4963 { &hf_pcep_no_path_tlvs_brpc,
4964 { "BRPC Path computation chain unavailable", "pcep.no_path_tlvs.brpc",
4965 FT_BOOLEAN, 32, NULL, 0x00000008,
4966 NULL, HFILL }
4968 { &hf_pcep_no_path_tlvs_pks,
4969 { "PKS expansion failure", "pcep.no_path_tlvs.pks",
4970 FT_BOOLEAN, 32, NULL, 0x00000010,
4971 NULL, HFILL }
4973 { &hf_pcep_no_path_tlvs_no_gco_migr,
4974 { "No GCO migration path found", "pcep.no_path_tlvs.no_gco_migr",
4975 FT_BOOLEAN, 32, NULL, 0x00000020,
4976 NULL, HFILL }
4978 { &hf_pcep_no_path_tlvs_no_gco_soln,
4979 { "No GCO solution found", "pcep.no_path_tlvs.no_gco_soln",
4980 FT_BOOLEAN, 32, NULL, 0x00000040,
4981 NULL, HFILL }
4983 { &hf_pcep_no_path_tlvs_p2mp,
4984 { "P2MP Reachability Problem", "pcep.no_path_tlvs.p2mp",
4985 FT_BOOLEAN, 32, NULL, 0x00000080,
4986 NULL, HFILL }
4988 { &hf_pcep_stateful_pce_capability_flags,
4989 { "Flags", "pcep.stateful-pce-capability.flags",
4990 FT_UINT32, BASE_HEX, NULL, 0x0,
4991 NULL, HFILL }
4994 { &hf_pcep_lsp_update_capability,
4995 { "LSP-UPDATE-CAPABILITY (U)", "pcep.stateful-pce-capability.lsp-update",
4996 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_U,
4997 NULL, HFILL }
4999 { &hf_pcep_include_db_version,
5000 { "INCLUDE-DB-VERSION (S)", "pcep.sync-capability.include-db-version",
5001 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_S,
5002 NULL, HFILL }
5004 { &hf_pcep_lsp_instantiation_capability,
5005 { "LSP-INSTANTIATION-CAPABILITY (I)", "pcep.stateful-pce-capability.lsp-instantiation",
5006 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_I,
5007 NULL, HFILL }
5009 { &hf_pcep_triggered_resync,
5010 { "TRIGGERED-RESYNC (T)", "pcep.stateful-pce-capability.triggered-resync",
5011 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_T,
5012 NULL, HFILL }
5014 { &hf_pcep_delta_lsp_sync_capability,
5015 { "DELTA-LSP-SYNC-CAPABILITY (D)", "pcep.stateful-pce-capability.delta-lsp-sync",
5016 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_D,
5017 NULL, HFILL }
5019 { &hf_pcep_triggered_initial_sync,
5020 { "TRIGGERED-INITIAL-SYNC (F)", "pcep.stateful-pce-capability.triggered-initial-sync",
5021 FT_BOOLEAN, 32, NULL, PCEP_TLV_STATEFUL_PCE_CAPABILITY_F,
5022 NULL, HFILL }
5024 { &hf_pcep_sr_pce_capability_reserved,
5025 { "Reserved", "pcep.tlv.sr-pce-capability.reserved",
5026 FT_UINT16, BASE_HEX, NULL, 0x0,
5027 NULL, HFILL }
5029 { &hf_pcep_sr_pce_capability_sub_tlv_reserved,
5030 { "Reserved", "pcep.sub-tlv.sr-pce-capability.reserved",
5031 FT_UINT16, BASE_HEX, NULL, 0x0,
5032 NULL, HFILL }
5034 // DEPRECATED
5035 { &hf_pcep_sr_pce_capability_flags,
5036 { "Flags", "pcep.tlv.sr-pce-capability.flags",
5037 FT_UINT8, BASE_HEX, NULL, 0x0,
5038 NULL, HFILL }
5040 { &hf_pcep_sr_pce_capability_sub_tlv_flags,
5041 { "Flags", "pcep.sub-tlv.sr-pce-capability.flags",
5042 FT_UINT8, BASE_HEX, NULL, 0x0,
5043 NULL, HFILL }
5045 // DEPRECATED
5046 // leave for backwards compatibility
5047 { &hf_pcep_sr_pce_capability_flags_l,
5048 { "L-flag", "pcep.tlv.sr-pce-capability.flags.l",
5049 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_TLV_SR_PCE_CAPABILITY_L,
5050 NULL, HFILL }
5052 { &hf_pcep_sr_pce_capability_sub_tlv_flags_n,
5053 { "Node or Adjacency Identifier (NAI) is supported (N)", "pcep.sub-tlv.sr-pce-capability.flags.n",
5054 FT_BOOLEAN, 7, TFS(&tfs_set_notset), PCEP_TLV_SR_PCE_CAPABILITY_L,
5055 NULL, HFILL }
5057 { &hf_pcep_sr_pce_capability_sub_tlv_flags_x,
5058 { "Unlimited Maximum SID Depth (X)", "pcep.sub-tlv.sr-pce-capability.flags.x",
5059 FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_TLV_SR_PCE_CAPABILITY_L,
5060 NULL, HFILL }
5062 // SR-PCE CAPABILITY TLV is deprecated
5063 // leave for backwards compatibility
5064 { &hf_pcep_sr_pce_capability_msd,
5065 { "MSD", "pcep.tlv.sr-pce-capability.msd",
5066 FT_UINT8, BASE_DEC, NULL, 0x0,
5067 "MSD (Maximum SID Depth)", HFILL }
5069 { &hf_pcep_sr_pce_capability_sub_tlv_msd,
5070 { "MSD", "pcep.sub-tlv.sr-pce-capability.msd",
5071 FT_UINT8, BASE_DEC, NULL, 0x0,
5072 "MSD (Maximum SID Depth)", HFILL }
5074 { &hf_pcep_path_setup_type_reserved24,
5075 { "Reserved", "pcep.pst.reserved",
5076 FT_UINT24, BASE_HEX, NULL, 0x0,
5077 NULL, HFILL }
5079 { &hf_pcep_path_setup_type,
5080 { "Path Setup Type", "pcep.pst",
5081 FT_UINT8, BASE_DEC, VALS(pcep_pst_vals), 0x0,
5082 NULL, HFILL }
5084 { &hf_pcep_path_setup_type_capability_reserved24,
5085 { "Reserved", "pcep.pst_capability.reserved",
5086 FT_UINT24, BASE_HEX, NULL, 0x0,
5087 NULL, HFILL }
5089 { &hf_pcep_path_setup_type_capability_psts,
5090 { "Path Setup Types", "pcep.pst_capability.psts",
5091 FT_UINT8, BASE_DEC, NULL, 0x0,
5092 NULL, HFILL }
5094 { &hf_pcep_path_setup_type_capability_pst,
5095 { "Path Setup Type", "pcep.pst_capability.pst",
5096 FT_UINT8, BASE_DEC, VALS(pcep_pst_vals), 0x0,
5097 NULL, HFILL }
5099 { &hf_PCEPF_SUBOBJ_SR,
5100 { "SR", "pcep.subobj.sr",
5101 FT_NONE, BASE_NONE, NULL, 0x0,
5102 "Segment Routing (SR)", HFILL }
5104 { &hf_pcep_subobj_sr_l,
5105 { "L", "pcep.subobj.sr.l",
5106 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5107 NULL, HFILL }
5109 { &hf_pcep_subobj_sr_length,
5110 { "Length", "pcep.subobj.sr.length",
5111 FT_UINT8, BASE_DEC, NULL, 0x0,
5112 NULL, HFILL }
5114 { &hf_pcep_subobj_sr_nt,
5115 { "NAI Type", "pcep.subobj.sr.nt",
5116 FT_UINT8, BASE_DEC, VALS(pcep_sr_nt_vals), 0xF0,
5117 NULL, HFILL }
5119 { &hf_pcep_subobj_sr_flags,
5120 { "Flags", "pcep.subobj.sr.flags",
5121 FT_UINT16, BASE_HEX, NULL, 0x0FFF,
5122 NULL, HFILL }
5124 { &hf_pcep_subobj_sr_flags_m,
5125 { "SID specifies an MPLS label (M)", "pcep.subobj.sr.flags.m",
5126 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SR_FLAGS_M,
5127 NULL, HFILL }
5129 { &hf_pcep_subobj_sr_flags_c,
5130 { "SID specifies TC, S, and TTL in addition to an MPLS label (C)", "pcep.subobj.sr.flags.c",
5131 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SR_FLAGS_C,
5132 NULL, HFILL }
5134 { &hf_pcep_subobj_sr_flags_s,
5135 { "SID is absent (S)", "pcep.subobj.sr.flags.s",
5136 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SR_FLAGS_S,
5137 NULL, HFILL }
5139 { &hf_pcep_subobj_sr_flags_f,
5140 { "NAI is absent (F)", "pcep.subobj.sr.flags.f",
5141 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SR_FLAGS_F,
5142 NULL, HFILL }
5144 { &hf_pcep_subobj_sr_sid,
5145 { "SID", "pcep.subobj.sr.sid",
5146 FT_UINT32, BASE_DEC, NULL, 0x0,
5147 NULL, HFILL }
5149 { &hf_pcep_subobj_sr_sid_label,
5150 { "SID/Label", "pcep.subobj.sr.sid.label",
5151 FT_UINT32, BASE_DEC, NULL, 0xfffff000,
5152 "SID represent MPLS Label stack: Label", HFILL }
5154 { &hf_pcep_subobj_sr_sid_tc,
5155 {"SID/TC", "pcep.subobj.sr.sid.tc",
5156 FT_UINT32, BASE_DEC, NULL, 0x00000E00,
5157 "SID represent MPLS Label stack: Traffic Class field", HFILL }
5159 { &hf_pcep_subobj_sr_sid_s,
5160 {"SID/S", "pcep.subobj.sr.sid.s",
5161 FT_UINT32, BASE_DEC, NULL, 0x00000100,
5162 "SID represent MPLS Label stack: Bottom of Stack", HFILL }
5164 { &hf_pcep_subobj_sr_sid_ttl,
5165 {"SID/TTL", "pcep.subobj.sr.sid.ttl",
5166 FT_UINT32, BASE_DEC, NULL, 0x000000FF,
5167 "SID represent MPLS Label stack: Time to Live", HFILL }
5169 { &hf_pcep_subobj_sr_nai_ipv4_node,
5170 { "NAI (IPv4 Node ID)", "pcep.subobj.sr.nai.ipv4node",
5171 FT_IPv4, BASE_NONE, NULL, 0x0,
5172 NULL, HFILL }
5174 { &hf_pcep_subobj_sr_nai_ipv6_node,
5175 { "NAI (IPv6 Node ID)", "pcep.subobj.sr.nai.ipv6node",
5176 FT_IPv6, BASE_NONE, NULL, 0x0,
5177 NULL, HFILL }
5179 { &hf_pcep_subobj_sr_nai_local_ipv4_addr,
5180 { "Local IPv4 address", "pcep.subobj.sr.nai.localipv4addr",
5181 FT_IPv4, BASE_NONE,
5182 NULL, 0x0, NULL, HFILL }
5184 { &hf_pcep_subobj_sr_nai_remote_ipv4_addr,
5185 { "Remote IPv4 address", "pcep.subobj.sr.nai.remoteipv4addr",
5186 FT_IPv4, BASE_NONE,
5187 NULL, 0x0, NULL, HFILL }
5189 { &hf_pcep_subobj_sr_nai_local_ipv6_addr,
5190 { "Local IPv6 address", "pcep.subobj.sr.nai.localipv6addr",
5191 FT_IPv6, BASE_NONE,
5192 NULL, 0x0, NULL, HFILL }
5194 { &hf_pcep_subobj_sr_nai_remote_ipv6_addr,
5195 { "Remote IPv6 address", "pcep.subobj.sr.nai.remoteipv6addr",
5196 FT_IPv6, BASE_NONE,
5197 NULL, 0x0, NULL, HFILL }
5199 { &hf_pcep_subobj_sr_nai_local_node_id,
5200 { "Local Node-ID", "pcep.subobj.sr.nai.localnodeid",
5201 FT_UINT32, BASE_DEC,
5202 NULL, 0x0, NULL, HFILL }
5204 { &hf_pcep_subobj_sr_nai_local_interface_id,
5205 { "Local Interface ID", "pcep.subobj.sr.nai.localinterfaceid",
5206 FT_UINT32, BASE_DEC,
5207 NULL, 0x0, NULL, HFILL }
5209 { &hf_pcep_subobj_sr_nai_remote_node_id,
5210 { "Remote Node-ID", "pcep.subobj.sr.nai.remotenodeid",
5211 FT_UINT32, BASE_DEC,
5212 NULL, 0x0, NULL, HFILL }
5214 { &hf_pcep_subobj_sr_nai_remote_interface_id,
5215 { "Remote Interface ID", "pcep.subobj.sr.nai.remoteinterfaceid",
5216 FT_UINT32, BASE_DEC,
5217 NULL, 0x0, NULL, HFILL }
5219 { &hf_PCEPF_SUBOBJ_SRv6,
5220 { "SRv6", "pcep.subobj.srv6",
5221 FT_NONE, BASE_NONE, NULL, 0x0,
5222 NULL, HFILL }
5224 { &hf_pcep_subobj_srv6_l,
5225 { "L", "pcep.subobj.srv6.l",
5226 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5227 NULL, HFILL }
5229 { &hf_pcep_subobj_srv6_length,
5230 { "Length", "pcep.subobj.srv6.length",
5231 FT_UINT8, BASE_DEC, NULL, 0x0,
5232 NULL, HFILL }
5234 { &hf_pcep_subobj_srv6_nt,
5235 { "NAI Type", "pcep.subobj.srv6.nt",
5236 FT_UINT8, BASE_DEC, VALS(pcep_sr_nt_vals), 0xF0,
5237 NULL, HFILL }
5239 { &hf_pcep_subobj_srv6_flags,
5240 { "Flags", "pcep.subobj.srv6.flags",
5241 FT_UINT16, BASE_HEX, NULL, 0x0FFF,
5242 NULL, HFILL }
5244 { &hf_pcep_subobj_srv6_flags_v,
5245 { "SID verification (V)", "pcep.subobj.srv6.flags.v",
5246 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SRV6_FLAGS_V,
5247 NULL, HFILL }
5249 { &hf_pcep_subobj_srv6_flags_t,
5250 { "SID structure is present (T)", "pcep.subobj.srv6.flags.t",
5251 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SRV6_FLAGS_T,
5252 NULL, HFILL }
5254 { &hf_pcep_subobj_srv6_flags_f,
5255 { "NAI is absent (F)", "pcep.subobj.srv6.flags.f",
5256 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SRV6_FLAGS_F,
5257 NULL, HFILL }
5259 { &hf_pcep_subobj_srv6_flags_s,
5260 { "SID is absent (S)", "pcep.subobj.srv6.flags.s",
5261 FT_BOOLEAN, 12, TFS(&tfs_set_notset), PCEP_SUBOBJ_SRV6_FLAGS_S,
5262 NULL, HFILL }
5264 { &hf_pcep_subobj_srv6_reserved,
5265 { "Reserved", "pcep.subobj.srv6.reserved",
5266 FT_UINT16, BASE_HEX, NULL, 0x0,
5267 NULL, HFILL }
5269 { &hf_pcep_subobj_srv6_endpoint_behavior,
5270 { "Endpoint Behavior", "pcep.subobj.srv6.endpoint_behavior",
5271 FT_UINT16, BASE_DEC, VALS(srv6_endpoint_behavior_vals), 0x0,
5272 NULL, HFILL }
5274 { &hf_pcep_subobj_srv6_sid,
5275 { "SRv6 SID", "pcep.subobj.srv6.sid",
5276 FT_IPv6, BASE_NONE, NULL, 0x0,
5277 NULL, HFILL }
5279 { &hf_pcep_subobj_srv6_nai,
5280 { "Node or Adjacency Identifier (NAI)", "pcep.subobj.srv6.nai",
5281 FT_NONE, BASE_NONE, NULL, 0x0,
5282 NULL, HFILL }
5284 { &hf_pcep_subobj_srv6_nai_ipv6_node,
5285 { "IPv6 Node ID", "pcep.subobj.srv6.nai.ipv6node",
5286 FT_IPv6, BASE_NONE, NULL, 0x0,
5287 NULL, HFILL }
5289 { &hf_pcep_subobj_srv6_nai_local_ipv6_addr,
5290 { "Local IPv6 address", "pcep.subobj.srv6.nai.localipv6addr",
5291 FT_IPv6, BASE_NONE,
5292 NULL, 0x0, NULL, HFILL }
5294 { &hf_pcep_subobj_srv6_nai_remote_ipv6_addr,
5295 { "Remote IPv6 address", "pcep.subobj.srv6.nai.remoteipv6addr",
5296 FT_IPv6, BASE_NONE,
5297 NULL, 0x0, NULL, HFILL }
5299 { &hf_pcep_subobj_srv6_nai_local_interface_id,
5300 { "Local Interface ID", "pcep.subobj.srv6.nai.localinterfaceid",
5301 FT_UINT32, BASE_DEC,
5302 NULL, 0x0, NULL, HFILL }
5304 { &hf_pcep_subobj_srv6_nai_remote_interface_id,
5305 { "Remote Interface ID", "pcep.subobj.srv6.nai.remoteinterfaceid",
5306 FT_UINT32, BASE_DEC,
5307 NULL, 0x0, NULL, HFILL }
5309 { &hf_pcep_subobj_srv6_sid_struct,
5310 { "SID Structure", "pcep.subobj.srv6.sid_structure",
5311 FT_NONE, BASE_NONE, NULL, 0x0,
5312 NULL, HFILL }
5314 { &hf_pcep_subobj_srv6_sid_struct_lb_len,
5315 { "Locator Block Length", "pcep.subobj.srv6.sid_structure.locator_block_length",
5316 FT_UINT8, BASE_DEC, NULL, 0x0,
5317 NULL, HFILL }
5319 { &hf_pcep_subobj_srv6_sid_struct_ln_len,
5320 { "Locator Node Length", "pcep.subobj.srv6.sid_structure.locator_node_length",
5321 FT_UINT8, BASE_DEC, NULL, 0x0,
5322 NULL, HFILL }
5324 { &hf_pcep_subobj_srv6_sid_struct_fun_len,
5325 { "Function Length", "pcep.subobj.srv6.sid_structure.function_length",
5326 FT_UINT8, BASE_DEC, NULL, 0x0,
5327 NULL, HFILL }
5329 { &hf_pcep_subobj_srv6_sid_struct_arg_len,
5330 { "Arguments Length", "pcep.subobj.srv6.sid_structure.arguments_length",
5331 FT_UINT8, BASE_DEC, NULL, 0x0,
5332 NULL, HFILL }
5334 { &hf_pcep_subobj_srv6_sid_struct_reserved,
5335 { "Reserved", "pcep.subobj.srv6.sid_structure.reserved",
5336 FT_UINT24, BASE_HEX, NULL, 0x0,
5337 NULL, HFILL }
5339 { &hf_pcep_subobj_srv6_sid_struct_flags,
5340 { "Flags", "pcep.subobj.srv6.sid_structure.flags",
5341 FT_UINT8, BASE_HEX, NULL, 0x0,
5342 NULL, HFILL }
5345 /* Generated from convert_proto_tree_add_text.pl */
5346 { &hf_pcep_tlv_type,
5347 { "Type", "pcep.tlv.type",
5348 FT_UINT16, BASE_DEC, VALS(pcep_tlvs_vals), 0x0,
5349 NULL, HFILL }
5351 { &hf_pcep_tlv_length,
5352 { "Length", "pcep.tlv.length",
5353 FT_UINT16, BASE_DEC, NULL, 0x0,
5354 NULL, HFILL }
5356 { &hf_pcep_request_id,
5357 { "Request-ID", "pcep.request_id",
5358 FT_UINT32, BASE_DEC, NULL, 0x0,
5359 NULL, HFILL }
5361 { &hf_pcep_tlv_data,
5362 { "Data", "pcep.tlv.data",
5363 FT_BYTES, BASE_NONE, NULL, 0x0,
5364 NULL, HFILL }
5366 { &hf_pcep_tlv_padding,
5367 { "Padding", "pcep.tlv.padding",
5368 FT_BYTES, BASE_NONE, NULL, 0x0,
5369 NULL, HFILL }
5371 { &hf_pcep_subobj_ipv4_length,
5372 { "Length", "pcep.subobj.ipv4.length",
5373 FT_UINT8, BASE_DEC, NULL, 0x0,
5374 NULL, HFILL }
5376 { &hf_pcep_subobj_ipv4_ipv4,
5377 { "IPv4 Address", "pcep.subobj.ipv4.ipv4",
5378 FT_IPv4, BASE_NONE, NULL, 0x0,
5379 NULL, HFILL }
5381 { &hf_pcep_subobj_ipv4_prefix_length,
5382 { "Prefix Length", "pcep.subobj.ipv4.prefix_length",
5383 FT_UINT8, BASE_DEC, NULL, 0x0,
5384 NULL, HFILL }
5386 { &hf_pcep_subobj_ipv4_padding,
5387 { "Padding", "pcep.subobj.ipv4.padding",
5388 FT_UINT8, BASE_HEX, NULL, 0x0,
5389 NULL, HFILL }
5391 { &hf_pcep_subobj_ipv4_flags,
5392 { "Flags", "pcep.subobj.ipv4.flags",
5393 FT_UINT8, BASE_HEX, NULL, 0x0,
5394 NULL, HFILL }
5396 { &hf_pcep_subobj_ipv4_attribute,
5397 { "Attribute", "pcep.subobj.ipv4.attribute",
5398 FT_UINT8, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
5399 NULL, HFILL }
5401 { &hf_pcep_subobj_ipv6_length,
5402 { "Length", "pcep.subobj.ipv6.length",
5403 FT_UINT8, BASE_DEC, NULL, 0x0,
5404 NULL, HFILL }
5406 { &hf_pcep_subobj_ipv6_ipv6,
5407 { "IPv6 Address", "pcep.subobj.ipv6.ipv6",
5408 FT_IPv6, BASE_NONE, NULL, 0x0,
5409 NULL, HFILL }
5411 { &hf_pcep_subobj_ipv6_prefix_length,
5412 { "Prefix Length", "pcep.subobj.ipv6.prefix_length",
5413 FT_UINT8, BASE_DEC, NULL, 0x0,
5414 NULL, HFILL }
5416 { &hf_pcep_subobj_ipv6_padding,
5417 { "Padding", "pcep.subobj.ipv6.padding",
5418 FT_UINT8, BASE_HEX, NULL, 0x0,
5419 NULL, HFILL }
5421 { &hf_pcep_subobj_ipv6_flags,
5422 { "Flags", "pcep.subobj.ipv6.flags",
5423 FT_UINT8, BASE_HEX, NULL, 0x0,
5424 NULL, HFILL }
5426 { &hf_pcep_subobj_ipv6_attribute,
5427 { "Attribute", "pcep.attribute",
5428 FT_UINT8, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
5429 NULL, HFILL }
5431 { &hf_pcep_subobj_label_control_length,
5432 { "Length", "pcep.subobj.label_control.length",
5433 FT_UINT8, BASE_DEC, NULL, 0x0,
5434 NULL, HFILL }
5436 { &hf_pcep_subobj_label_control_u,
5437 { "U", "pcep.subobj.label_control.u",
5438 FT_UINT8, BASE_DEC, VALS(pcep_route_u_obj_vals), 0x80,
5439 NULL, HFILL }
5441 { &hf_pcep_subobj_label_control_reserved,
5442 { "Reserved", "pcep.subobj.label_control.reserved",
5443 FT_UINT8, BASE_DEC, NULL, 0x7F,
5444 NULL, HFILL }
5446 { &hf_pcep_subobj_label_control_c_type,
5447 { "C-Type", "pcep.subobj.label_control.c_type",
5448 FT_UINT8, BASE_DEC, NULL, 0x0,
5449 NULL, HFILL }
5451 { &hf_pcep_subobj_label_control_label,
5452 { "Label", "pcep.subobj.label_control.label",
5453 FT_BYTES, BASE_NONE, NULL, 0x0,
5454 NULL, HFILL }
5456 { &hf_pcep_subobj_label_control_flags,
5457 { "Flags", "pcep.subobj.label_control.flags",
5458 FT_UINT8, BASE_HEX, NULL, 0x7F,
5459 NULL, HFILL }
5461 { &hf_pcep_subobj_unnumb_interfaceID_length,
5462 { "Length", "pcep.subobj.unnumb_interfaceID.length",
5463 FT_UINT8, BASE_DEC, NULL, 0x0,
5464 NULL, HFILL }
5466 { &hf_pcep_subobj_unnumb_interfaceID_reserved,
5467 { "Reserved", "pcep.subobj.unnumb_interfaceID.reserved",
5468 FT_UINT16, BASE_HEX, NULL, 0x0,
5469 NULL, HFILL }
5471 { &hf_pcep_subobj_unnumb_interfaceID_flags,
5472 { "Flags", "pcep.subobj.unnumb_interfaceID.flags",
5473 FT_UINT16, BASE_HEX, NULL, 0xFF00,
5474 NULL, HFILL }
5476 { &hf_pcep_subobj_unnumb_interfaceID_reserved_rrobj,
5477 { "Reserved", "pcep.subobj.unnumb_interfaceID.reserved",
5478 FT_UINT16, BASE_HEX, NULL, 0x00FF,
5479 NULL, HFILL }
5481 { &hf_pcep_subobj_unnumb_interfaceID_reserved_xroobj,
5482 { "Reserved", "pcep.subobj.unnumb_interfaceID.reserved",
5483 FT_UINT8, BASE_HEX, NULL, 0x0,
5484 NULL, HFILL }
5486 { &hf_pcep_subobj_unnumb_interfaceID_attribute,
5487 { "Attribute", "pcep.subobj.unnumb_interfaceID.attribute",
5488 FT_UINT8, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
5489 NULL, HFILL }
5491 { &hf_pcep_subobj_unnumb_interfaceID_router_id,
5492 { "Router ID", "pcep.subobj.unnumb_interfaceID.router_id",
5493 FT_IPv4, BASE_NONE, NULL, 0x0,
5494 NULL, HFILL }
5496 { &hf_pcep_subobj_unnumb_interfaceID_interface_id,
5497 { "Interface ID", "pcep.subobj.unnumb_interfaceID.interface_id",
5498 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
5499 NULL, HFILL }
5501 { &hf_pcep_subobj_autonomous_sys_num_length,
5502 { "Length", "pcep.subobj.autonomous_sys_num.length",
5503 FT_UINT8, BASE_DEC, NULL, 0x0,
5504 NULL, HFILL }
5506 { &hf_pcep_subobj_autonomous_sys_num_reserved,
5507 { "Reserved", "pcep.subobj.autonomous_sys_num.reserved",
5508 FT_UINT8, BASE_HEX, NULL, 0x0,
5509 NULL, HFILL }
5511 { &hf_pcep_subobj_autonomous_sys_num_attribute,
5512 { "Attribute", "pcep.subobj.autonomous_sys_num.attribute",
5513 FT_UINT8, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
5514 NULL, HFILL }
5516 { &hf_pcep_subobj_autonomous_sys_num_optional_as_number_high_octets,
5517 { "Optional AS Number High Octets", "pcep.subobj.autonomous_sys_num.optional_as_number_high_octets",
5518 FT_UINT16, BASE_HEX, NULL, 0x0,
5519 NULL, HFILL }
5521 { &hf_pcep_subobj_autonomous_sys_num_as_number,
5522 { "AS Number", "pcep.subobj.autonomous_sys_num.as_number",
5523 FT_UINT16, BASE_HEX, NULL, 0x0,
5524 NULL, HFILL }
5526 { &hf_pcep_subobj_srlg_length,
5527 { "Length", "pcep.subobj.srlg.length",
5528 FT_UINT8, BASE_DEC, NULL, 0x0,
5529 NULL, HFILL }
5531 { &hf_pcep_subobj_srlg_id,
5532 { "SRLG ID", "pcep.subobj.srlg.id",
5533 FT_UINT32, BASE_HEX, NULL, 0x0,
5534 NULL, HFILL }
5536 { &hf_pcep_subobj_srlg_reserved,
5537 { "Reserved", "pcep.subobj.srlg.reserved",
5538 FT_UINT8, BASE_HEX, NULL, 0x0,
5539 NULL, HFILL }
5541 { &hf_pcep_subobj_srlg_attribute,
5542 { "Attribute", "pcep.subobj.srlg.attribute",
5543 FT_UINT8, BASE_DEC, VALS(pcep_xro_attribute_obj_vals), 0x0,
5544 NULL, HFILL }
5546 { &hf_pcep_subobj_exrs_length,
5547 { "Length", "pcep.subobj.exrs.length",
5548 FT_UINT8, BASE_DEC, NULL, 0x0,
5549 NULL, HFILL }
5551 { &hf_pcep_subobj_exrs_reserved,
5552 { "Reserved", "pcep.subobj.exrs.reserved",
5553 FT_UINT16, BASE_HEX, NULL, 0x0,
5554 NULL, HFILL }
5556 { &hf_pcep_subobj_pksv4_length,
5557 { "Length", "pcep.subobj.pksv4.length",
5558 FT_UINT8, BASE_DEC, NULL, 0x0,
5559 NULL, HFILL }
5561 { &hf_pcep_subobj_pksv4_path_key,
5562 { "Path Key", "pcep.subobj.pksv4.path_key",
5563 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
5564 NULL, HFILL }
5566 { &hf_pcep_subobj_pksv4_pce_id,
5567 { "PCE ID", "pcep.subobj.pksv4.pce_id",
5568 FT_IPv4, BASE_NONE, NULL, 0x0,
5569 NULL, HFILL }
5571 { &hf_pcep_subobj_pksv6_length,
5572 { "Length", "pcep.subobj.pksv6.length",
5573 FT_UINT8, BASE_DEC, NULL, 0x0,
5574 NULL, HFILL }
5576 { &hf_pcep_subobj_pksv6_path_key,
5577 { "Path Key", "pcep.subobj.pksv6.path_key",
5578 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
5579 NULL, HFILL }
5581 { &hf_pcep_subobj_pksv6_pce_id,
5582 { "PCE ID", "pcep.subobj.pksv6.pce_id",
5583 FT_IPv6, BASE_NONE, NULL, 0x0,
5584 NULL, HFILL }
5586 { &hf_pcep_open_obj_pcep_version,
5587 { "PCEP Version", "pcep.obj.open.pcep_version",
5588 FT_UINT8, BASE_DEC, NULL, 0xE0,
5589 NULL, HFILL }
5591 { &hf_pcep_open_obj_flags,
5592 { "Flags", "pcep.obj.open.flags",
5593 FT_UINT8, BASE_HEX, NULL, 0x1F,
5594 NULL, HFILL }
5596 { &hf_pcep_open_obj_keepalive,
5597 { "Keepalive", "pcep.obj.open.keepalive",
5598 FT_UINT8, BASE_DEC, NULL, 0x0,
5599 NULL, HFILL }
5601 { &hf_pcep_open_obj_deadtime,
5602 { "Deadtime", "pcep.obj.open.deadtime",
5603 FT_UINT8, BASE_DEC, NULL, 0x0,
5604 NULL, HFILL }
5606 { &hf_pcep_open_obj_sid,
5607 { "SID", "pcep.obj.open.sid",
5608 FT_UINT8, BASE_DEC, NULL, 0x0,
5609 NULL, HFILL }
5611 { &hf_pcep_rp_obj_reserved,
5612 { "Reserved", "pcep.obj.rp.reserved",
5613 FT_UINT8, BASE_HEX, NULL, 0x0,
5614 NULL, HFILL }
5616 { &hf_pcep_rp_obj_flags,
5617 { "Flags", "pcep.obj.rp.flags",
5618 FT_UINT24, BASE_HEX, NULL, 0x0,
5619 NULL, HFILL }
5621 { &hf_pcep_rp_obj_requested_id_number,
5622 { "Requested ID Number", "pcep.obj.rp.requested_id_number",
5623 FT_UINT32, BASE_HEX, NULL, 0x0,
5624 NULL, HFILL }
5626 { &hf_pcep_no_path_obj_flags,
5627 { "Flags", "pcep.obj.no_path.flags",
5628 FT_UINT16, BASE_HEX, NULL, 0x0,
5629 NULL, HFILL }
5631 { &hf_pcep_no_path_obj_reserved,
5632 { "Reserved", "pcep.obj.no_path.reserved",
5633 FT_UINT8, BASE_HEX, NULL, 0x0,
5634 NULL, HFILL }
5636 { &hf_pcep_end_point_obj_source_ipv4_address,
5637 { "Source IPv4 Address", "pcep.obj.end_point.source_ipv4_address",
5638 FT_IPv4, BASE_NONE, NULL, 0x0,
5639 NULL, HFILL }
5641 { &hf_pcep_end_point_obj_destination_ipv4_address,
5642 { "Destination IPv4 Address", "pcep.obj.end_point.destination_ipv4_address",
5643 FT_IPv4, BASE_NONE, NULL, 0x0,
5644 NULL, HFILL }
5646 { &hf_pcep_end_point_obj_source_ipv6_address,
5647 { "Source IPv6 Address", "pcep.obj.end_point.source_ipv6_address",
5648 FT_IPv6, BASE_NONE, NULL, 0x0,
5649 NULL, HFILL }
5651 { &hf_pcep_end_point_obj_destination_ipv6_address,
5652 { "Destination IPv6 Address", "pcep.obj.end_point.destination_ipv6_address",
5653 FT_IPv6, BASE_NONE, NULL, 0x0,
5654 NULL, HFILL }
5656 { &hf_pcep_bandwidth,
5657 { "Bandwidth", "pcep.bandwidth",
5658 FT_FLOAT, BASE_NONE, NULL, 0x0,
5659 NULL, HFILL }
5661 { &hf_pcep_metric_obj_reserved,
5662 { "Reserved", "pcep.obj.metric.reserved",
5663 FT_UINT16, BASE_DEC, NULL, 0x0,
5664 NULL, HFILL }
5666 { &hf_pcep_metric_obj_flags,
5667 { "Flags", "pcep.obj.metric.flags",
5668 FT_UINT8, BASE_HEX, NULL, 0x0,
5669 NULL, HFILL }
5671 { &hf_pcep_metric_obj_type,
5672 { "Type", "pcep.obj.metric.type",
5673 FT_UINT8, BASE_DEC, VALS(pcep_metric_obj_vals), 0x0,
5674 NULL, HFILL }
5676 { &hf_pcep_metric_obj_metric_value,
5677 { "Metric Value", "pcep.obj.metric.metric_value",
5678 FT_FLOAT, BASE_NONE, NULL, 0x0,
5679 NULL, HFILL }
5681 { &hf_pcep_lspa_obj_exclude_any,
5682 { "Exclude-Any", "pcep.obj.lspa.exclude_any",
5683 FT_UINT32, BASE_HEX, NULL, 0x0,
5684 NULL, HFILL }
5686 { &hf_pcep_lspa_obj_include_any,
5687 { "Include-Any", "pcep.obj.lspa.include_any",
5688 FT_UINT32, BASE_HEX, NULL, 0x0,
5689 NULL, HFILL }
5691 { &hf_pcep_lspa_obj_include_all,
5692 { "Include-All", "pcep.obj.lspa.include_all",
5693 FT_UINT32, BASE_HEX, NULL, 0x0,
5694 NULL, HFILL }
5696 { &hf_pcep_lspa_obj_setup_priority,
5697 { "Setup Priority", "pcep.obj.lspa.setup_priority",
5698 FT_UINT8, BASE_DEC, NULL, 0x0,
5699 NULL, HFILL }
5701 { &hf_pcep_lspa_obj_holding_priority,
5702 { "Holding Priority", "pcep.obj.lspa.holding_priority",
5703 FT_UINT8, BASE_DEC, NULL, 0x0,
5704 NULL, HFILL }
5706 { &hf_pcep_lspa_obj_flags,
5707 { "Flags", "pcep.obj.lspa.flags",
5708 FT_UINT8, BASE_HEX, NULL, 0x0,
5709 NULL, HFILL }
5711 { &hf_pcep_lspa_obj_reserved,
5712 { "Reserved", "pcep.obj.lspa.reserved",
5713 FT_UINT8, BASE_HEX, NULL, 0x0,
5714 NULL, HFILL }
5716 { &hf_pcep_svec_obj_reserved,
5717 { "Reserved", "pcep.obj.svec.reserved",
5718 FT_UINT8, BASE_HEX, NULL, 0x0,
5719 NULL, HFILL }
5721 { &hf_pcep_svec_obj_flags,
5722 { "Flags", "pcep.obj.svec.flags",
5723 FT_UINT24, BASE_HEX, NULL, 0x0,
5724 NULL, HFILL }
5726 { &hf_pcep_svec_obj_request_id_number,
5727 { "Request-ID-Number", "pcep.obj.svec.request_id_number",
5728 FT_UINT32, BASE_DEC, NULL, 0x0,
5729 NULL, HFILL }
5731 { &hf_pcep_notification_obj_reserved,
5732 { "Reserved", "pcep.obj.notification.reserved",
5733 FT_UINT8, BASE_HEX, NULL, 0x0,
5734 NULL, HFILL }
5736 { &hf_pcep_notification_obj_flags,
5737 { "Flags", "pcep.obj.notification.flags",
5738 FT_UINT8, BASE_HEX, NULL, 0x0,
5739 NULL, HFILL }
5741 { &hf_pcep_notification_obj_type,
5742 { "Notification Type", "pcep.obj.notification.type",
5743 FT_UINT8, BASE_DEC, NULL, 0x0,
5744 NULL, HFILL }
5746 { &hf_pcep_notification_obj_value,
5747 { "Notification Value", "pcep.obj.notification.value",
5748 FT_UINT8, BASE_HEX, NULL, 0x0,
5749 NULL, HFILL }
5751 { &hf_pcep_error_obj_reserved,
5752 { "Reserved", "pcep.obj.error.reserved",
5753 FT_UINT8, BASE_HEX, NULL, 0x0,
5754 NULL, HFILL }
5756 { &hf_pcep_error_obj_flags,
5757 { "Flags", "pcep.obj.error.flags",
5758 FT_UINT8, BASE_HEX, NULL, 0x0,
5759 NULL, HFILL }
5761 { &hf_pcep_balancing_obj_reserved,
5762 { "Reserved", "pcep.obj.balancing.reserved",
5763 FT_UINT16, BASE_HEX, NULL, 0x0,
5764 NULL, HFILL }
5766 { &hf_pcep_balancing_obj_flags,
5767 { "Flags", "pcep.obj.balancing.flags",
5768 FT_UINT8, BASE_HEX, NULL, 0x0,
5769 NULL, HFILL }
5771 { &hf_pcep_balancing_obj_maximum_number_of_te_lsps,
5772 { "Maximum Number of TE LSPs", "pcep.obj.balancing.maximum_number_of_te_lsps",
5773 FT_UINT8, BASE_HEX, NULL, 0x0,
5774 NULL, HFILL }
5776 { &hf_pcep_balancing_obj_minimum_bandwidth,
5777 { "Minimum Bandwidth", "pcep.obj.balancing.minimum_bandwidth",
5778 FT_UINT32, BASE_HEX, NULL, 0x0,
5779 NULL, HFILL }
5781 { &hf_pcep_close_obj_reserved,
5782 { "Reserved", "pcep.obj.close.reserved",
5783 FT_UINT16, BASE_HEX, NULL, 0x0,
5784 NULL, HFILL }
5786 { &hf_pcep_close_obj_flags,
5787 { "Flags", "pcep.obj.close.flags",
5788 FT_UINT8, BASE_HEX, NULL, 0x0,
5789 NULL, HFILL }
5791 { &hf_pcep_close_obj_reason,
5792 { "Reason", "pcep.obj.close.reason",
5793 FT_UINT8, BASE_DEC, VALS(pcep_close_reason_obj_vals), 0x0,
5794 NULL, HFILL }
5796 { &hf_pcep_xro_obj_reserved,
5797 { "Reserved", "pcep.obj.xro.reserved",
5798 FT_UINT16, BASE_HEX, NULL, 0x0,
5799 NULL, HFILL }
5801 { &hf_pcep_xro_obj_flags,
5802 { "Flags", "pcep.obj.xro.flags",
5803 FT_UINT16, BASE_HEX, NULL, 0x0,
5804 NULL, HFILL }
5806 { &hf_pcep_obj_monitoring_reserved,
5807 { "Reserved", "pcep.obj.monitoring.reserved",
5808 FT_UINT8, BASE_HEX, NULL, 0x0,
5809 NULL, HFILL }
5811 { &hf_pcep_obj_monitoring_flags,
5812 { "Flags", "pcep.obj.monitoring.flags",
5813 FT_UINT24, BASE_HEX, NULL, 0x0,
5814 NULL, HFILL }
5816 { &hf_pcep_obj_of_code,
5817 { "OF-Code", "pcep.obj.of.code",
5818 FT_UINT16, BASE_DEC, VALS(pcep_of_vals), 0x0,
5819 NULL, HFILL }
5821 { &hf_pcep_obj_proc_time_reserved,
5822 { "Reserved", "pcep.obj.proc_time.reserved",
5823 FT_UINT16, BASE_HEX, NULL, 0x0,
5824 NULL, HFILL }
5826 { &hf_pcep_obj_proc_time_flags,
5827 { "Flags", "pcep.obj.proc_time.flags",
5828 FT_UINT16, BASE_HEX, NULL, 0x0,
5829 NULL, HFILL }
5831 { &hf_pcep_obj_overload_flags,
5832 { "Flags", "pcep.obj.overload.flags",
5833 FT_UINT8, BASE_HEX, NULL, 0x0,
5834 NULL, HFILL }
5836 { &hf_pcep_obj_overload_reserved,
5837 { "Reserved", "pcep.obj.overload.reserved",
5838 FT_UINT8, BASE_HEX, NULL, 0x0,
5839 NULL, HFILL }
5841 { &hf_pcep_object_type,
5842 { "Object Type", "pcep.object_type",
5843 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
5844 NULL, HFILL }
5846 { &hf_pcep_object_length,
5847 { "Object Length", "pcep.object_length",
5848 FT_UINT16, BASE_DEC, NULL, 0x0,
5849 NULL, HFILL }
5851 { &hf_pcep_version,
5852 { "PCEP Version", "pcep.version",
5853 FT_UINT8, BASE_HEX, NULL, 0x20,
5854 NULL, HFILL }
5856 { &hf_pcep_flags,
5857 { "Flags", "pcep.flags",
5858 FT_UINT8, BASE_HEX, NULL, 0x1F,
5859 NULL, HFILL }
5861 { &hf_pcep_message_length,
5862 { "Message length", "pcep.msg_length",
5863 FT_UINT16, BASE_DEC, NULL, 0x0,
5864 NULL, HFILL }
5866 { &hf_pcep_of_code,
5867 { "OF-Code", "pcep.of_code",
5868 FT_UINT16, BASE_DEC, VALS(pcep_of_vals), 0x0,
5869 NULL, HFILL }
5871 { &hf_pcep_subobj_ipv4_l,
5872 { "L", "pcep.subobj.ipv4.l",
5873 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5874 NULL, HFILL }
5876 { &hf_pcep_subobj_iro_ipv4_l,
5877 { "L", "pcep.iro.subobj.ipv4.l",
5878 FT_UINT8, BASE_HEX, NULL, Mask_L,
5879 NULL, HFILL }
5881 { &hf_pcep_subobj_ipv4_x,
5882 { "X", "pcep.subobj.ipv4.x",
5883 FT_UINT8, BASE_HEX, NULL, 0x80,
5884 NULL, HFILL }
5886 { &hf_pcep_subobj_ipv6_l,
5887 { "L", "pcep.subobj.ipv6.l",
5888 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5889 NULL, HFILL }
5891 { &hf_pcep_subobj_iro_ipv6_l,
5892 { "L", "pcep.iro.subobj.ipv6.l",
5893 FT_UINT8, BASE_HEX, NULL, Mask_L,
5894 NULL, HFILL }
5896 { &hf_pcep_subobj_ipv6_x,
5897 { "X", "pcep.subobj.ipv6.x",
5898 FT_UINT8, BASE_HEX, NULL, 0x80,
5899 NULL, HFILL }
5901 { &hf_pcep_subobj_label_control_l,
5902 { "L", "pcep.subobj.label_control.l",
5903 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5904 NULL, HFILL }
5906 { &hf_pcep_subobj_unnumb_interfaceID_l,
5907 { "L", "pcep.subobj.unnumb_interfaceID.l",
5908 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5909 NULL, HFILL }
5911 { &hf_pcep_subobj_iro_unnumb_interfaceID_l,
5912 { "L", "pcep.iro.subobj.unnumb_interfaceID.l",
5913 FT_UINT8, BASE_HEX, NULL, Mask_L,
5914 NULL, HFILL }
5916 { &hf_pcep_subobj_unnumb_interfaceID_x,
5917 { "X", "pcep.subobj.unnumb_interfaceID.x",
5918 FT_UINT8, BASE_HEX, NULL, 0x80,
5919 NULL, HFILL }
5921 { &hf_pcep_subobj_autonomous_sys_num_x,
5922 { "X", "pcep.subobj.autonomous_sys_num.x",
5923 FT_UINT8, BASE_HEX, NULL, 0x80,
5924 NULL, HFILL }
5926 { &hf_pcep_subobj_iro_autonomous_sys_num_l,
5927 { "L", "pcep.iro.subobj.autonomous_sys_num.l",
5928 FT_UINT8, BASE_HEX, NULL, Mask_L,
5929 NULL, HFILL }
5931 { &hf_pcep_subobj_autonomous_sys_num_l,
5932 { "L", "pcep.subobj.autonomous_sys_num.l",
5933 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5934 NULL, HFILL }
5936 { &hf_pcep_subobj_srlg_x,
5937 { "X", "pcep.subobj.srlg.x",
5938 FT_UINT8, BASE_HEX, NULL, 0x80,
5939 NULL, HFILL }
5941 { &hf_pcep_subobj_exrs_l,
5942 { "L", "pcep.subobj.exrs.l",
5943 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5944 NULL, HFILL }
5946 { &hf_pcep_subobj_exrs_type,
5947 { "Type", "pcep.subobj.exrs.type",
5948 FT_UINT8, BASE_DEC, NULL, 0x7F,
5949 NULL, HFILL }
5951 { &hf_pcep_subobj_pksv4_l,
5952 { "L", "pcep.subobj.pksv4.l",
5953 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5954 NULL, HFILL }
5956 { &hf_pcep_subobj_pksv6_l,
5957 { "L", "pcep.subobj.pksv6.l",
5958 FT_UINT8, BASE_DEC, VALS(pcep_route_l_obj_vals), Mask_L,
5959 NULL, HFILL }
5961 { &hf_pcep_no_path_obj_nature_of_issue,
5962 { "Nature of Issue", "pcep.obj.no_path.nature_of_issue",
5963 FT_UINT8, BASE_DEC, VALS(pcep_no_path_obj_vals), 0x0,
5964 NULL, HFILL }
5966 { &hf_pcep_obj_srp_id_number,
5967 { "SRP-ID-number", "pcep.obj.srp.id-number",
5968 FT_UINT32, BASE_DEC, NULL, 0x0,
5969 NULL, HFILL }
5971 { &hf_pcep_obj_lsp_plsp_id,
5972 { "PLSP-ID", "pcep.obj.lsp.plsp-id",
5973 FT_UINT32, BASE_DEC, NULL, PCEP_OBJ_LSP_PLSP_ID,
5974 NULL, HFILL }
5976 { &hf_pcep_obj_lsp_flags,
5977 { "Flags", "pcep.obj.lsp.flags",
5978 FT_UINT24, BASE_HEX, NULL, 0x0,
5979 NULL, HFILL }
5981 { &hf_pcep_obj_lsp_flags_d,
5982 { "Delegate (D)", "pcep.obj.lsp.flags.delegate",
5983 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_D,
5984 NULL, HFILL }
5986 { &hf_pcep_obj_lsp_flags_s,
5987 { "SYNC (S)", "pcep.obj.lsp.flags.sync",
5988 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_S,
5989 NULL, HFILL }
5991 { &hf_pcep_obj_lsp_flags_r,
5992 { "Remove (R)", "pcep.obj.lsp.flags.remove",
5993 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_R,
5994 NULL, HFILL }
5996 { &hf_pcep_obj_lsp_flags_a,
5997 { "Administrative (A)", "pcep.obj.lsp.flags.administrative",
5998 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_A,
5999 NULL, HFILL }
6001 { &hf_pcep_obj_lsp_flags_o,
6002 { "Operational (O)", "pcep.obj.lsp.flags.operational",
6003 FT_UINT16, BASE_DEC, VALS(pcep_object_lsp_flags_operational_vals), PCEP_OBJ_LSP_FLAGS_O,
6004 NULL, HFILL }
6006 { &hf_pcep_obj_lsp_flags_c,
6007 { "Create (C)", "pcep.obj.lsp.flags.create",
6008 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_C,
6009 NULL, HFILL }
6011 { &hf_pcep_obj_lsp_flags_reserved,
6012 { "Reserved", "pcep.obj.lsp.flags.reserved",
6013 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_LSP_FLAGS_RESERVED,
6014 NULL, HFILL }
6016 { &hf_pcep_obj_srp_flags,
6017 { "Flags", "pcep.obj.srp.flags",
6018 FT_UINT32, BASE_HEX, NULL, 0x0,
6019 NULL, HFILL }
6021 { &hf_pcep_obj_srp_flags_r,
6022 { "Remove (R)", "pcep.obj.srp.flags.remove",
6023 FT_BOOLEAN, 32, TFS(&tfs_set_notset), PCEP_OBJ_SRP_FLAGS_R,
6024 NULL, HFILL }
6026 { &hf_pcep_symbolic_path_name,
6027 { "SYMBOLIC-PATH-NAME", "pcep.tlv.symbolic-path-name",
6028 FT_STRING, BASE_NONE, NULL, 0x0,
6029 NULL, HFILL }
6031 { &hf_pcep_ipv4_lsp_id_tunnel_sender_address,
6032 { "IPv4 Tunnel Sender Address", "pcep.tlv.ipv4-lsp-id.tunnel-sender-addr",
6033 FT_IPv4, BASE_NONE, NULL, 0x0,
6034 NULL, HFILL }
6036 { &hf_pcep_ipv4_lsp_id_lsp_id,
6037 { "LSP ID", "pcep.tlv.ipv4-lsp-id.lsp-id",
6038 FT_UINT16, BASE_DEC, NULL, 0x0,
6039 NULL, HFILL }
6041 { &hf_pcep_ipv4_lsp_id_tunnel_id,
6042 { "Tunnel ID", "pcep.tlv.ipv4-lsp-id.tunnel-id",
6043 FT_UINT16, BASE_DEC, NULL, 0x0,
6044 NULL, HFILL }
6046 { &hf_pcep_ipv4_lsp_id_extended_tunnel_id,
6047 { "Extended Tunnel ID", "pcep.tlv.ipv4-lsp-id.extended-tunnel-id",
6048 FT_IPv4, BASE_NONE, NULL, 0x0,
6049 NULL, HFILL }
6051 { &hf_pcep_ipv4_lsp_id_tunnel_endpoint_address,
6052 { "IPv4 Tunnel Endpoint Address", "pcep.tlv.ipv4-lsp-id.tunnel-endpoint-addr",
6053 FT_IPv4, BASE_NONE, NULL, 0x0,
6054 NULL, HFILL }
6056 { &hf_pcep_ipv6_lsp_id_tunnel_sender_address,
6057 { "IPv6 Tunnel Sender Address", "pcep.tlv.ipv6-lsp-id.tunnel-sender-addr",
6058 FT_IPv6, BASE_NONE, NULL, 0x0,
6059 NULL, HFILL }
6061 { &hf_pcep_ipv6_lsp_id_lsp_id,
6062 { "LSP ID", "pcep.tlv.ipv6-lsp-id.lsp-id",
6063 FT_UINT16, BASE_DEC, NULL, 0x0,
6064 NULL, HFILL }
6066 { &hf_pcep_ipv6_lsp_id_tunnel_id,
6067 { "Tunnel ID", "pcep.tlv.ipv6-lsp-id.tunnel-id",
6068 FT_UINT16, BASE_DEC, NULL, 0x0,
6069 NULL, HFILL }
6071 { &hf_pcep_ipv6_lsp_id_extended_tunnel_id,
6072 { "Extended Tunnel ID", "pcep.tlv.ipv6-lsp-id.extended-tunnel-id",
6073 FT_IPv6, BASE_NONE, NULL, 0x0,
6074 NULL, HFILL }
6076 { &hf_pcep_ipv6_lsp_id_tunnel_endpoint_address,
6077 { "IPv6 Tunnel Endpoint Address", "pcep.tlv.ipv6-lsp-id.tunnel-endpoint-addr",
6078 FT_IPv6, BASE_NONE, NULL, 0x0,
6079 NULL, HFILL }
6081 { &hf_pcep_lsp_error_code,
6082 { "LSP Error Code", "pcep.tlv.lsp-error-code",
6083 FT_UINT32, BASE_DEC, VALS(pcep_tlv_lsp_error_code_vals), 0x0,
6084 NULL, HFILL }
6086 { &hf_pcep_rsvp_user_error_spec,
6087 { "RSVP/USER ERROR_SPEC", "pcep.tlv.rsvp-user-error-spec",
6088 FT_STRING, BASE_NONE, NULL, 0x0,
6089 NULL, HFILL }
6091 { &hf_pcep_lsp_state_db_version_number,
6092 { "LSP State DB Version Number", "pcep.tlv.lsp-state-db-version-number",
6093 FT_UINT64, BASE_DEC, NULL, 0x0,
6094 NULL, HFILL }
6096 { &hf_pcep_speaker_entity_id,
6097 { "Speaker Entity Identifier", "pcep.tlv.speaker-entity-id",
6098 FT_STRING, BASE_NONE, NULL, 0x0,
6099 NULL, HFILL }
6101 { &hf_pcep_association_reserved,
6102 { "Reserved", "pcep.association.reserved",
6103 FT_UINT16, BASE_HEX, NULL, 0x0,
6104 NULL, HFILL }
6106 { &hf_pcep_association_flags,
6107 { "Flags", "pcep.association.flags",
6108 FT_UINT16, BASE_HEX, NULL, 0x0,
6109 NULL, HFILL }
6111 { &hf_pcep_association_flags_r,
6112 { "Remove (R)", "pcep.association.flags.r",
6113 FT_BOOLEAN, 16, TFS(&tfs_set_notset), PCEP_OBJ_ASSOCIATION_FLAGS_R,
6114 NULL, HFILL }
6116 { &hf_pcep_association_type,
6117 { "Association Type", "pcep.association.type",
6118 FT_UINT16, BASE_DEC, VALS(pcep_association_type_field_vals), 0x0,
6119 NULL, HFILL }
6121 { &hf_pcep_association_id,
6122 { "Association ID", "pcep.association.id",
6123 FT_UINT16, BASE_DEC, NULL, 0x0,
6124 NULL, HFILL }
6126 { &hf_pcep_association_source_ipv4,
6127 { "IPv4 Association Source", "pcep.association.ipv4.source",
6128 FT_IPv4, BASE_NONE, NULL, 0x0,
6129 NULL, HFILL }
6131 { &hf_pcep_association_source_ipv6,
6132 { "IPv6 Association Source", "pcep.association.ipv6.source",
6133 FT_IPv6, BASE_NONE, NULL, 0x0,
6134 NULL, HFILL }
6136 { &hf_pcep_association_source_global,
6137 { "Global Association Source", "pcep.association.global.source",
6138 FT_UINT32, BASE_DEC, NULL, 0x0,
6139 NULL, HFILL }
6141 { &hf_pcep_association_id_extended,
6142 { "Extended Association ID", "pcep.tlv.extended_association_id.id",
6143 FT_BYTES, BASE_NONE, NULL, 0x0,
6144 NULL, HFILL }
6146 { &hf_pcep_association_id_extended_color,
6147 { "Color", "pcep.tlv.extended_association_id.color",
6148 FT_UINT32, BASE_DEC, NULL, 0x0,
6149 NULL, HFILL }
6151 { &hf_pcep_association_id_extended_ipv4_endpoint,
6152 { "IPv4 Endpoint", "pcep.tlv.extended_association_id.ipv4_endpoint",
6153 FT_IPv4, BASE_NONE, NULL, 0x0,
6154 NULL, HFILL }
6156 { &hf_pcep_association_id_extended_ipv6_endpoint,
6157 { "IPv6 Endpoint", "pcep.tlv.extended_association_id.ipv6_endpoint",
6158 FT_IPv6, BASE_NONE, NULL, 0x0,
6159 NULL, HFILL }
6161 { &hf_pcep_op_conf_assoc_range_reserved,
6162 { "Reserved", "pcep.op_conf_assoc_range.reserved",
6163 FT_BYTES, BASE_NONE, NULL, 0x0,
6164 NULL, HFILL }
6166 { &hf_pcep_op_conf_assoc_range_assoc_type,
6167 { "Assoc-Type", "pcep.op_conf_assoc_range.assoc_type",
6168 FT_UINT16, BASE_DEC, NULL, 0x0,
6169 NULL, HFILL }
6171 { &hf_pcep_op_conf_assoc_range_start_assoc,
6172 { "Start-Assoc", "pcep.op_conf_assoc_range.start_assoc",
6173 FT_UINT16, BASE_DEC, NULL, 0x0,
6174 NULL, HFILL }
6176 { &hf_pcep_op_conf_assoc_range_range,
6177 { "Range", "pcep.op_conf_assoc_range.range",
6178 FT_UINT16, BASE_DEC, NULL, 0x0,
6179 NULL, HFILL }
6181 { &hf_pcep_srcpag_info_color,
6182 { "Color", "pcep.srcpag_info.color",
6183 FT_UINT32, BASE_DEC, NULL, 0x0,
6184 NULL, HFILL }
6186 { &hf_pcep_srcpag_info_destination_endpoint,
6187 { "Destination End-point", "pcep.srcpag_info.destination_endpoint",
6188 FT_IPv4, BASE_NONE, NULL, 0x0,
6189 NULL, HFILL }
6191 { &hf_pcep_srcpag_info_preference,
6192 { "Preference", "pcep.srcpag_info.preference",
6193 FT_UINT32, BASE_DEC, NULL, 0x0,
6194 NULL, HFILL }
6196 { &hf_pcep_sr_policy_name,
6197 { "SR Policy Name", "pcep.tlv.sr_policy_name",
6198 FT_STRING, BASE_NONE, NULL, 0x0,
6199 NULL, HFILL }
6201 { &hf_pcep_sr_policy_cpath_id_proto_origin,
6202 { "Proto origin", "pcep.tlv.sr_policy_cpath_id.proto_origin",
6203 FT_UINT8, BASE_DEC, VALS(pcep_sr_policy_id_proto_origin_vals), 0x0,
6204 NULL, HFILL }
6206 { &hf_pcep_sr_policy_cpath_id_originator_asn,
6207 { "Originator ASN", "pcep.tlv.sr_policy_cpath_id.originator_asn",
6208 FT_UINT32, BASE_DEC, NULL, 0x0,
6209 NULL, HFILL }
6211 { &hf_pcep_sr_policy_cpath_id_originator_address,
6212 { "IPv4 Originator Address", "pcep.tlv.sr_policy_cpath_id.originator_ipv4_address",
6213 FT_IPv4, BASE_NONE, NULL, 0x0,
6214 NULL, HFILL }
6216 { &hf_pcep_sr_policy_cpath_id_discriminator,
6217 { "Discriminator", "pcep.tlv.sr_policy_cpath_id.proto_discriminator",
6218 FT_UINT32, BASE_DEC, NULL, 0x0,
6219 NULL, HFILL }
6221 { &hf_pcep_sr_policy_cpath_name,
6222 { "SR Policy Candidate Path Name", "pcep.tlv.sr_policy_cpath_name",
6223 FT_STRING, BASE_NONE, NULL, 0x0,
6224 NULL, HFILL }
6226 { &hf_pcep_sr_policy_cpath_preference,
6227 { "Preference", "pcep.tlv.sr_policy_cpath_preference",
6228 FT_UINT32, BASE_DEC, NULL, 0x0,
6229 NULL, HFILL }
6231 { &hf_pcep_enterprise_number,
6232 { "Enterprise Number", "pcep.vendor-information.enterprise-number",
6233 FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0,
6234 "IANA Private Enterprise Number", HFILL }
6236 { &hf_pcep_enterprise_specific_info,
6237 { "Enterprise-Specific Information", "pcep.vendor-information.enterprise-specific-info",
6238 FT_BYTES, BASE_NONE, NULL, 0x0,
6239 NULL, HFILL }
6241 { &hf_pcep_tlv_enterprise_number,
6242 { "Enterprise Number", "pcep.tlv.enterprise-number",
6243 FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0,
6244 "IANA Private Enterprise Number", HFILL }
6246 { &hf_pcep_tlv_enterprise_specific_info,
6247 { "Enterprise-Specific Information", "pcep.tlv.enterprise-specific-info",
6248 FT_BYTES, BASE_NONE, NULL, 0x0,
6249 NULL, HFILL }
6251 { &hf_pcep_bu_reserved,
6252 { "Reserved", "pcep.obj.bu.reserved",
6253 FT_UINT32, BASE_HEX, NULL, 0x0,
6254 NULL, HFILL }
6256 { &hf_pcep_bu_butype,
6257 { "Type", "pcep.obj.bu.butype",
6258 FT_UINT8, BASE_DEC, VALS(pcep_bu_butype_vals), 0x0,
6259 NULL, HFILL }
6261 { &hf_pcep_bu_utilization,
6262 { "Bandwidth Utilization", "pcep.obj.bu.utilization",
6263 FT_FLOAT, BASE_NONE, NULL, 0x0,
6264 "The bandwidth utilization quantified as a percentage and encoded in IEEE floating point format", HFILL }
6266 { &hf_pcep_obj_open_type,
6267 { "OPEN Object-Type", "pcep.obj.open.type",
6268 FT_UINT8, BASE_DEC, VALS(pcep_obj_open_type_vals), MASK_OBJ_TYPE,
6269 NULL, HFILL }
6272 { &hf_pcep_obj_rp_type,
6273 { "RP Object-Type", "pcep.obj.rp.type",
6274 FT_UINT8, BASE_DEC, VALS(pcep_obj_rp_type_vals), MASK_OBJ_TYPE,
6275 NULL, HFILL }
6278 { &hf_pcep_obj_no_path_type,
6279 { "NO-PATH Object-Type", "pcep.obj.nopath.type",
6280 FT_UINT8, BASE_DEC, VALS(pcep_obj_no_path_type_vals), MASK_OBJ_TYPE,
6281 NULL, HFILL }
6284 { &hf_pcep_obj_end_point_type,
6285 { "END-POINT Object-Type", "pcep.obj.endpoint.type",
6286 FT_UINT8, BASE_DEC, VALS(pcep_obj_end_point_type_vals), MASK_OBJ_TYPE,
6287 NULL, HFILL }
6290 { &hf_pcep_obj_bandwidth_type,
6291 { "BANDWIDTH Object-Type", "pcep.obj.bandwidth.type",
6292 FT_UINT8, BASE_DEC, VALS(pcep_obj_bandwidth_type_vals), MASK_OBJ_TYPE,
6293 NULL, HFILL }
6296 { &hf_pcep_obj_metric_type,
6297 { "METRIC Object-Type", "pcep.obj.metric.type",
6298 FT_UINT8, BASE_DEC, VALS(pcep_obj_metric_type_vals), MASK_OBJ_TYPE,
6299 NULL, HFILL }
6302 { &hf_pcep_obj_explicit_route_type,
6303 { "ERO Object-Type", "pcep.obj.ero.type",
6304 FT_UINT8, BASE_DEC, VALS(pcep_obj_explicit_route_type_vals), MASK_OBJ_TYPE,
6305 NULL, HFILL }
6308 { &hf_pcep_obj_record_route_type,
6309 { "RRO Object-Type", "pcep.obj.rro.type",
6310 FT_UINT8, BASE_DEC, VALS(pcep_obj_record_route_type_vals), MASK_OBJ_TYPE,
6311 NULL, HFILL }
6314 { &hf_pcep_obj_lspa_type,
6315 { "LSPA Object-Type", "pcep.obj.lspa.type",
6316 FT_UINT8, BASE_DEC, VALS(pcep_obj_lspa_type_vals), MASK_OBJ_TYPE,
6317 NULL, HFILL }
6320 { &hf_pcep_obj_iro_type,
6321 { "IRO Object-Type", "pcep.obj.iro.type",
6322 FT_UINT8, BASE_DEC, VALS(pcep_obj_iro_type_vals), MASK_OBJ_TYPE,
6323 NULL, HFILL }
6326 { &hf_pcep_obj_svec_type,
6327 { "SVEC Object-Type", "pcep.obj.svec.type",
6328 FT_UINT8, BASE_DEC, VALS(pcep_obj_svec_type_vals), MASK_OBJ_TYPE,
6329 NULL, HFILL }
6332 { &hf_pcep_obj_notification_type,
6333 { "NOTIFICATION Object-Type", "pcep.obj.notification.type",
6334 FT_UINT8, BASE_DEC, VALS(pcep_obj_notification_type_vals), MASK_OBJ_TYPE,
6335 NULL, HFILL }
6338 { &hf_pcep_obj_pcep_error_type,
6339 { "PCEP-ERROR Object-Type", "pcep.obj.error.type",
6340 FT_UINT8, BASE_DEC, VALS(pcep_obj_pcep_error_type_vals), MASK_OBJ_TYPE,
6341 NULL, HFILL }
6344 { &hf_pcep_obj_load_balancing_type,
6345 { "LOAD-BALANCING Object-Type", "pcep.obj.loadbalancing.type",
6346 FT_UINT8, BASE_DEC, VALS(pcep_obj_load_balancing_type_vals), MASK_OBJ_TYPE,
6347 NULL, HFILL }
6350 { &hf_pcep_obj_close_type,
6351 { "CLOSE Object-Type", "pcep.obj.close.type",
6352 FT_UINT8, BASE_DEC, VALS(pcep_obj_close_type_vals), MASK_OBJ_TYPE,
6353 NULL, HFILL }
6356 { &hf_pcep_obj_path_key_type,
6357 { "PATH-KEY Object-Type", "pcep.obj.path_key.type",
6358 FT_UINT8, BASE_DEC, VALS(pcep_obj_path_key_type_vals), MASK_OBJ_TYPE,
6359 NULL, HFILL }
6362 { &hf_pcep_obj_xro_type,
6363 { "XRO Object-Type", "pcep.obj.xro.type",
6364 FT_UINT8, BASE_DEC, VALS(pcep_obj_xro_type_vals), MASK_OBJ_TYPE,
6365 NULL, HFILL }
6368 { &hf_pcep_obj_monitoring_type,
6369 { "MONITORING Object-Type", "pcep.obj.monitoring.type",
6370 FT_UINT8, BASE_DEC, VALS(pcep_obj_monitoring_type_vals), MASK_OBJ_TYPE,
6371 NULL, HFILL }
6374 { &hf_pcep_obj_pcc_id_req_type,
6375 { "PCC-REQ-ID Object-Type", "pcep.obj.pccidreq.type",
6376 FT_UINT8, BASE_DEC, VALS(pcep_obj_pcc_id_req_type_vals), MASK_OBJ_TYPE,
6377 NULL, HFILL }
6380 { &hf_pcep_obj_of_type,
6381 { "OF Object-Type", "pcep.obj.of.type",
6382 FT_UINT8, BASE_DEC, VALS(pcep_obj_of_type_vals), MASK_OBJ_TYPE,
6383 NULL, HFILL }
6386 { &hf_pcep_obj_classtype,
6387 { "CLASSTYPE Type", "pcep.obj.classtype.type",
6388 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6389 NULL, HFILL }
6392 { &hf_pcep_obj_global_constraints,
6393 { "Global-Constraints Type", "pcep.obj.global_constraints.type",
6394 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6395 NULL, HFILL }
6398 { &hf_pcep_obj_pce_id_type,
6399 { "PCE-ID Object-Type", "pcep.obj.pceid.type",
6400 FT_UINT8, BASE_DEC, VALS(pcep_obj_pce_id_type_vals), MASK_OBJ_TYPE,
6401 NULL, HFILL }
6404 { &hf_pcep_obj_proc_time_type,
6405 { "PROC-TIME Object-Type", "pcep.obj.proctime.type",
6406 FT_UINT8, BASE_DEC, VALS(pcep_obj_proc_time_type_vals), MASK_OBJ_TYPE,
6407 NULL, HFILL }
6410 { &hf_pcep_obj_overload_type,
6411 { "OVERLOAD Object-Type", "pcep.obj.overload.type",
6412 FT_UINT8, BASE_DEC, VALS(pcep_obj_overload_type_vals), MASK_OBJ_TYPE,
6413 NULL, HFILL }
6416 { &hf_pcep_obj_unreach_destination_type,
6417 { "UNREACH-DESTINATION Object-Type", "pcep.obj.unreach-destination.type",
6418 FT_UINT8, BASE_DEC, VALS(pcep_obj_unreach_destination_type_vals), MASK_OBJ_TYPE,
6419 NULL, HFILL }
6422 { &hf_pcep_obj_sero_type,
6423 { "SERO Object-Type", "pcep.obj.sero.type",
6424 FT_UINT8, BASE_DEC, VALS(pcep_obj_sero_type_vals), MASK_OBJ_TYPE,
6425 NULL, HFILL }
6428 { &hf_pcep_obj_srro_type,
6429 { "SRRO Object-Type", "pcep.obj.srro.type",
6430 FT_UINT8, BASE_DEC, VALS(pcep_obj_srro_type_vals), MASK_OBJ_TYPE,
6431 NULL, HFILL }
6434 { &hf_pcep_obj_branch_node_capability_type,
6435 { "Branch Node Capability Object-Type", "pcep.obj.branch-node-capability.type",
6436 FT_UINT8, BASE_DEC, VALS(pcep_obj_branch_node_capability_type_vals), MASK_OBJ_TYPE,
6437 NULL, HFILL }
6440 { &hf_pcep_obj_lsp_type,
6441 { "LSP Object-Type", "pcep.obj.lsp.type",
6442 FT_UINT8, BASE_DEC, VALS(pcep_obj_lsp_type_vals), MASK_OBJ_TYPE,
6443 NULL, HFILL }
6446 { &hf_pcep_obj_srp_type,
6447 { "SRP Object-Type", "pcep.obj.srp.type",
6448 FT_UINT8, BASE_DEC, VALS(pcep_obj_srp_type_vals), MASK_OBJ_TYPE,
6449 NULL, HFILL }
6452 { &hf_pcep_obj_vendor_information_type,
6453 { "VENDOR-INFORMATION Object-Type", "pcep.obj.vendor-information.type",
6454 FT_UINT8, BASE_DEC, VALS(pcep_obj_vendor_information_type_vals), MASK_OBJ_TYPE,
6455 NULL, HFILL }
6458 { &hf_pcep_obj_bu_type,
6459 { "BU Object-Type", "pcep.obj.bu.type",
6460 FT_UINT8, BASE_DEC, VALS(pcep_obj_bu_type_vals), MASK_OBJ_TYPE,
6461 NULL, HFILL }
6464 { &hf_pcep_obj_inter_layer_type,
6465 { "Inter-Layer Type", "pcep.obj.inter_layer.type",
6466 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6467 NULL, HFILL }
6470 { &hf_pcep_obj_switch_layer_type,
6471 { "Switch-Layer Type", "pcep.obj.switch_layer.type",
6472 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6473 NULL, HFILL }
6476 { &hf_pcep_obj_req_adap_cap_type,
6477 { "REQ_ADAP_CAP Type", "pcep.obj.req_adap_cap.type",
6478 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6479 NULL, HFILL }
6482 { &hf_pcep_obj_server_ind_type,
6483 { "Server-Indication Type", "pcep.obj.server_indication.type",
6484 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6485 NULL, HFILL }
6488 { &hf_pcep_obj_association_type,
6489 { "ASSOCIATION Object-Type", "pcep.obj.association.type",
6490 FT_UINT8, BASE_DEC, VALS(pcep_obj_association_type_vals), MASK_OBJ_TYPE,
6491 NULL, HFILL }
6494 { &hf_pcep_obj_s2ls_type,
6495 { "S2LS Type", "pcep.obj.s2ls.type",
6496 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6497 NULL, HFILL }
6500 { &hf_pcep_obj_wa_type,
6501 { "Wavelength Assignment Type", "pcep.obj.wa.type",
6502 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6503 NULL, HFILL }
6506 { &hf_pcep_obj_flowspec_type,
6507 { "Flow Specification Type", "pcep.obj.flowspec.type",
6508 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6509 NULL, HFILL }
6512 { &hf_pcep_obj_cci_type,
6513 { "CCI Object-Type", "pcep.obj.cci_type.type",
6514 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6515 NULL, HFILL }
6518 { &hf_pcep_obj_path_attrib_type,
6519 { "Path-Attrib Type", "pcep.obj.path_attrib.type",
6520 FT_UINT8, BASE_DEC, NULL, MASK_OBJ_TYPE,
6521 NULL, HFILL }
6524 { &hf_pcep_path_setup_type_capability_sub_tlv_type,
6525 { "Type", "pcep.path-setup-type-capability-sub-tlv.type",
6526 FT_UINT16, BASE_DEC, VALS(pcep_path_setup_type_capability_sub_tlv_vals), 0x0,
6527 NULL, HFILL }
6530 { &hf_pcep_path_setup_type_capability_sub_tlv_length,
6531 { "Length", "pcep.path-setup-type-capability-sub-tlv.length",
6532 FT_UINT16, BASE_DEC, NULL, 0x0,
6533 NULL, HFILL }
6537 static int *ett[] = {
6538 &ett_pcep,
6539 &ett_pcep_hdr,
6540 &ett_pcep_obj_open,
6541 &ett_pcep_obj_request_parameters,
6542 &ett_pcep_obj_no_path,
6543 &ett_pcep_obj_end_point,
6544 &ett_pcep_obj_bandwidth,
6545 &ett_pcep_obj_metric,
6546 &ett_pcep_obj_explicit_route,
6547 &ett_pcep_obj_record_route,
6548 &ett_pcep_obj_lspa,
6549 &ett_pcep_obj_iro,
6550 &ett_pcep_obj_svec,
6551 &ett_pcep_obj_notification,
6552 &ett_pcep_obj_error,
6553 &ett_pcep_obj_load_balancing,
6554 &ett_pcep_obj_close,
6555 &ett_pcep_obj_path_key,
6556 &ett_pcep_obj_xro,
6557 &ett_pcep_obj_monitoring,
6558 &ett_pcep_obj_pcc_id_req,
6559 &ett_pcep_obj_of,
6560 &ett_pcep_obj_classtype,
6561 &ett_pcep_obj_global_constraints,
6562 &ett_pcep_obj_pce_id,
6563 &ett_pcep_obj_proc_time,
6564 &ett_pcep_obj_overload,
6565 &ett_pcep_obj_unreach_destination,
6566 &ett_pcep_obj_sero,
6567 &ett_pcep_obj_srro,
6568 &ett_pcep_obj_branch_node_capability,
6569 &ett_pcep_obj_lsp,
6570 &ett_pcep_obj_srp,
6571 &ett_pcep_obj_vendor_information,
6572 &ett_pcep_obj_bu,
6573 &ett_pcep_obj_inter_layer,
6574 &ett_pcep_obj_switch_layer,
6575 &ett_pcep_obj_req_adap_cap,
6576 &ett_pcep_obj_server_ind,
6577 &ett_pcep_obj_association,
6578 &ett_pcep_obj_s2ls,
6579 &ett_pcep_obj_wa,
6580 &ett_pcep_obj_flowspec,
6581 &ett_pcep_obj_cci_type,
6582 &ett_pcep_obj_path_attrib,
6583 &ett_pcep_obj_unknown,
6586 static ei_register_info ei[] = {
6587 /* Generated from convert_proto_tree_add_text.pl */
6588 { &ei_pcep_subobject_bad_length, { "pcep.subobject_bad_length", PI_MALFORMED, PI_WARN, "Bad subobject length", EXPFILL }},
6589 { &ei_pcep_non_defined_subobject, { "pcep.non_defined_subobject", PI_PROTOCOL, PI_WARN, "Non defined subobject for this object", EXPFILL }},
6590 { &ei_pcep_non_defined_object, { "pcep.unknown_object", PI_PROTOCOL, PI_WARN, "Unknown object", EXPFILL }},
6591 { &ei_pcep_object_length, { "pcep.object_length.bad", PI_MALFORMED, PI_WARN, "Object Length bogus", EXPFILL }},
6592 { &ei_pcep_pcep_object_body_non_defined, { "pcep.object_body_non_defined", PI_PROTOCOL, PI_WARN, "PCEP Object BODY non defined", EXPFILL }},
6593 { &ei_pcep_unknown_type_object, { "pcep.unknown_type_object", PI_PROTOCOL, PI_WARN, "UNKNOWN Type Object", EXPFILL }},
6596 expert_module_t* expert_pcep;
6598 /*Register the protocol name and description*/
6599 proto_pcep = proto_register_protocol (
6600 "Path Computation Element communication Protocol", "PCEP", "pcep");
6602 /* Required function calls to register the header fields and subtrees used */
6603 proto_register_field_array(proto_pcep, pcepf_info, array_length(pcepf_info));
6604 proto_register_subtree_array(ett, array_length(ett));
6605 expert_pcep = expert_register_protocol(proto_pcep);
6606 expert_register_field_array(expert_pcep, ei, array_length(ei));
6608 /* Register the dissector handle */
6609 pcep_handle = register_dissector("pcep", dissect_pcep, proto_pcep);
6612 /*Dissector Handoff*/
6613 void
6614 proto_reg_handoff_pcep(void)
6616 dissector_add_uint_with_preference("tcp.port", TCP_PORT_PCEP, pcep_handle);
6620 * Editor modelines
6622 * Local Variables:
6623 * c-basic-offset: 4
6624 * tab-width: 8
6625 * indent-tabs-mode: nil
6626 * End:
6628 * ex: set shiftwidth=4 tabstop=8 expandtab:
6629 * :indentSize=4:tabSize=8:noTabs=true: