MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / epan / dissectors / packet-idrp.c
blob6e9d86c2d02e06a4dad7c5acf8ec3b30b3eebc15
1 /* packet-idrp.c
2 * ISO 10747 Inter Domain Routing Protocol
3 * Routines for IDRP packet dissection.
4 * Copyright 2013, Mathias Guettler <guettler@web.de>
6 * $Id$
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.
26 /* Supports:
27 * ISO 10747 Inter Domain Routing Protocol October 18, 1993
28 * TODO:
29 * Validation checksum calculation
33 #include "config.h"
35 #include <glib.h>
36 #include <epan/packet.h>
37 #include <epan/nlpid.h>
39 #include <math.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;
47 /* static header */
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;
55 /* OPEN BISPDU */
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;
69 /* UPDATE BISPDU */
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;
109 /* ERROR BISPDU */
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;
125 /* flags */
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"},
138 {0, NULL}
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"},
155 {0, NULL}
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,
163 "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"},
168 {0, NULL}
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"},
205 {0, NULL}
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"},
217 {0, NULL}
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"},
225 {0, NULL}
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"},
241 {0, NULL}
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"},
261 {0, NULL}
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"},
296 {0, NULL}
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"},
302 {0, NULL}
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"},
317 {0, NULL}
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"},
327 {0, NULL}
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"},
338 {0, NULL}
342 int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
344 guint8 rdi_len;
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;
350 gint i;
351 gint j;
353 /* 1 octet idrp version */
354 proto_tree_add_item(tree, hf_idrp_open_version, tvb, offset,1, ENC_BIG_ENDIAN);
355 offset++;
357 /* Hold Time (2 octets) */
358 proto_tree_add_item(tree, hf_idrp_open_hold_time, tvb, offset, 2, ENC_BIG_ENDIAN);
359 offset += 2;
361 /* Maximum PDU Size (2 octets) */
362 proto_tree_add_item(tree, hf_idrp_open_max_pdu_size, tvb, offset, 2, ENC_BIG_ENDIAN);
363 offset += 2;
365 /* Source RDI Length Indicator (1 octet) */
366 rdi_len = tvb_get_guint8(tvb, offset);
367 offset++;
369 /* Source RDI */
370 proto_tree_add_item(tree, hf_idrp_open_src_rdi, tvb, offset, rdi_len, ENC_ASCII | ENC_NA);
371 offset += rdi_len;
373 /* Number of Non-empty RIB-Atts */
374 number_of_non_empty_rib_attributes = tvb_get_guint8(tvb, offset);
375 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
380 the Nth RIB-Att. */
381 number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
382 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);
388 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:
404 break;
405 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
406 /* 1 octet Nsap prefix length */
407 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
408 offset++;
409 /* process Nsap prefix */
410 proto_tree_add_item(
411 tree,
412 hf_idrp_open_rib_attr_locally_defined_qos_nsap,
413 tvb,
414 offset,
415 length_indicator_guint8,
416 ENC_ASCII | ENC_NA);
417 offset += length_indicator_guint8;
419 /* 1 octet Qos length */
420 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
421 offset++;
422 /* process Qos */
423 proto_tree_add_item(
424 tree,
425 hf_idrp_open_rib_attr_locally_defined_qos_value,
426 tvb,
427 offset,
428 length_indicator_guint8,
429 ENC_ASCII | ENC_NA);
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);
435 offset++;
436 /* process Metric */
437 proto_tree_add_item(
438 tree,
439 hf_idrp_open_rib_attr_locally_defined_qos_metric,
440 tvb,
441 offset,
442 length_indicator_guint8,
443 ENC_ASCII | ENC_NA);
444 offset += length_indicator_guint8;
445 break;
446 case IDRP_PATH_ATTR_TYPE_SECURITY:
447 /* length of Security Registration ID and Security Information */
448 offset += 2;
450 /* length of Security Registration ID */
451 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
452 offset++;
453 /* value of Security Registration ID */
454 proto_tree_add_item(
455 tree,
456 hf_idrp_open_rib_attr_security_reg_id,
457 tvb,
458 offset,
459 length_indicator_guint8,
460 ENC_ASCII | ENC_NA);
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);
466 offset++;
467 /* value of Security Information */
468 proto_tree_add_item(
469 tree,
470 hf_idrp_open_rib_attr_security_info,
471 tvb,
472 offset,
473 length_indicator_guint8,
474 ENC_ASCII | ENC_NA);
475 offset += length_indicator_guint8;
477 break;
478 default:
479 break;
480 } /* switch (path_attr_type) */
482 } /* process Nth non-empty RIB-Atts */
484 /* Confed-ID's */
485 /* Number of RDCs */
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);
489 offset++;
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);
495 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,
505 ENC_BIG_ENDIAN);
506 offset++;
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);
513 return 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;
523 int start_offset;
524 guint16 rdi_len;
525 guint8 proto_len;
526 guint16 net_len;
527 int path_segment_rdi_offset;
528 guint16 length_indicator_guint16;
529 guint8 length_indicator_guint8;
530 guint8 nb_of_snpa;
531 guint8 dist_list_count;
532 int i;
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);
538 offset += 2;
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,
543 4, ENC_BIG_ENDIAN);
544 offset += 4;
547 /* 2 octets path attributes length */
548 path_attrs_len = tvb_get_ntohs(tvb, offset);
549 offset += 2;
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);
557 offset++;
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);
562 offset++;
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);
567 offset += 2;
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,
573 tvb,
574 offset,
576 ENC_BIG_ENDIAN);
577 offset += 4;
578 proto_tree_add_item(tree,
579 hf_idrp_update_path_attr_route_separator_localpref,
580 tvb,
581 offset,
583 ENC_BIG_ENDIAN);
584 offset ++ ;
585 break;
586 case IDRP_PATH_ATTR_TYPE_EXT_INFO:
587 proto_tree_add_item(tree,
588 hf_idrp_update_path_attr_ext_info,
589 tvb,
590 offset,
592 ENC_BIG_ENDIAN);
593 break;
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,
602 tvb,
603 offset,
605 ENC_BIG_ENDIAN);
606 offset++;
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,
612 tvb,
613 offset,
615 ENC_BIG_ENDIAN);
616 offset += 2;
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);
623 offset++;
624 /* print N times path RDI */
625 proto_tree_add_item(tree,
626 hf_idrp_update_path_attr_rd_path_rdi,
627 tvb,
628 offset,
629 length_indicator_guint8,
630 ENC_ASCII | ENC_NA);
631 offset += length_indicator_guint8;
634 break;
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,
639 tvb,
640 offset,
642 ENC_BIG_ENDIAN);
643 offset++;
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,
651 tvb,
652 offset,
654 ENC_BIG_ENDIAN);
655 offset++;
656 /* 1 octet Proto len */
657 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
658 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,
662 tvb,
663 offset,
664 length_indicator_guint8,
665 ENC_ASCII | ENC_NA);
666 offset += length_indicator_guint8;
668 /* length of NET of Next HOP */
669 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
670 offset++;
671 /* NET of Next HOP */
672 proto_tree_add_item(tree,
673 hf_idrp_update_path_attr_next_hop_rdi,
674 tvb,
675 offset,
676 length_indicator_guint8,
677 ENC_ASCII | ENC_NA);
678 offset += length_indicator_guint8;
680 /* number of SNPA */
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,
684 tvb,
685 offset,
687 ENC_BIG_ENDIAN);
688 offset++;
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);
694 offset++;
695 proto_tree_add_item(tree,
696 hf_idrp_update_path_attr_next_hop_snpa,
697 tvb,
698 offset,
699 length_indicator_guint8 ,
700 ENC_ASCII | ENC_NA);
701 offset += length_indicator_guint8;
703 } /* while: process Nth next hop */
704 break;
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,
710 tvb,
711 offset,
713 ENC_BIG_ENDIAN);
714 offset++;
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);
720 offset++;
721 /* variable size RDI/Conderation */
722 proto_tree_add_item(tree,
723 hf_idrp_update_path_attr_dist_list_excl_rdi ,
724 tvb,
725 offset,
726 length_indicator_guint8 ,
727 ENC_ASCII | ENC_NA);
728 offset += length_indicator_guint8;
730 break;
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,
736 tvb,
737 offset,
739 ENC_BIG_ENDIAN);
740 offset++;
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);
746 offset++;
747 /* variable size RDI/Conderation */
748 proto_tree_add_item(tree,
749 hf_idrp_update_path_attr_dist_list_incl_rdi ,
750 tvb,
751 offset,
752 length_indicator_guint8 ,
753 ENC_ASCII | ENC_NA);
754 offset += length_indicator_guint8;
756 break;
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 ,
761 tvb,
762 offset,
764 ENC_BIG_ENDIAN);
765 offset++;
766 break;
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 ,
771 tvb,
772 offset,
774 ENC_BIG_ENDIAN);
775 offset += 2;
776 break;
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 ,
781 tvb,
782 offset,
784 ENC_BIG_ENDIAN);
785 offset += 4;
786 break;
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 ,
791 tvb,
792 offset,
794 ENC_BIG_ENDIAN);
795 offset += 2;
796 break;
797 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
798 /* 1 octet Nsap prefix length */
799 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
800 offset++;
801 /* process Nsap prefix */
802 proto_tree_add_item(tree,
803 hf_idrp_update_path_attr_locally_defined_qos_nsap ,
804 tvb,
805 offset,
806 length_indicator_guint8 ,
807 ENC_ASCII | ENC_NA);
808 offset += length_indicator_guint8;
809 /* 1 octet Qoslength */
810 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
811 offset++;
812 /* process Qos */
813 proto_tree_add_item(tree,
814 hf_idrp_update_path_attr_locally_defined_qos_value,
815 tvb,
816 offset,
817 length_indicator_guint8 ,
818 ENC_ASCII | ENC_NA);
819 offset += length_indicator_guint8;
820 /* 1 octet Metric length */
821 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
822 offset++;
823 /* process Metric */
824 proto_tree_add_item(tree,
825 hf_idrp_update_path_attr_locally_defined_qos_metric,
826 tvb,
827 offset,
828 length_indicator_guint8 ,
829 ENC_ASCII | ENC_NA);
830 offset += length_indicator_guint8;
831 break;
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,
836 tvb,
837 offset,
839 ENC_BIG_ENDIAN);
840 offset++;
841 break;
842 case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT:
843 proto_tree_add_item(tree,
844 hf_idrp_update_path_attr_rd_hop_count,
845 tvb,
846 offset,
848 ENC_BIG_ENDIAN);
849 offset++;
850 break;
851 case IDRP_PATH_ATTR_TYPE_SECURITY:
852 /* length of Security Registration ID */
853 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
854 offset++;
856 /* value of Security Registration ID */
857 proto_tree_add_item(tree,
858 hf_idrp_update_path_attr_security_reg_id,
859 tvb,
860 offset,
861 length_indicator_guint8 ,
862 ENC_ASCII | ENC_NA);
863 offset += length_indicator_guint8;
865 /* length of Security Information */
866 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
867 offset++;
868 /* value of Security Information */
869 proto_tree_add_item(tree,
870 hf_idrp_update_path_attr_security_info,
871 tvb,
872 offset,
873 length_indicator_guint8,
874 ENC_ASCII | ENC_NA);
875 offset += length_indicator_guint8;
876 break;
877 case IDRP_PATH_ATTR_TYPE_CAPACITY:
878 proto_tree_add_item(tree,
879 hf_idrp_update_path_attr_capacity,
880 tvb,
881 offset,
883 ENC_BIG_ENDIAN);
884 offset++;
885 break;
886 case IDRP_PATH_ATTR_TYPE_PRIORITY:
887 proto_tree_add_item(tree,
888 hf_idrp_update_path_attr_priority,
889 tvb,
890 offset,
892 ENC_BIG_ENDIAN);
893 offset++;
894 break;
895 default:
896 break;
900 /* 1 octet Proto type */
901 proto_tree_add_item(tree, hf_idrp_update_nlri_proto_type, tvb, offset,
902 1, ENC_BIG_ENDIAN);
903 offset++;
905 /* 1 octet Proto len */
906 proto_len = tvb_get_guint8(tvb, offset);
907 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);
912 offset += proto_len;
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,
917 2, ENC_BIG_ENDIAN);
918 offset += 2;
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);
927 offset++;
929 proto_tree_add_item(tree, hf_idrp_update_nlri_addr_info, tvb,
930 offset, rdi_len, ENC_ASCII | ENC_NA);
931 offset += rdi_len;
933 return offset;
936 int dissect_BISPDU_ERROR(tvbuff_t * tvb, int offset, proto_tree * tree)
938 guint8 error_code = 0;
939 gint data_length;
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);
944 offset++;
946 switch (error_code) {
947 case IDRP_ERROR_OPEN:
948 proto_tree_add_item(tree, hf_idrp_error_open_subcode, tvb, offset, 1,
949 ENC_BIG_ENDIAN);
950 break;
951 case IDRP_ERROR_UPDATE:
952 proto_tree_add_item(tree, hf_idrp_error_update_subcode, tvb, offset, 1,
953 ENC_BIG_ENDIAN);
954 break;
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);
958 break;
959 case IDRP_ERROR_FSM:
960 proto_tree_add_item(tree, hf_idrp_error_fsm_subcode, tvb, offset, 1,
961 ENC_BIG_ENDIAN);
962 break;
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);
966 break;
967 default:
968 break;
970 offset++;
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) {
977 offset++;
978 proto_tree_add_item(tree, hf_idrp_error_data, tvb, offset, data_length,
979 ENC_ASCII | ENC_NA);
980 offset += data_length;
983 return offset;
986 int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * tree)
988 proto_tree *sub_tree;
989 proto_item *ti;
990 guint8 number_of_non_empty_rib_attributes;
991 guint8 number_of_distinguishing_attributes;
992 guint8 rib_attribute_type;
993 guint8 length_indicator_guint8;
994 int i;
995 int j;
997 /* 1 octet Opcode */
998 proto_tree_add_item(tree, hf_idrp_rib_refresh_opcode, tvb, offset, 1,
999 ENC_BIG_ENDIAN);
1000 offset++;
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);
1008 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
1017 the Nth RIB-Att. */
1018 number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
1019 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);
1025 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:
1041 break;
1042 case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
1043 /* 1 octet Nsap prefix length */
1044 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1045 offset++;
1046 /* process Nsap prefix */
1047 proto_tree_add_item(
1048 sub_tree,
1049 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_nsap,
1050 tvb,
1051 offset,
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);
1058 offset++;
1059 /* process Qos */
1060 proto_tree_add_item(
1061 sub_tree,
1062 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_value,
1063 tvb,
1064 offset,
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);
1072 offset++;
1073 /* process Metric */
1074 proto_tree_add_item(
1075 sub_tree,
1076 hf_idrp_rib_refresh_rib_attr_locally_defined_qos_metric,
1077 tvb,
1078 offset,
1079 length_indicator_guint8,
1080 ENC_ASCII | ENC_NA);
1081 offset += length_indicator_guint8;
1082 break;
1083 case IDRP_PATH_ATTR_TYPE_SECURITY:
1084 /* length of Security Registration ID and Security Information */
1085 offset += 2;
1087 /* length of Security Registration ID */
1088 length_indicator_guint8 = tvb_get_guint8(tvb, offset);
1089 offset++;
1090 /* value of Security Registration ID */
1091 proto_tree_add_item(
1092 sub_tree,
1093 hf_idrp_rib_refresh_rib_attr_security_reg_id,
1094 tvb,
1095 offset,
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);
1103 offset++;
1104 /* value of Security Information */
1105 proto_tree_add_item(
1106 sub_tree,
1107 hf_idrp_rib_refresh_rib_attr_security_info,
1108 tvb,
1109 offset,
1110 length_indicator_guint8,
1111 ENC_ASCII | ENC_NA);
1112 offset += length_indicator_guint8;
1114 break;
1115 default:
1116 break;
1117 } /* switch (path_attr_type) */
1120 return offset;
1123 static int
1124 dissect_idrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
1126 proto_item *ti;
1127 proto_tree *idrp_tree;
1128 guint8 pdu_type;
1129 gint offset = 0;
1132 if (tvb_get_guint8(tvb, offset) != NLPID_ISO10747_IDRP)
1133 return 0; /* no idrp packet */
1134 offset++;
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);
1145 offset += 2;
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);
1151 offset++;
1153 /* 4 octets Sequence */
1154 proto_tree_add_item(idrp_tree, hf_idrp_sequence,
1155 tvb, offset, 4, ENC_BIG_ENDIAN);
1156 offset += 4;
1158 /* 4 octets Achnowledge */
1159 proto_tree_add_item(idrp_tree, hf_idrp_ack,
1160 tvb, offset, 4, ENC_BIG_ENDIAN);
1161 offset += 4;
1163 /* 1 octets credits offered */
1164 proto_tree_add_item(idrp_tree, hf_idrp_credit_offered,
1165 tvb, offset, 1, ENC_BIG_ENDIAN);
1166 offset++;
1168 /* 1 octets credits offered */
1169 proto_tree_add_item(idrp_tree, hf_idrp_credit_avail,
1170 tvb, offset, 1, ENC_BIG_ENDIAN);
1171 offset++;
1173 /* 16 octets validation */
1174 proto_tree_add_item(idrp_tree, hf_idrp_validation_pattern,
1175 tvb, offset, 16, ENC_ASCII | ENC_NA);
1176 offset += 16;
1178 switch (pdu_type) {
1179 case IDRP_TYPE_OPEN:
1180 offset = dissect_BISPDU_OPEN(tvb, offset, idrp_tree);
1181 break;
1182 case IDRP_TYPE_UPDATE:
1183 offset = dissect_BISPDU_UPDATE(tvb, offset, idrp_tree);
1184 break;
1185 case IDRP_TYPE_ERROR:
1186 offset = dissect_BISPDU_ERROR(tvb, offset, idrp_tree);
1187 break;
1188 case IDRP_TYPE_KEEPALIVE:
1189 /* KEEPALIVE PDU consists of only a PDU header and has a length of 30
1190 octets */
1191 offset += 30;
1192 break;
1193 case IDRP_TYPE_CEASE:
1194 /* CEASE is composed a PDU header and has length of 30 octets */
1195 offset += 30;
1196 break;
1197 case IDRP_TYPE_RIB_REFRESH:
1198 offset = dissect_BISPDU_RIB_REFRESH(tvb, offset, idrp_tree);
1199 break;
1200 default:
1201 break;
1204 col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
1205 val_to_str(pdu_type, idrp_pdu_types, "Unknown (%u)"));
1207 return offset;
1211 void proto_register_idrp(void)
1213 static hf_register_info hf_idrp[] = {
1214 {&hf_idrp_li,
1215 {"BISPDU Length", "idrp.li", FT_UINT16, BASE_DEC, NULL, 0x0,
1216 "BISPDU Length Indicator, length of this PDU", HFILL}},
1217 {&hf_idrp_type,
1218 {"BISPDU Type", "idrp.type", FT_UINT8, BASE_DEC,
1219 VALS(idrp_pdu_types), 0xff, NULL, HFILL}},
1220 {&hf_idrp_sequence,
1221 {"Sequence Number", "idrp.seq", FT_UINT32, BASE_DEC, NULL, 0x0,
1222 "Sequence number, Sequence number of curent BISPDU ", HFILL}},
1223 {&hf_idrp_ack,
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",
1226 HFILL}},
1227 {&hf_idrp_credit_offered,
1228 {"Credits Offered", "idrp.credits-offered", FT_UINT8, BASE_DEC,
1229 NULL, 0,
1230 "Number of additional BISPDUs that the sender is willing to accept from the remote BIS",
1231 HFILL}},
1232 {&hf_idrp_credit_avail,
1233 {"Credits Available", "idrp.credits-avail", FT_UINT8, BASE_DEC,
1234 NULL, 0,
1235 "Number of additional BISPDUs that the sender is able to send to the remote BIS",
1236 HFILL}},
1237 {&hf_idrp_validation_pattern,
1238 {"Validation", "idrp.validation", FT_BYTES, BASE_NONE,
1239 NULL, 0,
1240 "16-octet field which provides a validation function for the BISPDU",
1241 HFILL}},
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",
1248 HFILL}},
1249 {&hf_idrp_open_max_pdu_size,
1250 {"Max PDU Size", "idrp.open.max-pdu-size", FT_UINT16, BASE_DEC,
1251 NULL, 0,
1252 "Maximum number of octets that this BIS will accept in an incoming UPDATE PDU, IDRP ERROR PDU, or RIB REFRESH PDU",
1253 HFILL}},
1254 {&hf_idrp_open_src_rdi,
1255 {"Source RDI", "idrp.open.src-rdi", FT_BYTES, BASE_NONE,
1256 NULL, 0,
1257 "RDI of the routing domain in which the BIS that is sending this BISPDU is located",
1258 HFILL}},
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" ,
1263 HFILL}},
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" ,
1268 HFILL}},
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" ,
1273 HFILL}},
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" ,
1278 HFILL}},
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" ,
1283 HFILL}},
1284 {&hf_idrp_open_number_of_confederations,
1285 {"Number of Routing Confederations",
1286 "idrp.open.number-of-confederations", FT_UINT8, BASE_DEC,
1287 NULL, 0,
1288 "Number of Routing Domain Identifiers (Routing Domain Confederation) that this BIS is a member of",
1289 HFILL}},
1290 {&hf_idrp_open_confederation,
1291 {"Routing Confederation", "idrp.open.confederation", FT_BYTES,
1292 BASE_NONE,
1293 NULL, 0,
1294 "Routing Domain Identifier of Routing Domain Confederation that this BIS is a member of",
1295 HFILL}},
1296 {&hf_idrp_open_authentication_code,
1297 {"Authentication Code", "idrp.open.authentication-code", FT_UINT8,
1298 BASE_DEC,
1299 VALS(idrp_pdu_open_authentication_codes), 0,
1300 "Indicates the authentication mechanism being used",
1301 HFILL}},
1302 {&hf_idrp_open_authentication_data,
1303 {"Authentication Data", "idrp.open.authentication-data", FT_BYTES,
1304 BASE_NONE,
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,
1309 NULL, 0,
1310 "Number of RDIs that are included in the subsequent withdrawn routes field",
1311 HFILL}},
1312 {&hf_idrp_update_withdrawn_route,
1313 {"Unfeasible Route", "idrp.update.unfeasible-route", FT_UINT32,
1314 BASE_DEC,
1315 NULL, 0,
1316 "Route-ID for the route that id being withdrawn from service",
1317 HFILL}},
1318 {&hf_idrp_update_path_attr_flag,
1319 {"Path Attribute Flag", "idrp.update.path-attribute-flag", FT_UINT8,
1320 BASE_HEX,
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,
1324 BASE_DEC,
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,
1328 BASE_DEC,
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",
1334 HFILL}},
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",
1339 HFILL}},
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",
1344 HFILL}},
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,
1349 HFILL}},
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,
1353 NULL, 0, NULL,
1354 HFILL}},
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" ,
1359 HFILL}},
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" ,
1364 HFILL}},
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 ,
1369 HFILL}},
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,
1373 NULL, 0, NULL ,
1374 HFILL}},
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" ,
1379 HFILL}},
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" ,
1384 HFILL}},
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" ,
1389 HFILL}},
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" ,
1394 HFILL}},
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" ,
1399 HFILL}},
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" ,
1404 HFILL}},
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" ,
1409 HFILL}},
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" ,
1414 HFILL}},
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" ,
1419 HFILL}},
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" ,
1424 HFILL}},
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" ,
1429 HFILL}},
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" ,
1434 HFILL}},
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" ,
1439 HFILL}},
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" ,
1444 HFILL}},
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" ,
1449 HFILL}},
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" ,
1454 HFILL}},
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" ,
1459 HFILL}},
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" ,
1464 HFILL}},
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" ,
1469 HFILL}},
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" ,
1474 HFILL}},
1475 {&hf_idrp_update_nlri_proto_type,
1476 {"NLRI Protocol Type", "idrp.update.nlri.proto-type", FT_UINT8,
1477 BASE_DEC,
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,
1481 BASE_NONE,
1482 NULL, 0,
1483 "Identity of the protocol associated with the NLRI address information",
1484 HFILL}},
1485 {&hf_idrp_update_nlri_addr_length,
1486 {"NLRI Address Length",
1487 "idrp.update.nlri.addr-length.", FT_UINT16, BASE_DEC,
1488 NULL, 0, NULL ,
1489 HFILL}},
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,
1493 NULL, 0, NULL ,
1494 HFILL}},
1495 {&hf_idrp_update_nlri_addr_info,
1496 {"NLRI Address Info", "idrp.update.nlri.addr-info", FT_BYTES,
1497 BASE_NONE,
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,
1502 NULL, HFILL}},
1503 {&hf_idrp_error_open_subcode,
1504 {"Error Subcode (Open Message)", "idrp.error.subcode", FT_UINT8,
1505 BASE_DEC, VALS(idrp_error_open_subcodes),
1506 0, NULL, HFILL}},
1507 {&hf_idrp_error_update_subcode,
1508 {"Error Subcode (Update Message)", "idrp.error.subcode", FT_UINT8,
1509 BASE_DEC, VALS(idrp_error_update_subcodes),
1510 0, NULL, HFILL}},
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),
1514 0, NULL, HFILL}},
1515 {&hf_idrp_error_fsm_subcode,
1516 {"Error Subcode (Fsm State)", "idrp.error.subcode", FT_UINT8,
1517 BASE_DEC, VALS(idrp_error_fsm_subcodes),
1518 0, NULL, HFILL}},
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",
1526 HFILL}},
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" ,
1536 HFILL}},
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" ,
1542 HFILL}},
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" ,
1548 HFILL}},
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" ,
1553 HFILL}},
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" ,
1558 HFILL}},
1561 /* List of subtrees */
1562 static gint *ett[] = {
1563 &ett_idrp,
1564 &ett_idrp_sub
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
1577 * Local variables:
1578 * c-basic-offset: 4
1579 * tab-width: 4
1580 * indent-tabs-mode: nil
1581 * End:
1583 * vi: set shiftwidth=4 tabstop=4 expandtab:
1584 * :indentSize=4:tabSize=4:noTabs=true: