2 * ISO 10747 Inter Domain Routing Protocol
3 * Routines for IDRP packet dissection.
4 * Copyright 2013, Mathias Guettler <guettler@web.de>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 * ISO 10747 Inter Domain Routing Protocol October 18, 1993
15 * Validation checksum calculation
23 #include <epan/packet.h>
24 #include <epan/expert.h>
25 #include <epan/nlpid.h>
27 #define IDRP_PROTO "ISO/IEC 10747 (1993): Inter Domain Routing Protocol "
29 void proto_register_idrp(void);
31 static int proto_idrp = -1;
32 static gint ett_idrp = -1;
33 static gint ett_idrp_sub = -1;
36 static int hf_idrp_li = -1;
37 static int hf_idrp_type = -1;
38 static int hf_idrp_sequence = -1;
39 static int hf_idrp_ack = -1;
40 static int hf_idrp_credit_offered = -1;
41 static int hf_idrp_credit_avail = -1;
42 static int hf_idrp_validation_pattern = -1;
44 static int hf_idrp_open_version = -1;
45 static int hf_idrp_open_hold_time = -1;
46 static int hf_idrp_open_max_pdu_size = -1;
47 static int hf_idrp_open_src_rdi = -1;
48 static int hf_idrp_open_rib_attr_locally_defined_qos_nsap = -1;
49 static int hf_idrp_open_rib_attr_locally_defined_qos_value = -1;
50 static int hf_idrp_open_rib_attr_locally_defined_qos_metric = -1;
51 static int hf_idrp_open_rib_attr_security_reg_id = -1;
52 static int hf_idrp_open_rib_attr_security_info = -1;
53 static int hf_idrp_open_number_of_confederations = -1;
54 static int hf_idrp_open_confederation = -1;
55 static int hf_idrp_open_authentication_code = -1;
56 static int hf_idrp_open_authentication_data = -1;
58 static int hf_idrp_update_number_of_unfeasible_routes = -1;
59 static int hf_idrp_update_withdrawn_route = -1;
60 static int hf_idrp_update_path_attr_flag = -1;
61 static int hf_idrp_update_path_attr_type = -1;
62 static int hf_idrp_update_path_attr_length = -1;
63 static int hf_idrp_update_path_attr_route_separator_id = -1;
64 static int hf_idrp_update_path_attr_route_separator_localpref = -1;
65 static int hf_idrp_update_path_attr_ext_info = -1;
66 static int hf_idrp_update_path_attr_rd_path_type = -1;
67 static int hf_idrp_update_path_attr_rd_path_segment_length = -1;
68 static int hf_idrp_update_path_attr_rd_path_rdi = -1;
69 static int hf_idrp_update_path_attr_next_hop_idrp_server = -1;
70 static int hf_idrp_update_path_attr_next_hop_proto_type = -1;
71 static int hf_idrp_update_path_attr_next_hop_proto = -1;
72 static int hf_idrp_update_path_attr_next_hop_rdi = -1;
73 static int hf_idrp_update_path_attr_next_hop_nb_snpa = -1;
74 static int hf_idrp_update_path_attr_next_hop_snpa = -1;
75 static int hf_idrp_update_path_attr_dist_list_incl_nb_rdi = -1;
76 static int hf_idrp_update_path_attr_dist_list_incl_rdi = -1;
77 static int hf_idrp_update_path_attr_dist_list_excl_nb_rdi = -1;
78 static int hf_idrp_update_path_attr_dist_list_excl_rdi = -1;
79 static int hf_idrp_update_path_attr_multi_exit_disc = -1;
80 static int hf_idrp_update_path_attr_transit_delay = -1;
81 static int hf_idrp_update_path_attr_residual_error = -1;
82 static int hf_idrp_update_path_attr_expense = -1;
83 static int hf_idrp_update_path_attr_locally_defined_qos_nsap = -1;
84 static int hf_idrp_update_path_attr_locally_defined_qos_value = -1;
85 static int hf_idrp_update_path_attr_locally_defined_qos_metric = -1;
86 static int hf_idrp_update_path_attr_hierarchicaldecoding = -1;
87 static int hf_idrp_update_path_attr_rd_hop_count = -1;
88 static int hf_idrp_update_path_attr_security_reg_id = -1;
89 static int hf_idrp_update_path_attr_security_info = -1;
90 static int hf_idrp_update_path_attr_capacity = -1;
91 static int hf_idrp_update_path_attr_priority = -1;
92 static int hf_idrp_update_nlri_proto_type = -1;
93 static int hf_idrp_update_nlri_proto_id = -1;
94 static int hf_idrp_update_nlri_addr_length = -1;
95 static int hf_idrp_update_nlri_addr_info_nb_bits = -1;
96 static int hf_idrp_update_nlri_addr_info = -1;
98 static int hf_idrp_error_code = -1;
99 static int hf_idrp_error_open_subcode = -1;
100 static int hf_idrp_error_update_subcode = -1;
101 static int hf_idrp_error_hold_timer_subcode = -1;
102 static int hf_idrp_error_fsm_subcode = -1;
103 static int hf_idrp_error_rib_refresh_subcode = -1;
104 static int hf_idrp_error_data = -1;
105 /* RIB-REFRESH BISPDU */
106 static int hf_idrp_rib_refresh_opcode = -1;
107 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap = -1;
108 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value = -1;
109 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric = -1;
110 static int hf_idrp_rib_refresh_rib_attr_security_reg_id = -1;
111 static int hf_idrp_rib_refresh_rib_attr_security_info = -1;
113 static expert_field ei_idrp_no_path_attributes = EI_INIT;
116 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL 0x80
117 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE 0xc0
118 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL 0xe0
119 #define IDRP_UPDATE_PATH_FLAG_TRANSITIVE 0x40
120 #define IDRP_UPDATE_PATH_FLAG_PARTIAL 0x20
121 static const value_string idrp_path_attr_flags[] = {
122 {IDRP_UPDATE_PATH_FLAG_OPTIONAL,
124 {IDRP_UPDATE_PATH_FLAG_TRANSITIVE,
126 {IDRP_UPDATE_PATH_FLAG_PARTIAL,
128 {IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE,
129 "Optional, Transitive"},
130 {IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL,
131 "Optional, Transitive, Partial"},
135 /* BISPDU Type Codes */
136 #define IDRP_TYPE_OPEN 1
137 #define IDRP_TYPE_UPDATE 2
138 #define IDRP_TYPE_ERROR 3
139 #define IDRP_TYPE_KEEPALIVE 4
140 #define IDRP_TYPE_CEASE 5
141 #define IDRP_TYPE_RIB_REFRESH 6
142 static const value_string idrp_pdu_types[] = {
143 {IDRP_TYPE_OPEN, "OPEN"},
144 {IDRP_TYPE_UPDATE, "UPDATE"},
145 {IDRP_TYPE_ERROR, "ERROR"},
146 {IDRP_TYPE_KEEPALIVE, "KEEPALIVE"},
147 {IDRP_TYPE_CEASE, "CEASE"},
148 {IDRP_TYPE_RIB_REFRESH, "RIB REFRESH"},
152 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY 0
153 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_AUTHENTICATION 1
154 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT 2
155 static const value_string idrp_pdu_open_authentication_codes[] = {
156 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY,
158 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_AUTHENTICATION,
159 "Integrity plus authentication"},
160 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT,
161 "Integrity plus secret text"},
166 #define IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR 1
167 #define IDRP_PATH_ATTR_TYPE_EXT_INFO 2
168 #define IDRP_PATH_ATTR_TYPE_RD_PATH 3
169 #define IDRP_PATH_ATTR_TYPE_NEXT_HOP 4
170 #define IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL 5
171 #define IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL 6
172 #define IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC 7
173 #define IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY 8
174 #define IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR 9
175 #define IDRP_PATH_ATTR_TYPE_EXPENSE 10
176 #define IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS 11
177 #define IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING 12
178 #define IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT 13
179 #define IDRP_PATH_ATTR_TYPE_SECURITY 14
180 #define IDRP_PATH_ATTR_TYPE_CAPACITY 15
181 #define IDRP_PATH_ATTR_TYPE_PRIORITY 16
182 static const value_string path_attr_types[] = {
183 {IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR, "Route Separator"},
184 {IDRP_PATH_ATTR_TYPE_EXT_INFO, "Ext Info"},
185 {IDRP_PATH_ATTR_TYPE_RD_PATH, "RD Path"},
186 {IDRP_PATH_ATTR_TYPE_NEXT_HOP, "Next Hop"},
187 {IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL, "Dist List Incl"},
188 {IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL, "Dist List Excl"},
189 {IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC, "Multi Exit Disc"},
190 {IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY, "Transit Delay"},
191 {IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR, "Residual Error"},
192 {IDRP_PATH_ATTR_TYPE_EXPENSE, "Expense"},
193 {IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS, "Locally Ddefined Qos"},
194 {IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING, "Hierarchical Recording"},
195 {IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT, "RD Hop Count"},
196 {IDRP_PATH_ATTR_TYPE_SECURITY, "Security"},
197 {IDRP_PATH_ATTR_TYPE_CAPACITY, "Capacity"},
198 {IDRP_PATH_ATTR_TYPE_PRIORITY, "Priority"},
202 #define IDRP_RD_PATH_RD_SET 1
203 #define IDRP_RD_PATH_RD_SEQ 2
204 #define IDRP_RD_PATH_ENTRY_SEQ 3
205 #define IDRP_RD_PATH_ENTRY_SET 4
206 static const value_string path_rd_segment_types[] = {
207 {IDRP_RD_PATH_RD_SET, "RD_SET"},
208 {IDRP_RD_PATH_RD_SEQ, "RD_SEQ"},
209 {IDRP_RD_PATH_ENTRY_SEQ, "ENTRY_SEQ"},
210 {IDRP_RD_PATH_ENTRY_SET, "ENTRY_SET"},
214 #define IDRP_PROTO_TYPE_TR_9577 1
215 #define IDRP_PROTO_TYPE_8802 2
216 static const value_string idrp_proto_type[] = {
217 {IDRP_PROTO_TYPE_TR_9577, "ISO TR 9577 IPI/SPI"},
218 {IDRP_PROTO_TYPE_8802, "ISO 8802 LSAP"},
223 /* ERROR PDU error codes: */
224 #define IDRP_ERROR_OPEN 1
225 #define IDRP_ERROR_UPDATE 2
226 #define IDRP_ERROR_HOLD_TIMER 3
227 #define IDRP_ERROR_FSM 4
228 #define IDRP_ERROR_RIB_REFRESH 5
229 static const value_string idrp_error_codes[] = {
230 {IDRP_ERROR_OPEN, "OPEN PDU_Error"},
231 {IDRP_ERROR_UPDATE, "UPDATE PDU_Error"},
232 {IDRP_ERROR_HOLD_TIMER, "Hold Timer_Expired"},
233 {IDRP_ERROR_FSM, "FSM Error"},
234 {IDRP_ERROR_RIB_REFRESH, "RIB REFRESH PDU Error"},
238 /* ERROR PDU sub error codes: OPEN */
239 #define IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER 1
240 #define IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE 2
241 #define IDRP_ERROR_OPEN_BAD_PEER_RD 3
242 #define IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE 4
243 #define IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE 5
244 #define IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET 6
245 #define IDRP_ERROR_RDC_MISMATCH 7
246 static const value_string idrp_error_open_subcodes[] = {
247 {IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER,
248 "Unsupported Version Number"},
249 {IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE,
250 "Bad Maximum PDU Size"},
251 {IDRP_ERROR_OPEN_BAD_PEER_RD,
253 {IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE,
254 "Unsupported Authentication Code"},
255 {IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE,
256 "Authentication Failure"},
257 {IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET,
258 "Bad RIB Attribute Set"},
259 {IDRP_ERROR_RDC_MISMATCH,
264 /* ERROR PDU sub error codes: UPDATE */
265 #define IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST 1
266 #define IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE 2
267 #define IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE 3
268 #define IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR 4
269 #define IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR 5
270 #define IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP 6
271 #define IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE 7
272 #define IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR 8
273 #define IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION 9
274 #define IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS 10
275 #define IDRP_ERROR_UPDATE_MALFORMED_NLRI 11
276 #define IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES 12
277 #define IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT 13
278 static const value_string idrp_error_update_subcodes[] = {
279 {IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST,
280 "Malformed Attribute List"},
281 {IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE,
282 "Unrecognized Well-known Attribute"},
283 {IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE,
284 "Missing Well-known Attribute"},
285 {IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR,
286 "Attribute Flags Error"},
287 {IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR,
288 "Attribute Length Error"},
289 {IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP,
291 {IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE,
292 "Invalid NEXT HOP Attribute"},
293 {IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR,
294 "Optional Attribute error"},
295 {IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION,
296 "Invalid Reachability Information"},
297 {IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS,
298 "Misconfigured RDCs"},
299 {IDRP_ERROR_UPDATE_MALFORMED_NLRI,
301 {IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES,
302 "Duplicated_Attributes"},
303 {IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT,
304 "Illegal RD Path Segment"},
308 #define IDRP_ERROR_HOLD_TIMER_NONE 0
309 static const value_string idrp_error_hold_timer_subcodes[] = {
310 {IDRP_ERROR_HOLD_TIMER_NONE, "None"},
314 /* ERROR PDU sub error codes: FSM */
315 #define IDRP_ERROR_FSM_CLOSED 1
316 #define IDRP_ERROR_FSM_OPEN_RCVD 2
317 #define IDRP_ERROR_FSM_OPEN_SENT 3
318 #define IDRP_ERROR_FSM_CLOSE_WAIT 4
319 #define IDRP_ERROR_FSM_ESTABLISHED 5
320 static const value_string idrp_error_fsm_subcodes[] = {
321 {IDRP_ERROR_FSM_CLOSED, "CLOSED"},
322 {IDRP_ERROR_FSM_OPEN_RCVD, "OPEN-RCVD"},
323 {IDRP_ERROR_FSM_OPEN_SENT, "OPEN-SENT"},
324 {IDRP_ERROR_FSM_CLOSE_WAIT, "CLOSE-WAIT"},
325 {IDRP_ERROR_FSM_ESTABLISHED, "ESTABLISHED"},
330 #define IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE 1
331 #define IDRP_ERROR_RIB_REFRESH_UNSUPPORTED_RIB_ATTS 2
332 static const value_string idrp_error_rib_refresh_subcodes[] = {
333 {IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE, "Invalid OpCode"},
334 {IDRP_ERROR_RIB_REFRESH_UNSUPPORTED_RIB_ATTS,
335 "Unsupported RIB-Attributes"},
341 #define IDRP_RIB_REFRESH_REQUEST 1
342 #define IDRP_RIB_REFRESH_START 2
343 #define IDRP_RIB_REFRESH_END 3
344 static const value_string idrp_rib_refresh_opcodes[] = {
345 {IDRP_RIB_REFRESH_REQUEST, "RIB Refresh Request"},
346 {IDRP_RIB_REFRESH_START, "RIB Refresh Start"},
347 {IDRP_RIB_REFRESH_END, "RIB Refresh End"},
353 static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
356 guint8 number_of_non_empty_rib_attributes;
357 guint8 number_of_distinguishing_attributes;
358 guint8 rib_attribute_type;
359 guint8 number_of_rdcs;
360 guint8 length_indicator_guint8;
364 /* 1 octet idrp version */
365 proto_tree_add_item(tree, hf_idrp_open_version, tvb, offset,1, ENC_BIG_ENDIAN);
368 /* Hold Time (2 octets) */
369 proto_tree_add_item(tree, hf_idrp_open_hold_time, tvb, offset, 2, ENC_BIG_ENDIAN);
372 /* Maximum PDU Size (2 octets) */
373 proto_tree_add_item(tree, hf_idrp_open_max_pdu_size, tvb, offset, 2, ENC_BIG_ENDIAN);
376 /* Source RDI Length Indicator (1 octet) */
377 rdi_len = tvb_get_guint8(tvb, offset);
381 proto_tree_add_item(tree, hf_idrp_open_src_rdi, tvb, offset, rdi_len, ENC_NA);
384 /* Number of Non-empty RIB-Atts */
385 number_of_non_empty_rib_attributes = tvb_get_guint8(tvb, offset);
388 /* process Nth non-empty RIB-Atts */
389 for (i = number_of_non_empty_rib_attributes; i > 0; i--) {
390 /* 1 octet number of distinguishing attributes that are contained in
392 number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
395 /* process Nth RIB-Att */
396 for (j = number_of_distinguishing_attributes; j > 0; j--) {
397 /* 1 octet Type of RIB-Att */
398 rib_attribute_type = tvb_get_guint8(tvb, offset);
401 switch (rib_attribute_type) {
402 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR:
403 case IDRP_PATH_ATTR_TYPE_EXT_INFO:
404 case IDRP_PATH_ATTR_TYPE_RD_PATH:
405 case IDRP_PATH_ATTR_TYPE_NEXT_HOP:
406 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL:
407 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL:
408 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC:
409 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR:
410 case IDRP_PATH_ATTR_TYPE_EXPENSE:
411 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING:
412 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT:
413 case IDRP_PATH_ATTR_TYPE_CAPACITY:
414 case IDRP_PATH_ATTR_TYPE_PRIORITY:
416 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
417 /* 1 octet Nsap prefix length */
418 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
420 /* process Nsap prefix */
423 hf_idrp_open_rib_attr_locally_defined_qos_nsap,
426 length_indicator_guint8,
428 offset += length_indicator_guint8;
430 /* 1 octet Qos length */
431 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
436 hf_idrp_open_rib_attr_locally_defined_qos_value,
439 length_indicator_guint8,
441 offset += length_indicator_guint8;
443 /* 1 octet Metric length */
444 /* note: metric always absent in OPEN BISPDU */
445 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
450 hf_idrp_open_rib_attr_locally_defined_qos_metric,
453 length_indicator_guint8,
455 offset += length_indicator_guint8;
457 case IDRP_PATH_ATTR_TYPE_SECURITY:
458 /* length of Security Registration ID and Security Information */
461 /* length of Security Registration ID */
462 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
464 /* value of Security Registration ID */
467 hf_idrp_open_rib_attr_security_reg_id,
470 length_indicator_guint8,
472 offset += length_indicator_guint8;
474 /* length of Security Information */
475 /* note: always absent for OPEN BISPDU*/
476 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
478 /* value of Security Information */
481 hf_idrp_open_rib_attr_security_info,
484 length_indicator_guint8,
486 offset += length_indicator_guint8;
491 } /* switch (path_attr_type) */
493 } /* process Nth non-empty RIB-Atts */
497 number_of_rdcs = tvb_get_guint8(tvb, offset);
498 proto_tree_add_item(tree, hf_idrp_open_number_of_confederations, tvb,
499 offset, 1, ENC_BIG_ENDIAN);
502 /* process Nth Confederation RDI */
503 for (i = number_of_rdcs; i > 0; i--) {
504 /* 1 octet of RDI length */
505 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
508 /* process Nth RDI */
509 proto_tree_add_item(tree, hf_idrp_open_confederation, tvb,
510 offset, length_indicator_guint8, ENC_NA);
511 offset += length_indicator_guint8;
514 /* Authentication Code */
515 proto_tree_add_item(tree, hf_idrp_open_authentication_code, tvb, offset, 1,
519 /* Authentication Data */
520 proto_tree_add_item(tree, hf_idrp_open_authentication_data, tvb, offset,
521 tvb_reported_length_remaining(tvb, offset), ENC_NA);
522 offset += tvb_reported_length_remaining(tvb, offset);
527 static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
529 guint16 nb_unfeasible_routes;
530 guint16 path_attrs_len;
531 int path_attrs_start_offset;
532 guint8 path_attr_type;
533 guint16 path_attr_len;
538 int path_segment_rdi_offset;
539 guint16 length_indicator_guint16;
540 guint8 length_indicator_guint8;
542 guint8 dist_list_count;
545 /* 2 octet withdrawn ("Unfeasible") Route Count */
546 nb_unfeasible_routes = tvb_get_ntohs(tvb, offset);
547 proto_tree_add_item(tree, hf_idrp_update_number_of_unfeasible_routes,
548 tvb, offset, 2, ENC_BIG_ENDIAN);
551 /* process Nth unfeasible route ID */
552 for (i = nb_unfeasible_routes; i > 0; i--) {
553 proto_tree_add_item(tree, hf_idrp_update_withdrawn_route, tvb, offset,
558 /* 2 octets path attributes length */
559 path_attrs_len = tvb_get_ntohs(tvb, offset);
562 path_attrs_start_offset = offset;
563 /* process Nth path attribute */
564 while (offset < (path_attrs_start_offset + path_attrs_len)) {
565 /* Path attribute flag */
566 proto_tree_add_item(tree, hf_idrp_update_path_attr_flag, tvb,
567 offset, 1, ENC_BIG_ENDIAN);
569 /* Path attribute type */
570 path_attr_type = tvb_get_guint8(tvb, offset);
571 proto_tree_add_item(tree, hf_idrp_update_path_attr_type, tvb,
572 offset, 1, ENC_BIG_ENDIAN);
574 /* Path attribute length */
575 path_attr_len = tvb_get_ntohs(tvb, offset);
576 proto_tree_add_item(tree, hf_idrp_update_path_attr_length, tvb,
577 offset, 2, ENC_BIG_ENDIAN);
579 /* Path attribute value */
580 switch (path_attr_type) {
581 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR:
582 proto_tree_add_item(tree,
583 hf_idrp_update_path_attr_route_separator_id,
589 proto_tree_add_item(tree,
590 hf_idrp_update_path_attr_route_separator_localpref,
597 case IDRP_PATH_ATTR_TYPE_EXT_INFO:
598 proto_tree_add_item(tree,
599 hf_idrp_update_path_attr_ext_info,
605 case IDRP_PATH_ATTR_TYPE_RD_PATH:
606 start_offset = offset;
608 /* process Nth path segment */
609 while (offset < (start_offset + path_attr_len)) {
610 /* print path segment type */
611 proto_tree_add_item(tree,
612 hf_idrp_update_path_attr_rd_path_type,
619 /* 2 octets of path segment length */
620 length_indicator_guint16 = tvb_get_ntohs(tvb, offset);
621 proto_tree_add_item(tree,
622 hf_idrp_update_path_attr_rd_path_segment_length,
629 /* one path segment may contain one or more RDI */
630 path_segment_rdi_offset = offset;
631 while (offset < (path_segment_rdi_offset + length_indicator_guint16)) {
632 /* 1 octet rdi length */
633 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
635 /* print N times path RDI */
636 proto_tree_add_item(tree,
637 hf_idrp_update_path_attr_rd_path_rdi,
640 length_indicator_guint8,
642 offset += length_indicator_guint8;
646 case IDRP_PATH_ATTR_TYPE_NEXT_HOP:
647 /* 1 octet idrp server flag */
648 proto_tree_add_item(tree,
649 hf_idrp_update_path_attr_next_hop_idrp_server,
656 start_offset = offset;
657 /* process Nth next hop */
658 while (offset < (start_offset + path_attr_len)) {
659 /* 1 octet Proto type */
660 proto_tree_add_item(tree,
661 hf_idrp_update_path_attr_next_hop_proto_type,
667 /* 1 octet Proto len */
668 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
670 /* N octets Proto: in case of ISO 8473 one octet with the value 0x81 */
671 proto_tree_add_item(tree,
672 hf_idrp_update_path_attr_next_hop_proto,
675 length_indicator_guint8,
677 offset += length_indicator_guint8;
679 /* length of NET of Next HOP */
680 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
682 /* NET of Next HOP */
683 proto_tree_add_item(tree,
684 hf_idrp_update_path_attr_next_hop_rdi,
687 length_indicator_guint8,
689 offset += length_indicator_guint8;
692 nb_of_snpa = tvb_get_guint8(tvb, offset);
693 proto_tree_add_item(tree,
694 hf_idrp_update_path_attr_next_hop_nb_snpa,
700 /* process Nth SNPA */
701 for (i = nb_of_snpa; i > 0; i--) {
702 /* SNPS length in multiples of 4 bit */
703 length_indicator_guint8 =
704 /* length = half the length in semi-octets rounded up */
705 (tvb_get_guint8(tvb, offset) + 1) / 2;
707 proto_tree_add_item(tree,
708 hf_idrp_update_path_attr_next_hop_snpa,
711 length_indicator_guint8 ,
713 offset += length_indicator_guint8;
715 } /* while: process Nth next hop */
717 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL:
718 /* 1 octet number of RDI's/Confed's in DIST list */
719 dist_list_count = tvb_get_guint8(tvb, offset);
720 proto_tree_add_item(tree,
721 hf_idrp_update_path_attr_dist_list_excl_nb_rdi,
728 /* process RDI's/Confederations's in DIST list */
729 for (i = dist_list_count; i > 0; i--) {
730 /* 1 octet RDI/Confed length indicator */
731 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
733 /* variable size RDI/Conderation */
734 proto_tree_add_item(tree,
735 hf_idrp_update_path_attr_dist_list_excl_rdi ,
738 length_indicator_guint8 ,
740 offset += length_indicator_guint8;
743 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL:
744 /* 1 octet number of RDI's/Confed's in DIST list */
745 dist_list_count = tvb_get_guint8(tvb, offset);
746 proto_tree_add_item(tree,
747 hf_idrp_update_path_attr_dist_list_incl_nb_rdi,
754 /* process RDI's/Confederations's in DIST list */
755 for (i = dist_list_count; i > 0; i--) {
756 /* 1 octet RDI/Confed length indicator */
757 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
759 /* variable size RDI/Conderation */
760 proto_tree_add_item(tree,
761 hf_idrp_update_path_attr_dist_list_incl_rdi ,
764 length_indicator_guint8 ,
766 offset += length_indicator_guint8;
769 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC:
770 /* 1 octet Multi Exit Discriminator */
771 proto_tree_add_item(tree,
772 hf_idrp_update_path_attr_multi_exit_disc ,
779 case IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY:
780 /* 2 octets of transit delay */
781 proto_tree_add_item(tree,
782 hf_idrp_update_path_attr_transit_delay ,
789 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR:
790 /* 4 octets of residual error */
791 proto_tree_add_item(tree,
792 hf_idrp_update_path_attr_residual_error ,
799 case IDRP_PATH_ATTR_TYPE_EXPENSE:
800 /* 2 octets of Expense */
801 proto_tree_add_item(tree,
802 hf_idrp_update_path_attr_expense ,
809 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
810 /* 1 octet Nsap prefix length */
811 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
813 /* process Nsap prefix */
814 proto_tree_add_item(tree,
815 hf_idrp_update_path_attr_locally_defined_qos_nsap ,
818 length_indicator_guint8 ,
820 offset += length_indicator_guint8;
821 /* 1 octet Qoslength */
822 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
825 proto_tree_add_item(tree,
826 hf_idrp_update_path_attr_locally_defined_qos_value,
829 length_indicator_guint8 ,
831 offset += length_indicator_guint8;
832 /* 1 octet Metric length */
833 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
836 proto_tree_add_item(tree,
837 hf_idrp_update_path_attr_locally_defined_qos_metric,
840 length_indicator_guint8 ,
842 offset += length_indicator_guint8;
844 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING:
845 /* 1 octet flag hierarchical recording */
846 proto_tree_add_item(tree,
847 hf_idrp_update_path_attr_hierarchicaldecoding,
854 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT:
855 proto_tree_add_item(tree,
856 hf_idrp_update_path_attr_rd_hop_count,
863 case IDRP_PATH_ATTR_TYPE_SECURITY:
864 /* length of Security Registration ID */
865 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
868 /* value of Security Registration ID */
869 proto_tree_add_item(tree,
870 hf_idrp_update_path_attr_security_reg_id,
873 length_indicator_guint8 ,
875 offset += length_indicator_guint8;
877 /* length of Security Information */
878 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
880 /* value of Security Information */
881 proto_tree_add_item(tree,
882 hf_idrp_update_path_attr_security_info,
885 length_indicator_guint8,
887 offset += length_indicator_guint8;
889 case IDRP_PATH_ATTR_TYPE_CAPACITY:
890 proto_tree_add_item(tree,
891 hf_idrp_update_path_attr_capacity,
898 case IDRP_PATH_ATTR_TYPE_PRIORITY:
899 proto_tree_add_item(tree,
900 hf_idrp_update_path_attr_priority,
912 /* 1 octet Proto type */
913 proto_tree_add_item(tree, hf_idrp_update_nlri_proto_type, tvb, offset,
917 /* 1 octet Proto len */
918 proto_len = tvb_get_guint8(tvb, offset);
921 /* N octets Proto identity: in case of ISO 8473 one octet with the value 0x81 */
922 proto_tree_add_item(tree, hf_idrp_update_nlri_proto_id, tvb, offset,
926 /* 2 octets length of address */
927 net_len = tvb_get_ntohs(tvb, offset);
928 proto_tree_add_item(tree, hf_idrp_update_nlri_addr_length, tvb, offset,
932 /* process N address info sets */
933 start_offset = offset;
934 while (offset < (start_offset + net_len)) {
935 /* 1 octet address length in bits */
936 rdi_len = tvb_get_guint8(tvb, offset) / 8;
937 proto_tree_add_item(tree, hf_idrp_update_nlri_addr_info_nb_bits, tvb,
938 offset, 1, ENC_BIG_ENDIAN);
941 proto_tree_add_item(tree, hf_idrp_update_nlri_addr_info, tvb,
942 offset, rdi_len, ENC_NA);
948 static int dissect_BISPDU_ERROR(tvbuff_t * tvb, int offset, proto_tree * tree)
950 guint8 error_code = 0;
953 /* Error Code (1 octet) */
954 error_code = tvb_get_guint8(tvb, offset);
955 proto_tree_add_item(tree, hf_idrp_error_code, tvb, offset, 1, ENC_BIG_ENDIAN);
958 switch (error_code) {
959 case IDRP_ERROR_OPEN:
960 proto_tree_add_item(tree, hf_idrp_error_open_subcode, tvb, offset, 1,
963 case IDRP_ERROR_UPDATE:
964 proto_tree_add_item(tree, hf_idrp_error_update_subcode, tvb, offset, 1,
967 case IDRP_ERROR_HOLD_TIMER:
968 proto_tree_add_item(tree, hf_idrp_error_hold_timer_subcode, tvb,
969 offset, 1, ENC_BIG_ENDIAN);
972 proto_tree_add_item(tree, hf_idrp_error_fsm_subcode, tvb, offset, 1,
975 case IDRP_ERROR_RIB_REFRESH:
976 proto_tree_add_item(tree, hf_idrp_error_rib_refresh_subcode, tvb,
977 offset, 1, ENC_BIG_ENDIAN);
984 /* data : zero or more octets of data to be used in diagnosing the reason
985 for the IDRP ERROR PDU. The contents of the Data field depends upon the
986 error code and error subcode. */
987 data_length = tvb_reported_length_remaining(tvb, offset);
989 proto_tree_add_item(tree, hf_idrp_error_data, tvb, offset, data_length,
991 offset += data_length;
997 static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, packet_info *pinfo, int offset, proto_tree * tree)
999 proto_tree *sub_tree;
1000 proto_item *sub_item;
1001 guint8 number_of_non_empty_rib_attributes;
1002 guint8 number_of_distinguishing_attributes;
1003 guint8 rib_attribute_type;
1004 guint8 length_indicator_guint8;
1008 /* 1 octet Opcode */
1009 proto_tree_add_item(tree, hf_idrp_rib_refresh_opcode, tvb, offset, 1,
1013 /* Path Attributes subtree */
1014 sub_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_idrp_sub, &sub_item, "Path Attributes");
1016 /* Number of Non-empty RIB-Atts */
1017 number_of_non_empty_rib_attributes = tvb_get_guint8(tvb, offset);
1020 if (!number_of_non_empty_rib_attributes)
1021 expert_add_info(pinfo, sub_item, &ei_idrp_no_path_attributes);
1023 /* process Nth RIB-Atts */
1024 for (i = number_of_non_empty_rib_attributes; i > 0; i--) {
1026 /* 1 octet number of distinguishing attributes that are contained in
1028 number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
1031 /* process Nth RIB-Att */
1032 for (j = number_of_distinguishing_attributes; j > 0; j--) {
1033 /* 1 octet Type of RIB-Att */
1034 rib_attribute_type = tvb_get_guint8(tvb, offset);
1037 switch (rib_attribute_type) {
1038 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR:
1039 case IDRP_PATH_ATTR_TYPE_EXT_INFO:
1040 case IDRP_PATH_ATTR_TYPE_RD_PATH:
1041 case IDRP_PATH_ATTR_TYPE_NEXT_HOP:
1042 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL:
1043 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL:
1044 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC:
1045 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR:
1046 case IDRP_PATH_ATTR_TYPE_EXPENSE:
1047 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING:
1048 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT:
1049 case IDRP_PATH_ATTR_TYPE_CAPACITY:
1050 case IDRP_PATH_ATTR_TYPE_PRIORITY:
1052 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
1053 /* 1 octet Nsap prefix length */
1054 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1056 /* process Nsap prefix */
1057 proto_tree_add_item(
1059 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap,
1062 length_indicator_guint8,
1064 offset += length_indicator_guint8;
1066 /* 1 octet Qos length */
1067 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1070 proto_tree_add_item(
1072 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value,
1075 length_indicator_guint8,
1077 offset += length_indicator_guint8;
1079 /* 1 octet Metric length */
1080 /* note: metric always absent in OPEN BISPDU */
1081 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1083 /* process Metric */
1084 proto_tree_add_item(
1086 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric,
1089 length_indicator_guint8,
1091 offset += length_indicator_guint8;
1093 case IDRP_PATH_ATTR_TYPE_SECURITY:
1094 /* length of Security Registration ID and Security Information */
1097 /* length of Security Registration ID */
1098 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1100 /* value of Security Registration ID */
1101 proto_tree_add_item(
1103 hf_idrp_rib_refresh_rib_attr_security_reg_id,
1106 length_indicator_guint8,
1108 offset += length_indicator_guint8;
1110 /* length of Security Information */
1111 /* note: always absent for OPEN BISPDU*/
1112 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1114 /* value of Security Information */
1115 proto_tree_add_item(
1117 hf_idrp_rib_refresh_rib_attr_security_info,
1120 length_indicator_guint8,
1122 offset += length_indicator_guint8;
1127 } /* switch (path_attr_type) */
1134 dissect_idrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
1137 proto_tree *idrp_tree;
1142 if (tvb_get_guint8(tvb, offset) != NLPID_ISO10747_IDRP)
1143 return 0; /* no idrp packet */
1146 col_set_str(pinfo->cinfo, COL_PROTOCOL, "IDRP");
1147 col_clear(pinfo->cinfo, COL_INFO);
1149 ti = proto_tree_add_item(tree, proto_idrp, tvb, 0, -1, ENC_NA);
1150 idrp_tree = proto_item_add_subtree(ti, ett_idrp);
1152 /* 2 octets BISPDU Length */
1153 proto_tree_add_item(idrp_tree, hf_idrp_li,
1154 tvb, offset, 2, ENC_BIG_ENDIAN);
1157 /* 1 octet BISPDU Type */
1158 pdu_type = tvb_get_guint8(tvb, offset);
1159 proto_tree_add_item(idrp_tree, hf_idrp_type,
1160 tvb, offset, 1, ENC_BIG_ENDIAN);
1163 /* 4 octets Sequence */
1164 proto_tree_add_item(idrp_tree, hf_idrp_sequence,
1165 tvb, offset, 4, ENC_BIG_ENDIAN);
1168 /* 4 octets Acknowledge */
1169 proto_tree_add_item(idrp_tree, hf_idrp_ack,
1170 tvb, offset, 4, ENC_BIG_ENDIAN);
1173 /* 1 octets credits offered */
1174 proto_tree_add_item(idrp_tree, hf_idrp_credit_offered,
1175 tvb, offset, 1, ENC_BIG_ENDIAN);
1178 /* 1 octets credits offered */
1179 proto_tree_add_item(idrp_tree, hf_idrp_credit_avail,
1180 tvb, offset, 1, ENC_BIG_ENDIAN);
1183 /* 16 octets validation */
1184 proto_tree_add_item(idrp_tree, hf_idrp_validation_pattern,
1185 tvb, offset, 16, ENC_NA);
1189 case IDRP_TYPE_OPEN:
1190 offset = dissect_BISPDU_OPEN(tvb, offset, idrp_tree);
1192 case IDRP_TYPE_UPDATE:
1193 offset = dissect_BISPDU_UPDATE(tvb, offset, idrp_tree);
1195 case IDRP_TYPE_ERROR:
1196 offset = dissect_BISPDU_ERROR(tvb, offset, idrp_tree);
1198 case IDRP_TYPE_KEEPALIVE:
1199 /* KEEPALIVE PDU consists of only a PDU header and has a length of 30
1203 case IDRP_TYPE_CEASE:
1204 /* CEASE is composed a PDU header and has length of 30 octets */
1207 case IDRP_TYPE_RIB_REFRESH:
1208 offset = dissect_BISPDU_RIB_REFRESH(tvb, pinfo, offset, idrp_tree);
1214 col_append_str(pinfo->cinfo, COL_INFO,
1215 val_to_str(pdu_type, idrp_pdu_types, "Unknown (%u)"));
1221 void proto_register_idrp(void)
1223 static hf_register_info hf_idrp[] = {
1225 {"BISPDU Length", "idrp.li", FT_UINT16, BASE_DEC, NULL, 0x0,
1226 "BISPDU Length Indicator, length of this PDU", HFILL}},
1228 {"BISPDU Type", "idrp.type", FT_UINT8, BASE_DEC,
1229 VALS(idrp_pdu_types), 0xff, NULL, HFILL}},
1231 {"Sequence Number", "idrp.seq", FT_UINT32, BASE_DEC, NULL, 0x0,
1232 "Sequence number, Sequence number of current BISPDU ", HFILL}},
1234 {"Acknowledgment number", "idrp.ack", FT_UINT32, BASE_DEC, NULL, 0x0,
1235 "Acknowledgment number, Sequence number of the PDU that the sender last received correctly and in sequence number order",
1237 {&hf_idrp_credit_offered,
1238 {"Credits Offered", "idrp.credits-offered", FT_UINT8, BASE_DEC,
1240 "Number of additional BISPDUs that the sender is willing to accept from the remote BIS",
1242 {&hf_idrp_credit_avail,
1243 {"Credits Available", "idrp.credits-avail", FT_UINT8, BASE_DEC,
1245 "Number of additional BISPDUs that the sender is able to send to the remote BIS",
1247 {&hf_idrp_validation_pattern,
1248 {"Validation", "idrp.validation", FT_BYTES, BASE_NONE,
1250 "16-octet field which provides a validation function for the BISPDU",
1252 {&hf_idrp_open_version,
1253 {"Version", "idrp.open.version", FT_UINT8, BASE_DEC,
1254 NULL, 0, "Version number of the protocol.", HFILL}},
1255 {&hf_idrp_open_hold_time,
1256 {"Hold Time", "idrp.open.hold-time", FT_UINT16, BASE_DEC,
1257 NULL, 0, "Max number of seconds to remain in the ESTABLISHED state",
1259 {&hf_idrp_open_max_pdu_size,
1260 {"Max PDU Size", "idrp.open.max-pdu-size", FT_UINT16, BASE_DEC,
1262 "Maximum number of octets that this BIS will accept in an incoming UPDATE PDU, IDRP ERROR PDU, or RIB REFRESH PDU",
1264 {&hf_idrp_open_src_rdi,
1265 {"Source RDI", "idrp.open.src-rdi", FT_BYTES, BASE_NONE,
1267 "RDI of the routing domain in which the BIS that is sending this BISPDU is located",
1269 {&hf_idrp_open_rib_attr_locally_defined_qos_nsap,
1270 {"Rib Attribute Value Locally Defined Qos NSAP",
1271 "idrp.open.rib-attr.locally-defined-qos.nsap", FT_BYTES, BASE_NONE,
1272 NULL, 0, "Locally Defined Qos NSAP" ,
1274 {&hf_idrp_open_rib_attr_locally_defined_qos_value,
1275 {"Rib Attribute Value Locally Defined Qos",
1276 "idrp.open.rib-attr.locally-defined-qos.qos", FT_BYTES, BASE_NONE,
1277 NULL, 0, "Locally Defined Qos Value" ,
1279 {&hf_idrp_open_rib_attr_locally_defined_qos_metric,
1280 {"Rib Attribute Value Locally Defined Qos Metric",
1281 "idrp.open.rib-attr.locally-defined-qos.metric", FT_BYTES, BASE_NONE,
1282 NULL, 0, "Locally Defined Metric" ,
1284 {&hf_idrp_open_rib_attr_security_reg_id,
1285 {"Rib Attribute Value Security Registration ID",
1286 "idrp.open.rib-attr.security.reg-id", FT_BYTES, BASE_NONE,
1287 NULL, 0, "Identifies the Security Authority" ,
1289 {&hf_idrp_open_rib_attr_security_info,
1290 {"Rib Attribute Value Security Registration ID",
1291 "idrp.open.rib-attr.security.info", FT_BYTES, BASE_NONE,
1292 NULL, 0, "Additional security related information" ,
1294 {&hf_idrp_open_number_of_confederations,
1295 {"Number of Routing Confederations",
1296 "idrp.open.number-of-confederations", FT_UINT8, BASE_DEC,
1298 "Number of Routing Domain Identifiers (Routing Domain Confederation) that this BIS is a member of",
1300 {&hf_idrp_open_confederation,
1301 {"Routing Confederation", "idrp.open.confederation", FT_BYTES,
1304 "Routing Domain Identifier of Routing Domain Confederation that this BIS is a member of",
1306 {&hf_idrp_open_authentication_code,
1307 {"Authentication Code", "idrp.open.authentication-code", FT_UINT8,
1309 VALS(idrp_pdu_open_authentication_codes), 0,
1310 "Indicates the authentication mechanism being used",
1312 {&hf_idrp_open_authentication_data,
1313 {"Authentication Data", "idrp.open.authentication-data", FT_BYTES,
1315 NULL, 0, "Datat used for optional authentication of a peer BIS", HFILL}},
1316 {&hf_idrp_update_number_of_unfeasible_routes,
1317 {"Number of Unfeasible Routes",
1318 "idrp.update.number-of-unfeasible-routes", FT_UINT16, BASE_DEC,
1320 "Number of RDIs that are included in the subsequent withdrawn routes field",
1322 {&hf_idrp_update_withdrawn_route,
1323 {"Unfeasible Route", "idrp.update.unfeasible-route", FT_UINT32,
1326 "Route-ID for the route that id being withdrawn from service",
1328 {&hf_idrp_update_path_attr_flag,
1329 {"Path Attribute Flag", "idrp.update.path-attribute-flag", FT_UINT8,
1331 VALS(idrp_path_attr_flags), 0, NULL, HFILL}},
1332 {&hf_idrp_update_path_attr_type,
1333 {"Path Attribute Type", "idrp.update.path-attribute-type", FT_UINT8,
1335 VALS(path_attr_types), 0, NULL, HFILL}},
1336 {&hf_idrp_update_path_attr_length,
1337 {"Path Attribute Length", "idrp.update.path-attribute-length", FT_UINT16,
1339 NULL, 0, NULL, HFILL}},
1340 {&hf_idrp_update_path_attr_route_separator_id,
1341 {"Path Attribute Value Route Separator Id",
1342 "idrp.update.path-attr.route-separator.id", FT_UINT32, BASE_DEC,
1343 NULL, 0,",Route identifier for the advertised route",
1345 {&hf_idrp_update_path_attr_route_separator_localpref,
1346 {"Path Attribute Value Route Separator Local Pref",
1347 "idrp.update.path-attr.route-separator.local-pref", FT_UINT8, BASE_DEC,
1348 NULL, 0,"Contains the local preference value for route",
1350 {&hf_idrp_update_path_attr_ext_info,
1351 {"Path Attribute Value External Info",
1352 "idrp.update.path-attr.ext-info", FT_BOOLEAN, 8,
1353 NULL, 0,"Flag indicates if routes have been discovered by means of IDRP",
1355 {&hf_idrp_update_path_attr_rd_path_type,
1356 {"Path Attribute Value RD Path Segment Type",
1357 "idrp.update.path-attr.rd-path.segment-type", FT_UINT8, BASE_HEX,
1358 VALS(path_rd_segment_types), 0, NULL,
1360 {&hf_idrp_update_path_attr_rd_path_segment_length,
1361 {"Path Attribute Value RD Path Segment Length",
1362 "idrp.update.path-attr.rd-path.segment-length", FT_UINT16, BASE_DEC,
1365 {&hf_idrp_update_path_attr_rd_path_rdi,
1366 {"Path Attribute Value RD Path Segment RDI",
1367 "idrp.update.path-attr.rd-path.segment-rdi", FT_BYTES, BASE_NONE,
1368 NULL, 0,"RD Path Segment Routing Identifier or Confederation" ,
1370 {&hf_idrp_update_path_attr_next_hop_idrp_server,
1371 {"Path Attribute Value Next Hop Idrp Server",
1372 "idrp.update.path-attr.next-hop.idrp-server", FT_UINT8, BASE_DEC,
1373 NULL, 0, "Permit a BIS to advertise a different or local BISs NET" ,
1375 {&hf_idrp_update_path_attr_next_hop_proto_type,
1376 {"Path Attribute Value Next Hop Segment Protocol Type",
1377 "idrp.update.path-attr.next-hop.segment-protp-type", FT_UINT8, BASE_DEC,
1378 VALS(idrp_proto_type), 0, NULL ,
1380 {&hf_idrp_update_path_attr_next_hop_proto,
1381 {"Path Attribute Value Next Hop Segment Protocol",
1382 "idrp.update.path-attr.next-hop.segment-proto", FT_UINT8, BASE_DEC,
1385 {&hf_idrp_update_path_attr_next_hop_rdi,
1386 {"Path Attribute Value Next Hop RDI",
1387 "idrp.update.path-attr.next-hop.rdi", FT_BYTES, BASE_NONE,
1388 NULL, 0, "NET to advertise as next hop segment" ,
1390 {&hf_idrp_update_path_attr_next_hop_nb_snpa,
1391 {"Path Attribute Value Next Hop Number of SNPA",
1392 "idrp.update.path-attr.next-hop.number-snpa", FT_UINT8, BASE_DEC,
1393 NULL, 0, "Number of SNPA's on next hop segment" ,
1395 {&hf_idrp_update_path_attr_next_hop_snpa,
1396 {"Path Attribute Value Next Hop SNPA",
1397 "idrp.update.path-attr.next-hop.snpa", FT_BYTES, BASE_NONE,
1398 NULL, 0, "SNPA on next hop segment" ,
1400 {&hf_idrp_update_path_attr_dist_list_incl_nb_rdi,
1401 {"Path Attribute Value Dist List Incl Number of RDIs",
1402 "idrp.update.path-attr.dist-list-incl.number-rdi", FT_UINT8, BASE_DEC,
1403 NULL, 0, "Number of RDIs which NLRI information may be distributed" ,
1405 {&hf_idrp_update_path_attr_dist_list_incl_rdi,
1406 {"Path Attribute Value Dist List Incl RDI",
1407 "idrp.update.path-attr.dist-list-incl.rdi", FT_BYTES, BASE_NONE,
1408 NULL, 0, "RDI which NLRI information may be distributed" ,
1410 {&hf_idrp_update_path_attr_dist_list_excl_nb_rdi,
1411 {"Path Attribute Value Dist List Excl Number of RDIs",
1412 "idrp.update.path-attr.dist-list-excl.number-rdi", FT_UINT8, BASE_DEC,
1413 NULL, 0, "Number of RDIs which NLRI information may not be distributed" ,
1415 {&hf_idrp_update_path_attr_dist_list_excl_rdi,
1416 {"Path Attribute Value Dist List Excl RDI",
1417 "idrp.update.path-attr.dist-list-excl.rdi", FT_BYTES, BASE_NONE,
1418 NULL, 0, "RDI which NLRI information may be distributed" ,
1420 {&hf_idrp_update_path_attr_multi_exit_disc,
1421 {"Path Attribute Value Multi Exit Disc",
1422 "idrp.update.path-attr.multi-exit-disc", FT_UINT8, BASE_DEC,
1423 NULL, 0, "Number of exit points to an adjacent domain" ,
1425 {&hf_idrp_update_path_attr_transit_delay,
1426 {"Path Attribute Value Transit Delay",
1427 "idrp.update.path-attr.transit-delay", FT_UINT16, BASE_DEC,
1428 NULL, 0, "Transit Delay" ,
1430 {&hf_idrp_update_path_attr_residual_error,
1431 {"Path Attribute Value Residual Error",
1432 "idrp.update.path-attr.residual-error", FT_UINT32, BASE_DEC,
1433 NULL, 0, "Residual error probability to destination" ,
1435 {&hf_idrp_update_path_attr_expense,
1436 {"Path Attribute Value Expense",
1437 "idrp.update.path-attr.expense", FT_UINT16, BASE_DEC,
1438 NULL, 0, "Expense to destination" ,
1440 {&hf_idrp_update_path_attr_locally_defined_qos_nsap,
1441 {"Path Attribute Value Locally Defined Qos NSAP",
1442 "idrp.update.path-attr.locally-defined-qos.nsap", FT_BYTES, BASE_NONE,
1443 NULL, 0, "Locally Defined Qos NSAP" ,
1445 {&hf_idrp_update_path_attr_locally_defined_qos_value,
1446 {"Path Attribute Value Locally Defined Qos",
1447 "idrp.update.path-attr.locally-defined-qos.qos", FT_BYTES, BASE_NONE,
1448 NULL, 0, "Locally Defined Qos Value" ,
1450 {&hf_idrp_update_path_attr_locally_defined_qos_metric,
1451 {"Path Attribute Value Locally Defined Qos Metric",
1452 "idrp.update.path-attr.locally-defined-qos.metric", FT_BYTES, BASE_NONE,
1453 NULL, 0, "Locally Defined Metric" ,
1455 {&hf_idrp_update_path_attr_hierarchicaldecoding,
1456 {"Path Attribute Value Hierarchical Decoding",
1457 "idrp.update.path-attr.hierarchical-decoding", FT_UINT8, BASE_HEX,
1458 NULL, 0, "Controls the transitivity of NPDUs through the confederation" ,
1460 {&hf_idrp_update_path_attr_rd_hop_count,
1461 {"Path Attribute Value RD Hop Count",
1462 "idrp.update.path-attr.rd-hop-count", FT_UINT8, BASE_DEC,
1463 NULL, 0, "Maximum Hop Count for this Routing Information to travel" ,
1465 {&hf_idrp_update_path_attr_security_reg_id,
1466 {"Path Attribute Value Security Registration ID",
1467 "idrp.update.path-attr.security.reg-id", FT_BYTES, BASE_NONE,
1468 NULL, 0, "Identifies the Security Authority" ,
1470 {&hf_idrp_update_path_attr_security_info,
1471 {"Path Attribute Value Security Registration ID",
1472 "idrp.update.path-attr.security.info", FT_BYTES, BASE_NONE,
1473 NULL, 0, "Additional security related information" ,
1475 {&hf_idrp_update_path_attr_capacity,
1476 {"Path Attribute Value Capacity",
1477 "idrp.update.path-attr.capacity", FT_UINT8, BASE_DEC,
1478 NULL, 0, "Capacity of the RD_PATH for handling traffic" ,
1480 {&hf_idrp_update_path_attr_priority,
1481 {"Path Attribute Value Capacity",
1482 "idrp.update.path-attr.capacity", FT_UINT8, BASE_DEC,
1483 NULL, 0, "Capacity of the RD_PATH for handling traffic" ,
1485 {&hf_idrp_update_nlri_proto_type,
1486 {"NLRI Protocol Type", "idrp.update.nlri.proto-type", FT_UINT8,
1488 VALS(idrp_proto_type), 0, NULL, HFILL}},
1489 {&hf_idrp_update_nlri_proto_id,
1490 {"NLRI Protocol Identity", "idrp.update.nlri.proto-id", FT_BYTES,
1493 "Identity of the protocol associated with the NLRI address information",
1495 {&hf_idrp_update_nlri_addr_length,
1496 {"NLRI Address Length",
1497 "idrp.update.nlri.addr-length", FT_UINT16, BASE_DEC,
1500 {&hf_idrp_update_nlri_addr_info_nb_bits,
1501 {"NLRI Address Info Bits",
1502 "idrp.update.nlri.addr-info-bits", FT_UINT8, BASE_DEC,
1505 {&hf_idrp_update_nlri_addr_info,
1506 {"NLRI Address Info", "idrp.update.nlri.addr-info", FT_BYTES,
1508 NULL, 0, "Network Layer Reachability Information Protocol", HFILL}},
1509 {&hf_idrp_error_code,
1510 {"Error Code", "idrp.error.code", FT_UINT8, BASE_DEC,
1511 VALS(idrp_error_codes), 0,
1513 {&hf_idrp_error_open_subcode,
1514 {"Error Subcode (Open Message)", "idrp.error.subcode", FT_UINT8,
1515 BASE_DEC, VALS(idrp_error_open_subcodes),
1517 {&hf_idrp_error_update_subcode,
1518 {"Error Subcode (Update Message)", "idrp.error.subcode", FT_UINT8,
1519 BASE_DEC, VALS(idrp_error_update_subcodes),
1521 {&hf_idrp_error_hold_timer_subcode,
1522 {"Error Subcode (Hold Timer)", "idrp.error.subcode", FT_UINT8,
1523 BASE_DEC, VALS(idrp_error_hold_timer_subcodes),
1525 {&hf_idrp_error_fsm_subcode,
1526 {"Error Subcode (Fsm State)", "idrp.error.subcode", FT_UINT8,
1527 BASE_DEC, VALS(idrp_error_fsm_subcodes),
1529 {&hf_idrp_error_rib_refresh_subcode,
1530 {"Error Subcode (Rib-Refresh Message)", "idrp.error.subcode",
1531 FT_UINT8, BASE_DEC, VALS(idrp_error_rib_refresh_subcodes),
1532 0xff, NULL, HFILL}},
1533 {&hf_idrp_error_data,
1534 {"Error Data", "idrp.error.data", FT_BYTES, BASE_NONE, NULL, 0,
1535 "Diagnosis data that depends upon the error code and error subcode",
1537 {&hf_idrp_rib_refresh_opcode,
1538 {"Rib Refresh opcode", "idrp.rib-refresh.opcode", FT_UINT8, BASE_DEC,
1539 VALS(idrp_error_rib_refresh_subcodes),
1540 0xff, NULL, HFILL}},
1541 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap,
1542 {"Rib Attribute Value Locally Defined Qos NSAP",
1543 "idrp.rib-refresh.rib-attr.locally-defined-qos.nsap",
1544 FT_BYTES, BASE_NONE,
1545 NULL, 0, "Locally Defined Qos NSAP" ,
1547 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value,
1548 {"Rib Attribute Value Locally Defined Qos",
1549 "idrp.rib-refresh.rib-attr.locally-defined-qos.qos",
1550 FT_BYTES, BASE_NONE,
1551 NULL, 0, "Locally Defined Qos Value" ,
1553 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric,
1554 {"Rib Attribute Value Locally Defined Qos Metric",
1555 "idrp.rib-refresh.rib-attr.locally-defined-qos.metric",
1556 FT_BYTES, BASE_NONE,
1557 NULL, 0, "Locally Defined Metric" ,
1559 {&hf_idrp_rib_refresh_rib_attr_security_reg_id,
1560 {"Rib Attribute Value Security Registration ID",
1561 "idrp.rib-refresh.rib-attr.security.reg-id", FT_BYTES, BASE_NONE,
1562 NULL, 0, "Identifies the Security Authority" ,
1564 {&hf_idrp_rib_refresh_rib_attr_security_info,
1565 {"Rib Attribute Value Security Registration ID",
1566 "idrp.rib-refresh.rib-attr.security.info", FT_BYTES, BASE_NONE,
1567 NULL, 0, "Additional security related information" ,
1571 /* List of subtrees */
1572 static gint *ett[] = {
1577 static ei_register_info ei[] = {
1578 { &ei_idrp_no_path_attributes, { "idrp.no_path_attributes", PI_PROTOCOL, PI_NOTE, "No path attributes", EXPFILL }},
1581 expert_module_t* expert_idrp;
1583 proto_idrp = proto_register_protocol(IDRP_PROTO, "IDRP", "idrp");
1584 proto_register_field_array(proto_idrp, hf_idrp, array_length(hf_idrp));
1585 proto_register_subtree_array(ett, array_length(ett));
1586 expert_idrp = expert_register_protocol(proto_idrp);
1587 expert_register_field_array(expert_idrp, ei, array_length(ei));
1588 register_dissector("idrp", dissect_idrp, proto_idrp);
1593 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1598 * indent-tabs-mode: nil
1601 * vi: set shiftwidth=4 tabstop=8 expandtab:
1602 * :indentSize=4:tabSize=8:noTabs=true: