2 * ISO 10747 Inter Domain Routing Protocol
3 * Routines for IDRP packet dissection.
4 * Copyright 2013, Mathias Guettler <guettler@web.de>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * ISO 10747 Inter Domain Routing Protocol October 18, 1993
29 * Validation checksum calculation
36 #include <epan/packet.h>
37 #include <epan/nlpid.h>
41 #define IDRP_PROTO "ISO/IEC 10747 (1993): Inter Domain Routing Protocol "
43 static int proto_idrp
= -1;
44 static gint ett_idrp
= -1;
45 static gint ett_idrp_sub
= -1;
48 static int hf_idrp_li
= -1;
49 static int hf_idrp_type
= -1;
50 static int hf_idrp_sequence
= -1;
51 static int hf_idrp_ack
= -1;
52 static int hf_idrp_credit_offered
= -1;
53 static int hf_idrp_credit_avail
= -1;
54 static int hf_idrp_validation_pattern
= -1;
56 static int hf_idrp_open_version
= -1;
57 static int hf_idrp_open_hold_time
= -1;
58 static int hf_idrp_open_max_pdu_size
= -1;
59 static int hf_idrp_open_src_rdi
= -1;
60 static int hf_idrp_open_rib_attr_locally_defined_qos_nsap
= -1;
61 static int hf_idrp_open_rib_attr_locally_defined_qos_value
= -1;
62 static int hf_idrp_open_rib_attr_locally_defined_qos_metric
= -1;
63 static int hf_idrp_open_rib_attr_security_reg_id
= -1;
64 static int hf_idrp_open_rib_attr_security_info
= -1;
65 static int hf_idrp_open_number_of_confederations
= -1;
66 static int hf_idrp_open_confederation
= -1;
67 static int hf_idrp_open_authentication_code
= -1;
68 static int hf_idrp_open_authentication_data
= -1;
70 static int hf_idrp_update_number_of_unfeasible_routes
= -1;
71 static int hf_idrp_update_withdrawn_route
= -1;
72 static int hf_idrp_update_path_attr_flag
= -1;
73 static int hf_idrp_update_path_attr_type
= -1;
74 static int hf_idrp_update_path_attr_length
= -1;
75 static int hf_idrp_update_path_attr_route_separator_id
= -1;
76 static int hf_idrp_update_path_attr_route_separator_localpref
= -1;
77 static int hf_idrp_update_path_attr_ext_info
= -1;
78 static int hf_idrp_update_path_attr_rd_path_type
= -1;
79 static int hf_idrp_update_path_attr_rd_path_segment_length
= -1;
80 static int hf_idrp_update_path_attr_rd_path_rdi
= -1;
81 static int hf_idrp_update_path_attr_next_hop_idrp_server
= -1;
82 static int hf_idrp_update_path_attr_next_hop_proto_type
= -1;
83 static int hf_idrp_update_path_attr_next_hop_proto
= -1;
84 static int hf_idrp_update_path_attr_next_hop_rdi
= -1;
85 static int hf_idrp_update_path_attr_next_hop_nb_snpa
= -1;
86 static int hf_idrp_update_path_attr_next_hop_snpa
= -1;
87 static int hf_idrp_update_path_attr_dist_list_incl_nb_rdi
= -1;
88 static int hf_idrp_update_path_attr_dist_list_incl_rdi
= -1;
89 static int hf_idrp_update_path_attr_dist_list_excl_nb_rdi
= -1;
90 static int hf_idrp_update_path_attr_dist_list_excl_rdi
= -1;
91 static int hf_idrp_update_path_attr_multi_exit_disc
= -1;
92 static int hf_idrp_update_path_attr_transit_delay
= -1;
93 static int hf_idrp_update_path_attr_residual_error
= -1;
94 static int hf_idrp_update_path_attr_expense
= -1;
95 static int hf_idrp_update_path_attr_locally_defined_qos_nsap
= -1;
96 static int hf_idrp_update_path_attr_locally_defined_qos_value
= -1;
97 static int hf_idrp_update_path_attr_locally_defined_qos_metric
= -1;
98 static int hf_idrp_update_path_attr_hierarchicaldecoding
= -1;
99 static int hf_idrp_update_path_attr_rd_hop_count
= -1;
100 static int hf_idrp_update_path_attr_security_reg_id
= -1;
101 static int hf_idrp_update_path_attr_security_info
= -1;
102 static int hf_idrp_update_path_attr_capacity
= -1;
103 static int hf_idrp_update_path_attr_priority
= -1;
104 static int hf_idrp_update_nlri_proto_type
= -1;
105 static int hf_idrp_update_nlri_proto_id
= -1;
106 static int hf_idrp_update_nlri_addr_length
= -1;
107 static int hf_idrp_update_nlri_addr_info_nb_bits
= -1;
108 static int hf_idrp_update_nlri_addr_info
= -1;
110 static int hf_idrp_error_code
= -1;
111 static int hf_idrp_error_open_subcode
= -1;
112 static int hf_idrp_error_update_subcode
= -1;
113 static int hf_idrp_error_hold_timer_subcode
= -1;
114 static int hf_idrp_error_fsm_subcode
= -1;
115 static int hf_idrp_error_rib_refresh_subcode
= -1;
116 static int hf_idrp_error_data
= -1;
117 /* RIB-REFRESH BISPDU */
118 static int hf_idrp_rib_refresh_opcode
= -1;
119 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap
= -1;
120 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value
= -1;
121 static int hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric
= -1;
122 static int hf_idrp_rib_refresh_rib_attr_security_reg_id
= -1;
123 static int hf_idrp_rib_refresh_rib_attr_security_info
= -1;
126 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL 0x80
127 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE 0xc0
128 #define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL 0xe0
129 #define IDRP_UPDATE_PATH_FLAG_TRANSITIVE 0x40
130 #define IDRP_UPDATE_PATH_FLAG_PARTIAL 0x20
131 static const value_string idrp_path_attr_flags
[] = {
132 {IDRP_UPDATE_PATH_FLAG_OPTIONAL
, "Optional"},
133 {IDRP_UPDATE_PATH_FLAG_TRANSITIVE
, "Transitive"},
134 {IDRP_UPDATE_PATH_FLAG_PARTIAL
, "Partial"},
135 {IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE
, "Optional, Transitive"},
136 {IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL
,
137 "Optional, Transitive, Partial"},
141 /* BISPDU Type Codes */
142 #define IDRP_TYPE_OPEN 1
143 #define IDRP_TYPE_UPDATE 2
144 #define IDRP_TYPE_ERROR 3
145 #define IDRP_TYPE_KEEPALIVE 4
146 #define IDRP_TYPE_CEASE 5
147 #define IDRP_TYPE_RIB_REFRESH 6
148 static const value_string idrp_pdu_types
[] = {
149 {IDRP_TYPE_OPEN
, "OPEN"},
150 {IDRP_TYPE_UPDATE
, "UPDATE"},
151 {IDRP_TYPE_ERROR
, "ERROR"},
152 {IDRP_TYPE_KEEPALIVE
, "KEEPALIVE"},
153 {IDRP_TYPE_CEASE
, "CEASE"},
154 {IDRP_TYPE_RIB_REFRESH
, "RIB REFRESH"},
158 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY 0
159 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_AUTHENTICATION 1
160 #define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT 2
161 static const value_string idrp_pdu_open_authentication_codes
[] = {
162 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY
,
164 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_AUTHENTICATION
,
165 "Integrity plus authentication"},
166 {IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT
,
167 "Integrity plus secret text"},
172 #define IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR 1
173 #define IDRP_PATH_ATTR_TYPE_EXT_INFO 2
174 #define IDRP_PATH_ATTR_TYPE_RD_PATH 3
175 #define IDRP_PATH_ATTR_TYPE_NEXT_HOP 4
176 #define IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL 5
177 #define IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL 6
178 #define IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC 7
179 #define IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY 8
180 #define IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR 9
181 #define IDRP_PATH_ATTR_TYPE_EXPENSE 10
182 #define IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS 11
183 #define IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING 12
184 #define IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT 13
185 #define IDRP_PATH_ATTR_TYPE_SECURITY 14
186 #define IDRP_PATH_ATTR_TYPE_CAPACITY 15
187 #define IDRP_PATH_ATTR_TYPE_PRIORITY 16
188 static const value_string path_attr_types
[] = {
189 {IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR
, "Route Separator"},
190 {IDRP_PATH_ATTR_TYPE_EXT_INFO
, "Ext Info"},
191 {IDRP_PATH_ATTR_TYPE_RD_PATH
, "RD Path"},
192 {IDRP_PATH_ATTR_TYPE_NEXT_HOP
, "Next Hop"},
193 {IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL
, "Dist List Incl"},
194 {IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL
, "Dist List Excl"},
195 {IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC
, "Multi Exit Disc"},
196 {IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY
, "Transit Delay"},
197 {IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR
, "Residual Error"},
198 {IDRP_PATH_ATTR_TYPE_EXPENSE
, "Expense"},
199 {IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS
, "Locally Ddefined Qos"},
200 {IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING
, "Hierarchical Recording"},
201 {IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT
, "RD Hop Count"},
202 {IDRP_PATH_ATTR_TYPE_SECURITY
, "Security"},
203 {IDRP_PATH_ATTR_TYPE_CAPACITY
, "Capacity"},
204 {IDRP_PATH_ATTR_TYPE_PRIORITY
, "Priority"},
208 #define IDRP_RD_PATH_RD_SET 1
209 #define IDRP_RD_PATH_RD_SEQ 2
210 #define IDRP_RD_PATH_ENTRY_SEQ 3
211 #define IDRP_RD_PATH_ENTRY_SET 4
212 static const value_string path_rd_segment_types
[] = {
213 {IDRP_RD_PATH_RD_SET
, "RD_SET"},
214 {IDRP_RD_PATH_RD_SEQ
, "RD_SEQ"},
215 {IDRP_RD_PATH_ENTRY_SEQ
, "ENTRY_SEQ"},
216 {IDRP_RD_PATH_ENTRY_SET
, "ENTRY_SET"},
220 #define IDRP_PROTO_TYPE_TR_9577 1
221 #define IDRP_PROTO_TYPE_8802 2
222 static const value_string idrp_proto_type
[] = {
223 {IDRP_PROTO_TYPE_TR_9577
, "ISO TR 9577 IPI/SPI"},
224 {IDRP_PROTO_TYPE_8802
, "ISO 8802 LSAP"},
229 /* ERROR PDU error codes: */
230 #define IDRP_ERROR_OPEN 1
231 #define IDRP_ERROR_UPDATE 2
232 #define IDRP_ERROR_HOLD_TIMER 3
233 #define IDRP_ERROR_FSM 4
234 #define IDRP_ERROR_RIB_REFRESH 5
235 static const value_string idrp_error_codes
[] = {
236 {IDRP_ERROR_OPEN
, "OPEN PDU_Error"},
237 {IDRP_ERROR_UPDATE
, "UPDATE PDU_Error"},
238 {IDRP_ERROR_HOLD_TIMER
, "Hold Timer_Expired"},
239 {IDRP_ERROR_FSM
, "FSM Error"},
240 {IDRP_ERROR_RIB_REFRESH
, "RIB REFRESH PDU Error"},
244 /* ERROR PDU sub error codes: OPEN */
245 #define IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER 1
246 #define IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE 2
247 #define IDRP_ERROR_OPEN_BAD_PEER_RD 3
248 #define IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE 4
249 #define IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE 5
250 #define IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET 6
251 #define IDRP_ERROR_RDC_MISMATCH 7
252 static const value_string idrp_error_open_subcodes
[] = {
253 {IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER
, "Unsupported Version Number"},
254 {IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE
, "Bad Maximum PDU Size"},
255 {IDRP_ERROR_OPEN_BAD_PEER_RD
, "Bad Peer RD"},
256 {IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE
,
257 "Unsupported Authentication Code"},
258 {IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE
, "Authentication Failure"},
259 {IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET
, "Bad RIB Attribute Set"},
260 {IDRP_ERROR_RDC_MISMATCH
, "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
, "Malformed Attribute List"},
280 {IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE
,
281 "Unrecognized Well-known Attribute"},
282 {IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE
,
283 "Missing Well-known Attribute"},
284 {IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR
, "Attribute Flags Error"},
285 {IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR
, "Attribute Length Error"},
286 {IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP
, "RD Routing Loop"},
287 {IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE
,
288 "Invalid NEXT HOP Attribute"},
289 {IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR
, "Optional Attribute error"},
290 {IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION
,
291 "Invalid Reachability Information"},
292 {IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS
, "Misconfigured RDCs"},
293 {IDRP_ERROR_UPDATE_MALFORMED_NLRI
, "Malformed NLRI"},
294 {IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES
, "Duplicated_Attributes"},
295 {IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT
, "Illegal RD Path Segment"},
299 #define IDRP_ERROR_HOLD_TIMER_NONE 0
300 static const value_string idrp_error_hold_timer_subcodes
[] = {
301 {IDRP_ERROR_HOLD_TIMER_NONE
, "None"},
305 /* ERROR PDU sub error codes: FSM */
306 #define IDRP_ERROR_FSM_CLOSED 1
307 #define IDRP_ERROR_FSM_OPEN_RCVD 2
308 #define IDRP_ERROR_FSM_OPEN_SENT 3
309 #define IDRP_ERROR_FSM_CLOSE_WAIT 4
310 #define IDRP_ERROR_FSM_ESTABLISHED 5
311 static const value_string idrp_error_fsm_subcodes
[] = {
312 {IDRP_ERROR_FSM_CLOSED
, "CLOSED"},
313 {IDRP_ERROR_FSM_OPEN_RCVD
, "OPEN-RCVD"},
314 {IDRP_ERROR_FSM_OPEN_SENT
, "OPEN-SENT"},
315 {IDRP_ERROR_FSM_CLOSE_WAIT
, "CLOSE-WAIT"},
316 {IDRP_ERROR_FSM_ESTABLISHED
, "ESTABLISHED"},
321 #define IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE 1
322 #define IDRP_ERROR_RIB_REFRESH_UNSUPPORTED_RIB_ATTS 2
323 static const value_string idrp_error_rib_refresh_subcodes
[] = {
324 {IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE
, "Invalid OpCode"},
325 {IDRP_ERROR_RIB_REFRESH_UNSUPPORTED_RIB_ATTS
,
326 "Unsupported RIB-Attributes"},
331 #define IDRP_RIB_REFRESH_REQUEST 1
332 #define IDRP_RIB_REFRESH_START 2
333 #define IDRP_RIB_REFRESH_END 3
334 static const value_string idrp_rib_refresh_opcodes
[] = {
335 {IDRP_RIB_REFRESH_REQUEST
, "RIB Refresh Request"},
336 {IDRP_RIB_REFRESH_START
, "RIB Refresh Start"},
337 {IDRP_RIB_REFRESH_END
, "RIB Refresh End"},
342 int dissect_BISPDU_OPEN(tvbuff_t
* tvb
, int offset
, proto_tree
* tree
)
345 guint8 number_of_non_empty_rib_attributes
;
346 guint8 number_of_distinguishing_attributes
;
347 guint8 rib_attribute_type
;
348 guint8 number_of_rdcs
;
349 guint8 length_indicator_guint8
;
353 /* 1 octet idrp version */
354 proto_tree_add_item(tree
, hf_idrp_open_version
, tvb
, offset
,1, ENC_BIG_ENDIAN
);
357 /* Hold Time (2 octets) */
358 proto_tree_add_item(tree
, hf_idrp_open_hold_time
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
361 /* Maximum PDU Size (2 octets) */
362 proto_tree_add_item(tree
, hf_idrp_open_max_pdu_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
365 /* Source RDI Length Indicator (1 octet) */
366 rdi_len
= tvb_get_guint8(tvb
, offset
);
370 proto_tree_add_item(tree
, hf_idrp_open_src_rdi
, tvb
, offset
, rdi_len
, ENC_ASCII
| ENC_NA
);
373 /* Number of Non-empty RIB-Atts */
374 number_of_non_empty_rib_attributes
= tvb_get_guint8(tvb
, offset
);
377 /* process Nth non-empty RIB-Atts */
378 for (i
= number_of_non_empty_rib_attributes
; i
> 0; i
--) {
379 /* 1 octet number of distinguishing attributes that are contained in
381 number_of_distinguishing_attributes
= tvb_get_guint8(tvb
, offset
);
384 /* process Nth RIB-Att */
385 for (j
= number_of_distinguishing_attributes
; j
> 0; j
--) {
386 /* 1 octet Type of RIB-Att */
387 rib_attribute_type
= tvb_get_guint8(tvb
, offset
);
390 switch (rib_attribute_type
) {
391 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR
:
392 case IDRP_PATH_ATTR_TYPE_EXT_INFO
:
393 case IDRP_PATH_ATTR_TYPE_RD_PATH
:
394 case IDRP_PATH_ATTR_TYPE_NEXT_HOP
:
395 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL
:
396 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL
:
397 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC
:
398 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR
:
399 case IDRP_PATH_ATTR_TYPE_EXPENSE
:
400 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING
:
401 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT
:
402 case IDRP_PATH_ATTR_TYPE_CAPACITY
:
403 case IDRP_PATH_ATTR_TYPE_PRIORITY
:
405 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS
:
406 /* 1 octet Nsap prefix length */
407 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
409 /* process Nsap prefix */
412 hf_idrp_open_rib_attr_locally_defined_qos_nsap
,
415 length_indicator_guint8
,
417 offset
+= length_indicator_guint8
;
419 /* 1 octet Qos length */
420 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
425 hf_idrp_open_rib_attr_locally_defined_qos_value
,
428 length_indicator_guint8
,
430 offset
+= length_indicator_guint8
;
432 /* 1 octet Metric length */
433 /* note: metric always absent in OPEN BISPDU */
434 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
439 hf_idrp_open_rib_attr_locally_defined_qos_metric
,
442 length_indicator_guint8
,
444 offset
+= length_indicator_guint8
;
446 case IDRP_PATH_ATTR_TYPE_SECURITY
:
447 /* length of Security Registration ID and Security Information */
450 /* length of Security Registration ID */
451 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
453 /* value of Security Registration ID */
456 hf_idrp_open_rib_attr_security_reg_id
,
459 length_indicator_guint8
,
461 offset
+= length_indicator_guint8
;
463 /* length of Security Information */
464 /* note: always absent for OPEN BISPDU*/
465 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
467 /* value of Security Information */
470 hf_idrp_open_rib_attr_security_info
,
473 length_indicator_guint8
,
475 offset
+= length_indicator_guint8
;
480 } /* switch (path_attr_type) */
482 } /* process Nth non-empty RIB-Atts */
486 number_of_rdcs
= tvb_get_guint8(tvb
, offset
);
487 proto_tree_add_item(tree
, hf_idrp_open_number_of_confederations
, tvb
,
488 offset
, 1, ENC_BIG_ENDIAN
);
491 /* process Nth Confederation RDI */
492 for (i
= number_of_rdcs
; i
> 0; i
--) {
493 /* 1 octet of RDI length */
494 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
497 /* process Nth RDI */
498 proto_tree_add_item(tree
, hf_idrp_open_confederation
, tvb
,
499 offset
, length_indicator_guint8
, ENC_ASCII
| ENC_NA
);
500 offset
+= length_indicator_guint8
;
503 /* Authentication Code */
504 proto_tree_add_item(tree
, hf_idrp_open_authentication_code
, tvb
, offset
, 1,
508 /* Authentication Data */
509 proto_tree_add_item(tree
, hf_idrp_open_authentication_data
, tvb
, offset
,
510 tvb_reported_length_remaining(tvb
, offset
), ENC_ASCII
| ENC_NA
);
511 offset
+= tvb_reported_length_remaining(tvb
, offset
);
516 int dissect_BISPDU_UPDATE(tvbuff_t
* tvb
, int offset
, proto_tree
* tree
)
518 guint16 nb_unfeasible_routes
;
519 guint16 path_attrs_len
;
520 int path_attrs_start_offset
;
521 guint8 path_attr_type
;
522 guint16 path_attr_len
;
527 int path_segment_rdi_offset
;
528 guint16 length_indicator_guint16
;
529 guint8 length_indicator_guint8
;
531 guint8 dist_list_count
;
534 /* 2 octet withdrawn ("Unfeasible") Route Count */
535 nb_unfeasible_routes
= tvb_get_ntohs(tvb
, offset
);
536 proto_tree_add_item(tree
, hf_idrp_update_number_of_unfeasible_routes
,
537 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
540 /* process Nth unfeasible route ID */
541 for (i
= nb_unfeasible_routes
; i
> 0; i
--) {
542 proto_tree_add_item(tree
, hf_idrp_update_withdrawn_route
, tvb
, offset
,
547 /* 2 octets path attributes length */
548 path_attrs_len
= tvb_get_ntohs(tvb
, offset
);
551 path_attrs_start_offset
= offset
;
552 /* process Nth path attribute */
553 while (offset
< (path_attrs_start_offset
+ path_attrs_len
)) {
554 /* Path attribute flag */
555 proto_tree_add_item(tree
, hf_idrp_update_path_attr_flag
, tvb
,
556 offset
, 1, ENC_BIG_ENDIAN
);
558 /* Path attribute type */
559 path_attr_type
= tvb_get_guint8(tvb
, offset
);
560 proto_tree_add_item(tree
, hf_idrp_update_path_attr_type
, tvb
,
561 offset
, 1, ENC_BIG_ENDIAN
);
563 /* Path attribute length */
564 path_attr_len
= tvb_get_ntohs(tvb
, offset
);
565 proto_tree_add_item(tree
, hf_idrp_update_path_attr_length
, tvb
,
566 offset
, 2, ENC_BIG_ENDIAN
);
568 /* Path attribute value */
569 switch (path_attr_type
) {
570 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR
:
571 proto_tree_add_item(tree
,
572 hf_idrp_update_path_attr_route_separator_id
,
578 proto_tree_add_item(tree
,
579 hf_idrp_update_path_attr_route_separator_localpref
,
586 case IDRP_PATH_ATTR_TYPE_EXT_INFO
:
587 proto_tree_add_item(tree
,
588 hf_idrp_update_path_attr_ext_info
,
594 case IDRP_PATH_ATTR_TYPE_RD_PATH
:
595 start_offset
= offset
;
597 /* process Nth path segment */
598 while (offset
< (start_offset
+ path_attr_len
)) {
599 /* print path segment type */
600 proto_tree_add_item(tree
,
601 hf_idrp_update_path_attr_rd_path_type
,
608 /* 2 octets of path segment length */
609 length_indicator_guint16
= tvb_get_ntohs(tvb
, offset
);
610 proto_tree_add_item(tree
,
611 hf_idrp_update_path_attr_rd_path_segment_length
,
618 /* one path segment may contain one or more RDI */
619 path_segment_rdi_offset
= offset
;
620 while (offset
< (path_segment_rdi_offset
+ length_indicator_guint16
)) {
621 /* 1 octet rdi length */
622 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
624 /* print N times path RDI */
625 proto_tree_add_item(tree
,
626 hf_idrp_update_path_attr_rd_path_rdi
,
629 length_indicator_guint8
,
631 offset
+= length_indicator_guint8
;
635 case IDRP_PATH_ATTR_TYPE_NEXT_HOP
:
636 /* 1 octet idrp server flag */
637 proto_tree_add_item(tree
,
638 hf_idrp_update_path_attr_next_hop_idrp_server
,
645 start_offset
= offset
;
646 /* process Nth next hop */
647 while (offset
< (start_offset
+ path_attr_len
)) {
648 /* 1 octet Proto type */
649 proto_tree_add_item(tree
,
650 hf_idrp_update_path_attr_next_hop_proto_type
,
656 /* 1 octet Proto len */
657 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
659 /* N octets Proto: in case of ISO 8473 one octet with the value 0x81 */
660 proto_tree_add_item(tree
,
661 hf_idrp_update_path_attr_next_hop_proto
,
664 length_indicator_guint8
,
666 offset
+= length_indicator_guint8
;
668 /* length of NET of Next HOP */
669 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
671 /* NET of Next HOP */
672 proto_tree_add_item(tree
,
673 hf_idrp_update_path_attr_next_hop_rdi
,
676 length_indicator_guint8
,
678 offset
+= length_indicator_guint8
;
681 nb_of_snpa
= tvb_get_guint8(tvb
, offset
);
682 proto_tree_add_item(tree
,
683 hf_idrp_update_path_attr_next_hop_nb_snpa
,
689 /* process Nth SNPA */
690 for (i
= nb_of_snpa
; i
> 0; i
--) {
691 /* SNPS length in multiples of 4 bit */
692 length_indicator_guint8
=
693 (guint8
) ceil((float)tvb_get_guint8(tvb
, offset
) / (float)2.0);
695 proto_tree_add_item(tree
,
696 hf_idrp_update_path_attr_next_hop_snpa
,
699 length_indicator_guint8
,
701 offset
+= length_indicator_guint8
;
703 } /* while: process Nth next hop */
705 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL
:
706 /* 1 octet number of RDI's/Confed's in DIST list */
707 dist_list_count
= tvb_get_guint8(tvb
, offset
);
708 proto_tree_add_item(tree
,
709 hf_idrp_update_path_attr_dist_list_excl_nb_rdi
,
716 /* process RDI's/Confederations's in DIST list */
717 for (i
= dist_list_count
; i
> 0; i
--) {
718 /* 1 octet RDI/Confed length indicator */
719 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
721 /* variable size RDI/Conderation */
722 proto_tree_add_item(tree
,
723 hf_idrp_update_path_attr_dist_list_excl_rdi
,
726 length_indicator_guint8
,
728 offset
+= length_indicator_guint8
;
731 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL
:
732 /* 1 octet number of RDI's/Confed's in DIST list */
733 dist_list_count
= tvb_get_guint8(tvb
, offset
);
734 proto_tree_add_item(tree
,
735 hf_idrp_update_path_attr_dist_list_incl_nb_rdi
,
742 /* process RDI's/Confederations's in DIST list */
743 for (i
= dist_list_count
; i
> 0; i
--) {
744 /* 1 octet RDI/Confed length indicator */
745 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
747 /* variable size RDI/Conderation */
748 proto_tree_add_item(tree
,
749 hf_idrp_update_path_attr_dist_list_incl_rdi
,
752 length_indicator_guint8
,
754 offset
+= length_indicator_guint8
;
757 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC
:
758 /* 1 octet Multi Exit Discriminator */
759 proto_tree_add_item(tree
,
760 hf_idrp_update_path_attr_multi_exit_disc
,
767 case IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY
:
768 /* 2 octets of transit delay */
769 proto_tree_add_item(tree
,
770 hf_idrp_update_path_attr_transit_delay
,
777 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR
:
778 /* 4 octets of residual error */
779 proto_tree_add_item(tree
,
780 hf_idrp_update_path_attr_residual_error
,
787 case IDRP_PATH_ATTR_TYPE_EXPENSE
:
788 /* 2 octets of Expense */
789 proto_tree_add_item(tree
,
790 hf_idrp_update_path_attr_expense
,
797 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS
:
798 /* 1 octet Nsap prefix length */
799 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
801 /* process Nsap prefix */
802 proto_tree_add_item(tree
,
803 hf_idrp_update_path_attr_locally_defined_qos_nsap
,
806 length_indicator_guint8
,
808 offset
+= length_indicator_guint8
;
809 /* 1 octet Qoslength */
810 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
813 proto_tree_add_item(tree
,
814 hf_idrp_update_path_attr_locally_defined_qos_value
,
817 length_indicator_guint8
,
819 offset
+= length_indicator_guint8
;
820 /* 1 octet Metric length */
821 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
824 proto_tree_add_item(tree
,
825 hf_idrp_update_path_attr_locally_defined_qos_metric
,
828 length_indicator_guint8
,
830 offset
+= length_indicator_guint8
;
832 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING
:
833 /* 1 octet flag hierarchical recording */
834 proto_tree_add_item(tree
,
835 hf_idrp_update_path_attr_hierarchicaldecoding
,
842 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT
:
843 proto_tree_add_item(tree
,
844 hf_idrp_update_path_attr_rd_hop_count
,
851 case IDRP_PATH_ATTR_TYPE_SECURITY
:
852 /* length of Security Registration ID */
853 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
856 /* value of Security Registration ID */
857 proto_tree_add_item(tree
,
858 hf_idrp_update_path_attr_security_reg_id
,
861 length_indicator_guint8
,
863 offset
+= length_indicator_guint8
;
865 /* length of Security Information */
866 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
868 /* value of Security Information */
869 proto_tree_add_item(tree
,
870 hf_idrp_update_path_attr_security_info
,
873 length_indicator_guint8
,
875 offset
+= length_indicator_guint8
;
877 case IDRP_PATH_ATTR_TYPE_CAPACITY
:
878 proto_tree_add_item(tree
,
879 hf_idrp_update_path_attr_capacity
,
886 case IDRP_PATH_ATTR_TYPE_PRIORITY
:
887 proto_tree_add_item(tree
,
888 hf_idrp_update_path_attr_priority
,
900 /* 1 octet Proto type */
901 proto_tree_add_item(tree
, hf_idrp_update_nlri_proto_type
, tvb
, offset
,
905 /* 1 octet Proto len */
906 proto_len
= tvb_get_guint8(tvb
, offset
);
909 /* N octets Proto identity: in case of ISO 8473 one octet with the value 0x81 */
910 proto_tree_add_item(tree
, hf_idrp_update_nlri_proto_id
, tvb
, offset
,
911 proto_len
, ENC_ASCII
| ENC_NA
);
914 /* 2 octets length of address */
915 net_len
= tvb_get_ntohs(tvb
, offset
);
916 proto_tree_add_item(tree
, hf_idrp_update_nlri_addr_length
, tvb
, offset
,
920 /* process N address info sets */
921 start_offset
= offset
;
922 while (offset
< (start_offset
+ net_len
)) {
923 /* 1 octet address length in bits */
924 rdi_len
= tvb_get_guint8(tvb
, offset
) / 8;
925 proto_tree_add_item(tree
, hf_idrp_update_nlri_addr_info_nb_bits
, tvb
,
926 offset
, 1, ENC_BIG_ENDIAN
);
929 proto_tree_add_item(tree
, hf_idrp_update_nlri_addr_info
, tvb
,
930 offset
, rdi_len
, ENC_ASCII
| ENC_NA
);
936 int dissect_BISPDU_ERROR(tvbuff_t
* tvb
, int offset
, proto_tree
* tree
)
938 guint8 error_code
= 0;
941 /* Error Code (1 octet) */
942 error_code
= tvb_get_guint8(tvb
, offset
);
943 proto_tree_add_item(tree
, hf_idrp_error_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
946 switch (error_code
) {
947 case IDRP_ERROR_OPEN
:
948 proto_tree_add_item(tree
, hf_idrp_error_open_subcode
, tvb
, offset
, 1,
951 case IDRP_ERROR_UPDATE
:
952 proto_tree_add_item(tree
, hf_idrp_error_update_subcode
, tvb
, offset
, 1,
955 case IDRP_ERROR_HOLD_TIMER
:
956 proto_tree_add_item(tree
, hf_idrp_error_hold_timer_subcode
, tvb
,
957 offset
, 1, ENC_BIG_ENDIAN
);
960 proto_tree_add_item(tree
, hf_idrp_error_fsm_subcode
, tvb
, offset
, 1,
963 case IDRP_ERROR_RIB_REFRESH
:
964 proto_tree_add_item(tree
, hf_idrp_error_rib_refresh_subcode
, tvb
,
965 offset
, 1, ENC_BIG_ENDIAN
);
972 /* data : zero or more octets of data to be used in diagnosing the reason
973 for the IDRP ERROR PDU. The contents of the Data field depends upon the
974 error code and error subcode. */
975 data_length
= tvb_reported_length_remaining(tvb
, offset
);
976 if (data_length
>=0) {
978 proto_tree_add_item(tree
, hf_idrp_error_data
, tvb
, offset
, data_length
,
980 offset
+= data_length
;
986 int dissect_BISPDU_RIB_REFRESH(tvbuff_t
* tvb
, int offset
, proto_tree
* tree
)
988 proto_tree
*sub_tree
;
990 guint8 number_of_non_empty_rib_attributes
;
991 guint8 number_of_distinguishing_attributes
;
992 guint8 rib_attribute_type
;
993 guint8 length_indicator_guint8
;
998 proto_tree_add_item(tree
, hf_idrp_rib_refresh_opcode
, tvb
, offset
, 1,
1002 /* Path Attributes subtree */
1003 ti
= proto_tree_add_text(tree
, tvb
, offset
, 0, "Path Attributes");
1004 sub_tree
= proto_item_add_subtree(ti
, ett_idrp_sub
);
1006 /* Number of Non-empty RIB-Atts */
1007 number_of_non_empty_rib_attributes
= tvb_get_guint8(tvb
, offset
);
1010 if (!number_of_non_empty_rib_attributes
)
1011 proto_tree_add_text(sub_tree
, tvb
, offset
, 0, "none");
1013 /* process Nth RIB-Atts */
1014 for (i
= number_of_non_empty_rib_attributes
; i
> 0; i
--) {
1016 /* 1 octet number of distinguishing attributes that are contained in
1018 number_of_distinguishing_attributes
= tvb_get_guint8(tvb
, offset
);
1021 /* process Nth RIB-Att */
1022 for (j
= number_of_distinguishing_attributes
; j
> 0; j
--) {
1023 /* 1 octet Type of RIB-Att */
1024 rib_attribute_type
= tvb_get_guint8(tvb
, offset
);
1027 switch (rib_attribute_type
) {
1028 case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR
:
1029 case IDRP_PATH_ATTR_TYPE_EXT_INFO
:
1030 case IDRP_PATH_ATTR_TYPE_RD_PATH
:
1031 case IDRP_PATH_ATTR_TYPE_NEXT_HOP
:
1032 case IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL
:
1033 case IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL
:
1034 case IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC
:
1035 case IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR
:
1036 case IDRP_PATH_ATTR_TYPE_EXPENSE
:
1037 case IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING
:
1038 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT
:
1039 case IDRP_PATH_ATTR_TYPE_CAPACITY
:
1040 case IDRP_PATH_ATTR_TYPE_PRIORITY
:
1042 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS
:
1043 /* 1 octet Nsap prefix length */
1044 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
1046 /* process Nsap prefix */
1047 proto_tree_add_item(
1049 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap
,
1052 length_indicator_guint8
,
1053 ENC_ASCII
| ENC_NA
);
1054 offset
+= length_indicator_guint8
;
1056 /* 1 octet Qos length */
1057 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
1060 proto_tree_add_item(
1062 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value
,
1065 length_indicator_guint8
,
1066 ENC_ASCII
| ENC_NA
);
1067 offset
+= length_indicator_guint8
;
1069 /* 1 octet Metric length */
1070 /* note: metric always absent in OPEN BISPDU */
1071 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
1073 /* process Metric */
1074 proto_tree_add_item(
1076 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric
,
1079 length_indicator_guint8
,
1080 ENC_ASCII
| ENC_NA
);
1081 offset
+= length_indicator_guint8
;
1083 case IDRP_PATH_ATTR_TYPE_SECURITY
:
1084 /* length of Security Registration ID and Security Information */
1087 /* length of Security Registration ID */
1088 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
1090 /* value of Security Registration ID */
1091 proto_tree_add_item(
1093 hf_idrp_rib_refresh_rib_attr_security_reg_id
,
1096 length_indicator_guint8
,
1097 ENC_ASCII
| ENC_NA
);
1098 offset
+= length_indicator_guint8
;
1100 /* length of Security Information */
1101 /* note: always absent for OPEN BISPDU*/
1102 length_indicator_guint8
= tvb_get_guint8(tvb
, offset
);
1104 /* value of Security Information */
1105 proto_tree_add_item(
1107 hf_idrp_rib_refresh_rib_attr_security_info
,
1110 length_indicator_guint8
,
1111 ENC_ASCII
| ENC_NA
);
1112 offset
+= length_indicator_guint8
;
1117 } /* switch (path_attr_type) */
1124 dissect_idrp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1127 proto_tree
*idrp_tree
;
1132 if (tvb_get_guint8(tvb
, offset
) != NLPID_ISO10747_IDRP
)
1133 return 0; /* no idrp packet */
1136 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "IDRP");
1137 col_clear(pinfo
->cinfo
, COL_INFO
);
1139 ti
= proto_tree_add_item(tree
, proto_idrp
, tvb
, 0, -1, ENC_NA
);
1140 idrp_tree
= proto_item_add_subtree(ti
, ett_idrp
);
1142 /* 2 octets BISPDU Length */
1143 proto_tree_add_item(idrp_tree
, hf_idrp_li
,
1144 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1147 /* 1 octet BISPDU Type */
1148 pdu_type
= tvb_get_guint8(tvb
, offset
);
1149 proto_tree_add_item(idrp_tree
, hf_idrp_type
,
1150 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1153 /* 4 octets Sequence */
1154 proto_tree_add_item(idrp_tree
, hf_idrp_sequence
,
1155 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1158 /* 4 octets Achnowledge */
1159 proto_tree_add_item(idrp_tree
, hf_idrp_ack
,
1160 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1163 /* 1 octets credits offered */
1164 proto_tree_add_item(idrp_tree
, hf_idrp_credit_offered
,
1165 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1168 /* 1 octets credits offered */
1169 proto_tree_add_item(idrp_tree
, hf_idrp_credit_avail
,
1170 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1173 /* 16 octets validation */
1174 proto_tree_add_item(idrp_tree
, hf_idrp_validation_pattern
,
1175 tvb
, offset
, 16, ENC_ASCII
| ENC_NA
);
1179 case IDRP_TYPE_OPEN
:
1180 offset
= dissect_BISPDU_OPEN(tvb
, offset
, idrp_tree
);
1182 case IDRP_TYPE_UPDATE
:
1183 offset
= dissect_BISPDU_UPDATE(tvb
, offset
, idrp_tree
);
1185 case IDRP_TYPE_ERROR
:
1186 offset
= dissect_BISPDU_ERROR(tvb
, offset
, idrp_tree
);
1188 case IDRP_TYPE_KEEPALIVE
:
1189 /* KEEPALIVE PDU consists of only a PDU header and has a length of 30
1193 case IDRP_TYPE_CEASE
:
1194 /* CEASE is composed a PDU header and has length of 30 octets */
1197 case IDRP_TYPE_RIB_REFRESH
:
1198 offset
= dissect_BISPDU_RIB_REFRESH(tvb
, offset
, idrp_tree
);
1204 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s",
1205 val_to_str(pdu_type
, idrp_pdu_types
, "Unknown (%u)"));
1211 void proto_register_idrp(void)
1213 static hf_register_info hf_idrp
[] = {
1215 {"BISPDU Length", "idrp.li", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1216 "BISPDU Length Indicator, length of this PDU", HFILL
}},
1218 {"BISPDU Type", "idrp.type", FT_UINT8
, BASE_DEC
,
1219 VALS(idrp_pdu_types
), 0xff, NULL
, HFILL
}},
1221 {"Sequence Number", "idrp.seq", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1222 "Sequence number, Sequence number of curent BISPDU ", HFILL
}},
1224 {"Acknowledgment number", "idrp.ack", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1225 "Acknowledgment number, Sequence number of the PDU that the sender last received correctly and in sequence number order",
1227 {&hf_idrp_credit_offered
,
1228 {"Credits Offered", "idrp.credits-offered", FT_UINT8
, BASE_DEC
,
1230 "Number of additional BISPDUs that the sender is willing to accept from the remote BIS",
1232 {&hf_idrp_credit_avail
,
1233 {"Credits Available", "idrp.credits-avail", FT_UINT8
, BASE_DEC
,
1235 "Number of additional BISPDUs that the sender is able to send to the remote BIS",
1237 {&hf_idrp_validation_pattern
,
1238 {"Validation", "idrp.validation", FT_BYTES
, BASE_NONE
,
1240 "16-octet field which provides a validation function for the BISPDU",
1242 {&hf_idrp_open_version
,
1243 {"Version", "idrp.open.version", FT_UINT8
, BASE_DEC
,
1244 NULL
, 0, "Version number of the protocol.", HFILL
}},
1245 {&hf_idrp_open_hold_time
,
1246 {"Hold Time", "idrp.open.hold-time", FT_UINT16
, BASE_DEC
,
1247 NULL
, 0, "Max number of seconds to remain in the ESTABLISHED state",
1249 {&hf_idrp_open_max_pdu_size
,
1250 {"Max PDU Size", "idrp.open.max-pdu-size", FT_UINT16
, BASE_DEC
,
1252 "Maximum number of octets that this BIS will accept in an incoming UPDATE PDU, IDRP ERROR PDU, or RIB REFRESH PDU",
1254 {&hf_idrp_open_src_rdi
,
1255 {"Source RDI", "idrp.open.src-rdi", FT_BYTES
, BASE_NONE
,
1257 "RDI of the routing domain in which the BIS that is sending this BISPDU is located",
1259 {&hf_idrp_open_rib_attr_locally_defined_qos_nsap
,
1260 {"Rib Attribute Value Locally Defined Qos NSAP",
1261 "idrp.open.rib-attr.locally-defined-qos.nsap", FT_BYTES
, BASE_NONE
,
1262 NULL
, 0, "Locally Defined Qos NSAP" ,
1264 {&hf_idrp_open_rib_attr_locally_defined_qos_value
,
1265 {"Rib Attribute Value Locally Defined Qos",
1266 "idrp.open.rib-attr.locally-defined-qos.qos", FT_BYTES
, BASE_NONE
,
1267 NULL
, 0, "Locally Defined Qos Value" ,
1269 {&hf_idrp_open_rib_attr_locally_defined_qos_metric
,
1270 {"Rib Attribute Value Locally Defined Qos Metric",
1271 "idrp.open.rib-attr.locally-defined-qos.metric", FT_BYTES
, BASE_NONE
,
1272 NULL
, 0, "Locally Defined Metric" ,
1274 {&hf_idrp_open_rib_attr_security_reg_id
,
1275 {"Rib Attribute Value Security Registration ID",
1276 "idrp.open.rib-attr.security.reg-id", FT_BYTES
, BASE_NONE
,
1277 NULL
, 0, "Identifys the Security Authority" ,
1279 {&hf_idrp_open_rib_attr_security_info
,
1280 {"Rib Attribute Value Security Registration ID",
1281 "idrp.open.rib-attr.security.info", FT_BYTES
, BASE_NONE
,
1282 NULL
, 0, "Additional security related information" ,
1284 {&hf_idrp_open_number_of_confederations
,
1285 {"Number of Routing Confederations",
1286 "idrp.open.number-of-confederations", FT_UINT8
, BASE_DEC
,
1288 "Number of Routing Domain Identifiers (Routing Domain Confederation) that this BIS is a member of",
1290 {&hf_idrp_open_confederation
,
1291 {"Routing Confederation", "idrp.open.confederation", FT_BYTES
,
1294 "Routing Domain Identifier of Routing Domain Confederation that this BIS is a member of",
1296 {&hf_idrp_open_authentication_code
,
1297 {"Authentication Code", "idrp.open.authentication-code", FT_UINT8
,
1299 VALS(idrp_pdu_open_authentication_codes
), 0,
1300 "Indicates the authentication mechanism being used",
1302 {&hf_idrp_open_authentication_data
,
1303 {"Authentication Data", "idrp.open.authentication-data", FT_BYTES
,
1305 NULL
, 0, "Datat used for optional authentication of a peer BIS", HFILL
}},
1306 {&hf_idrp_update_number_of_unfeasible_routes
,
1307 {"Number of Unfeasible Routes",
1308 "idrp.update.number-of-unfeasible-routes", FT_UINT16
, BASE_DEC
,
1310 "Number of RDIs that are included in the subsequent withdrawn routes field",
1312 {&hf_idrp_update_withdrawn_route
,
1313 {"Unfeasible Route", "idrp.update.unfeasible-route", FT_UINT32
,
1316 "Route-ID for the route that id being withdrawn from service",
1318 {&hf_idrp_update_path_attr_flag
,
1319 {"Path Attribute Flag", "idrp.update.path-attribute-flag", FT_UINT8
,
1321 VALS(idrp_path_attr_flags
), 0, NULL
, HFILL
}},
1322 {&hf_idrp_update_path_attr_type
,
1323 {"Path Attribute Type", "idrp.update.path-attribute-type", FT_UINT8
,
1325 VALS(path_attr_types
), 0, NULL
, HFILL
}},
1326 {&hf_idrp_update_path_attr_length
,
1327 {"Path Attribute Length", "idrp.update.path-attribute-length", FT_UINT16
,
1329 NULL
, 0, NULL
, HFILL
}},
1330 {&hf_idrp_update_path_attr_route_separator_id
,
1331 {"Path Attribute Value Route Separator Id",
1332 "idrp.update.path-attr.route-separator.id", FT_UINT32
, BASE_DEC
,
1333 NULL
, 0,",Route identifier for the advertised route",
1335 {&hf_idrp_update_path_attr_route_separator_localpref
,
1336 {"Path Attribute Value Route Separator Local Pref",
1337 "idrp.update.path-attr.route-separator.local-pref", FT_UINT8
, BASE_DEC
,
1338 NULL
, 0,"Contains the local preference value for route",
1340 {&hf_idrp_update_path_attr_ext_info
,
1341 {"Path Attribute Value External Info",
1342 "idrp.update.path-attr.ext-info", FT_BOOLEAN
, 8,
1343 NULL
, 0,"Flag indicates if routes have been discovered by means of IDRP",
1345 {&hf_idrp_update_path_attr_rd_path_type
,
1346 {"Path Attribute Value RD Path Segment Type",
1347 "idrp.update.path-attr.rd-path.segment-type", FT_UINT8
, BASE_HEX
,
1348 VALS(path_rd_segment_types
), 0, NULL
,
1350 {&hf_idrp_update_path_attr_rd_path_segment_length
,
1351 {"Path Attribute Value RD Path Segment Length",
1352 "idrp.update.path-attr.rd-path.segment-length", FT_UINT16
, BASE_DEC
,
1355 {&hf_idrp_update_path_attr_rd_path_rdi
,
1356 {"Path Attribute Value RD Path Segment RDI",
1357 "idrp.update.path-attr.rd-path.segment-rdi", FT_BYTES
, BASE_NONE
,
1358 NULL
, 0,"RD Path Segment Routing Identifier or Confederation" ,
1360 {&hf_idrp_update_path_attr_next_hop_idrp_server
,
1361 {"Path Attribute Value Next Hop Idrp Server",
1362 "idrp.update.path-attr.next-hop.idrp-server", FT_UINT8
, BASE_DEC
,
1363 NULL
, 0, "Permit a BIS to advertise a different or local BISs NET" ,
1365 {&hf_idrp_update_path_attr_next_hop_proto_type
,
1366 {"Path Attribute Value Next Hop Segment Protocol Type",
1367 "idrp.update.path-attr.next-hop.segment-protp-type", FT_UINT8
, BASE_DEC
,
1368 VALS(idrp_proto_type
), 0, NULL
,
1370 {&hf_idrp_update_path_attr_next_hop_proto
,
1371 {"Path Attribute Value Next Hop Segment Protocol",
1372 "idrp.update.path-attr.next-hop.segment-proto", FT_UINT8
, BASE_DEC
,
1375 {&hf_idrp_update_path_attr_next_hop_rdi
,
1376 {"Path Attribute Value Next Hop RDI",
1377 "idrp.update.path-attr.next-hop.rdi", FT_BYTES
, BASE_NONE
,
1378 NULL
, 0, "NET to advertise as next hop segment" ,
1380 {&hf_idrp_update_path_attr_next_hop_nb_snpa
,
1381 {"Path Attribute Value Next Hop Number of SNPA",
1382 "idrp.update.path-attr.next-hop.number-snpa", FT_UINT8
, BASE_DEC
,
1383 NULL
, 0, "Number of SNPA's on next hop segment" ,
1385 {&hf_idrp_update_path_attr_next_hop_snpa
,
1386 {"Path Attribute Value Next Hop SNPA",
1387 "idrp.update.path-attr.next-hop.snpa", FT_BYTES
, BASE_NONE
,
1388 NULL
, 0, "SNPA on next hop segment" ,
1390 {&hf_idrp_update_path_attr_dist_list_incl_nb_rdi
,
1391 {"Path Attribute Value Dist List Incl Number of RDIs",
1392 "idrp.update.path-attr.dist-list-incl.number-rdi", FT_UINT8
, BASE_DEC
,
1393 NULL
, 0, "Number of RDIs which NLRI infomation may be distributed" ,
1395 {&hf_idrp_update_path_attr_dist_list_incl_rdi
,
1396 {"Path Attribute Value Dist List Incl RDI",
1397 "idrp.update.path-attr.dist-list-incl.rdi", FT_BYTES
, BASE_NONE
,
1398 NULL
, 0, "RDI which NLRI infomation may be distributed" ,
1400 {&hf_idrp_update_path_attr_dist_list_excl_nb_rdi
,
1401 {"Path Attribute Value Dist List Excl Number of RDIs",
1402 "idrp.update.path-attr.dist-list-excl.number-rdi", FT_UINT8
, BASE_DEC
,
1403 NULL
, 0, "Number of RDIs which NLRI infomation may not be distributed" ,
1405 {&hf_idrp_update_path_attr_dist_list_excl_rdi
,
1406 {"Path Attribute Value Dist List Excl RDI",
1407 "idrp.update.path-attr.dist-list-excl.rdi", FT_BYTES
, BASE_NONE
,
1408 NULL
, 0, "RDI which NLRI infomation may be distributed" ,
1410 {&hf_idrp_update_path_attr_multi_exit_disc
,
1411 {"Path Attribute Value Multi Exit Disc",
1412 "idrp.update.path-attr.dist-list-excl.rdi", FT_UINT8
, BASE_DEC
,
1413 NULL
, 0, "Number of exit points to an adjacent domain" ,
1415 {&hf_idrp_update_path_attr_transit_delay
,
1416 {"Path Attribute Value Transit Delay",
1417 "idrp.update.path-attr.transit-delay", FT_UINT16
, BASE_DEC
,
1418 NULL
, 0, "Transit Delay" ,
1420 {&hf_idrp_update_path_attr_residual_error
,
1421 {"Path Attribute Value Residual Error",
1422 "idrp.update.path-attr.residual-error", FT_UINT32
, BASE_DEC
,
1423 NULL
, 0, "Residual error probability to destination" ,
1425 {&hf_idrp_update_path_attr_expense
,
1426 {"Path Attribute Value Expense",
1427 "idrp.update.path-attr.expense", FT_UINT16
, BASE_DEC
,
1428 NULL
, 0, "Expense to destination" ,
1430 {&hf_idrp_update_path_attr_locally_defined_qos_nsap
,
1431 {"Path Attribute Value Locally Defined Qos NSAP",
1432 "idrp.update.path-attr.locally-defined-qos.nsap", FT_BYTES
, BASE_NONE
,
1433 NULL
, 0, "Locally Defined Qos NSAP" ,
1435 {&hf_idrp_update_path_attr_locally_defined_qos_value
,
1436 {"Path Attribute Value Locally Defined Qos",
1437 "idrp.update.path-attr.locally-defined-qos.qos", FT_BYTES
, BASE_NONE
,
1438 NULL
, 0, "Locally Defined Qos Value" ,
1440 {&hf_idrp_update_path_attr_locally_defined_qos_metric
,
1441 {"Path Attribute Value Locally Defined Qos Metric",
1442 "idrp.update.path-attr.locally-defined-qos.metric", FT_BYTES
, BASE_NONE
,
1443 NULL
, 0, "Locally Defined Metric" ,
1445 {&hf_idrp_update_path_attr_hierarchicaldecoding
,
1446 {"Path Attribute Value Hierarchical Decoding",
1447 "idrp.update.path-attr.hierarchical-decoding", FT_UINT8
, BASE_HEX
,
1448 NULL
, 0, "Controls the transitivity of NPDUs through the confederation" ,
1450 {&hf_idrp_update_path_attr_rd_hop_count
,
1451 {"Path Attribute Value RD Hop Count",
1452 "idrp.update.path-attr.rd-hop-count", FT_UINT8
, BASE_DEC
,
1453 NULL
, 0, "Maximum Hop Count for this Routing Information to travel" ,
1455 {&hf_idrp_update_path_attr_security_reg_id
,
1456 {"Path Attribute Value Security Registration ID",
1457 "idrp.update.path-attr.security.reg-id", FT_BYTES
, BASE_NONE
,
1458 NULL
, 0, "Identifys the Security Authority" ,
1460 {&hf_idrp_update_path_attr_security_info
,
1461 {"Path Attribute Value Security Registration ID",
1462 "idrp.update.path-attr.security.info", FT_BYTES
, BASE_NONE
,
1463 NULL
, 0, "Additional security related information" ,
1465 {&hf_idrp_update_path_attr_capacity
,
1466 {"Path Attribute Value Capacity",
1467 "idrp.update.path-attr.capacity", FT_UINT8
, BASE_DEC
,
1468 NULL
, 0, "Capacity of the RD_PATH for handling traffic" ,
1470 {&hf_idrp_update_path_attr_priority
,
1471 {"Path Attribute Value Capacity",
1472 "idrp.update.path-attr.capacity", FT_UINT8
, BASE_DEC
,
1473 NULL
, 0, "Capacity of the RD_PATH for handling traffic" ,
1475 {&hf_idrp_update_nlri_proto_type
,
1476 {"NLRI Protocol Type", "idrp.update.nlri.proto-type", FT_UINT8
,
1478 VALS(idrp_proto_type
), 0, NULL
, HFILL
}},
1479 {&hf_idrp_update_nlri_proto_id
,
1480 {"NLRI Protocol Identity", "idrp.update.nlri.proto-id", FT_BYTES
,
1483 "Identity of the protocol associated with the NLRI address information",
1485 {&hf_idrp_update_nlri_addr_length
,
1486 {"NLRI Address Length",
1487 "idrp.update.nlri.addr-length.", FT_UINT16
, BASE_DEC
,
1490 {&hf_idrp_update_nlri_addr_info_nb_bits
,
1491 {"NLRI Address Info Bits",
1492 "idrp.update.nlri.addr-info-bits.", FT_UINT8
, BASE_DEC
,
1495 {&hf_idrp_update_nlri_addr_info
,
1496 {"NLRI Address Info", "idrp.update.nlri.addr-info", FT_BYTES
,
1498 NULL
, 0, "Network Layer Reachability Information Protocol", HFILL
}},
1499 {&hf_idrp_error_code
,
1500 {"Error Code", "idrp.error.code", FT_UINT8
, BASE_DEC
,
1501 VALS(idrp_error_codes
), 0,
1503 {&hf_idrp_error_open_subcode
,
1504 {"Error Subcode (Open Message)", "idrp.error.subcode", FT_UINT8
,
1505 BASE_DEC
, VALS(idrp_error_open_subcodes
),
1507 {&hf_idrp_error_update_subcode
,
1508 {"Error Subcode (Update Message)", "idrp.error.subcode", FT_UINT8
,
1509 BASE_DEC
, VALS(idrp_error_update_subcodes
),
1511 {&hf_idrp_error_hold_timer_subcode
,
1512 {"Error Subcode (Hold Timer)", "idrp.error.subcode", FT_UINT8
,
1513 BASE_DEC
, VALS(idrp_error_hold_timer_subcodes
),
1515 {&hf_idrp_error_fsm_subcode
,
1516 {"Error Subcode (Fsm State)", "idrp.error.subcode", FT_UINT8
,
1517 BASE_DEC
, VALS(idrp_error_fsm_subcodes
),
1519 {&hf_idrp_error_rib_refresh_subcode
,
1520 {"Error Subcode (Rib-Refresh Message)", "idrp.error.subcode",
1521 FT_UINT8
, BASE_DEC
, VALS(idrp_error_rib_refresh_subcodes
),
1522 0xff, NULL
, HFILL
}},
1523 {&hf_idrp_error_data
,
1524 {"Error Data", "idrp.error.data", FT_BYTES
, BASE_NONE
, NULL
, 0,
1525 "Diagnosis data that depends upon the error code and error subcode",
1527 {&hf_idrp_rib_refresh_opcode
,
1528 {"Rib Refresh upcode", "idrp.rib-refresh.opcode", FT_UINT8
, BASE_DEC
,
1529 VALS(idrp_error_rib_refresh_subcodes
),
1530 0xff, NULL
, HFILL
}},
1531 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap
,
1532 {"Rib Attribute Value Locally Defined Qos NSAP",
1533 "idrp.rib-refresh.rib-attr.locally-defined-qos.nsap",
1534 FT_BYTES
, BASE_NONE
,
1535 NULL
, 0, "Locally Defined Qos NSAP" ,
1537 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value
,
1538 {"Rib Attribute Value Locally Defined Qos",
1539 "idrp.rib-refresh.rib-attr.locally-defined-qos.qos",
1540 FT_BYTES
, BASE_NONE
,
1541 NULL
, 0, "Locally Defined Qos Value" ,
1543 {&hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric
,
1544 {"Rib Attribute Value Locally Defined Qos Metric",
1545 "idrp.rib-refresh.rib-attr.locally-defined-qos.metric",
1546 FT_BYTES
, BASE_NONE
,
1547 NULL
, 0, "Locally Defined Metric" ,
1549 {&hf_idrp_rib_refresh_rib_attr_security_reg_id
,
1550 {"Rib Attribute Value Security Registration ID",
1551 "idrp.rib-refresh.rib-attr.security.reg-id", FT_BYTES
, BASE_NONE
,
1552 NULL
, 0, "Identifys the Security Authority" ,
1554 {&hf_idrp_rib_refresh_rib_attr_security_info
,
1555 {"Rib Attribute Value Security Registration ID",
1556 "idrp.rib-refresh.rib-attr.security.info", FT_BYTES
, BASE_NONE
,
1557 NULL
, 0, "Additional security related information" ,
1561 /* List of subtrees */
1562 static gint
*ett
[] = {
1567 proto_idrp
= proto_register_protocol(IDRP_PROTO
, "IDRP", "idrp");
1568 proto_register_field_array(proto_idrp
, hf_idrp
, array_length(hf_idrp
));
1569 proto_register_subtree_array(ett
, array_length(ett
));
1570 new_register_dissector("idrp", dissect_idrp
, proto_idrp
);
1575 * Editor modelines - http://www.wireshark.org/tools/modelines.html
1580 * indent-tabs-mode: nil
1583 * vi: set shiftwidth=4 tabstop=4 expandtab:
1584 * :indentSize=4:tabSize=4:noTabs=true: