2 * Routines for Network-Based IP Flow Mobility (NBIFOM) dissection
3 * 3GPP TS 24.161 V13.3.0 (2016-12) Release 13
4 * Copyright 2016, Pascal Quantin <pascal@wireshark.org>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
17 #include <wsutil/array.h>
19 void proto_register_nbifom(void);
21 static int proto_nbifom
;
22 static int hf_nbifom_param_id_ul
;
23 static int hf_nbifom_param_id_dl
;
24 static int hf_nbifom_param_contents_len
;
25 static int hf_nbifom_param_contents_dflt_access
;
26 static int hf_nbifom_param_contents_status
;
27 static int hf_nbifom_param_contents_ran_rules_handling
;
28 static int hf_nbifom_param_contents_ran_rules_status
;
29 static int hf_nbifom_param_contents_access_use_ind_spare
;
30 static int hf_nbifom_param_contents_access_use_ind_wlan_access_usable_val
;
31 static int hf_nbifom_param_contents_access_use_ind_3gpp_access_usable_val
;
32 static int hf_nbifom_param_contents_mode
;
33 static int hf_nbifom_param_contents_rem_bytes
;
34 static int hf_nbifom_routing_rule_len
;
35 static int hf_nbifom_routing_rule_id
;
36 static int hf_nbifom_routing_rule_routing_access
;
37 static int hf_nbifom_routing_rule_spare
;
38 static int hf_nbifom_routing_rule_op_code
;
39 static int hf_nbifom_routing_rule_prio
;
40 static int hf_nbifom_routing_rule_flags
;
41 static int hf_nbifom_routing_rule_flags_prot_type_nxt_hdr
;
42 static int hf_nbifom_routing_rule_flags_ipsec_spi
;
43 static int hf_nbifom_routing_rule_flags_dst_addr_prefix_len
;
44 static int hf_nbifom_routing_rule_flags_src_addr_prefix_len
;
45 static int hf_nbifom_routing_rule_flags_dst_ipv6_addr
;
46 static int hf_nbifom_routing_rule_flags_src_ipv6_addr
;
47 static int hf_nbifom_routing_rule_flags_dst_ipv4_addr
;
48 static int hf_nbifom_routing_rule_flags_src_ipv4_addr
;
49 static int hf_nbifom_routing_rule_flags_spare_bits0xc0
;
50 static int hf_nbifom_routing_rule_flags_flow_label
;
51 static int hf_nbifom_routing_rule_flags_tos
;
52 static int hf_nbifom_routing_rule_flags_end_dst_port_range
;
53 static int hf_nbifom_routing_rule_flags_start_dst_port_range
;
54 static int hf_nbifom_routing_rule_flags_end_src_port_range
;
55 static int hf_nbifom_routing_rule_flags_start_src_port_range
;
56 static int hf_nbifom_routing_rule_flags_spare_bits0xffff
;
57 static int hf_nbifom_routing_rule_src_ipv4_addr
;
58 static int hf_nbifom_routing_rule_dst_ipv4_addr
;
59 static int hf_nbifom_routing_rule_src_ipv6_addr
;
60 static int hf_nbifom_routing_rule_dst_ipv6_addr
;
61 static int hf_nbifom_routing_rule_src_addr_prefix_len
;
62 static int hf_nbifom_routing_rule_dst_addr_prefix_len
;
63 static int hf_nbifom_routing_rule_ipsec_spi
;
64 static int hf_nbifom_routing_rule_prot_type_nxt_hdr
;
65 static int hf_nbifom_routing_rule_start_src_port_range
;
66 static int hf_nbifom_routing_rule_end_src_port_range
;
67 static int hf_nbifom_routing_rule_start_dst_port_range
;
68 static int hf_nbifom_routing_rule_end_dst_port_range
;
69 static int hf_nbifom_routing_rule_tos
;
70 static int hf_nbifom_routing_rule_flow_label
;
72 static int ett_nbifom
;
73 static int ett_nbifom_param_contents
;
74 static int ett_nbifom_routing_rule
;
75 static int ett_nbifom_routing_rule_flags
;
77 static const value_string nbifom_param_id_ue_to_nw_vals
[] = {
78 { 0x00, "Not assigned" },
79 { 0x01, "NBIFOM mode" },
80 { 0x02, "NBIFOM default access" },
81 { 0x03, "NBIFOM status" },
82 { 0x04, "NBIFOM routing rules" },
83 { 0x05, "NBIFOM IP flow mapping" },
84 { 0x06, "Not assigned" },
85 { 0x07, "NBIFOM access stratum status" },
86 { 0x08, "NBIFOM access usability indication" },
90 static const value_string nbifom_param_id_nw_to_ue_vals
[] = {
91 { 0x00, "Not assigned" },
92 { 0x01, "NBIFOM mode" },
93 { 0x02, "NBIFOM default access" },
94 { 0x03, "NBIFOM status" },
95 { 0x04, "NBIFOM routing rules" },
96 { 0x05, "Not assigned" },
97 { 0x06, "NBIFOM RAN rules handling" },
98 { 0x07, "Not assigned" },
99 { 0x08, "Not assigned" },
103 static const value_string nbifom_dflt_access_vals
[] = {
104 { 0x01, "3GPP access" },
105 { 0x02, "Non-3GPP access" },
109 static const value_string nbifom_status_vals
[] = {
110 { 0x00, "Accepted" },
111 { 0x1a, "Insufficient resources" },
112 { 0x22, "Service option temporarily out of order" },
113 { 0x25, "Requested service option not subscribed" },
114 { 0x39, "Incorrect indication in the routing rule operation" },
115 { 0x3a, "Unknown information in IP flow filter(s)" },
116 { 0x3f, "Request rejected, unspecified" },
117 { 0x6f, "Protocol error, unspecified" },
118 { 0x82, "Unknown routing access information" },
122 static const value_string nbifom_ran_rules_handling_vals
[] = {
123 { 0x01, "RAN rules handling parameter is not set" },
124 { 0x02, "RAN rules handling parameter is set" },
128 static const value_string nbifom_ran_rules_status_vals
[] = {
129 { 0x01, "No indication" },
130 { 0x02, "Move-traffic-from-WLAN indication" },
131 { 0x03, "Move-traffic-to-WLAN indication" },
135 static const value_string nbifom_wlan_access_usable_vals
[] = {
136 { 0x00, "No change in usability of WLAN access" },
137 { 0x01, "WLAN access becomes usable" },
138 { 0x02, "WLAN access becomes unusable" },
139 { 0x03, "Reserved" },
143 static const value_string nbifom_3gpp_access_usable_vals
[] = {
144 { 0x00, "No change in usability of 3GPP access" },
145 { 0x01, "3GPP access becomes usable" },
146 { 0x02, "3GPP access becomes unusable" },
147 { 0x03, "Reserved" },
151 static const value_string nbifom_mode_vals
[] = {
152 { 0x01, "UE-initiated NBIFOM mode" },
153 { 0x02, "Network-initiated NBIFOM mode" },
157 static const value_string nbifom_routing_access_vals
[] = {
158 { 0x01, "3GPP access" },
159 { 0x02, "Non-3GPP access" },
163 static const value_string nbifom_op_code_vals
[] = {
165 { 0x01, "Create routing rule" },
166 { 0x02, "Delete routing rule" },
167 { 0x03, "Replace existing routing rule" },
168 { 0x04, "Reserved" },
173 dissect_nbifom_routing_rules(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, int offset
, uint32_t params_content_len
)
175 int curr_offset
= offset
;
176 uint32_t i
= 0, routing_rule_len
;
181 while ((curr_offset
- offset
) < (int)params_content_len
) {
182 static int * const flags1
[] = {
183 &hf_nbifom_routing_rule_routing_access
,
184 &hf_nbifom_routing_rule_spare
,
185 &hf_nbifom_routing_rule_op_code
,
188 static int * const flags2
[] = {
189 &hf_nbifom_routing_rule_flags_prot_type_nxt_hdr
,
190 &hf_nbifom_routing_rule_flags_ipsec_spi
,
191 &hf_nbifom_routing_rule_flags_dst_addr_prefix_len
,
192 &hf_nbifom_routing_rule_flags_src_addr_prefix_len
,
193 &hf_nbifom_routing_rule_flags_dst_ipv6_addr
,
194 &hf_nbifom_routing_rule_flags_src_ipv6_addr
,
195 &hf_nbifom_routing_rule_flags_dst_ipv4_addr
,
196 &hf_nbifom_routing_rule_flags_src_ipv4_addr
,
197 &hf_nbifom_routing_rule_flags_spare_bits0xc0
,
198 &hf_nbifom_routing_rule_flags_flow_label
,
199 &hf_nbifom_routing_rule_flags_tos
,
200 &hf_nbifom_routing_rule_flags_end_dst_port_range
,
201 &hf_nbifom_routing_rule_flags_start_dst_port_range
,
202 &hf_nbifom_routing_rule_flags_end_src_port_range
,
203 &hf_nbifom_routing_rule_flags_start_src_port_range
,
204 &hf_nbifom_routing_rule_flags_spare_bits0xffff
,
208 subtree
= proto_tree_add_subtree_format(tree
, tvb
, curr_offset
, -1, ett_nbifom_routing_rule
, &item
, "Routing Rule %u", ++i
);
209 proto_tree_add_item_ret_uint(subtree
, hf_nbifom_routing_rule_len
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
, &routing_rule_len
);
210 proto_item_set_len(item
, routing_rule_len
+1);
212 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_id
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
214 proto_tree_add_bitmask_list(subtree
, tvb
, curr_offset
, 1, flags1
, ENC_BIG_ENDIAN
);
216 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_prio
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
218 proto_tree_add_bitmask_ret_uint64(subtree
, tvb
, curr_offset
, hf_nbifom_routing_rule_flags
,
219 ett_nbifom_routing_rule_flags
, flags2
, ENC_BIG_ENDIAN
, &flags
);
221 if (flags
& 0x01000000) {
222 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_src_ipv4_addr
, tvb
, curr_offset
, 4, ENC_NA
);
225 if (flags
& 0x02000000) {
226 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_dst_ipv4_addr
, tvb
, curr_offset
, 4, ENC_NA
);
229 if (flags
& 0x04000000) {
230 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_src_ipv6_addr
, tvb
, curr_offset
, 16, ENC_NA
);
233 if (flags
& 0x08000000) {
234 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_dst_ipv6_addr
, tvb
, curr_offset
, 16, ENC_NA
);
237 if (flags
& 0x10000000) {
238 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_src_addr_prefix_len
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
241 if (flags
& 0x20000000) {
242 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_dst_addr_prefix_len
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
245 if (flags
& 0x40000000) {
246 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_ipsec_spi
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
249 if (flags
& 0x80000000) {
250 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_prot_type_nxt_hdr
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
253 if (flags
& 0x00010000) {
254 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_start_src_port_range
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
257 if (flags
& 0x00020000) {
258 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_end_src_port_range
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
261 if (flags
& 0x00040000) {
262 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_start_dst_port_range
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
265 if (flags
& 0x00080000) {
266 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_end_dst_port_range
, tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
269 if (flags
& 0x00100000) {
270 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_tos
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
273 if (flags
& 0x00200000) {
274 proto_tree_add_item(subtree
, hf_nbifom_routing_rule_flow_label
, tvb
, curr_offset
, 3, ENC_BIG_ENDIAN
);
281 dissect_nbifom(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
284 proto_tree
*nbifom_tree
, *subtree
;
285 int reported_len
= tvb_reported_length(tvb
);
286 int offset
= 0, saved_offset
;
287 uint32_t param_id
, param_contents_len
;
288 int hf_nbifom_param_id
= pinfo
->link_dir
== P2P_DIR_UL
? hf_nbifom_param_id_ul
: hf_nbifom_param_id_dl
;
290 col_append_sep_str(pinfo
->cinfo
, COL_PROTOCOL
, "/", "NBIFOM");
292 item
= proto_tree_add_item(tree
, proto_nbifom
, tvb
, 0, -1, ENC_NA
);
293 nbifom_tree
= proto_item_add_subtree(item
, ett_nbifom
);
295 while (offset
< reported_len
) {
296 item
= proto_tree_add_item_ret_uint(nbifom_tree
, hf_nbifom_param_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, ¶m_id
);
298 subtree
= proto_item_add_subtree(item
, ett_nbifom_param_contents
);
299 proto_tree_add_item_ret_uint(subtree
, hf_nbifom_param_contents_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, ¶m_contents_len
);
301 saved_offset
= offset
;
304 proto_tree_add_item(subtree
, hf_nbifom_param_contents_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
308 proto_tree_add_item(subtree
, hf_nbifom_param_contents_dflt_access
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
312 proto_tree_add_item(subtree
, hf_nbifom_param_contents_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
316 if (pinfo
->link_dir
== P2P_DIR_DL
) {
318 } /* else fall through case 4 */
321 dissect_nbifom_routing_rules(tvb
, pinfo
, subtree
, offset
, param_contents_len
);
322 offset
+= param_contents_len
;
325 if (pinfo
->link_dir
== P2P_DIR_DL
) {
326 proto_tree_add_item(subtree
, hf_nbifom_param_contents_ran_rules_handling
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
331 if (pinfo
->link_dir
== P2P_DIR_UL
) {
332 proto_tree_add_item(subtree
, hf_nbifom_param_contents_ran_rules_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
337 if (pinfo
->link_dir
== P2P_DIR_UL
) {
338 static int * const flags
[] = {
339 &hf_nbifom_param_contents_access_use_ind_spare
,
340 &hf_nbifom_param_contents_access_use_ind_wlan_access_usable_val
,
341 &hf_nbifom_param_contents_access_use_ind_3gpp_access_usable_val
,
345 proto_tree_add_bitmask_list(subtree
, tvb
, offset
, 1, flags
, ENC_BIG_ENDIAN
);
352 if ((offset
- saved_offset
) < (int)param_contents_len
) {
353 proto_tree_add_item(subtree
, hf_nbifom_param_contents_rem_bytes
, tvb
, offset
, param_contents_len
- (offset
- saved_offset
), ENC_NA
);
355 offset
= saved_offset
+ param_contents_len
;
358 return tvb_captured_length(tvb
);
362 proto_register_nbifom(void)
364 static hf_register_info hf
[] = {
365 { &hf_nbifom_param_id_ul
,
366 { "Parameter identifier", "nbifom.param_id", FT_UINT8
, BASE_HEX
,
367 VALS(nbifom_param_id_ue_to_nw_vals
), 0, NULL
, HFILL
}},
368 { &hf_nbifom_param_id_dl
,
369 { "Parameter identifier", "nbifom.param_id", FT_UINT8
, BASE_HEX
,
370 VALS(nbifom_param_id_nw_to_ue_vals
), 0, NULL
, HFILL
}},
371 { &hf_nbifom_param_contents_len
,
372 { "Length of parameter contents", "nbifom.param_contents.len", FT_UINT8
, BASE_DEC
,
373 NULL
, 0, NULL
, HFILL
}},
374 { &hf_nbifom_param_contents_dflt_access
,
375 { "NBIFOM default access", "nbifom.param_contents.dflt_access", FT_UINT8
, BASE_HEX
,
376 VALS(nbifom_dflt_access_vals
), 0, NULL
, HFILL
}},
377 { &hf_nbifom_param_contents_status
,
378 { "NBIFOM status", "nbifom.param_contents.status", FT_UINT8
, BASE_HEX
,
379 VALS(nbifom_status_vals
), 0, NULL
, HFILL
}},
380 { &hf_nbifom_param_contents_ran_rules_handling
,
381 { "NBIFOM RAN rules handling", "nbifom.param_contents.ran_rules_handling", FT_UINT8
, BASE_HEX
,
382 VALS(nbifom_ran_rules_handling_vals
), 0, NULL
, HFILL
}},
383 { &hf_nbifom_param_contents_ran_rules_status
,
384 { "NBIFOM RAN rules status", "nbifom.param_contents.ran_rules_status", FT_UINT8
, BASE_HEX
,
385 VALS(nbifom_ran_rules_status_vals
), 0, NULL
, HFILL
}},
386 { &hf_nbifom_param_contents_access_use_ind_spare
,
387 { "Spare", "nbifom.param_contents.access_use_ind.spare", FT_UINT8
, BASE_HEX
,
388 NULL
, 0xf0, NULL
, HFILL
}},
389 { &hf_nbifom_param_contents_access_use_ind_wlan_access_usable_val
,
390 { "WLAN access usable value", "nbifom.param_contents.access_use_ind.wlan_access_usable_val", FT_UINT8
, BASE_HEX
,
391 VALS(nbifom_wlan_access_usable_vals
), 0x0c, NULL
, HFILL
}},
392 { &hf_nbifom_param_contents_access_use_ind_3gpp_access_usable_val
,
393 { "3GPP access usable value", "nbifom.param_contents.access_use_ind.3gpp_access_usable_val", FT_UINT8
, BASE_HEX
,
394 VALS(nbifom_3gpp_access_usable_vals
), 0x03, NULL
, HFILL
}},
395 { &hf_nbifom_param_contents_mode
,
396 { "NBIFOM mode", "nbifom.param_contents.mode", FT_UINT8
, BASE_HEX
,
397 VALS(nbifom_mode_vals
), 0, NULL
, HFILL
}},
398 { &hf_nbifom_param_contents_rem_bytes
,
399 { "Remaining parameter contents", "nbifom.param_contents.rem_bytes", FT_BYTES
, BASE_NONE
,
400 NULL
, 0, NULL
, HFILL
}},
401 { &hf_nbifom_routing_rule_len
,
402 { "Length of routing rule", "nbifom.routing_rule.len", FT_UINT8
, BASE_DEC
,
403 NULL
, 0, NULL
, HFILL
}},
404 { &hf_nbifom_routing_rule_id
,
405 { "Routing rule identifier", "nbifom.routing_rule.id", FT_UINT8
, BASE_DEC
,
406 NULL
, 0, NULL
, HFILL
}},
407 { &hf_nbifom_routing_rule_routing_access
,
408 { "Routing access", "nbifom.routing_rule.routing_access", FT_UINT8
, BASE_DEC
,
409 VALS(nbifom_routing_access_vals
), 0xc0, NULL
, HFILL
}},
410 { &hf_nbifom_routing_rule_spare
,
411 { "Spare", "nbifom.routing_rule.spare", FT_UINT8
, BASE_HEX
,
412 NULL
, 0x38, NULL
, HFILL
}},
413 { &hf_nbifom_routing_rule_op_code
,
414 { "Operation code", "nbifom.routing_rule.op_code", FT_UINT8
, BASE_HEX
,
415 VALS(nbifom_op_code_vals
), 0x07, NULL
, HFILL
}},
416 { &hf_nbifom_routing_rule_prio
,
417 { "Routing rule priority", "nbifom.routing_rule.prio", FT_UINT8
, BASE_DEC
,
418 NULL
, 0, NULL
, HFILL
}},
419 { &hf_nbifom_routing_rule_flags
,
420 { "Flags", "nbifom.routing_rule.flags", FT_UINT32
, BASE_HEX
,
421 NULL
, 0, NULL
, HFILL
}},
422 { &hf_nbifom_routing_rule_flags_prot_type_nxt_hdr
,
423 { "Protocol type / next header", "nbifom.routing_rule.flags.prot_type_nxt_hdr", FT_BOOLEAN
, 32,
424 TFS(&tfs_present_not_present
), 0x80000000, NULL
, HFILL
}},
425 { &hf_nbifom_routing_rule_flags_ipsec_spi
,
426 { "IPSec SPI", "nbifom.routing_rule.flags.ipsec_spi", FT_BOOLEAN
, 32,
427 TFS(&tfs_present_not_present
), 0x40000000, NULL
, HFILL
}},
428 { &hf_nbifom_routing_rule_flags_dst_addr_prefix_len
,
429 { "Destination address prefix length", "nbifom.routing_rule.flags.dst_addr_prefix_len", FT_BOOLEAN
, 32,
430 TFS(&tfs_present_not_present
), 0x20000000, NULL
, HFILL
}},
431 { &hf_nbifom_routing_rule_flags_src_addr_prefix_len
,
432 { "Source address prefix length", "nbifom.routing_rule.flags.src_addr_prefix_len", FT_BOOLEAN
, 32,
433 TFS(&tfs_present_not_present
), 0x10000000, NULL
, HFILL
}},
434 { &hf_nbifom_routing_rule_flags_dst_ipv6_addr
,
435 { "Destination IPv6 address", "nbifom.routing_rule.flags.dst_ipv6_addr", FT_BOOLEAN
, 32,
436 TFS(&tfs_present_not_present
), 0x08000000, NULL
, HFILL
}},
437 { &hf_nbifom_routing_rule_flags_src_ipv6_addr
,
438 { "Source IPv6 address", "nbifom.routing_rule.flags.src_ipv6_addr", FT_BOOLEAN
, 32,
439 TFS(&tfs_present_not_present
), 0x04000000, NULL
, HFILL
}},
440 { &hf_nbifom_routing_rule_flags_dst_ipv4_addr
,
441 { "Destination IPv4 address", "nbifom.routing_rule.flags.dst_ipv4_addr", FT_BOOLEAN
, 32,
442 TFS(&tfs_present_not_present
), 0x02000000, NULL
, HFILL
}},
443 { &hf_nbifom_routing_rule_flags_src_ipv4_addr
,
444 { "Source IPv4 address", "nbifom.routing_rule.flags.src_ipv4_addr", FT_BOOLEAN
, 32,
445 TFS(&tfs_present_not_present
), 0x01000000, NULL
, HFILL
}},
446 { &hf_nbifom_routing_rule_flags_spare_bits0xc0
,
447 { "Spare", "nbifom.routing_rule.flags.spare", FT_UINT32
, BASE_HEX
,
448 NULL
, 0x00c00000, NULL
, HFILL
}},
449 { &hf_nbifom_routing_rule_flags_flow_label
,
450 { "Flow label", "nbifom.routing_rule.flags.flow_label", FT_BOOLEAN
, 32,
451 TFS(&tfs_present_not_present
), 0x00200000, NULL
, HFILL
}},
452 { &hf_nbifom_routing_rule_flags_tos
,
453 { "Type of service", "nbifom.routing_rule.flags.tos", FT_BOOLEAN
, 32,
454 TFS(&tfs_present_not_present
), 0x00100000, NULL
, HFILL
}},
455 { &hf_nbifom_routing_rule_flags_end_dst_port_range
,
456 { "End destination port range", "nbifom.routing_rule.flags.end_dst_port_range", FT_BOOLEAN
, 32,
457 TFS(&tfs_present_not_present
), 0x00080000, NULL
, HFILL
}},
458 { &hf_nbifom_routing_rule_flags_start_dst_port_range
,
459 { "Start destination port range", "nbifom.routing_rule.flags.start_dst_port_range", FT_BOOLEAN
, 32,
460 TFS(&tfs_present_not_present
), 0x00040000, NULL
, HFILL
}},
461 { &hf_nbifom_routing_rule_flags_end_src_port_range
,
462 { "End source port range", "nbifom.routing_rule.flags.end_src_port_range", FT_BOOLEAN
, 32,
463 TFS(&tfs_present_not_present
), 0x00020000, NULL
, HFILL
}},
464 { &hf_nbifom_routing_rule_flags_start_src_port_range
,
465 { "Start source port range", "nbifom.routing_rule.flags.start_src_port_range", FT_BOOLEAN
, 32,
466 TFS(&tfs_present_not_present
), 0x00010000, NULL
, HFILL
}},
467 { &hf_nbifom_routing_rule_flags_spare_bits0xffff
,
468 { "Spare", "nbifom.routing_rule.flags.spare", FT_UINT32
, BASE_HEX
,
469 NULL
, 0x0000ffff, NULL
, HFILL
}},
470 { &hf_nbifom_routing_rule_src_ipv4_addr
,
471 { "Source IPv4 address", "nbifom.routing_rule.src_ipv4_addr", FT_IPv4
, BASE_NONE
,
472 NULL
, 0, NULL
, HFILL
}},
473 { &hf_nbifom_routing_rule_dst_ipv4_addr
,
474 { "Destination IPv4 address", "nbifom.routing_rule.dst_ipv4_addr", FT_IPv4
, BASE_NONE
,
475 NULL
, 0, NULL
, HFILL
}},
476 { &hf_nbifom_routing_rule_src_ipv6_addr
,
477 { "Source IPv6 address", "nbifom.routing_rule.src_ipv6_addr", FT_IPv6
, BASE_NONE
,
478 NULL
, 0, NULL
, HFILL
}},
479 { &hf_nbifom_routing_rule_dst_ipv6_addr
,
480 { "Destination IPv6 address", "nbifom.routing_rule.dst_ipv6_addr", FT_IPv6
, BASE_NONE
,
481 NULL
, 0, NULL
, HFILL
}},
482 { &hf_nbifom_routing_rule_src_addr_prefix_len
,
483 { "Source address prefix length", "nbifom.routing_rule.src_addr_prefix_len", FT_UINT8
, BASE_DEC
,
484 NULL
, 0, NULL
, HFILL
}},
485 { &hf_nbifom_routing_rule_dst_addr_prefix_len
,
486 { "Destination address prefix length", "nbifom.routing_rule.dst_addr_prefix_len", FT_UINT8
, BASE_DEC
,
487 NULL
, 0, NULL
, HFILL
}},
488 { &hf_nbifom_routing_rule_ipsec_spi
,
489 { "IPSec SPI", "nbifom.routing_rule.ipsec_spi", FT_UINT32
, BASE_HEX
,
490 NULL
, 0, NULL
, HFILL
}},
491 { &hf_nbifom_routing_rule_prot_type_nxt_hdr
,
492 { "Protocol type / next header", "nbifom.routing_rule.prot_type_nxt_hdr", FT_UINT8
, BASE_HEX
,
493 NULL
, 0, NULL
, HFILL
}},
494 { &hf_nbifom_routing_rule_start_src_port_range
,
495 { "Start source port range", "nbifom.routing_rule.start_src_port_range", FT_UINT32
, BASE_DEC
,
496 NULL
, 0, NULL
, HFILL
}},
497 { &hf_nbifom_routing_rule_end_src_port_range
,
498 { "End source port range", "nbifom.routing_rule.end_src_port_range", FT_UINT32
, BASE_DEC
,
499 NULL
, 0, NULL
, HFILL
}},
500 { &hf_nbifom_routing_rule_start_dst_port_range
,
501 { "Start destination port range", "nbifom.routing_rule.start_dst_port_range", FT_UINT32
, BASE_DEC
,
502 NULL
, 0, NULL
, HFILL
}},
503 { &hf_nbifom_routing_rule_end_dst_port_range
,
504 { "End destination port range", "nbifom.routing_rule.end_dst_port_range", FT_UINT32
, BASE_DEC
,
505 NULL
, 0, NULL
, HFILL
}},
506 { &hf_nbifom_routing_rule_tos
,
507 { "Type of service", "nbifom.routing_rule.tos", FT_UINT8
, BASE_HEX
,
508 NULL
, 0, NULL
, HFILL
}},
509 { &hf_nbifom_routing_rule_flow_label
,
510 { "Flow label", "nbifom.routing_rule.flow_label", FT_UINT24
, BASE_HEX
,
511 NULL
, 0x0fffff, NULL
, HFILL
}}
514 static int *nbifom_ett
[] = {
516 &ett_nbifom_param_contents
,
517 &ett_nbifom_routing_rule
,
518 &ett_nbifom_routing_rule_flags
521 proto_nbifom
= proto_register_protocol("Network-Based IP Flow Mobility", "NBIFOM", "nbifom");
522 proto_register_field_array(proto_nbifom
, hf
, array_length(hf
));
523 proto_register_subtree_array(nbifom_ett
, array_length(nbifom_ett
));
525 register_dissector("nbifom", dissect_nbifom
, proto_nbifom
);
529 * Editor modelines - https://www.wireshark.org/tools/modelines.html
534 * indent-tabs-mode: nil
537 * vi: set shiftwidth=4 tabstop=8 expandtab:
538 * :indentSize=4:tabSize=8:noTabs=true: