epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-mih.c
bloba34992c0c912331d95a5daabeefbf03653f0f424
1 /* packet-mih.c
2 * Definitions for MIH (Media independent Handover) packet disassembly structures and routines
3 * Refer to (IEEE 802.21) IEEE Standard for Local and metropolitan area networks- Part 21: Media Independent Handover Services, 21 Jan 2009
5 * Copyright 2011, ANKITH AGARWAL <ankitha@cdac.in>
7 * The original patch submitted in 2011 was improved and expanded in 2012 by Fraunhofer Institute for Open Communication Systems (FOKUS)
8 * The improvements include filtering of all fields as well as including definitions from the revised IEEE 802.21b document from 10 May 2012
10 * Copyright 2012, Alton MacDonald <alton.kenneth.macdonald@fokus.fraunhofer.de>
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * SPDX-License-Identifier: GPL-2.0-or-later
21 #include "config.h"
23 #include <epan/packet.h>
24 #include <epan/exceptions.h>
25 #include <epan/etypes.h>
26 void proto_register_mih(void);
27 void proto_reg_handoff_mih(void);
29 static dissector_handle_t mih_handle;
31 #define MIH_PORT 4551
33 #define VERSION_MASK 0xF0
34 #define ACKREQ_MASK 0x8
35 #define ACKRESP_MASK 0x4
36 #define UIR_MASK 0x2
37 #define MORE_FRAG_MASK 0x1
38 #define FRAG_NO_MASK 0xFE
39 #define SID_MASK 0xF000
40 #define OPCODE_MASK 0x0C00
41 #define AID_MASK 0x03FF
42 #define TRANS_ID_MASK 0x0FFF
43 #define LEN_OF_LEN_MASK 0x80
45 /*Type values for TLV encoding*/
46 #define SRC_MIHF_ID 1
47 #define DEST_MIHF_ID 2
48 #define STATUS 3
49 #define LINK_TYPE 4
50 #define MIH_EVT_LIST 5
51 #define MIH_CMD_LIST 6
52 #define MIH_IQ_TYPE_LIST 7
53 #define MIH_TRANS_LIST 8
54 #define LINK_ADDR_LIST 9
55 #define MBB_HO_SUPP_LIST 10
56 #define REG_REQUEST_CODE 11
57 #define VALID_TIME_INTR 12
58 #define LINK_ID 13
59 #define NEW_LINK_ID 14
60 #define OLD_ACCESS_ROUTER 15
61 #define NEW_ACCESS_ROUTER 16
62 #define IP_RENEWAL_FLAG 17
63 #define IP_MOB_MGMT 18
64 #define IP_CFG_MTHDS 19
65 #define LINK_DN_REASON 20
66 #define TIMER_INTERVAL 21
67 #define LINK_GOING_DN_REASON 22
68 #define LINK_PARAM_RPT_LIST 23
69 #define DEV_STATES_REQ 24
70 #define LINK_ID_LIST 25
71 #define DEV_STATES_RSP_LIST 26
72 #define STATUS_REQ_SET 27
73 #define STATUS_RSP_LIST 28
74 #define CFG_REQ_LIST 29
75 #define CFG_RSP_LIST 30
76 #define LINK_POA_LIST 31
77 #define PREF_LINK_LIST 32
78 #define HO_REQ_QUERY_LIST 33
79 #define HO_STATUS 34
80 #define ACCESS_ROUTER_ADDR 35
81 #define DHCP_SER_ADDR 36
82 #define FA_ADDR 37
83 #define LINK_ACTION_REQ_LIST 38
84 #define LINK_ACTION_RSP_LIST 39
85 #define HO_RESULT 40
86 #define LINK_RES_STATUS 41
87 #define RES_RETENTION_STATUS 42
88 #define IQ_BIN_DATA_LIST 43
89 #define IQ_RDF_DATA_LIST 44
90 #define IQ_RDF_SCHEMA_URL 45
91 #define IQ_RDF_SCHM_LIST 46
92 #define MAX_RSP_SIZE 47
93 #define IR_BIN_DATA_LIST 48
94 #define IR_RDF_DATA_LIST 49
95 #define IR_SCHM_URL_LIST 50
96 #define IR_RDF_SCHM_LIST 51
97 #define MN_MIHF_ID 52
98 #define Q_RES_RPT_FLAG 53
99 #define EVT_CFG_INFO_LIST 54
100 #define TGT_NET_INFO 55
101 #define TGT_NET_INFO_LIST 56
102 #define ASGN_RES_SET 57
103 #define LINK_DET_INFO_LIST 58
104 #define MN_LINK_ID 59
105 #define POA_LINK_ADDR 60
106 #define UNAUTH_INFO_REQ 61
107 #define NET_TYPE 62
108 #define REQ_RES_SET 63
109 #define VEND_SPECIFIC_TLV 100
111 /*Bitmasks in 802.21 are encoded in Network-Byte-Order: bit0 is leftmost bit*/
113 /*MASK for event list*/
114 #define LINK_DETECT_MASK 0x80000000
115 #define LINK_UP_MASK 0x40000000
116 #define LINK_DOWN_MASK 0x20000000
117 #define LINK_PARAM_MASK 0x10000000
118 #define LINK_GD_MASK 0x08000000
119 #define LINK_HO_IMM_MASK 0x04000000
120 #define LINK_HO_COMP_MASK 0x02000000
121 #define LINK_PDU_MASK 0x01000000
123 /*MASK for command list*/
124 /*1st bit is reserved*/
125 #define CMD_EVT_SUBS_MASK 0x40000000
126 #define CMD_EVT_UNSUBS_MASK 0x20000000
127 #define CMD_GET_PARA_MASK 0x10000000
128 #define CMD_CONF_TH_MASK 0x08000000
129 #define CMD_LINK_AC_MASK 0x04000000
131 /*MASK for Info Query list*/
132 #define IQ_BIN_DATA_MASK 0x80000000
133 #define IQ_RDF_DATA_MASK 0x40000000
134 #define IQ_RDF_SCH_U_MASK 0x20000000
135 #define IQ_RDF_SCH_MASK 0x10000000
136 #define IQ_IE_NET_TYPE_MASK 0x08000000
137 #define IQ_IE_OP_ID_MASK 0x04000000
138 #define IQ_SERV_ID_MASK 0x02000000
139 #define IQ_IE_COUN_MASK 0x01000000
140 #define IQ_NET_ID_MASK 0x00800000
141 #define IQ_NET_AUX_MASK 0x00400000
142 #define IQ_IE_ROAM_MASK 0x00200000
143 #define IQ_IE_COST_MASK 0x00100000
144 #define IQ_IE_QOS_MASK 0x00080000
145 #define IQ_IE_DATA_MASK 0x00040000
146 #define IQ_IE_REGDOM_MASK 0x00020000
147 #define IQ_IE_FREQ_MASK 0x00010000
148 #define IQ_IE_IP_CFG_MASK 0x00008000
149 #define IQ_IE_CAP_MASK 0x00004000
150 #define IQ_IE_SUP_MASK 0x00002000
151 #define IQ_IE_MOB_MG_MASK 0x00001000
152 #define IQ_IE_EM_SERV_MASK 0x00000800
153 #define IQ_IE_IMS_MASK 0x00000400
154 #define IQ_IE_MOB_NET_MASK 0x00000200
155 #define IQ_IE_POA_ADDR_MASK 0x00000100
156 #define IQ_IE_POA_LOC_MASK 0x00000080
157 #define IQ_IE_POA_CHAN_MASK 0x00000040
158 #define IQ_IE_POA_SYS_MASK 0x00000020
159 #define IQ_IE_POA_SUB_MASK 0x00000010
160 #define IQ_IE_POA_IP_MASK 0x00000008
162 /*MASK for mobility Management methods*/
163 #define MOB_MIP4_MASK 0x8000
164 #define MOB_MIP4_REG_MASK 0x4000
165 #define MOB_MIP6_MASK 0x2000
166 #define MOB_HMIP6_MASK 0x1000
167 #define MOB_LOW_LAT_MASK 0x0800
168 #define MOB_FMIP6_MASK 0x0400
169 #define MOB_IKE_MULTI_MASK 0x0200
171 /*MASK for ip configuration methods*/
172 #define IP_CFG_STAT_MASK 0x80000000
173 #define IP_CFG_DHCP4_MASK 0x40000000
174 #define IP_CFG_MIP4_FA_MASK 0x20000000
175 #define IP_CFG_MIP4_NFA_MASK 0x10000000
176 /*bits 4-10 reserved for IPv4 address configuration*/
177 #define IP_CFG_IP6_SL_MASK 0x00100000
178 #define IP_CFG_DHCP6_MASK 0x00080000
179 #define IP_CFG_IP6_MAN_MASK 0x00040000
181 /*information holder integers...*/
182 static int proto_mih;
183 static int hf_mih_version;
184 static int hf_mih_ack_req;
185 static int hf_mih_ack_resp;
186 static int hf_mih_uir;
187 static int hf_mih_more_frag;
188 static int hf_mih_frag_no;
189 static int hf_mih_mid;
190 static int hf_mih_service_id;
191 static int hf_mih_opcode;
192 static int hf_mih_serv_actionid;
193 static int hf_mih_event_actionid;
194 static int hf_mih_command_actionid;
195 static int hf_mih_info_actionid;
196 static int hf_mih_tid;
197 static int hf_mih_pay_len;
198 static int hf_mih_type;
199 static int hf_mih_type_length;
200 static int hf_mih_type_length_ext;
201 static int hf_mihf_id;
202 static int hf_mihf_id_mac;
203 static int hf_mihf_id_ipv4;
204 static int hf_mihf_id_ipv6;
205 static int hf_status;
206 static int hf_ip_methods_supported;
207 static int hf_ip_dhcp_services;
208 static int hf_fn_agent;
209 static int hf_access_router;
210 static int hf_link_type;
211 static int hf_link_type_ext;
212 static int hf_ipv4_addr;
213 static int hf_ipv6_addr;
214 static int hf_link_dn_reason;
215 static int hf_link_gdn_reason;
216 static int hf_mac_addr;
217 static int hf_link_param_gen;
218 static int hf_link_param_qos;
219 static int hf_link_param_gg;
220 static int hf_link_param_802_11;
221 static int hf_link_param_fdd;
222 static int hf_link_param_edge;
223 static int hf_link_param_eth;
224 static int hf_link_param_c2k;
225 static int hf_link_param_hrpd;
226 static int hf_link_param_802_16;
227 static int hf_link_param_802_20;
228 static int hf_link_param_802_22;
229 static int hf_link_param_value;
230 static int hf_op_mode;
231 static int hf_link_ac_type;
232 static int hf_link_ac_ext_time;
233 static int hf_link_ac_result;
234 static int hf_ho_reason;
235 static int hf_ho_status;
236 static int hf_reg_request_code;
237 static int hf_ip_renewal;
238 static int hf_max_resp_size;
239 static int hf_time_interval;
240 static int hf_valid_time_interval;
241 static int hf_tsp_carrier;
242 static int hf_mbb_ho_supp;
243 static int hf_link_addr_type;
244 static int hf_link_transport_addr_type;
245 static int hf_link_addr_string;
246 static int hf_link_data_rate;
247 static int hf_plmn_id;
248 static int hf_location_area_id;
249 static int hf_cell_id;
250 static int hf_ci;
251 static int hf_threshold_val;
252 static int hf_threshold_x_dir;
253 static int hf_threshold_action;
254 static int hf_config_status;
255 static int hf_num_cos;
256 static int hf_num_queue;
257 static int hf_channel_id;
258 static int hf_predef_cfg_id;
259 static int hf_network_id;
260 static int hf_net_aux_id;
261 static int hf_sig_strength_dbm;
262 static int hf_sig_strength_per;
263 static int hf_cos_id;
264 static int hf_cos_value;
265 static int hf_sinr;
266 static int hf_rdf_data;
267 static int hf_rdf_mime_type;
268 static int hf_link_res_status;
269 static int hf_res_retention_status;
270 static int hf_res_rpt_flag;
271 static int hf_unauth_info_req;
272 static int hf_rdf_sch;
273 static int hf_rdf_sch_url;
274 static int hf_ir_bin_data;
275 static int hf_iq_bin_data_x;
276 static int hf_vendor_specific_tlv;
277 static int hf_reserved_tlv;
278 static int hf_experimental_tlv;
279 static int hf_unknown_tlv;
280 static int hf_fragmented_tlv;
282 /*header fields for event list */
283 static int hf_event_list;
284 static int hf_event_link_detect;
285 static int hf_event_link_up;
286 static int hf_event_link_dn;
287 static int hf_event_link_param;
288 static int hf_event_link_gd;
289 static int hf_event_ho_imm;
290 static int hf_event_ho_comp;
291 static int hf_event_pdu_tx_stat;
293 /*header fields for command list*/
294 static int hf_cmd_list;
295 static int hf_cmd_event_subs;
296 static int hf_cmd_event_unsub;
297 static int hf_cmd_get_param;
298 static int hf_cmd_con_thres;
299 static int hf_cmd_link_action;
301 /*header fields for iq type list*/
302 static int hf_iq_list;
303 static int hf_iq_bin_data;
304 static int hf_iq_rdf_data;
305 static int hf_iq_rdf_sch_url;
306 static int hf_iq_rdf_sch;
307 static int hf_iq_net_type;
308 static int hf_iq_op_id;
309 static int hf_iq_serv_pro_id;
310 static int hf_iq_country_code;
311 static int hf_iq_net_id;
312 static int hf_iq_net_aux_id;
313 static int hf_iq_roam_part;
314 static int hf_iq_cost;
315 static int hf_iq_net_qos;
316 static int hf_iq_net_dat_rt;
317 static int hf_iq_net_reg_dom;
318 static int hf_iq_freq_bands;
319 static int hf_iq_ip_cfg_mthds;
320 static int hf_iq_net_cap;
321 static int hf_iq_supp_lcp;
322 static int hf_iq_net_mob_mg;
323 static int hf_iq_net_emserv;
324 static int hf_iq_net_ims_pcscf;
325 static int hf_iq_net_mob_net;
326 static int hf_iq_link_addr;
327 static int hf_iq_poa_loc;
328 static int hf_iq_poa_chan_range;
329 static int hf_iq_poa_sys_info;
330 static int hf_iq_poa_sub_info;
331 static int hf_iq_poa_ip;
333 /*header fields for mob mgmt*/
334 static int hf_mob_list;
335 static int hf_mob_mip4;
336 static int hf_mob_mip4_reg;
337 static int hf_mob_mip6;
338 static int hf_mob_hmip6;
339 static int hf_mob_low_lat;
340 static int hf_mob_fmip6;
341 static int hf_mob_ike_multi;
343 /*header fields for configure methods*/
344 static int hf_cfg_mthds;
345 static int hf_cfg_ip4_stat;
346 static int hf_cfg_dhcp4;
347 static int hf_cfg_mip_fa;
348 static int hf_cfg_mip_wo_fa;
349 static int hf_cfg_ip6_sac;
350 static int hf_cfg_dhcp6;
351 static int hf_cfg_ip6_manual;
353 /*header fields for transport list*/
354 static int hf_trans_list;
355 static int hf_trans_udp;
356 static int hf_trans_tcp;
358 /*header fields for device state requests and responses*/
359 static int hf_dev_states_req;
360 static int hf_dev_states_req_dev_info;
361 static int hf_dev_states_req_batt_lvl;
362 static int hf_dev_states_resp;
363 static int hf_dev_batt_level;
364 static int hf_dev_info;
366 /*header fields for Link Action Attributes*/
367 static int hf_link_ac_attr;
368 static int hf_link_ac_attr_link_scan;
369 static int hf_link_ac_attr_link_res_retain;
370 static int hf_link_ac_attr_data_fwd_req;
372 /*header fields for transport subtypes*/
373 static int hf_link_subtype_eth;
374 static int hf_link_subtype_eth_10m;
375 static int hf_link_subtype_eth_100m;
376 static int hf_link_subtype_eth_1000m;
377 static int hf_link_subtype_wireless_other;
378 static int hf_link_subtype_wireless_other_dvb;
379 static int hf_link_subtype_wireless_other_tdmb;
380 static int hf_link_subtype_wireless_other_atsc;
381 static int hf_link_subtype_ieee80211;
382 static int hf_link_subtype_ieee80211_24;
383 static int hf_link_subtype_ieee80211_5;
384 static int hf_link_subtype_ieee80211_49;
385 static int hf_link_subtype_ieee80211_365;
386 static int hf_link_subtype_ieee80211_316;
387 static int hf_link_subtype_umts;
388 static int hf_link_subtype_umts_99;
389 static int hf_link_subtype_umts_4;
390 static int hf_link_subtype_umts_5;
391 static int hf_link_subtype_umts_6;
392 static int hf_link_subtype_umts_7;
393 static int hf_link_subtype_umts_8;
394 static int hf_link_subtype_cdma2000;
395 static int hf_link_subtype_cdma2000_0;
396 static int hf_link_subtype_cdma2000_a;
397 static int hf_link_subtype_cdma2000_b;
398 static int hf_link_subtype_cdma2000_c;
399 static int hf_link_subtype_ieee80216;
400 static int hf_link_subtype_ieee80216_25;
401 static int hf_link_subtype_ieee80216_35;
403 /*header fields for MIH Capabilities*/
404 static int hf_mihcap;
405 static int hf_mihcap_es;
406 static int hf_mihcap_cs;
407 static int hf_mihcap_is;
409 /*header fields for High Level Network Capabilities*/
410 static int hf_net_caps;
411 static int hf_net_caps_sec;
412 static int hf_net_caps_qos0;
413 static int hf_net_caps_qos1;
414 static int hf_net_caps_qos2;
415 static int hf_net_caps_qos3;
416 static int hf_net_caps_qos4;
417 static int hf_net_caps_qos5;
418 static int hf_net_caps_ia;
419 static int hf_net_caps_es;
420 static int hf_net_caps_mihcap;
422 /*trees and subtrees...*/
423 static int ett_mih;
424 static int ett_ver_flags;
425 static int ett_mid;
426 static int ett_tlv;
427 static int ett_cmd_bitmap;
428 static int ett_event_bitmap;
429 static int ett_mob_mgt_bitmap;
430 static int ett_cfg_mtd_bitmap;
431 static int ett_iq_type_bitmap;
432 static int ett_trans_list_bitmap;
433 static int ett_dev_states_bitmap;
434 static int ett_mihcap_bitmap;
435 static int ett_net_caps_bitmap;
436 static int ett_ac_attr_bitmap;
437 static int ett_subtype_eth_bitmap;
438 static int ett_subtype_wireless_other_bitmap;
439 static int ett_subtype_ieee80211_bitmap;
440 static int ett_subtype_umts_bitmap;
441 static int ett_subtype_cdma2000_bitmap;
442 static int ett_subtype_ieee80216_bitmap;
443 static int ett_min_pk_tx_delay;
444 static int ett_avg_pk_tx_delay;
445 static int ett_max_pk_tx_delay;
446 static int ett_pk_delay_jitter;
447 static int ett_pk_loss_rate;
448 static int ett_list_prefer_link;
449 static int ett_ip_dhcp_server;
450 static int ett_fn_agent;
451 static int ett_access_router;
452 static int ett_link_states_req;
453 static int ett_link_desc_req;
454 static int ett_dev_states_resp;
456 /*field definitions of evt, cmd, mob mgmt, ip cfg, iq type */
457 static int * const event_fields[] = {
458 &hf_event_link_detect,
459 &hf_event_link_up,
460 &hf_event_link_dn,
461 &hf_event_link_param,
462 &hf_event_link_gd,
463 &hf_event_ho_imm,
464 &hf_event_ho_comp,
465 &hf_event_pdu_tx_stat,
466 NULL
469 static int * const cmd_fields[] = {
470 &hf_cmd_event_subs,
471 &hf_cmd_event_unsub,
472 &hf_cmd_get_param,
473 &hf_cmd_con_thres,
474 &hf_cmd_link_action,
475 NULL
478 static int * const iq_type_fields[] = {
479 &hf_iq_bin_data,
480 &hf_iq_rdf_data,
481 &hf_iq_rdf_sch_url,
482 &hf_iq_rdf_sch,
483 &hf_iq_net_type,
484 &hf_iq_op_id,
485 &hf_iq_serv_pro_id,
486 &hf_iq_country_code,
487 &hf_iq_net_id,
488 &hf_iq_net_aux_id,
489 &hf_iq_roam_part,
490 &hf_iq_cost,
491 &hf_iq_net_qos,
492 &hf_iq_net_dat_rt,
493 &hf_iq_net_reg_dom,
494 &hf_iq_freq_bands,
495 &hf_iq_ip_cfg_mthds,
496 &hf_iq_net_cap,
497 &hf_iq_supp_lcp,
498 &hf_iq_net_mob_mg,
499 &hf_iq_net_emserv,
500 &hf_iq_net_ims_pcscf,
501 &hf_iq_net_mob_net,
502 &hf_iq_link_addr,
503 &hf_iq_poa_loc,
504 &hf_iq_poa_chan_range,
505 &hf_iq_poa_sys_info,
506 &hf_iq_poa_sub_info,
507 &hf_iq_poa_ip,
508 NULL
511 static int * const mob_fields[] = {
512 &hf_mob_mip4,
513 &hf_mob_mip4_reg,
514 &hf_mob_mip6,
515 &hf_mob_hmip6,
516 &hf_mob_low_lat,
517 &hf_mob_fmip6,
518 &hf_mob_ike_multi,
519 NULL
522 static int * const cfg_fields[] = {
523 &hf_cfg_ip4_stat,
524 &hf_cfg_dhcp4,
525 &hf_cfg_mip_fa,
526 &hf_cfg_mip_wo_fa,
527 &hf_cfg_ip6_sac,
528 &hf_cfg_dhcp6,
529 &hf_cfg_ip6_manual,
530 NULL
533 /*field definitions for various bitmaps */
534 static int * const trans_fields[] = {
535 &hf_trans_udp,
536 &hf_trans_tcp,
537 NULL
540 static int * const dev_states_fields[] = {
541 &hf_dev_states_req_dev_info,
542 &hf_dev_states_req_batt_lvl,
543 NULL
546 static int * const mihcap_fields[] = {
547 &hf_mihcap_es,
548 &hf_mihcap_cs,
549 &hf_mihcap_is,
550 NULL
553 static int * const net_caps_fields[] = {
554 &hf_net_caps_sec,
555 &hf_net_caps_qos0,
556 &hf_net_caps_qos1,
557 &hf_net_caps_qos2,
558 &hf_net_caps_qos3,
559 &hf_net_caps_qos4,
560 &hf_net_caps_qos5,
561 &hf_net_caps_ia,
562 &hf_net_caps_es,
563 &hf_net_caps_mihcap,
564 NULL
567 static int * const ac_attr_fields[] = {
568 &hf_link_ac_attr_link_scan,
569 &hf_link_ac_attr_link_res_retain,
570 &hf_link_ac_attr_data_fwd_req,
571 NULL
574 static int * const subtype_eth_fields[] = {
575 &hf_link_subtype_eth_10m,
576 &hf_link_subtype_eth_100m,
577 &hf_link_subtype_eth_1000m,
578 NULL
581 static int * const subtype_wireless_other_fields[] = {
582 &hf_link_subtype_wireless_other_dvb,
583 &hf_link_subtype_wireless_other_tdmb,
584 &hf_link_subtype_wireless_other_atsc,
585 NULL
588 static int * const subtype_ieee80211_fields[] = {
589 &hf_link_subtype_ieee80211_24,
590 &hf_link_subtype_ieee80211_5,
591 &hf_link_subtype_ieee80211_49,
592 &hf_link_subtype_ieee80211_365,
593 &hf_link_subtype_ieee80211_316,
594 NULL
597 static int * const subtype_umts_fields[] = {
598 &hf_link_subtype_umts_99,
599 &hf_link_subtype_umts_4,
600 &hf_link_subtype_umts_5,
601 &hf_link_subtype_umts_6,
602 &hf_link_subtype_umts_7,
603 &hf_link_subtype_umts_8,
604 NULL
607 static int * const subtype_cdma2000_fields[] = {
608 &hf_link_subtype_cdma2000_0,
609 &hf_link_subtype_cdma2000_a,
610 &hf_link_subtype_cdma2000_b,
611 &hf_link_subtype_cdma2000_c,
612 NULL
615 static int * const subtype_ieee80216_fields[] = {
616 &hf_link_subtype_ieee80216_25,
617 &hf_link_subtype_ieee80216_35,
618 NULL
621 static const value_string servicevalues[] = {
622 {1, "Service Management"},
623 {2, "Event Service"},
624 {3, "Command Service"},
625 {4, "Information Service"},
626 {0, NULL}
629 static const value_string opcodevalues[] = {
630 {0, "Confirm"},
631 {1, "Request"},
632 {2, "Response"},
633 {3, "Indication"},
634 {0, NULL},
637 static const value_string link_ac_result_vals[] = {
638 {0, "Success"},
639 {1, "Failure"},
640 {2, "Refused"},
641 {3, "Incapable"},
642 {0, NULL},
645 static const value_string serv_act_id_values[] = {
646 {1, "MIH_Capability_Discover"},
647 {2, "MIH_Register"},
648 {3, "MIH_DeRegister"},
649 {4, "MIH_Event_Subscribe"},
650 {5, "MIH_Event_Unsubscribe"},
651 {0, NULL}
654 static const value_string event_act_id_values[] = {
655 {1, "MIH_Link_Detected"},
656 {2, "MIH_Link_UP"},
657 {3, "MIH_Link_Down"},
658 {5, "MIH_Link_Parameter_Report"},
659 {6, "MIH_Link_Going_down"},
660 {7, "MIH_Link_Handover_Imminent"},
661 {8, "MIH_Handover_Complete"},
662 {0, NULL}
665 static const value_string status_types[] = {
666 {0, "Success"},
667 {1, "Unspecified Failure"},
668 {2, "Rejected"},
669 {3, "Authorization Failure"},
670 {4, "Network Error"},
671 {0, NULL}
674 static const value_string ho_status_vals[] = {
675 {0, "Handover Permitted"},
676 {1, "Handover Declined"},
677 {0, NULL}
680 static const value_string mbb_ho_supp_vals[] = {
681 {0, "Make before break is not supported."},
682 {1, "Make before break is supported."},
683 {0, NULL}
686 static const value_string reg_request_code_vals[] = {
687 {0, "Make"},
688 {1, "Re-Registration"},
689 {0, NULL}
692 static const value_string ip_renewal_vals[] = {
693 {0, "Change Not Required"},
694 {1, "Change Required"},
695 {0, NULL}
698 static const value_string dev_states_req_vals[] = {
699 {0, "DEVICE_INFO"},
700 {1, "BATT_LEVEL"},
701 {0, NULL}
704 static const value_string link_addr_types[] ={
705 {0, "MAC_ADDR"},
706 {1, "3GPP_3G_CELL_ID"},
707 {2, "3GPP_2G_CELL_ID"},
708 {3, "3GPP_ADDR"},
709 {4, "3GPP2_ADDR"},
710 {5, "OTHER_L2_ADDR"},
711 {0, NULL}
714 static const value_string threshold_x_dir_vals[] ={
715 {0, "Above Threshold"},
716 {1, "Below Threshold"},
717 {0, NULL}
720 static const value_string threshold_action_vals[] ={
721 {0, "Set Normal Threshold"},
722 {1, "Set one-shot Threshold"},
723 {2, "Cancel Threshold"},
724 {0, NULL}
727 static const value_string boolean_types[] ={
728 {0, "False"},
729 {1, "True"},
730 {0, NULL}
733 static const value_string command_act_id_values[] = {
734 {1, "MIH_Link_Get_Parameters"},
735 {2, "MIH_Link_Configure_Thresholds"},
736 {3, "MIH_Link_Actions"},
737 {4, "MIH_Net_HO_Candidate_Query"},
738 {5, "MIH_MN_HO_Candidate_Query"},
739 {6, "MIH_N2N_HO_Query_Resources"},
740 {7, "MIH_MN_HO_Commit"},
741 {8, "MIH_Net_HO-Commit"},
742 {9, "MN_N2N_HO_Commit"},
743 {10, "MIH_MN_HO_Complete"},
744 {11, "MIH_N2N_HO_Complete"},
745 {12, "MIH_Net_HO_Best_Commit"},
746 {0, NULL}
749 static const value_string info_act_id_values[] = {
750 {1, "MIH_Get_Information"},
751 {2, "MIH_Push_information"},
752 {0, NULL}
755 static const value_string link_dn_reason_vals[] = {
756 {0, "Explicit Disconnect"},
757 {1, "Packet Timeout"},
758 {2, "No resource"},
759 {3, "No broadcast"},
760 {4, "Authentication Failure"},
761 {5, "Billing Failure"},
762 {0, NULL}
765 static const value_string link_gdn_reason_vals[] = {
766 {0, "Explicit Disconnect"},
767 {1, "Link Parameter Degrading"},
768 {2, "Low Power"},
769 {3, "No resource"},
770 {0, NULL}
773 static const value_string link_type_vals[] = {
774 {0, "Reserved"},
775 {1, "Wireless - GSM"},
776 {2, "Wireless - GPRS"},
777 {3, "Wireless - EDGE"},
778 {15, "Ethernet"},
779 {18, "Wireless - Other"},
780 {19, "Wireless - IEEE 802.11"},
781 {22, "Wireless - CDMA2000"},
782 {23, "Wireless - UMTS"},
783 {24, "Wireless - cdma2000-HRPD"},
784 {27, "Wireless - IEEE 802.16"},
785 {28, "Wireless - IEEE 802.20"},
786 {29, "Wireless - IEEE 802.22"},
787 {40, "DVB"},
788 {41, "T-DMB"},
789 {42, "ATSC-M/H"},
790 {0, NULL}
793 static const value_string link_param_gen_vals[] = {
794 {0, "Data Rate"},
795 {1, "Signal Strength"},
796 {2, "SINR"},
797 {3, "Throughput"},
798 {4, "Packet Error Rate"},
799 {5, "Channel Frequency"},
800 {6, "Channel Bandwidth"},
801 {7, "Channel TX Power"},
802 {8, "Higher Adjacent Channel Frequency"},
803 {9, "Higher Adjacent Channel Bandwidth"},
804 {10, "Higher Adjacent Channel TX Power"},
805 {11, "Lower Adjacent Channel Frequency"},
806 {12, "Lower Adjacent Channel Bandwidth"},
807 {13, "Lower Adjacent Channel TX Power"},
808 {0, NULL}
811 static const value_string link_ac_type_vals[] = {
812 {0, "NONE"},
813 {1, "LINK_DISCONNECT"},
814 {2, "LINK_LOW_POWER"},
815 {3, "LINK_POWER_DOWN"},
816 {4, "LINK_POWER_UP"},
817 {5, "LINK_CONFIGURE"},
818 {0, NULL}
821 static const value_string link_param_gg_vals[] = {
822 {0, "Rx Qual"},
823 {1, "RsLev"},
824 {2, "Mean BEP"},
825 {3, "StDev BEP"},
826 {0, NULL}
829 static const value_string link_param_fdd_vals[] = {
830 {0, "CPICH RSCP"},
831 {1, "PCCPCH RSCP"},
832 {2, "UTRA carrier RSSI"},
833 {3, "GSM carrier RSSI"},
834 {4, "CPICH Ec/No"},
835 {5, "Transport channel BLER"},
836 {6, "User equipment (UE) transmitted power"},
837 {0, NULL}
840 static const value_string link_param_802_11_vals[] = {
841 {0, "RSSI"},
842 {1, "No QoS resource Available"},
843 {2, "Multicast packet loss rate"},
844 {0, NULL}
847 static const value_string op_mode_vals[] = {
848 {0, "Normal Mode"},
849 {1, "Power Saving Mode"},
850 {2, "Powered Down"},
851 {0, NULL}
854 static const value_string link_param_qos_vals[] = {
855 {0, "Max no of differentiable classes"},
856 {1, "Min Packet transfer delay"},
857 {2, "Avg packet transfer delay"},
858 {3, "Max packet transfer delay"},
859 {4, "delay jitter"},
860 {5, "Packet loss"},
861 {0, NULL}
864 static const value_string link_param_c2k_hrpd_vals[] = {
865 {0, "Pilot Strength"},
866 {0, NULL}
869 static const value_string typevaluenames[] = {
870 { 1, "Source MIHIF ID" },
871 { 2, "Destination MIHIF ID" },
872 { 3, "Status" },
873 { 4, "Link type" },
874 { 5, "MIH event list" },
875 { 6, "MIH command list" },
876 { 7, "MIIS query type list" },
877 { 8, "Transport option list" },
878 { 9, "Link address list" },
879 { 10, "MBB handover support" },
880 { 11, "Register request code" },
881 { 12, "Valid time interval" },
882 { 13, "Link identifier" },
883 { 14, "New Link identifier" },
884 { 15, "Old access router" },
885 { 16, "New access router" },
886 { 17, "IP renewal flag" },
887 { 18, "Mobility management support" },
888 { 19, "IP address configuration methods" },
889 { 20, "Link down reason code" },
890 { 21, "Time interval" },
891 { 22, "Link going down reason" },
892 { 23, "Link parameter report list" },
893 { 24, "Device states request" },
894 { 25, "Link identifier list" },
895 { 26, "Device states response list" },
896 { 27, "Get status request set" },
897 { 28, "Get status response list" },
898 { 29, "Configure request list" },
899 { 30, "Configure response list" },
900 { 31, "List of link PoA list" },
901 { 32, "Preferred link list" },
902 { 33, "Handover resource query list" },
903 { 34, "Handover status" },
904 { 35, "Access router address" },
905 { 36, "DHCP server address" },
906 { 37, "FA address" },
907 { 38, "Link actions list" },
908 { 39, "Link actions result list" },
909 { 40, "Handover result" },
910 { 41, "Resource status" },
911 { 42, "Resource retention status" },
912 { 43, "Info query binary data list" },
913 { 44, "Info query RDF data list" },
914 { 45, "Info query RDF schema URL" },
915 { 46, "Info query RDF schema list" },
916 { 47, "Max response size" },
917 { 48, "Info response binary data list" },
918 { 49, "Info response RDF data list" },
919 { 50, "Info response RDF schema URL list" },
920 { 51, "Info response RDF schema list" },
921 { 52, "Mobile node MIHF ID" },
922 { 53, "Query resource report flag" },
923 { 54, "Event configuration info list" },
924 { 55, "Target network info" },
925 { 56, "List of target network info" },
926 { 57, "Assigned resource set" },
927 { 58, "Link detected info list" },
928 { 59, "MN link ID" },
929 { 60, "PoA" },
930 { 61, "Unauthenticated information request" },
931 { 62, "Network type" },
932 { 63, "Requested resource set" },
933 {0, NULL}
936 static int16_t dissect_mih_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree, int16_t (*base_dissect)(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree))
938 uint8_t i = 0;
939 uint8_t list_len = tvb_get_uint8(tvb, offset);
940 offset ++;
941 for(i=0; i < list_len; i++)
942 offset = base_dissect(tvb, offset, tlv_tree);
943 return (offset);
946 static int16_t dissect_ip_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
948 uint16_t addr_type = tvb_get_ntohs(tvb, offset);
949 uint8_t len = 0;
950 if(addr_type == 1 )
952 /*IPv4 Addr*/
953 len = tvb_get_uint8(tvb, offset + 3);
954 proto_tree_add_item(tlv_tree, hf_ipv4_addr, tvb, offset+2, len, ENC_BIG_ENDIAN);
955 return (offset+3+len);
957 if(addr_type == 2)
959 /*IPv6 Addr*/
960 len = tvb_get_uint8(tvb, offset + 3);
961 proto_tree_add_item(tlv_tree,hf_ipv6_addr, tvb, offset+2, len, ENC_NA);
962 return (offset+3+len);
964 else
966 len = tvb_get_uint8(tvb, offset + 3);
967 return (offset+3+len);
971 static int16_t dissect_qos_val(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
973 proto_tree_add_item(tlv_tree, hf_cos_id, tvb, offset, 1, ENC_BIG_ENDIAN);
974 offset++ ;
975 proto_tree_add_item(tlv_tree, hf_cos_value, tvb, offset, 2, ENC_BIG_ENDIAN);
976 offset += 2;
977 return (offset);
980 static int16_t dissect_link_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree )
982 uint8_t link_addr_choice = tvb_get_uint8(tvb, offset);
983 uint8_t len = 0;
985 proto_tree_add_item(tlv_tree, hf_link_addr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
986 switch (link_addr_choice)
988 case 0 : /*MAC_ADDR*/
989 proto_tree_add_item(tlv_tree, hf_link_transport_addr_type, tvb, offset+1, 2, ENC_BIG_ENDIAN);
990 if(tvb_get_ntohs(tvb, offset+1) == 0x06)
991 proto_tree_add_item(tlv_tree, hf_mac_addr, tvb, offset+4, tvb_get_uint8(tvb, offset+3), ENC_NA);
992 return (offset + 10);
994 case 1 :/*3GPP_3G_CELL_ID*/
995 proto_tree_add_item(tlv_tree, hf_plmn_id, tvb, offset+1, 3, ENC_BIG_ENDIAN);
996 proto_tree_add_item(tlv_tree, hf_cell_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
997 return (offset + 8);
999 case 2 :/*3GPP_2G_CELL_ID*/
1000 proto_tree_add_item(tlv_tree, hf_plmn_id, tvb, offset+1, 3, ENC_BIG_ENDIAN);
1001 proto_tree_add_item(tlv_tree, hf_location_area_id, tvb, offset+4, 2, ENC_BIG_ENDIAN);
1002 proto_tree_add_item(tlv_tree, hf_ci, tvb, offset+6, 2, ENC_BIG_ENDIAN);
1003 return (offset + 8);
1005 case 3 :/*3GPP_ADDR*/
1006 case 4 :/*3GPP2_ADDR*/
1007 case 5 :/*OTHER_L2_ADDR*/
1008 len = tvb_get_uint8(tvb, offset+1);
1009 proto_tree_add_item(tlv_tree, hf_link_addr_string, tvb, offset+2, len, ENC_ASCII);
1010 return (offset + 2 + len);
1012 return 0;
1015 static int16_t dissect_tsp_container(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1017 uint8_t len = 0;
1018 if(tvb_get_uint8(tvb, offset) == 1)
1020 proto_tree_add_item(tlv_tree, hf_predef_cfg_id, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1021 return (offset + 2);
1023 else if(tvb_get_uint8(tvb, offset) == 2)
1025 len = tvb_get_uint8(tvb, offset+1);
1026 proto_tree_add_item(tlv_tree, hf_tsp_carrier, tvb, offset+2, len, ENC_ASCII);
1027 return (offset + len + 2);
1029 else
1030 return (offset + 1);
1033 static int16_t dissect_iq_rdf_data(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1035 uint8_t len = 0;
1036 if(tvb_get_uint8(tvb, offset))
1038 len = tvb_get_uint8(tvb, offset+1);
1039 proto_tree_add_item(tlv_tree, hf_rdf_mime_type, tvb, offset+2, len, ENC_ASCII);
1040 offset += len + 1;
1042 offset++;
1043 len = tvb_get_uint8(tvb, offset);
1044 proto_tree_add_item(tlv_tree, hf_rdf_data, tvb, offset+1, len, ENC_ASCII);
1045 return (offset+len+1);
1048 static int16_t dissect_qos_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1050 proto_tree *subtree;
1052 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1053 offset += 1;
1054 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_min_pk_tx_delay, NULL, "MIN_PK_TX_DELAY");
1055 offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1056 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_avg_pk_tx_delay, NULL, "AVG_PK_TX_DELAY");
1057 offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1058 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_max_pk_tx_delay, NULL, "MAX_PK_TX_DELAY");
1059 offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1060 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_pk_delay_jitter, NULL, "PK_DELAY_JITTER");
1061 offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1062 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_pk_loss_rate, NULL, "PK_LOSS_RATE");
1063 offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1064 return (offset);
1067 static int16_t dissect_dev_states(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1069 uint8_t len = 0;
1070 proto_item *item;
1071 proto_tree *sub_tree;
1073 item = proto_tree_add_item(tlv_tree, hf_dev_states_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
1074 sub_tree = proto_item_add_subtree(item, ett_dev_states_resp);
1075 if(tvb_get_uint8(tvb, offset))
1077 /*BATT_LEVEL*/
1078 offset++;
1079 proto_tree_add_item(sub_tree, hf_dev_batt_level, tvb, offset, 1, ENC_BIG_ENDIAN);
1080 return (offset+1);
1082 else
1084 /*DEVICE INFO*/
1085 offset++;
1086 len = tvb_get_uint8(tvb, offset);
1087 proto_tree_add_item(sub_tree, hf_dev_info, tvb, offset+1, len, ENC_ASCII);
1088 return (offset + len + 1);
1093 static int16_t dissect_net_type(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1095 uint8_t len = 0;
1096 uint8_t type = 0;
1097 if(!tvb_get_uint8(tvb, offset))
1099 /*LINK_TYPE*/
1100 type = tvb_get_uint8(tvb, offset+1);
1101 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1102 offset += 1;
1104 offset += 1;
1105 if(!tvb_get_uint8(tvb, offset))
1107 /*LINK_SUBTYPE*/
1108 switch (type)
1110 /* last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1111 Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits
1112 1 (identifier) + 4(bitmask defined values) + 4 (unused bits) = 9 (final offset)*/
1113 case 15 : /*subtype ethernet*/
1114 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_eth, ett_subtype_eth_bitmap, subtype_eth_fields, ENC_BIG_ENDIAN);
1115 break;
1116 case 18 : /*subtype wireless other*/
1117 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_wireless_other, ett_subtype_wireless_other_bitmap, subtype_wireless_other_fields, ENC_BIG_ENDIAN);
1118 break;
1119 case 19 : /*subtype 802.11*/
1120 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80211, ett_subtype_ieee80211_bitmap, subtype_ieee80211_fields, ENC_BIG_ENDIAN);
1121 break;
1122 case 23 : /*subtype UMTS*/
1123 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_umts, ett_subtype_umts_bitmap, subtype_umts_fields, ENC_BIG_ENDIAN);
1124 break;
1125 case 24 : /*subtype cdma2000*/
1126 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_cdma2000, ett_subtype_cdma2000_bitmap, subtype_cdma2000_fields, ENC_BIG_ENDIAN);
1127 break;
1128 case 27 : /*subtype 802.16*/
1129 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80216, ett_subtype_ieee80216_bitmap, subtype_ieee80216_fields, ENC_BIG_ENDIAN);
1130 break;
1131 default :
1132 proto_item_append_text(tlv_tree, "N/A");
1134 /*4(bitmask defined values) + 4 (unused bits) = 8 bits*/
1135 offset += 8;
1137 /*1 (identifier) = 1 bit*/
1138 offset += 1;
1139 if(!tvb_get_uint8(tvb, offset))
1141 /*TYPE_EXT*/
1142 len = tvb_get_uint8(tvb, offset+1);
1143 proto_tree_add_item(tlv_tree, hf_link_type_ext, tvb, offset+2, len, ENC_ASCII);
1144 offset += len + 2;
1146 return (offset);
1149 static int16_t dissect_net_type_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1151 offset = dissect_net_type(tvb, offset, tlv_tree);
1152 offset = dissect_link_addr(tvb, offset, tlv_tree);
1153 return (offset) ;
1156 static int16_t dissect_mbb_ho_supp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1158 offset = dissect_net_type(tvb, offset, tlv_tree);
1159 offset = dissect_net_type(tvb, offset, tlv_tree);
1160 proto_tree_add_item(tlv_tree, hf_mbb_ho_supp, tvb, offset, 1, ENC_BIG_ENDIAN);
1161 offset++;
1162 return (offset);
1165 static int16_t dissect_tgt_net_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1167 uint8_t len = 0;
1168 if(!tvb_get_uint8(tvb, offset))
1170 offset +=1;
1172 /*NETWORK_ID*/
1173 len = tvb_get_uint8(tvb, offset);
1174 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1175 offset += len + 2;
1176 if(!tvb_get_uint8(tvb, offset))
1178 /*NET_AUX_ID*/
1179 offset +=1;
1180 len = tvb_get_uint8(tvb, offset);
1181 proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII);
1182 return (offset + 1);
1184 return (offset + 2);
1186 else
1188 /*LINK_ADDR*/
1189 offset +=1;
1190 offset = dissect_link_addr(tvb, offset, tlv_tree);
1191 return (offset);
1195 static int16_t dissect_link_id(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1198 int16_t next_offset = 0;
1200 /*LINK_TYPE*/
1201 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1202 next_offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1203 return (next_offset);
1206 static int16_t dissect_link_poa(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1208 offset = dissect_link_id(tvb, offset, tlv_tree);
1209 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_addr);
1210 return (offset);
1213 static int16_t dissect_rq_result(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1215 proto_tree *subtree;
1216 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_list_prefer_link, NULL, "List of preferred links");
1217 offset = dissect_link_poa(tvb, offset, subtree);
1218 offset = dissect_qos_list(tvb, offset, tlv_tree);
1219 offset++;
1220 switch(tvb_get_uint8(tvb, offset-1))
1222 case 1:
1223 proto_tree_add_item(tlv_tree, hf_ip_methods_supported, tvb, offset, 1, ENC_BIG_ENDIAN);
1224 offset++;
1225 break;
1226 case 2:
1227 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1228 offset += 2;
1229 break;
1231 offset++;
1232 switch(tvb_get_uint8(tvb, offset-1))
1234 case 1:
1235 proto_tree_add_item(tlv_tree, hf_ip_dhcp_services, tvb, offset, 1, ENC_BIG_ENDIAN);
1236 offset++;
1237 break;
1238 case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_ip_dhcp_server, NULL, "IP DHCP server");
1239 offset = dissect_ip_addr(tvb, offset, subtree);
1240 break;
1242 offset++;
1243 switch(tvb_get_uint8(tvb, offset-1))
1245 case 1:
1246 proto_tree_add_item(tlv_tree, hf_fn_agent, tvb, offset, 1, ENC_BIG_ENDIAN);
1247 offset++;
1248 break;
1249 case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_fn_agent, NULL, "FN Agent");
1250 offset = dissect_ip_addr(tvb, offset, subtree);
1251 break;
1253 offset++;
1254 switch(tvb_get_uint8(tvb, offset-1))
1256 case 1:
1257 proto_tree_add_item(tlv_tree, hf_access_router, tvb, offset, 1, ENC_BIG_ENDIAN);
1258 offset++;
1259 break;
1260 case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_access_router, NULL, "Access Router");
1261 offset = dissect_ip_addr(tvb, offset, subtree);
1262 break;
1264 return (offset+1);
1267 static int16_t dissect_link_det_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1269 uint8_t len = 0;
1270 offset = dissect_link_id(tvb, offset, tlv_tree);
1271 if(tvb_get_uint8(tvb, offset))
1273 offset++;
1274 offset = dissect_link_addr(tvb, offset, tlv_tree);
1275 offset --;
1277 offset++;
1278 len = tvb_get_uint8(tvb, offset);
1279 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1280 offset += len + 1;
1281 len = tvb_get_uint8(tvb, offset);
1282 proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII);
1283 offset += len + 1;
1284 if(tvb_get_uint8(tvb, offset))
1285 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1286 else
1287 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1288 offset += 2;
1289 proto_tree_add_item(tlv_tree, hf_sinr, tvb, offset, 2, ENC_BIG_ENDIAN);
1290 offset += 2;
1291 proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset,4, ENC_BIG_ENDIAN);
1292 offset += 4;
1293 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mihcap, ett_mihcap_bitmap, mihcap_fields, ENC_BIG_ENDIAN);
1294 offset++;
1295 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_net_caps, ett_net_caps_bitmap, net_caps_fields, ENC_BIG_ENDIAN);
1296 offset += 4;
1297 return (offset);
1300 static int16_t dissect_link_scan_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1302 uint8_t len = 0;
1303 offset = dissect_link_addr(tvb, offset, tlv_tree);
1304 len = tvb_get_uint8(tvb, offset);
1305 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1306 offset = offset + len + 1;
1307 if(tvb_get_uint8(tvb, offset))
1308 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1309 else
1310 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1311 return offset+2;
1314 static int16_t dissect_link_action_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1316 offset = dissect_link_id(tvb, offset, tlv_tree);
1317 proto_tree_add_item(tlv_tree, hf_link_ac_result, tvb, offset, 1, ENC_BIG_ENDIAN);
1318 offset++;
1319 if(tvb_get_uint8(tvb, offset))
1321 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_link_scan_rsp);
1322 return offset;
1324 else
1325 return (offset+1);
1329 static int16_t dissect_link_action_req(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1331 offset = dissect_link_id(tvb, offset, tlv_tree);
1332 if(tvb_get_uint8(tvb, offset))
1334 offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1336 else
1338 offset++;
1340 proto_tree_add_item(tlv_tree, hf_link_ac_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1341 offset++;
1342 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_link_ac_attr, ett_ac_attr_bitmap, ac_attr_fields, ENC_BIG_ENDIAN);
1343 offset++;
1344 proto_tree_add_item(tlv_tree, hf_link_ac_ext_time, tvb, offset, 2, ENC_BIG_ENDIAN);
1345 return (offset+2);
1348 static int16_t dissect_link_states_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1350 if(!tvb_get_uint8(tvb, offset))
1352 proto_tree_add_item(tlv_tree, hf_op_mode, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1353 offset += 2;
1355 else
1357 proto_tree_add_item(tlv_tree, hf_channel_id, tvb, offset+1, 2, ENC_BIG_ENDIAN);
1358 offset += 3;
1360 return (offset);
1363 static int16_t dissect_link_param_type(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1365 uint8_t type = tvb_get_uint8(tvb, offset);
1366 offset++;
1368 /*LINK_PARAM_TYPE*/
1369 switch (type)
1371 case 0 :/*LINK_PARAM_GEN*/
1372 proto_tree_add_item(tlv_tree, hf_link_param_gen, tvb, offset, 1, ENC_BIG_ENDIAN);
1373 break;
1375 case 1 :/*LINK_PARAM_QOS*/
1376 proto_tree_add_item(tlv_tree, hf_link_param_qos, tvb, offset, 1, ENC_BIG_ENDIAN);
1377 break;
1379 case 2 :/*LINK_PARAM_GG*/
1380 proto_tree_add_item(tlv_tree, hf_link_param_gg, tvb, offset, 1, ENC_BIG_ENDIAN);
1381 break;
1383 case 3 :/*LINK_PARAM_EDGE*/
1384 proto_tree_add_item(tlv_tree, hf_link_param_edge, tvb, offset, 1, ENC_BIG_ENDIAN);
1385 break;
1387 case 4 :/*LINK_PARAM_ETH*/
1388 proto_tree_add_item(tlv_tree, hf_link_param_eth, tvb, offset, 1, ENC_BIG_ENDIAN);
1389 break;
1391 case 5 :/*LINK_PARAM_802_11*/
1392 proto_tree_add_item(tlv_tree, hf_link_param_802_11, tvb, offset, 1, ENC_BIG_ENDIAN);
1393 break;
1395 case 6 :/*LINK_PARAM_C2K*/
1396 proto_tree_add_item(tlv_tree, hf_link_param_c2k, tvb, offset, 1, ENC_BIG_ENDIAN);
1397 break;
1399 case 7 :/*LINK_PARAM_FDD*/
1400 proto_tree_add_item(tlv_tree, hf_link_param_fdd, tvb, offset, 1, ENC_BIG_ENDIAN);
1401 break;
1403 case 8 :/*LINK_PARAM_HRPD*/
1404 proto_tree_add_item(tlv_tree, hf_link_param_hrpd, tvb, offset, 1, ENC_BIG_ENDIAN);
1405 break;
1407 case 9 :/*LINK_PARAM_802_16*/
1408 proto_tree_add_item(tlv_tree, hf_link_param_802_16, tvb, offset, 1, ENC_BIG_ENDIAN);
1409 break;
1411 case 10 :/*LINK_PARAM_802_20*/
1412 proto_tree_add_item(tlv_tree, hf_link_param_802_20, tvb, offset, 1, ENC_BIG_ENDIAN);
1413 break;
1415 case 11 :/*LINK_PARAM_802_22*/
1416 proto_tree_add_item(tlv_tree, hf_link_param_802_22, tvb, offset, 1, ENC_BIG_ENDIAN);
1417 break;
1419 return (offset+1);
1422 static void dissect_link_status_req(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1424 proto_tree *subtree;
1426 /*LINK_STATES_REQ*/
1427 uint16_t temp = tvb_get_ntohs(tvb, offset);
1428 if(!temp)
1430 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 3, ett_link_states_req, NULL, "LINK_STATES_REQ: ");
1431 proto_tree_add_item(subtree, hf_op_mode, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1432 offset+=3;
1434 else
1436 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 4, ett_link_states_req, NULL, "LINK_STATES_REQ: ");
1437 proto_tree_add_item(subtree, hf_channel_id, tvb, offset+2, 2, ENC_BIG_ENDIAN);
1438 offset+=4;
1441 /*LINK_PARAM_TYPE_LIST*/
1442 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_type);
1444 /*LINK_DESC_REQ*/
1445 temp = tvb_get_ntohs(tvb, offset);
1446 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 3, ett_link_desc_req, NULL, "LINK_DESC_REQ");
1447 offset+=2;
1448 if(!temp)
1449 proto_tree_add_item(subtree, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1450 else
1451 proto_tree_add_item(subtree, hf_num_queue, tvb, offset, 1, ENC_BIG_ENDIAN);
1454 static int16_t dissect_link_cfg_status(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1456 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1457 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1458 offset += 2;
1459 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1460 offset ++;
1461 proto_tree_add_item(tlv_tree, hf_config_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1462 return (offset+1);
1465 static int16_t dissect_link_param(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1467 /*LINK_PARAM_TYPE*/
1468 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1469 if(!tvb_get_uint8(tvb, offset))
1471 offset ++;
1472 /*LINK_PARAM_VALUE*/
1473 proto_tree_add_item(tlv_tree, hf_link_param_value, tvb, offset, 2, ENC_BIG_ENDIAN);
1474 offset += 2;
1476 else
1478 proto_tree *subtree;
1479 offset ++;
1480 /*QOS_PARAM_VALUE*/
1481 switch(tvb_get_uint8(tvb, offset))
1483 case 0:
1484 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1485 offset += 2;
1486 break;
1487 case 1:
1488 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_min_pk_tx_delay, NULL, "MIN_PK_TX_DELAY");
1489 offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1490 break;
1491 case 2:
1492 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_avg_pk_tx_delay, NULL, "AVG_PK_TX_DELAY");
1493 offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1494 break;
1495 case 3:
1496 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_max_pk_tx_delay, NULL, "MAX_PK_TX_DELAY");
1497 offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1498 break;
1499 case 4:
1500 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_pk_delay_jitter, NULL, "PK_DELAY_JITTER");
1501 offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1502 break;
1503 case 5:
1504 subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_pk_loss_rate, NULL, "PK_LOSS_RATE");
1505 offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1506 break;
1509 return offset;
1512 static int16_t dissect_link_param_rpt(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1514 /*LINK_PARAM*/
1515 offset = dissect_link_param(tvb, offset, tlv_tree);
1516 if(tvb_get_uint8(tvb, offset))
1518 /*Threshold*/
1519 offset++;
1520 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1521 offset += 2;
1522 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1523 return (offset+1);
1525 else
1526 return (offset+1);
1529 static int16_t dissect_link_desc_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1531 if(!tvb_get_uint8(tvb, offset))
1532 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1533 else
1534 proto_tree_add_item(tlv_tree, hf_num_queue, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1535 return (offset+2);
1538 static int16_t dissect_status_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1540 /*LINK_ID*/
1541 offset = dissect_link_id(tvb, offset, tlv_tree);
1543 /*LINK_STATES_RSP*/
1544 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_states_rsp);
1546 /*LINK_PARAM*/
1547 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param);
1549 /*LINK_DESC_RSP*/
1550 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_desc_rsp);
1551 return offset;
1554 static int16_t dissect_link_det_cfg(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1556 uint8_t len = 0;
1557 if(tvb_get_uint8(tvb, offset))
1559 len = tvb_get_uint8(tvb, offset+1);
1560 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+2, len, ENC_ASCII);
1561 offset += len + 1;
1563 offset++;
1564 if(tvb_get_uint8(tvb, offset))
1566 if(tvb_get_uint8(tvb, offset+1))
1567 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1568 else
1569 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1570 offset += 2;
1572 offset++;
1573 if(tvb_get_uint8(tvb, offset))
1575 proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset+1,4, ENC_BIG_ENDIAN);
1576 offset += 4;
1578 return (offset+1);
1581 static int16_t dissect_link_cfg_param(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1583 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1584 if(tvb_get_uint8(tvb, offset))
1586 proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1587 offset += 2;
1589 offset++;
1590 proto_tree_add_item(tlv_tree, hf_threshold_action, tvb, offset, 1, ENC_BIG_ENDIAN);
1591 offset++;
1592 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1593 offset += 2;
1594 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1595 return (offset+1) ;
1598 static int16_t dissect_mih_evt_cfg_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1600 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_cfg);
1601 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1602 return offset;
1605 static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, uint8_t type, uint32_t length)
1608 uint8_t mihf_id_len = 0;
1609 char mihf_id_first_char = 0;
1610 uint8_t i = 0;
1611 uint8_t len = 0;
1613 tvbuff_t *volatile tvb_mihf_id = NULL;
1614 tvbuff_t* tvb_temp = NULL;
1615 volatile bool composite_error = false;
1617 /*For Value fields*/
1618 switch (type)
1620 case SRC_MIHF_ID :
1621 case DEST_MIHF_ID :
1622 case MN_MIHF_ID :
1623 /*MIHF ID*/
1624 mihf_id_len = tvb_get_uint8(tvb, offset);
1625 /*taken from the 802.21 standard:
1626 If L2 communication is used then MIHF_ID is the NAI-encoded linklayer
1627 address (LINK_ADDR) of the entity that hosts the MIH services.
1628 In an NAI-encoded IP address or link-layer address, each octet
1629 of binary-encoded IP4_ADDR, IP6_ADDR and LINK_ADDR data is
1630 encoded in the username part of the NAI as "\" followed by the octet
1631 value.*/
1632 mihf_id_first_char = (char)tvb_get_uint8(tvb, offset+1);
1633 if(mihf_id_first_char!='\\')
1634 proto_tree_add_item(tlv_tree, hf_mihf_id, tvb, offset+1, mihf_id_len, ENC_ASCII);
1635 else
1637 if(mihf_id_len<tvb_reported_length_remaining(tvb,0) && (mihf_id_len==12 || mihf_id_len==64 || mihf_id_len==128))
1639 tvb_mihf_id = tvb_new_composite();
1640 for(i=0; i < mihf_id_len/2; i++)
1642 tvb_temp = tvb_new_subset_length(tvb, offset + 2 + 2*i, 1);
1643 if (tvb_captured_length(tvb_temp)) {
1644 tvb_composite_append(tvb_mihf_id, tvb_temp);
1649 tvb_composite_finalize(tvb_mihf_id);
1651 CATCH_ALL
1653 composite_error = true;
1655 ENDTRY;
1657 if(!composite_error)
1659 switch(mihf_id_len)
1661 case 12: /* checks if the length corresponds to a MAC address */
1662 proto_tree_add_item(tlv_tree, hf_mihf_id_mac, tvb_mihf_id, 0, mihf_id_len/2, ENC_NA);
1663 break;
1664 case 64: /* checks if the length corresponds to an IPv4 address */
1665 proto_tree_add_item(tlv_tree, hf_mihf_id_ipv4, tvb_mihf_id, 0, mihf_id_len/2, ENC_BIG_ENDIAN);
1666 break;
1667 case 128: /* checks if the length corresponds to an IPv6 address */
1668 proto_tree_add_item(tlv_tree, hf_mihf_id_ipv6, tvb_mihf_id, 0, mihf_id_len/2, ENC_NA);
1669 break;
1672 else
1673 tvb_free(tvb_mihf_id);
1676 break;
1678 case STATUS :
1679 /*STATUS*/
1680 proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1681 break;
1683 case LINK_TYPE :
1684 /*LINK_TYPE*/
1685 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1686 break;
1688 case MIH_EVT_LIST :
1689 /*MIH_EVT_LIST*/
1690 proto_tree_add_bitmask(tlv_tree/*evt_list_tree*/, tvb, offset, hf_event_list, ett_event_bitmap, event_fields, ENC_BIG_ENDIAN);
1691 break;
1693 case MIH_CMD_LIST :
1694 /*MIH_CMD_LSIT*/
1695 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cmd_list, ett_cmd_bitmap, cmd_fields, ENC_BIG_ENDIAN);
1696 break;
1698 case MIH_IQ_TYPE_LIST :
1699 /*MIH_IQ_TYPE_LIST*/
1700 /*last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1701 Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits*/
1702 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_iq_list, ett_iq_type_bitmap, iq_type_fields, ENC_BIG_ENDIAN);
1703 break;
1705 case MIH_TRANS_LIST :
1706 /*MIH_TRANS_LIST*/
1707 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_trans_list, ett_trans_list_bitmap, trans_fields, ENC_BIG_ENDIAN);
1708 break;
1710 case LINK_ADDR_LIST :
1711 /*NET_TYPE_ADDR_LIST*/
1712 dissect_mih_list(tvb, offset, tlv_tree, dissect_net_type_addr);
1713 break;
1715 case MBB_HO_SUPP_LIST :
1716 /*MBB_HO_SUPP_LIST*/
1717 dissect_mih_list(tvb, offset, tlv_tree, dissect_mbb_ho_supp);
1718 break;
1720 case REG_REQUEST_CODE :
1721 /*REG_REQUEST_CODE*/
1722 proto_tree_add_item(tlv_tree, hf_reg_request_code, tvb, offset, 1, ENC_BIG_ENDIAN);
1723 break;
1725 case VALID_TIME_INTR :
1726 /*Valid Time interval*/
1727 proto_tree_add_item(tlv_tree, hf_valid_time_interval, tvb, offset, 4, ENC_BIG_ENDIAN);
1728 break;
1730 case LINK_ID :
1731 case NEW_LINK_ID :
1732 case MN_LINK_ID :
1733 /*Link identifier*/
1734 dissect_link_id(tvb, offset, tlv_tree);
1735 break;
1737 case OLD_ACCESS_ROUTER :
1738 case NEW_ACCESS_ROUTER :
1739 case POA_LINK_ADDR :
1740 /*LINK ADDR*/
1741 dissect_link_addr(tvb, offset, tlv_tree);
1742 break;
1744 case IP_RENEWAL_FLAG :
1745 /*IP_RENEWAL_FLAG*/
1746 proto_tree_add_item(tlv_tree, hf_ip_renewal, tvb, offset, 1, ENC_BIG_ENDIAN);
1747 break;
1749 case IP_MOB_MGMT :
1750 /*IP_MOB_MGMT*/
1751 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mob_list, ett_mob_mgt_bitmap, mob_fields, ENC_BIG_ENDIAN);
1752 break;
1754 case IP_CFG_MTHDS :
1755 /*IP_CFG_MTHDS*/
1756 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1757 break;
1759 case LINK_DN_REASON :
1760 /*LINK_DN_REASON*/
1761 proto_tree_add_item(tlv_tree, hf_link_dn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1762 break;
1764 case TIMER_INTERVAL :
1765 /*Time interval*/
1766 proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1767 break;
1769 case LINK_GOING_DN_REASON :
1770 /*LINK_GOING_DN REASON*/
1771 proto_tree_add_item(tlv_tree, hf_link_gdn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1772 break;
1774 case LINK_PARAM_RPT_LIST :
1775 /*LINK_PARAM_RPT_LIST*/
1776 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_rpt);
1777 break;
1779 case DEV_STATES_REQ :
1780 /*DEV_STATES_REQ*/
1781 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_dev_states_req, ett_dev_states_bitmap, dev_states_fields, ENC_BIG_ENDIAN);
1782 break;
1784 case LINK_ID_LIST :
1785 /*LINK ID List*/
1786 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_id);
1787 break;
1789 case DEV_STATES_RSP_LIST :
1790 /*DEV_STATES_RSP List*/
1791 dissect_mih_list(tvb, offset, tlv_tree, dissect_dev_states);
1792 break;
1794 case STATUS_REQ_SET :
1795 /*LINK_STATUS_REQ*/
1796 dissect_link_status_req(tvb, offset, tlv_tree);
1797 break;
1799 case STATUS_RSP_LIST :
1800 /*Status Response List*/
1801 dissect_mih_list(tvb, offset, tlv_tree, dissect_status_list);
1802 break;
1804 case CFG_REQ_LIST :
1805 /*LINK_CFG_PARAM_LIST*/
1806 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1807 break;
1809 case CFG_RSP_LIST :
1810 /*LINK_CFG_STATUS_LIST*/
1811 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_status);
1812 break;
1814 case LINK_POA_LIST :
1815 /*LINK_POA_LIST*/
1816 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_poa);
1817 break;
1819 case PREF_LINK_LIST :
1820 /*RQ_RESULT*/
1821 dissect_mih_list(tvb, offset, tlv_tree, dissect_rq_result);
1822 break;
1824 case HO_REQ_QUERY_LIST :
1825 /*QoS_LIST*/
1826 dissect_qos_list(tvb, offset, tlv_tree);
1827 break;
1829 case HO_STATUS:
1830 /*HO_STATUS*/
1831 proto_tree_add_item(tlv_tree, hf_ho_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1832 break;
1834 case ACCESS_ROUTER_ADDR :
1835 case DHCP_SER_ADDR :
1836 case FA_ADDR :
1837 /*IP_ADDR*/
1838 dissect_ip_addr(tvb, offset, tlv_tree);
1839 break;
1841 case LINK_ACTION_REQ_LIST :
1842 /*LINK_ACTION_REQ LIST*/
1843 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_req);
1844 break;
1846 case LINK_ACTION_RSP_LIST :
1847 /*LINK_ACTION_RSP LIST*/
1848 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_rsp);
1849 break;
1851 case HO_RESULT :
1852 /*HO_RESULT*/
1853 proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1854 break;
1856 case LINK_RES_STATUS :
1857 /*LINK_RES_STATUS*/
1858 proto_tree_add_item(tlv_tree, hf_link_res_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1859 break;
1861 case RES_RETENTION_STATUS :
1862 /*BOOLEAN*/
1863 proto_tree_add_item(tlv_tree, hf_res_retention_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1864 break;
1866 case IQ_RDF_SCHEMA_URL :
1867 /*BOOLEAN*/
1868 proto_tree_add_item(tlv_tree, hf_iq_rdf_sch_url, tvb, offset, 1, ENC_BIG_ENDIAN);
1869 break;
1871 case Q_RES_RPT_FLAG :
1872 /*BOOLEAN*/
1873 proto_tree_add_item(tlv_tree, hf_res_rpt_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
1874 break;
1876 case UNAUTH_INFO_REQ :
1877 /*BOOLEAN*/
1878 proto_tree_add_item(tlv_tree, hf_unauth_info_req, tvb, offset, 1, ENC_BIG_ENDIAN);
1879 break;
1881 case IQ_BIN_DATA_LIST :
1882 /*IQ_BIN_DATA LIST*/
1883 proto_tree_add_item(tlv_tree, hf_iq_bin_data_x, tvb, offset, length, ENC_ASCII);
1884 break;
1886 case IQ_RDF_DATA_LIST :
1887 case IR_RDF_DATA_LIST :
1888 case IR_RDF_SCHM_LIST :
1889 /*IQ_RDF_DATA LIST*/
1890 dissect_mih_list(tvb, offset, tlv_tree, dissect_iq_rdf_data);
1891 break;
1893 case IQ_RDF_SCHM_LIST :
1894 /*IQ_RDF_SCHM*/
1895 for(i=0; i < tvb_get_uint8(tvb, offset); i++)
1897 len = tvb_get_uint8(tvb, offset+1);
1898 proto_tree_add_item(tlv_tree, hf_rdf_sch, tvb, offset+2, len, ENC_ASCII);
1899 offset += len;
1901 break;
1903 case MAX_RSP_SIZE :
1904 /*Max Response Size*/
1905 proto_tree_add_item(tlv_tree, hf_max_resp_size, tvb, offset, 2, ENC_BIG_ENDIAN);
1906 break;
1908 case IR_BIN_DATA_LIST :
1909 /*IR_BIN_DATA LIST*/
1910 proto_tree_add_item(tlv_tree, hf_ir_bin_data, tvb, offset, length, ENC_ASCII);
1911 break;
1913 case IR_SCHM_URL_LIST :
1914 /*IR_SCHM_URL*/
1915 for(i=0; i < tvb_get_uint8(tvb, offset); i++)
1917 len = tvb_get_uint8(tvb, offset+1);
1918 proto_tree_add_item(tlv_tree, hf_rdf_sch_url, tvb, offset+2, len, ENC_ASCII);
1919 offset += len;
1921 break;
1923 case EVT_CFG_INFO_LIST :
1924 /*EVT_CFG_INFO LIST*/
1925 dissect_mih_list(tvb, offset, tlv_tree, dissect_mih_evt_cfg_info);
1926 break;
1928 case TGT_NET_INFO :
1929 /*TGT_NET_INFO*/
1930 dissect_tgt_net_info(tvb, offset, tlv_tree);
1931 break;
1933 case TGT_NET_INFO_LIST :
1934 /*List of TGT_NET_INFO*/
1935 dissect_mih_list(tvb, offset, tlv_tree, dissect_tgt_net_info);
1936 break;
1938 case ASGN_RES_SET :
1939 /*ASGN_RES_SET*/
1940 offset = dissect_qos_list(tvb, offset, tlv_tree);
1941 dissect_tsp_container(tvb, offset, tlv_tree);
1942 break;
1944 case LINK_DET_INFO_LIST :
1945 /*LINK_DET_INFO LIST*/
1946 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_info);
1947 break;
1949 case NET_TYPE :
1950 /*NETWORK TYPE*/
1951 dissect_net_type(tvb, offset, tlv_tree);
1952 break;
1954 case REQ_RES_SET :
1955 /*REQ_RES_SET*/
1956 offset = dissect_qos_list(tvb, offset, tlv_tree);
1957 offset = dissect_tsp_container(tvb, offset, tlv_tree);
1958 proto_tree_add_item(tlv_tree, hf_ho_reason, tvb, offset, 1, ENC_BIG_ENDIAN );
1959 break;
1961 case VEND_SPECIFIC_TLV :
1962 /*Vendor specific tlv*/
1963 proto_tree_add_item(tlv_tree, hf_vendor_specific_tlv, tvb, offset, length, ENC_ASCII);
1964 break;
1966 default :/*did not match type*/
1967 /*do switch case for range of numbers*/
1969 /*RESERVED TLVs*/
1970 if(type > 63 && type < 100)
1971 proto_tree_add_item(tlv_tree, hf_reserved_tlv, tvb, offset, length, ENC_ASCII);
1973 /*EXPERIMENTAL TLVs*/
1974 else if(type > 100 && type < 255)
1975 proto_tree_add_item(tlv_tree, hf_experimental_tlv, tvb, offset, length, ENC_ASCII);
1977 /*UNKNOWN TLVs*/
1978 else
1979 proto_tree_add_item(tlv_tree, hf_unknown_tlv, tvb, offset, length, ENC_ASCII);
1981 return;
1984 static int dissect_mih(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1986 proto_item *ti = NULL;
1987 int offset = 0;
1988 proto_item *item = NULL;
1989 proto_tree *mih_tree = NULL;
1990 proto_tree *ver_flags_tree = NULL;
1991 uint8_t serviceid = 0;
1992 uint8_t opcode = 0;
1993 uint8_t service = 0;
1994 uint16_t action = 0;
1995 int32_t payload_length = 0;
1996 uint64_t len = 0;
1997 uint8_t len_of_len = 0;
1998 uint8_t type = 0;
1999 proto_tree *mid_tree = NULL;
2000 proto_tree *tlv_tree = NULL;
2001 uint8_t fragment = 0;
2003 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MIH");
2004 col_clear(pinfo->cinfo,COL_INFO);
2006 /* we are being asked for details */
2007 ti = proto_tree_add_item(tree, proto_mih, tvb, 0, -1, ENC_NA);
2008 mih_tree = proto_item_add_subtree(ti, ett_mih);
2009 if(mih_tree)
2011 /* TODO: should have a different hf item for this version root */
2012 item = proto_tree_add_item(mih_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2014 ver_flags_tree = proto_item_add_subtree(item, ett_ver_flags);
2015 proto_tree_add_item(ver_flags_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2016 proto_tree_add_item(ver_flags_tree, hf_mih_ack_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2017 proto_tree_add_item(ver_flags_tree, hf_mih_ack_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
2018 proto_tree_add_item(ver_flags_tree, hf_mih_uir, tvb, offset, 1, ENC_BIG_ENDIAN);
2019 proto_tree_add_item(ver_flags_tree, hf_mih_more_frag, tvb, offset, 1, ENC_BIG_ENDIAN);
2021 fragment = tvb_get_uint8(tvb, offset);
2022 fragment = fragment << 7;
2024 offset += 1;
2026 if(mih_tree)
2028 /*flags and version tree is done.....*/
2029 proto_tree_add_item(mih_tree, hf_mih_frag_no, tvb, offset, 1, ENC_BIG_ENDIAN);
2031 /*for MIH message ID*/
2032 item = proto_tree_add_item(mih_tree, hf_mih_mid, tvb, offset + 1, 2, ENC_BIG_ENDIAN);
2034 fragment = fragment + (tvb_get_uint8(tvb, offset)>>1);
2035 offset += 1;
2036 mid_tree = proto_item_add_subtree(item, ett_mid);
2037 serviceid = tvb_get_uint8(tvb, offset);
2038 serviceid = serviceid & 0xF0;
2039 serviceid >>= 4;
2040 proto_tree_add_item(mid_tree, hf_mih_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2042 /*filling the info column with the service type...*/
2043 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(serviceid, servicevalues, "Unknown"));
2044 opcode = tvb_get_uint8(tvb, offset);
2045 opcode = opcode & 0x0C;
2046 opcode >>= 2;
2047 if(mid_tree)
2048 proto_tree_add_item(mid_tree, hf_mih_opcode, tvb, offset, 2, ENC_BIG_ENDIAN);
2050 /*filling the info column with the opcode type...*/
2051 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(opcode, opcodevalues, "Unknown"));
2053 /*check for type of service..*/
2054 service = tvb_get_uint8(tvb, offset);
2055 service = service & 0xF0;
2056 service >>= 4;
2058 /*get the action id.*/
2059 action = tvb_get_ntohs(tvb, offset);
2060 action = action & 0x03FF;
2061 switch (service)
2063 case 1 :/*for Service Management..*/
2064 proto_tree_add_item(mid_tree, hf_mih_serv_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2065 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, serv_act_id_values, "Unknown"));
2066 break;
2067 case 2 :/*for event services..*/
2068 proto_tree_add_item(mid_tree, hf_mih_event_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2069 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, event_act_id_values, "Unknown"));
2070 break;
2071 case 3 :/*for Command Services..*/
2072 proto_tree_add_item(mid_tree, hf_mih_command_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2073 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, command_act_id_values, "Unknown"));
2074 break;
2075 case 4 :/*for Information Services..*/
2076 proto_tree_add_item(mid_tree, hf_mih_info_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2077 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, info_act_id_values, "Unknown"));
2078 break;
2080 offset += 2;
2081 if(mih_tree)
2084 /* displaying the transaction id*/
2085 proto_tree_add_item(mih_tree, hf_mih_tid, tvb, offset, 2, ENC_BIG_ENDIAN );
2087 /*displaying the payload length...*/
2088 proto_tree_add_item(mih_tree, hf_mih_pay_len, tvb, offset + 2, 2, ENC_BIG_ENDIAN );
2090 offset += 2;
2091 payload_length = tvb_get_ntohs(tvb, offset);
2092 offset += 2;
2094 /*now the type length values list is present get them and decode it...
2095 loop for showing all the tlvs....*/
2096 while(payload_length > 0 && fragment==0)
2098 /* Adding a third case here since the 802.21 standard defines 3 cases */
2099 /*extract length*/
2100 /*case 1: If the number of octets occupied by the Value field is LESS THAN 128, the size of the Length field is always
2101 one octet and the MSB of the octet is set to the value 0. The values of the other seven bits of this octet
2102 indicate the actual length of the Value field.
2104 /*case 2: If the number of octets occupied by the Value field is EXACTLY 128, the size of the Length field is one octet.
2105 The MSB of the Length octet is set to the value '1' and the other seven bits of this octet are all set to the value '0'.
2107 /*case 3: If the number of octets occupied by the Value field is GREATER THAN 128, then the Length field is always greater
2108 than one octet. The MSB of the first octet of the Length field is set to the value 1 and the remaining seven
2109 bits of the first octet indicate the number of octets that are appended further. The number represented by the
2110 second and subsequent octets of the Length field, when added to 128, indicates the total size of the Value field, in octets.
2112 /*cases 2 and 3 can be logically programmed as the same condition since the whole octet is used to represent the len_of_len parameter. */
2114 /*code for testing if length is less than or equal to 128*/
2115 len = tvb_get_uint8(tvb, offset+1);
2116 if(len > 128)
2118 /*length is greater than 128 => len of len is greater than 1 byte*/
2119 /*Expanding conditions where the length values can be from 1- 8 octets long*/
2120 /*TODO: this assumes the maximum value length is 2^64. If larger data types are used, we have to implement our own tvb_get function*/
2121 len_of_len = (uint8_t)len - 128;
2122 switch (len_of_len) /*depending on the detected length , we read a different amount of bytes from the tvb buffer*/
2124 case 1:
2125 len = tvb_get_uint8(tvb, offset+2);
2126 break;
2127 case 2:
2128 len = tvb_get_ntohs(tvb, offset+2);
2129 break;
2130 case 3:
2131 len = tvb_get_ntoh24(tvb, offset+2);
2132 break;
2133 case 4:
2134 len = tvb_get_ntohl(tvb, offset+2);
2135 break;
2136 case 5:
2137 len = tvb_get_ntoh40(tvb, offset+2);
2138 break;
2139 case 6:
2140 len = tvb_get_ntoh48(tvb, offset+2);
2141 break;
2142 case 7:
2143 len = tvb_get_ntoh56(tvb, offset+2);
2144 break;
2145 case 8:
2146 len = tvb_get_ntoh64(tvb, offset+2);
2148 len_of_len++;
2149 len = 128 + len;
2151 else
2152 len_of_len = 1;
2155 /*TODO: TLVs greater than the payload_length are fragmented, and currently not parsed*/
2156 if(len <= (uint64_t)payload_length)
2158 /*for type...*/
2159 tlv_tree = proto_tree_add_subtree_format(mih_tree, tvb, offset, 1 + len_of_len + (uint32_t)len, ett_tlv, NULL,
2160 "MIH TLV : %s", val_to_str_const(tvb_get_uint8(tvb, offset), typevaluenames, "UNKNOWN"));
2161 if(tlv_tree)
2163 proto_tree_add_item(tlv_tree, hf_mih_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2164 type = tvb_get_uint8(tvb, offset);
2166 /*for length...*/
2167 if(len_of_len == 1)
2169 proto_tree_add_item(tlv_tree, hf_mih_type_length, tvb, offset+1, len_of_len, ENC_BIG_ENDIAN);
2171 else if(len_of_len>1 && len_of_len<=5)
2173 proto_tree_add_item(tlv_tree, hf_mih_type_length_ext, tvb, offset+2, len_of_len-1, ENC_BIG_ENDIAN);
2177 offset += 1 + len_of_len;
2179 /*For Value fields*/
2180 /*TODO: this assumes the maximum value length is 2^32. Dissecting bigger data fields would require breaking the data into chunks*/
2181 if(len < (UINT64_C(1) << 32)){ /* XXX: always true ? see above */
2182 dissect_mih_tlv(tvb, offset, tlv_tree, type, (uint32_t)len);
2183 offset += (uint32_t)len;
2184 payload_length -= (1 + len_of_len + (uint32_t)len);
2185 }else{
2186 return offset;
2189 else
2191 proto_tree_add_item(mih_tree, hf_fragmented_tlv, tvb, offset, -1, ENC_NA);
2192 payload_length = 0;
2195 if(fragment!=0)
2196 proto_tree_add_item(mih_tree, hf_fragmented_tlv, tvb, offset, -1, ENC_NA);
2198 return tvb_captured_length(tvb);
2201 /*dissector initialisation*/
2202 void proto_register_mih(void)
2204 static hf_register_info hf[] =
2207 &hf_mih_version,
2209 "MIH Version",
2210 "mih.version",
2211 FT_UINT8,
2212 BASE_DEC,
2213 NULL,
2214 VERSION_MASK,
2215 NULL, HFILL
2219 &hf_mih_ack_req,
2221 "MIH ACK-Req",
2222 "mih.acq_req",
2223 FT_BOOLEAN,
2225 NULL,
2226 ACKREQ_MASK,
2227 NULL, HFILL
2231 &hf_mih_ack_resp,
2233 "MIH ACK-Resp",
2234 "mih.acq_resp",
2235 FT_BOOLEAN,
2237 NULL,
2238 ACKRESP_MASK,
2239 NULL, HFILL
2243 &hf_mih_uir,
2245 "MIH Unauthenticated info request",
2246 "mih.uir",
2247 FT_BOOLEAN,
2249 NULL,
2250 UIR_MASK,
2251 NULL, HFILL
2255 &hf_mih_more_frag,
2257 "MIH more fragment",
2258 "mih.more_frag",
2259 FT_BOOLEAN,
2261 NULL,
2262 MORE_FRAG_MASK,
2263 NULL, HFILL
2267 &hf_mih_frag_no,
2269 "Fragment No",
2270 "mih.frag_no",
2271 FT_UINT8,
2272 BASE_DEC,
2273 NULL,
2274 FRAG_NO_MASK,
2275 NULL, HFILL
2279 &hf_mih_mid,
2281 "MIH message ID",
2282 "mih.mid",
2283 FT_UINT16,
2284 BASE_HEX,
2285 NULL,
2286 0x0,
2287 NULL, HFILL
2291 &hf_mih_service_id,
2293 "Service ID",
2294 "mih.service_id",
2295 FT_UINT16,
2296 BASE_HEX,
2297 VALS(servicevalues),
2298 SID_MASK,
2299 NULL, HFILL
2303 &hf_mih_opcode,
2305 "Opcode",
2306 "mih.opcode",
2307 FT_UINT16,
2308 BASE_HEX,
2309 VALS(opcodevalues),
2310 OPCODE_MASK,
2311 NULL, HFILL
2315 &hf_mih_serv_actionid,
2317 "Action ID",
2318 "mih.action_id",
2319 FT_UINT16,
2320 BASE_HEX,
2321 VALS(serv_act_id_values),
2322 AID_MASK,
2323 NULL, HFILL
2327 &hf_mih_event_actionid,
2329 "Action ID",
2330 "mih.action_id",
2331 FT_UINT16,
2332 BASE_HEX,
2333 VALS(event_act_id_values),
2334 AID_MASK,
2335 NULL, HFILL
2339 &hf_mih_command_actionid,
2341 "Action ID",
2342 "mih.action_id",
2343 FT_UINT16,
2344 BASE_HEX,
2345 VALS(command_act_id_values),
2346 AID_MASK,
2347 NULL, HFILL
2351 &hf_mih_info_actionid,
2353 "Action ID",
2354 "mih.action_id",
2355 FT_UINT16,
2356 BASE_HEX,
2357 VALS(info_act_id_values),
2358 AID_MASK,
2359 NULL, HFILL
2363 &hf_mih_tid,
2365 "TID",
2366 "mih.tid",
2367 FT_UINT16,
2368 BASE_DEC,
2369 NULL,
2370 TRANS_ID_MASK,
2371 NULL, HFILL
2375 &hf_mih_pay_len,
2377 "Payload length",
2378 "mih.pay_len",
2379 FT_UINT16,
2380 BASE_DEC,
2381 NULL,
2382 0x0,
2383 NULL, HFILL
2387 &hf_mih_type,
2389 "MIH TLV type",
2390 "mih.tlv_type",
2391 FT_UINT8,
2392 BASE_DEC,
2393 VALS(typevaluenames),
2394 0x0,
2395 NULL, HFILL
2399 &hf_mih_type_length,
2401 "MIH TLV length",
2402 "mih.tlv_length",
2403 FT_UINT8,
2404 BASE_DEC,
2405 NULL,
2406 0x0,
2407 NULL, HFILL
2411 &hf_mih_type_length_ext,
2413 "MIH TLV length",
2414 "mih.tlv_length_ext",
2415 FT_UINT64,
2416 BASE_DEC,
2417 NULL,
2418 0x0,
2419 NULL, HFILL
2423 &hf_mihf_id,
2425 "MIHF_ID",
2426 "mih.mihf_id",
2427 FT_STRING,
2428 BASE_NONE,
2429 NULL,
2430 0x0,
2431 NULL, HFILL
2435 &hf_mihf_id_mac,
2437 "MIHF_ID",
2438 "mih.mihf_id.mac",
2439 FT_ETHER,
2440 BASE_NONE,
2441 NULL,
2442 0x0,
2443 NULL, HFILL
2447 &hf_mihf_id_ipv4,
2449 "MIHF_ID",
2450 "mih.mihf_id.ipv4",
2451 FT_IPv4,
2452 BASE_NONE,
2453 NULL,
2454 0x0,
2455 NULL, HFILL
2459 &hf_mihf_id_ipv6,
2461 "MIHF_ID",
2462 "mih.mihf_id.ipv6",
2463 FT_IPv6,
2464 BASE_NONE,
2465 NULL,
2466 0x0,
2467 NULL, HFILL
2471 &hf_status,
2473 "STATUS",
2474 "mih.status",
2475 FT_UINT8,
2476 BASE_DEC,
2477 VALS(status_types),
2478 0x0,
2479 NULL, HFILL
2483 &hf_ip_methods_supported,
2485 "IP methods supported",
2486 "mih.ip_methods_supported",
2487 FT_UINT8,
2488 BASE_DEC,
2489 VALS(boolean_types),
2490 0x0,
2491 NULL, HFILL
2495 &hf_ip_dhcp_services,
2497 "IP DHCP services",
2498 "mih.ip_dhcp_services",
2499 FT_UINT8,
2500 BASE_DEC,
2501 VALS(boolean_types),
2502 0x0,
2503 NULL, HFILL
2507 &hf_fn_agent,
2509 "FN Agent",
2510 "mih.fn_agent",
2511 FT_UINT8,
2512 BASE_DEC,
2513 VALS(boolean_types),
2514 0x0,
2515 NULL, HFILL
2519 &hf_access_router,
2521 "Access Router",
2522 "mih.access_router",
2523 FT_UINT8,
2524 BASE_DEC,
2525 VALS(boolean_types),
2526 0x0,
2527 NULL, HFILL
2531 &hf_link_type,
2533 "Link Type",
2534 "mih.link_type",
2535 FT_UINT8,
2536 BASE_DEC,
2537 VALS(link_type_vals),
2538 0x0,
2539 NULL, HFILL
2543 &hf_link_subtype_eth,
2545 "Ethernet - IEEE802.3 Subtype",
2546 "mih.link_subtype_eth",
2547 FT_UINT32,
2548 BASE_HEX,
2549 NULL,
2550 0x0,
2551 NULL, HFILL
2555 &hf_link_subtype_eth_10m,
2557 "Ethernet 10 Mb",
2558 "mih.link_subtype_eth.10mb",
2559 FT_BOOLEAN,
2561 NULL,
2562 0x00000001,
2563 NULL, HFILL
2567 &hf_link_subtype_eth_100m,
2569 "Ethernet 100 Mb",
2570 "mih.link_subtype_eth.100mb",
2571 FT_BOOLEAN,
2573 NULL,
2574 0x00000002,
2575 NULL, HFILL
2579 &hf_link_subtype_eth_1000m,
2581 "Ethernet 1000 Mb",
2582 "mih.link_subtype_eth.1000mb",
2583 FT_BOOLEAN,
2585 NULL,
2586 0x00000004,
2587 NULL, HFILL
2591 &hf_link_subtype_wireless_other,
2593 "Wireless Other Subtype",
2594 "mih.link_subtype_wireless_other",
2595 FT_UINT32,
2596 BASE_HEX,
2597 NULL,
2598 0x0,
2599 NULL, HFILL
2603 &hf_link_subtype_wireless_other_dvb,
2605 "DVB",
2606 "mih.link_subtype_wireless_other.dvb",
2607 FT_BOOLEAN,
2609 NULL,
2610 0x00000001,
2611 NULL, HFILL
2615 &hf_link_subtype_wireless_other_tdmb,
2617 "T-DVB",
2618 "mih.link_subtype_wireless_other.tdmb",
2619 FT_BOOLEAN,
2621 NULL,
2622 0x00000002,
2623 NULL, HFILL
2627 &hf_link_subtype_wireless_other_atsc,
2629 "ATSC-M/H",
2630 "mih.link_subtype_wireless_other.atsc",
2631 FT_BOOLEAN,
2633 NULL,
2634 0x00000004,
2635 NULL, HFILL
2639 &hf_link_subtype_ieee80211,
2641 "Wireless - IEEE 802.11 Subtype",
2642 "mih.link_subtype_ieee80211",
2643 FT_UINT32,
2644 BASE_HEX,
2645 NULL,
2646 0x0,
2647 NULL, HFILL
2651 &hf_link_subtype_ieee80211_24,
2653 "2.4 GHz",
2654 "mih.link_subtype_ieee80211.2_4ghz",
2655 FT_BOOLEAN,
2657 NULL,
2658 0x00000001,
2659 NULL, HFILL
2663 &hf_link_subtype_ieee80211_5,
2665 "5 GHz",
2666 "mih.link_subtype_ieee80211.5ghz",
2667 FT_BOOLEAN,
2669 NULL,
2670 0x00000002,
2671 NULL, HFILL
2675 &hf_link_subtype_ieee80211_49,
2677 "4.9 GHz",
2678 "mih.link_subtype_ieee80211.4_9ghz",
2679 FT_BOOLEAN,
2681 NULL,
2682 0x00000004,
2683 NULL, HFILL
2687 &hf_link_subtype_ieee80211_365,
2689 "3.65 GHz",
2690 "mih.link_subtype_ieee80211.3_65ghz",
2691 FT_BOOLEAN,
2693 NULL,
2694 0x00000008,
2695 NULL, HFILL
2699 &hf_link_subtype_ieee80211_316,
2701 "316 THz",
2702 "mih.link_subtype_ieee80211.316thz",
2703 FT_BOOLEAN,
2705 NULL,
2706 0x00000010,
2707 NULL, HFILL
2711 &hf_link_subtype_umts,
2713 "Wireless - UMTS Subtype",
2714 "mih.link_subtype_umts",
2715 FT_UINT32,
2716 BASE_HEX,
2717 NULL,
2718 0x0,
2719 NULL, HFILL
2723 &hf_link_subtype_umts_99,
2725 "Rel-99",
2726 "mih.link_subtype_umts.rel99",
2727 FT_BOOLEAN,
2729 NULL,
2730 0x00000001,
2731 NULL, HFILL
2735 &hf_link_subtype_umts_4,
2737 "Rel-4",
2738 "mih.link_subtype_umts.rel4",
2739 FT_BOOLEAN,
2741 NULL,
2742 0x00000002,
2743 NULL, HFILL
2747 &hf_link_subtype_umts_5,
2749 "Rel-5 (w/HSDPA)",
2750 "mih.link_subtype_umts.rel5",
2751 FT_BOOLEAN,
2753 NULL,
2754 0x00000004,
2755 NULL, HFILL
2759 &hf_link_subtype_umts_6,
2761 "Rel-6 (w/ HSUPA)",
2762 "mih.link_subtype_umts.rel6",
2763 FT_BOOLEAN,
2765 NULL,
2766 0x00000008,
2767 NULL, HFILL
2771 &hf_link_subtype_umts_7,
2773 "Rel-7 (MIMO/OFDM)",
2774 "mih.link_subtype_umts.rel7",
2775 FT_BOOLEAN,
2777 NULL,
2778 0x00000010,
2779 NULL, HFILL
2783 &hf_link_subtype_umts_8,
2785 "Rel-8",
2786 "mih.link_subtype_umts.rel8",
2787 FT_BOOLEAN,
2789 NULL,
2790 0x00000020,
2791 NULL, HFILL
2795 &hf_link_subtype_cdma2000,
2797 "Wireless - cdma2000-HRPD",
2798 "mih.link_subtype_cdma2000",
2799 FT_UINT32,
2800 BASE_HEX,
2801 NULL,
2802 0x0,
2803 NULL, HFILL
2807 &hf_link_subtype_cdma2000_0,
2809 "Rev-0",
2810 "mih.link_subtype_cdma2000.rev0",
2811 FT_BOOLEAN,
2813 NULL,
2814 0x00000001,
2815 NULL, HFILL
2819 &hf_link_subtype_cdma2000_a,
2821 "Rev-A",
2822 "mih.link_subtype_cdma2000.reva",
2823 FT_BOOLEAN,
2825 NULL,
2826 0x00000002,
2827 NULL, HFILL
2831 &hf_link_subtype_cdma2000_b,
2833 "Rev-B",
2834 "mih.link_subtype_cdma2000.revb",
2835 FT_BOOLEAN,
2837 NULL,
2838 0x00000004,
2839 NULL, HFILL
2843 &hf_link_subtype_cdma2000_c,
2845 "Rev-C",
2846 "mih.link_subtype_cdma2000.revc",
2847 FT_BOOLEAN,
2849 NULL,
2850 0x00000008,
2851 NULL, HFILL
2855 &hf_link_subtype_ieee80216,
2857 "Wireless - IEEE 802.16",
2858 "mih.link_subtype_ieee80216",
2859 FT_UINT32,
2860 BASE_HEX,
2861 NULL,
2862 0x0,
2863 NULL, HFILL
2867 &hf_link_subtype_ieee80216_25,
2869 "2.5 GHz",
2870 "mih.link_subtype_ieee80216.2_5ghz",
2871 FT_BOOLEAN,
2873 NULL,
2874 0x00000001,
2875 NULL, HFILL
2879 &hf_link_subtype_ieee80216_35,
2881 "3.5 GHz",
2882 "mih.link_subtype_ieee80216.3_5ghz",
2883 FT_BOOLEAN,
2885 NULL,
2886 0x00000002,
2887 NULL, HFILL
2891 &hf_link_type_ext,
2893 "LINK_TYPE_EXT",
2894 "mih.link_type_ext",
2895 FT_STRING,
2896 BASE_NONE,
2897 NULL,
2898 0x0,
2899 NULL, HFILL
2903 &hf_ipv4_addr,
2905 "IP Address",
2906 "mih.ipv4_addr",
2907 FT_IPv4,
2908 BASE_NONE,
2909 NULL,
2910 0x0,
2911 NULL, HFILL
2915 &hf_ipv6_addr,
2917 "IP Address",
2918 "mih.ipv6_addr",
2919 FT_IPv6,
2920 BASE_NONE,
2921 NULL,
2922 0x0,
2923 NULL, HFILL
2927 &hf_link_dn_reason,
2929 "LINK Down Reason",
2930 "mih.link_dn_reason",
2931 FT_UINT8,
2932 BASE_DEC,
2933 VALS(link_dn_reason_vals),
2934 0x0,
2935 NULL, HFILL
2939 &hf_link_gdn_reason,
2941 "LINK Going Down Reason",
2942 "mih.link_gdn_reason",
2943 FT_UINT8,
2944 BASE_DEC,
2945 VALS(link_gdn_reason_vals),
2946 0x0,
2947 NULL, HFILL
2951 &hf_mac_addr,
2953 "MAC ADDRESS",
2954 "mih.mac_addr",
2955 FT_ETHER,
2956 BASE_NONE,
2957 NULL,
2958 0x0,
2959 NULL, HFILL
2963 &hf_link_param_gen,
2965 "LINK_PARAM",
2966 "mih.link_param_gen",
2967 FT_UINT8,
2968 BASE_DEC,
2969 VALS(link_param_gen_vals),
2970 0x0,
2971 NULL, HFILL
2975 &hf_link_param_qos,
2977 "LINK_PARAM",
2978 "mih.link_param_qos",
2979 FT_UINT8,
2980 BASE_DEC,
2981 VALS(link_param_qos_vals),
2982 0x0,
2983 NULL, HFILL
2987 &hf_link_param_gg,
2989 "LINK_PARAM",
2990 "mih.link_param_gg",
2991 FT_UINT8,
2992 BASE_DEC,
2993 VALS(link_param_gg_vals),
2994 0x0,
2995 NULL, HFILL
2999 &hf_link_param_edge,
3001 "LINK_PARAM",
3002 "mih.link_param_edge",
3003 FT_UINT8,
3004 BASE_DEC,
3005 NULL,
3006 0x0,
3007 NULL, HFILL
3011 &hf_link_param_eth,
3013 "LINK_PARAM",
3014 "mih.link_param_eth",
3015 FT_UINT8,
3016 BASE_DEC,
3017 NULL,
3018 0x0,
3019 NULL, HFILL
3023 &hf_link_param_802_11,
3025 "LINK_PARAM",
3026 "mih.link_param_802_11",
3027 FT_UINT8,
3028 BASE_DEC,
3029 VALS(link_param_802_11_vals),
3030 0x0,
3031 NULL, HFILL
3035 &hf_link_param_c2k,
3037 "LINK_PARAM",
3038 "mih.link_param_c2k",
3039 FT_UINT8,
3040 BASE_DEC,
3041 VALS(link_param_c2k_hrpd_vals),
3042 0x0,
3043 NULL, HFILL
3047 &hf_link_param_fdd,
3049 "LINK_PARAM",
3050 "mih.link_param_fdd",
3051 FT_UINT8,
3052 BASE_DEC,
3053 VALS(link_param_fdd_vals),
3054 0x0,
3055 NULL, HFILL
3059 &hf_link_param_hrpd,
3061 "LINK_PARAM",
3062 "mih.link_param_hrpd",
3063 FT_UINT8,
3064 BASE_DEC,
3065 VALS(link_param_c2k_hrpd_vals),
3066 0x0,
3067 NULL, HFILL
3071 &hf_link_param_802_16,
3073 "LINK_PARAM",
3074 "mih.link_param_802_16",
3075 FT_UINT8,
3076 BASE_DEC,
3077 NULL,
3078 0x0,
3079 NULL, HFILL
3083 &hf_link_param_802_20,
3085 "LINK_PARAM",
3086 "mih.link_param_802_20",
3087 FT_UINT8,
3088 BASE_DEC,
3089 NULL,
3090 0x0,
3091 NULL, HFILL
3095 &hf_link_param_802_22,
3097 "LINK_PARAM",
3098 "mih.link_param_802_22",
3099 FT_UINT8,
3100 BASE_DEC,
3101 NULL,
3102 0x0,
3103 NULL, HFILL
3107 &hf_link_param_value,
3109 "LINK_VALUE",
3110 "mih.link_param_value",
3111 FT_UINT16,
3112 BASE_DEC,
3113 NULL,
3114 0x0,
3115 NULL, HFILL
3119 &hf_op_mode,
3121 "OP_MODE",
3122 "mih.op_mode",
3123 FT_UINT8,
3124 BASE_DEC,
3125 VALS(op_mode_vals),
3126 0x0,
3127 NULL, HFILL
3131 &hf_link_ac_type,
3133 "LINK_AC_TYPE",
3134 "mih.link_ac_type",
3135 FT_UINT8,
3136 BASE_DEC,
3137 VALS(link_ac_type_vals),
3138 0x0,
3139 NULL, HFILL
3143 &hf_link_ac_ext_time,
3145 "LINK_AC_ext_time",
3146 "mih.link_ac_ext_time",
3147 FT_UINT16,
3148 BASE_DEC,
3149 NULL,
3150 0x0,
3151 NULL, HFILL
3155 &hf_link_ac_result,
3157 "LINK_AC_RESULT",
3158 "mih.link_ac_result",
3159 FT_UINT8,
3160 BASE_DEC,
3161 VALS(link_ac_result_vals),
3162 0x0,
3163 NULL, HFILL
3167 &hf_ho_reason,
3169 "HO CAUSE",
3170 "mih.ho_reason",
3171 FT_UINT8,
3172 BASE_DEC,
3173 VALS(link_dn_reason_vals),
3174 0x0,
3175 NULL, HFILL
3179 &hf_ho_status,
3181 "HO STATUS",
3182 "mih.ho_status",
3183 FT_UINT8,
3184 BASE_DEC,
3185 VALS(ho_status_vals),
3186 0x0,
3187 NULL, HFILL
3191 &hf_mbb_ho_supp,
3193 "MBB HO SUPP",
3194 "mih.mbb_ho_supp",
3195 FT_UINT8,
3196 BASE_DEC,
3197 VALS(mbb_ho_supp_vals),
3198 0x0,
3199 NULL, HFILL
3203 &hf_reg_request_code,
3205 "REGISTER REQUEST CODE",
3206 "mih.reg_request_code",
3207 FT_UINT8,
3208 BASE_DEC,
3209 VALS(reg_request_code_vals),
3210 0x0,
3211 NULL, HFILL
3215 &hf_ip_renewal,
3217 "IP RENEWAL FLAG",
3218 "mih.ip_renewal",
3219 FT_UINT8,
3220 BASE_DEC,
3221 VALS(ip_renewal_vals),
3222 0x0,
3223 NULL, HFILL
3227 &hf_dev_states_resp,
3229 "SUPPORTED TRANSPORTS",
3230 "mih.dev_states_resp",
3231 FT_UINT8,
3232 BASE_DEC,
3233 VALS(dev_states_req_vals),
3234 0x0,
3235 NULL, HFILL
3239 &hf_dev_batt_level,
3241 "Battery Level",
3242 "mih.dev_states_resp.batt_level",
3243 FT_INT8,
3244 BASE_DEC,
3245 NULL,
3246 0x0,
3247 NULL, HFILL
3251 &hf_dev_info,
3253 "Device Info",
3254 "mih.dev_states_resp.dev_info",
3255 FT_STRING,
3256 BASE_NONE,
3257 NULL,
3258 0x0,
3259 NULL, HFILL
3263 &hf_max_resp_size,
3265 "Maximum Response Size",
3266 "mih.max_resp_size",
3267 FT_UINT16,
3268 BASE_DEC,
3269 NULL,
3270 0x0,
3271 NULL, HFILL
3275 &hf_time_interval,
3277 "Time Interval",
3278 "mih.time_interval",
3279 FT_UINT16,
3280 BASE_DEC,
3281 NULL,
3282 0x0,
3283 NULL, HFILL
3287 &hf_valid_time_interval,
3289 "Valid Time Interval",
3290 "mih.valid_time_interval",
3291 FT_UINT32,
3292 BASE_DEC,
3293 NULL,
3294 0x0,
3295 NULL, HFILL
3299 &hf_tsp_carrier,
3301 "TSP Carrier",
3302 "mih.tsp_carrier",
3303 FT_STRING,
3304 BASE_NONE,
3305 NULL,
3306 0x0,
3307 NULL, HFILL
3311 &hf_link_addr_type,
3313 "Link Address Type",
3314 "mih.link_addr_type",
3315 FT_UINT8,
3316 BASE_DEC,
3317 VALS(link_addr_types),
3318 0x0,
3319 NULL, HFILL
3323 &hf_link_transport_addr_type,
3325 "Link Transport Address Type",
3326 "mih.link_transport_addr_type",
3327 FT_UINT16,
3328 BASE_DEC,
3329 NULL,
3330 0x0,
3331 NULL, HFILL
3335 &hf_link_addr_string,
3337 "Link Address String",
3338 "mih.link_addr_string",
3339 FT_STRING,
3340 BASE_NONE,
3341 NULL,
3342 0x0,
3343 NULL, HFILL
3347 &hf_cell_id,
3349 "3G Cell ID",
3350 "mih.cell_id",
3351 FT_UINT32,
3352 BASE_DEC,
3353 NULL,
3354 0x0,
3355 NULL, HFILL
3359 &hf_ci,
3361 "2G Cell ID",
3362 "mih.ci",
3363 FT_UINT16,
3364 BASE_DEC,
3365 NULL,
3366 0x0,
3367 NULL, HFILL
3371 &hf_plmn_id,
3373 "Public Land Mobile Network (PLMN) ID",
3374 "mih.plmn_id",
3375 FT_UINT24,
3376 BASE_DEC,
3377 NULL,
3378 0x0,
3379 NULL, HFILL
3383 &hf_location_area_id,
3385 "Location Area Code (LAC)",
3386 "mih.lac",
3387 FT_UINT16,
3388 BASE_DEC,
3389 NULL,
3390 0x0,
3391 NULL, HFILL
3395 &hf_threshold_val,
3397 "Threshold Value",
3398 "mih.threshold_val",
3399 FT_UINT16,
3400 BASE_DEC,
3401 NULL,
3402 0x0,
3403 NULL, HFILL
3407 &hf_threshold_x_dir,
3409 "Threshold Direction",
3410 "mih.threshold_x_dir",
3411 FT_UINT8,
3412 BASE_DEC,
3413 VALS(threshold_x_dir_vals),
3414 0x0,
3415 NULL, HFILL
3419 &hf_threshold_action,
3421 "Threshold Action",
3422 "mih.threshold_action",
3423 FT_UINT8,
3424 BASE_DEC,
3425 VALS(threshold_action_vals),
3426 0x0,
3427 NULL, HFILL
3431 &hf_config_status,
3433 "Config Status",
3434 "mih.config_status",
3435 FT_UINT8,
3436 BASE_DEC,
3437 VALS(boolean_types),
3438 0x0,
3439 NULL, HFILL
3443 &hf_num_cos,
3445 "Number of differentiable classes",
3446 "mih.num_cos",
3447 FT_UINT8,
3448 BASE_DEC,
3449 NULL,
3450 0x0,
3451 NULL, HFILL
3455 &hf_num_queue,
3457 "Number of transmit queues supported",
3458 "mih.num_queue",
3459 FT_UINT8,
3460 BASE_DEC,
3461 NULL,
3462 0x0,
3463 NULL, HFILL
3467 &hf_channel_id,
3469 "Channel ID",
3470 "mih.channel_id",
3471 FT_UINT16,
3472 BASE_DEC,
3473 NULL,
3474 0x0,
3475 NULL, HFILL
3479 &hf_predef_cfg_id,
3481 "Pre-defined Configuration Identifier",
3482 "mih.predef_cfg_id",
3483 FT_INT8,
3484 BASE_DEC,
3485 NULL,
3486 0x0,
3487 NULL, HFILL
3491 &hf_network_id,
3493 "Network ID",
3494 "mih.network_id",
3495 FT_STRING,
3496 BASE_NONE,
3497 NULL,
3498 0x0,
3499 NULL, HFILL
3503 &hf_net_aux_id,
3505 "Auxiliary Network ID",
3506 "mih.net_aux_id",
3507 FT_STRING,
3508 BASE_NONE,
3509 NULL,
3510 0x0,
3511 NULL, HFILL
3515 &hf_sig_strength_dbm,
3517 "Signal Strength (dBm)",
3518 "mih.sig_strength",
3519 FT_INT8,
3520 BASE_DEC,
3521 NULL,
3522 0x0,
3523 NULL, HFILL
3527 &hf_sig_strength_per,
3529 "Signal Strength (%)",
3530 "mih.sig_strength",
3531 FT_INT8,
3532 BASE_DEC,
3533 NULL,
3534 0x0,
3535 NULL, HFILL
3539 &hf_cos_id,
3541 "Class of Service ID",
3542 "mih.cos_id",
3543 FT_INT8,
3544 BASE_DEC,
3545 NULL,
3546 0x0,
3547 NULL, HFILL
3551 &hf_cos_value,
3553 "Class of Service Value",
3554 "mih.cos_value",
3555 FT_INT16,
3556 BASE_DEC,
3557 NULL,
3558 0x0,
3559 NULL, HFILL
3563 &hf_sinr,
3565 "SINR",
3566 "mih.sinr",
3567 FT_INT16,
3568 BASE_DEC,
3569 NULL,
3570 0x0,
3571 NULL, HFILL
3575 &hf_link_data_rate,
3577 "Link Data Rate (kb/s)",
3578 "mih.link_data_rate",
3579 FT_UINT32,
3580 BASE_DEC,
3581 NULL,
3582 0x0,
3583 NULL, HFILL
3587 &hf_rdf_data,
3589 "RDF data",
3590 "mih.rdf_data",
3591 FT_STRING,
3592 BASE_NONE,
3593 NULL,
3594 0x0,
3595 NULL, HFILL
3599 &hf_rdf_mime_type,
3601 "RDF data",
3602 "mih.rdf_mime_type",
3603 FT_STRING,
3604 BASE_NONE,
3605 NULL,
3606 0x0,
3607 NULL, HFILL
3611 &hf_link_res_status,
3613 "Resource Status",
3614 "mih.res_status",
3615 FT_UINT8,
3616 BASE_DEC,
3617 VALS(boolean_types),
3618 0x0,
3619 NULL, HFILL
3623 &hf_res_retention_status,
3625 "Info query RDF schema URL",
3626 "mih.res_retention_status",
3627 FT_UINT8,
3628 BASE_DEC,
3629 VALS(boolean_types),
3630 0x0,
3631 NULL, HFILL
3635 &hf_res_rpt_flag,
3637 "Query resource report flag",
3638 "mih.res_rpt_flag",
3639 FT_UINT8,
3640 BASE_DEC,
3641 VALS(boolean_types),
3642 0x0,
3643 NULL, HFILL
3647 &hf_unauth_info_req,
3649 "Unauthenticated information request",
3650 "mih.unauth_info_req",
3651 FT_UINT8,
3652 BASE_DEC,
3653 VALS(boolean_types),
3654 0x0,
3655 NULL, HFILL
3659 &hf_rdf_sch,
3661 "RDF Schema",
3662 "mih.rdf_sch",
3663 FT_STRING,
3664 BASE_NONE,
3665 NULL,
3666 0x0,
3667 NULL, HFILL
3671 &hf_rdf_sch_url,
3673 "RDF Schema URL",
3674 "mih.rdf_sch_url",
3675 FT_STRING,
3676 BASE_NONE,
3677 NULL,
3678 0x0,
3679 NULL, HFILL
3683 &hf_ir_bin_data,
3685 "IR Binary Data",
3686 "mih.ir_bin_data",
3687 FT_STRING,
3688 BASE_NONE,
3689 NULL,
3690 0x0,
3691 NULL, HFILL
3695 &hf_iq_bin_data_x,
3697 "IQ Binary Data",
3698 "mih.iq_bin_data",
3699 FT_STRING,
3700 BASE_NONE,
3701 NULL,
3702 0x0,
3703 NULL, HFILL
3707 &hf_vendor_specific_tlv,
3709 "Vendor Specific TLV",
3710 "mih.vendor_specific_tlv",
3711 FT_STRING,
3712 BASE_NONE,
3713 NULL,
3714 0x0,
3715 NULL, HFILL
3719 &hf_reserved_tlv,
3721 "Reserved TLV",
3722 "mih.reserved_tlv",
3723 FT_STRING,
3724 BASE_NONE,
3725 NULL,
3726 0x0,
3727 NULL, HFILL
3731 &hf_experimental_tlv,
3733 "Experimental TLV",
3734 "mih.experimental_tlv",
3735 FT_STRING,
3736 BASE_NONE,
3737 NULL,
3738 0x0,
3739 NULL, HFILL
3743 &hf_unknown_tlv,
3745 "UNKNOWN TLV",
3746 "mih.unknown_tlv",
3747 FT_STRING,
3748 BASE_NONE,
3749 NULL,
3750 0x0,
3751 NULL, HFILL
3755 &hf_fragmented_tlv,
3757 "FRAGMENTED TLV",
3758 "mih.fragmented_tlv",
3759 FT_BYTES,
3760 BASE_NONE,
3761 NULL,
3762 0x0,
3763 NULL, HFILL
3767 /*event related hf fields*/
3769 &hf_event_list,
3771 "List of Events",
3772 "mih.event_list",
3773 FT_UINT32,
3774 BASE_HEX,
3775 NULL,
3776 0x0,
3777 NULL, HFILL
3781 &hf_event_link_detect,
3783 "MIH LINK Detected",
3784 "mih.event_list.link_detect",
3785 FT_BOOLEAN,
3787 NULL,
3788 LINK_DETECT_MASK,
3789 NULL, HFILL
3793 &hf_event_link_up,
3795 "MIH LINK UP",
3796 "mih.event_list.link_up",
3797 FT_BOOLEAN,
3799 NULL,
3800 LINK_UP_MASK,
3801 NULL, HFILL
3805 &hf_event_link_dn,
3807 "MIH LINK DOWN",
3808 "mih.event_list.link_down",
3809 FT_BOOLEAN,
3811 NULL,
3812 LINK_DOWN_MASK,
3813 NULL, HFILL
3817 &hf_event_link_param,
3819 "MIH LINK Parameters Report",
3820 "mih.event_list.link_param_rpt",
3821 FT_BOOLEAN,
3823 NULL,
3824 LINK_PARAM_MASK,
3825 NULL, HFILL
3829 &hf_event_link_gd,
3831 "MIH LINK Going Down",
3832 "mih.event_list.link_gd",
3833 FT_BOOLEAN,
3835 NULL,
3836 LINK_GD_MASK,
3837 NULL, HFILL
3841 &hf_event_ho_imm,
3843 "Link Handover Imminent",
3844 "mih.event_list.link_ho_imm",
3845 FT_BOOLEAN,
3847 NULL,
3848 LINK_HO_IMM_MASK,
3849 NULL, HFILL
3853 &hf_event_ho_comp,
3855 "MIH LINK Handover Complete",
3856 "mih.event_list.link_ho_comp",
3857 FT_BOOLEAN,
3859 NULL,
3860 LINK_HO_COMP_MASK,
3861 NULL, HFILL
3865 &hf_event_pdu_tx_stat,
3867 "MIH LINK PDU Transmit Status",
3868 "mih.event_list.link_pdu_tx_stat",
3869 FT_BOOLEAN,
3871 NULL,
3872 LINK_PDU_MASK,
3873 NULL, HFILL
3877 /* cmd related hf fields */
3879 &hf_cmd_list,
3881 "List of Commands",
3882 "mih.command_list",
3883 FT_UINT32,
3884 BASE_HEX,
3885 NULL,
3886 0x0,
3887 NULL, HFILL
3892 &hf_cmd_event_subs,
3894 "MIH LINK Event Subscribe",
3895 "mih.cmd_list.evt_subs",
3896 FT_BOOLEAN,
3898 NULL,
3899 CMD_EVT_SUBS_MASK,
3900 NULL, HFILL
3904 &hf_cmd_event_unsub,
3906 "Link Event Unsubscribe",
3907 "mih.cmd_list.evt_unsubs",
3908 FT_BOOLEAN,
3910 NULL,
3911 CMD_EVT_UNSUBS_MASK,
3912 NULL, HFILL
3916 &hf_cmd_get_param,
3918 "MIH LINK Get Parameters",
3919 "mih.cmd_list.evt_get_param",
3920 FT_BOOLEAN,
3922 NULL,
3923 CMD_GET_PARA_MASK,
3924 NULL, HFILL
3928 &hf_cmd_con_thres,
3930 "Link Configure Thresholds",
3931 "mih.cmd_list.evt_conf_th",
3932 FT_BOOLEAN,
3934 NULL,
3935 CMD_CONF_TH_MASK,
3936 NULL, HFILL
3940 &hf_cmd_link_action,
3942 "MIH LINK Action",
3943 "mih.cmd_list.evt_link_action",
3944 FT_BOOLEAN,
3946 NULL,
3947 CMD_LINK_AC_MASK,
3948 NULL, HFILL
3952 /*header fields for iq type list*/
3954 &hf_iq_list,
3956 "List of of IS query types",
3957 "mih.iq_type_list",
3958 FT_UINT32,
3959 BASE_HEX,
3960 NULL,
3961 0x0,
3962 NULL, HFILL
3966 &hf_iq_bin_data,
3968 "Binary data",
3969 "mih.iq_type_list.bin_data",
3970 FT_BOOLEAN,
3972 NULL,
3973 IQ_BIN_DATA_MASK,
3974 NULL, HFILL
3978 &hf_iq_rdf_data,
3980 "RDF data",
3981 "mih.iq_type_list.rdf_data",
3982 FT_BOOLEAN,
3984 NULL,
3985 IQ_RDF_DATA_MASK,
3986 NULL, HFILL
3990 &hf_iq_rdf_sch_url,
3992 "RDF schema URL",
3993 "mih.iq_type_list.rdf_sch_u",
3994 FT_BOOLEAN,
3996 NULL,
3997 IQ_RDF_SCH_U_MASK,
3998 NULL, HFILL
4002 &hf_iq_rdf_sch,
4004 "RDF schema",
4005 "mih.iq_type_list.rdf_sch",
4006 FT_BOOLEAN,
4008 NULL,
4009 IQ_RDF_SCH_MASK,
4010 NULL, HFILL
4014 &hf_iq_net_type,
4016 "IE_NETWORK_TYPE",
4017 "mih.iq_type_list.ie_net_type",
4018 FT_BOOLEAN,
4020 NULL,
4021 IQ_IE_NET_TYPE_MASK,
4022 NULL, HFILL
4026 &hf_iq_op_id,
4028 "IE_OPERATOR_ID",
4029 "mih.iq_type_list.ie_op_id",
4030 FT_BOOLEAN,
4032 NULL,
4033 IQ_IE_OP_ID_MASK,
4034 NULL, HFILL
4038 &hf_iq_serv_pro_id,
4040 "IE_SERVICE_PROVIDER_ID",
4041 "mih.iq_type_list.ie_serv_id",
4042 FT_BOOLEAN,
4044 NULL,
4045 IQ_SERV_ID_MASK,
4046 NULL, HFILL
4050 &hf_iq_country_code,
4052 "IE_COUNTRY_CODE",
4053 "mih.iq_type_list.ie_country_code",
4054 FT_BOOLEAN,
4056 NULL,
4057 IQ_IE_COUN_MASK,
4058 NULL, HFILL
4062 &hf_iq_net_id,
4064 "IE_NETWORK_ID",
4065 "mih.iq_type_list.ie_net_id",
4066 FT_BOOLEAN,
4068 NULL,
4069 IQ_NET_ID_MASK,
4070 NULL, HFILL
4074 &hf_iq_net_aux_id,
4076 "IE_NETWORK_AUX_ID",
4077 "mih.iq_type_list.net_aux_id",
4078 FT_BOOLEAN,
4080 NULL,
4081 IQ_NET_AUX_MASK,
4082 NULL, HFILL
4086 &hf_iq_roam_part,
4088 "IE_ROAMING_PARTNERS",
4089 "mih.iq_type_list.ie_roam_part",
4090 FT_BOOLEAN,
4092 NULL,
4093 IQ_IE_ROAM_MASK,
4094 NULL, HFILL
4098 &hf_iq_cost,
4100 "IE_COST",
4101 "mih.iq_type_list.ie_cost",
4102 FT_BOOLEAN,
4104 NULL,
4105 IQ_IE_COST_MASK,
4106 NULL, HFILL
4110 &hf_iq_net_qos,
4112 "IE_NETWORK_QOS",
4113 "mih.iq_type_list.ie_net_qos",
4114 FT_BOOLEAN,
4116 NULL,
4117 IQ_IE_QOS_MASK,
4118 NULL, HFILL
4122 &hf_iq_net_dat_rt,
4124 "IE_NETWORK_DATA_RATE",
4125 "mih.iq_type_list.ie_net_dat_rt",
4126 FT_BOOLEAN,
4128 NULL,
4129 IQ_IE_DATA_MASK,
4130 NULL, HFILL
4134 &hf_iq_net_reg_dom,
4136 "IE_NET_REGULT_DOMAIN",
4137 "mih.iq_type_list.ie_net_reg_dom",
4138 FT_BOOLEAN,
4140 NULL,
4141 IQ_IE_REGDOM_MASK,
4142 NULL, HFILL
4146 &hf_iq_freq_bands,
4148 "IE_NET_FREQUENCY_BANDS",
4149 "mih.iq_type_list.ie_net_freq",
4150 FT_BOOLEAN,
4152 NULL,
4153 IQ_IE_FREQ_MASK,
4154 NULL, HFILL
4158 &hf_iq_ip_cfg_mthds,
4160 "IE_NET_IP_CFG_METHODS",
4161 "mih.iq_type_list.ie_net_ip_cfg",
4162 FT_BOOLEAN,
4164 NULL,
4165 IQ_IE_IP_CFG_MASK,
4166 NULL, HFILL
4170 &hf_iq_net_cap,
4172 "IE_NET_CAPABILITIES",
4173 "mih.iq_type_list.ie_net_cap",
4174 FT_BOOLEAN,
4176 NULL,
4177 IQ_IE_CAP_MASK,
4178 NULL, HFILL
4182 &hf_iq_supp_lcp,
4184 "IE_NET_SUPPORTED_LCP",
4185 "mih.iq_type_list.ie_net_sup_lcp",
4186 FT_BOOLEAN,
4188 NULL,
4189 IQ_IE_SUP_MASK,
4190 NULL, HFILL
4194 &hf_iq_net_mob_mg,
4196 "IE_NET_MOB_MGMT_PROT",
4197 "mih.iq_type_list.ie_net_mob_mg",
4198 FT_BOOLEAN,
4200 NULL,
4201 IQ_IE_MOB_MG_MASK,
4202 NULL, HFILL
4206 &hf_iq_net_emserv,
4208 "IE_NET_EMSERV_PROXY",
4209 "mih.iq_type_list.ie_net_emer_serv",
4210 FT_BOOLEAN,
4212 NULL,
4213 IQ_IE_EM_SERV_MASK,
4214 NULL, HFILL
4218 &hf_iq_net_ims_pcscf,
4220 "IE_NET_IMS_PROXY_CSCF",
4221 "mih.iq_type_list.ie_net_ims_pcscf",
4222 FT_BOOLEAN,
4224 NULL,
4225 IQ_IE_IMS_MASK,
4226 NULL, HFILL
4230 &hf_iq_net_mob_net,
4232 "IE_NET_MOBILE_NETWORK",
4233 "mih.iq_type_list.ie_net_mob_net",
4234 FT_BOOLEAN,
4236 NULL,
4237 IQ_IE_MOB_NET_MASK,
4238 NULL, HFILL
4242 &hf_iq_link_addr,
4244 "IE_POA_LINK_ADDR",
4245 "mih.iq_type_list.ie_poa_link",
4246 FT_BOOLEAN,
4248 NULL,
4249 IQ_IE_POA_ADDR_MASK,
4250 NULL, HFILL
4254 &hf_iq_poa_loc,
4256 "IE_POA_LOCATION",
4257 "mih.iq_type_list.ie_poa_loc",
4258 FT_BOOLEAN,
4260 NULL,
4261 IQ_IE_POA_LOC_MASK,
4262 NULL, HFILL
4266 &hf_iq_poa_chan_range,
4268 "IE_POA_CHANNEL_RANGE",
4269 "mih.iq_type_list.ie_poa_chan_rg",
4270 FT_BOOLEAN,
4272 NULL,
4273 IQ_IE_POA_CHAN_MASK,
4274 NULL, HFILL
4278 &hf_iq_poa_sys_info,
4280 "IE_POA_SYSTEM_INFO",
4281 "mih.iq_type_list.ie_poa_syst_info",
4282 FT_BOOLEAN,
4284 NULL,
4285 IQ_IE_POA_SYS_MASK,
4286 NULL, HFILL
4290 &hf_iq_poa_sub_info,
4292 "IE_POA_SUBNET_INFO",
4293 "mih.iq_type_list.ie_poa_sub_info",
4294 FT_BOOLEAN,
4296 NULL,
4297 IQ_IE_POA_SUB_MASK,
4298 NULL, HFILL
4302 &hf_iq_poa_ip,
4304 "IE_POA_IP_ADDR",
4305 "mih.iq_type_list.ie_poa_ip",
4306 FT_BOOLEAN,
4308 NULL,
4309 IQ_IE_POA_IP_MASK,
4310 NULL, HFILL
4314 /*header fields for mob mgmt*/
4316 &hf_mob_list,
4318 "List of supported mobility management protocols",
4319 "mih.mob_list",
4320 FT_UINT16,
4321 BASE_HEX,
4322 NULL,
4323 0x0,
4324 NULL, HFILL
4328 &hf_mob_mip4,
4330 "Mobile IPv4",
4331 "mih.mob_list.mip4",
4332 FT_BOOLEAN,
4334 NULL,
4335 MOB_MIP4_MASK,
4336 NULL, HFILL
4340 &hf_mob_mip4_reg,
4342 "Mobile IPv4 Regional Registration",
4343 "mih.mob_list.mip4_reg",
4344 FT_BOOLEAN,
4346 NULL,
4347 MOB_MIP4_REG_MASK,
4348 NULL, HFILL
4352 &hf_mob_mip6,
4354 "Mobile IPv6",
4355 "mih.mob_list.mip6",
4356 FT_BOOLEAN,
4358 NULL,
4359 MOB_MIP6_MASK,
4360 NULL, HFILL
4364 &hf_mob_hmip6,
4366 "Hierarchical Mobile IPv6",
4367 "mih.mob_list.hmip6",
4368 FT_BOOLEAN,
4370 NULL,
4371 MOB_HMIP6_MASK,
4372 NULL, HFILL
4376 &hf_mob_low_lat,
4378 "Low Latency Handoffs",
4379 "mih.mob_list.low_lat",
4380 FT_BOOLEAN,
4382 NULL,
4383 MOB_LOW_LAT_MASK,
4384 NULL, HFILL
4388 &hf_mob_fmip6,
4390 "Mobile IPv6 Fast Handovers",
4391 "mih.mob_list.fmip6",
4392 FT_BOOLEAN,
4394 NULL,
4395 MOB_FMIP6_MASK,
4396 NULL, HFILL
4400 &hf_mob_ike_multi,
4402 "IKEv2 Mobility and Multihoming Protocol",
4403 "mih.mob_list.ike_multi",
4404 FT_BOOLEAN,
4406 NULL,
4407 MOB_IKE_MULTI_MASK,
4408 NULL, HFILL
4412 /*header fields for configure methods*/
4414 &hf_cfg_mthds,
4416 "A set of IP configuration methods",
4417 "mih.cfg_mthds",
4418 FT_UINT32,
4419 BASE_HEX,
4420 NULL,
4421 0x0,
4422 NULL, HFILL
4426 &hf_cfg_ip4_stat,
4428 "IPv4 static configuration",
4429 "mih.ip_cfg_mthds.static",
4430 FT_BOOLEAN,
4432 NULL,
4433 IP_CFG_STAT_MASK,
4434 NULL, HFILL
4438 &hf_cfg_dhcp4,
4440 "DHCPv4",
4441 "mih.ip_cfg_mthds.dhcp4",
4442 FT_BOOLEAN,
4444 NULL,
4445 IP_CFG_DHCP4_MASK,
4446 NULL, HFILL
4450 &hf_cfg_mip_fa,
4452 "Mobile IPv4 with foreign agent",
4453 "mih.ip_cfg_mthds.mip4_fa",
4454 FT_BOOLEAN,
4456 NULL,
4457 IP_CFG_MIP4_FA_MASK,
4458 NULL, HFILL
4462 &hf_cfg_mip_wo_fa,
4464 "Mobile IPv4 without FA",
4465 "mih.ip_cfg_mthds.mip4_wo_fa",
4466 FT_BOOLEAN,
4468 NULL,
4469 IP_CFG_MIP4_NFA_MASK,
4470 NULL, HFILL
4474 &hf_cfg_ip6_sac,
4476 "IPv6 stateless address configuration",
4477 "mih.ip_cfg_mthds.ip6_state_less",
4478 FT_BOOLEAN,
4480 NULL,
4481 IP_CFG_IP6_SL_MASK,
4482 NULL, HFILL
4486 &hf_cfg_dhcp6,
4488 "DHCPv6",
4489 "mih.ip_cfg_mthds.dhcp6",
4490 FT_BOOLEAN,
4492 NULL,
4493 IP_CFG_DHCP6_MASK,
4494 NULL, HFILL
4498 &hf_cfg_ip6_manual,
4500 "IPv6 manual configuration",
4501 "mih.ip_cfg_mthds.ip6_manual",
4502 FT_BOOLEAN,
4504 NULL,
4505 IP_CFG_IP6_MAN_MASK,
4506 NULL, HFILL
4510 /*header fields for transport lists*/
4512 &hf_trans_list,
4514 "Supported Transports",
4515 "mih.trans_list",
4516 FT_UINT16,
4517 BASE_HEX,
4518 NULL,
4519 0x0,
4520 NULL, HFILL
4524 &hf_trans_udp,
4526 "UDP",
4527 "mih.trans_list.udp",
4528 FT_BOOLEAN,
4530 NULL,
4531 0x8000,
4532 NULL, HFILL
4536 &hf_trans_tcp,
4538 "TCP",
4539 "mih.trans_list.tcp",
4540 FT_BOOLEAN,
4542 NULL,
4543 0x4000,
4544 NULL, HFILL
4548 /*header fields for device state request*/
4550 &hf_dev_states_req,
4552 "Device Status Request",
4553 "mih.dev_states_req",
4554 FT_UINT16,
4555 BASE_HEX,
4556 NULL,
4557 0x0,
4558 NULL, HFILL
4562 &hf_dev_states_req_dev_info,
4564 "Device Info",
4565 "mih.dev_states_req.dev_info",
4566 FT_BOOLEAN,
4568 NULL,
4569 0x8000,
4570 NULL, HFILL
4574 &hf_dev_states_req_batt_lvl,
4576 "Battery Level",
4577 "mih.dev_states_req.batt_level",
4578 FT_BOOLEAN,
4580 NULL,
4581 0x4000,
4582 NULL, HFILL
4586 /*header fields for MIH Capabilities*/
4588 &hf_mihcap,
4590 "Supported MIH Capability",
4591 "mih.mihcap",
4592 FT_UINT8,
4593 BASE_HEX,
4594 NULL,
4595 0x0,
4596 NULL, HFILL
4600 &hf_mihcap_es,
4602 "Event Service (ES)",
4603 "mih.mihcap.event_service",
4604 FT_BOOLEAN,
4606 NULL,
4607 0x80,
4608 NULL, HFILL
4612 &hf_mihcap_cs,
4614 "Command Service (CS)",
4615 "mih.mihcap.command_service",
4616 FT_BOOLEAN,
4618 NULL,
4619 0x40,
4620 NULL, HFILL
4624 &hf_mihcap_is,
4626 "Information Service (IS)",
4627 "mih.mihcap.information_service",
4628 FT_BOOLEAN,
4630 NULL,
4631 0x20,
4632 NULL, HFILL
4636 /*header fields for High Level Network Capabilities*/
4638 &hf_net_caps,
4640 "High Level Network Capability",
4641 "mih.net_caps",
4642 FT_UINT32,
4643 BASE_HEX,
4644 NULL,
4645 0x0,
4646 NULL, HFILL
4650 &hf_net_caps_sec,
4652 "Security",
4653 "mih.net_caps.sec",
4654 FT_BOOLEAN,
4656 NULL,
4657 0x80000000,
4658 NULL, HFILL
4662 &hf_net_caps_qos0,
4664 "QoS Class 0",
4665 "mih.net_caps.qos0",
4666 FT_BOOLEAN,
4668 NULL,
4669 0x40000000,
4670 NULL, HFILL
4674 &hf_net_caps_qos1,
4676 "QoS Class 1",
4677 "mih.net_caps.qos1",
4678 FT_BOOLEAN,
4680 NULL,
4681 0x20000000,
4682 NULL, HFILL
4686 &hf_net_caps_qos2,
4688 "QoS Class 2",
4689 "mih.net_caps.qos2",
4690 FT_BOOLEAN,
4692 NULL,
4693 0x10000000,
4694 NULL, HFILL
4698 &hf_net_caps_qos3,
4700 "QoS Class 3",
4701 "mih.net_caps.qos3",
4702 FT_BOOLEAN,
4704 NULL,
4705 0x08000000,
4706 NULL, HFILL
4710 &hf_net_caps_qos4,
4712 "QoS Class 4",
4713 "mih.net_caps.qos4",
4714 FT_BOOLEAN,
4716 NULL,
4717 0x04000000,
4718 NULL, HFILL
4722 &hf_net_caps_qos5,
4724 "QoS Class 5",
4725 "mih.net_caps.qos5",
4726 FT_BOOLEAN,
4728 NULL,
4729 0x02000000,
4730 NULL, HFILL
4734 &hf_net_caps_ia,
4736 "Internet Access",
4737 "mih.net_caps.internet_access",
4738 FT_BOOLEAN,
4740 NULL,
4741 0x01000000,
4742 NULL, HFILL
4746 &hf_net_caps_es,
4748 "Emergency Services",
4749 "mih.net_caps.emergency_services",
4750 FT_BOOLEAN,
4752 NULL,
4753 0x00800000,
4754 NULL, HFILL
4758 &hf_net_caps_mihcap,
4760 "MIH Capability",
4761 "mih.net_caps.mihcap",
4762 FT_BOOLEAN,
4764 NULL,
4765 0x00400000,
4766 NULL, HFILL
4770 /*header fields for Link Action attributes*/
4772 &hf_link_ac_attr,
4774 "Link Action Attribute",
4775 "mih.link_ac_attr",
4776 FT_UINT8,
4777 BASE_HEX,
4778 NULL,
4779 0x0,
4780 NULL, HFILL
4784 &hf_link_ac_attr_link_scan,
4786 "Link_Scan",
4787 "mih.link_ac_attr.link_scan",
4788 FT_BOOLEAN,
4790 NULL,
4791 0x80,
4792 NULL, HFILL
4796 &hf_link_ac_attr_link_res_retain,
4798 "Link Resource Retain",
4799 "mih.link_ac_attr.link_res_retain",
4800 FT_BOOLEAN,
4802 NULL,
4803 0x40,
4804 NULL, HFILL
4808 &hf_link_ac_attr_data_fwd_req,
4810 "Forward Data Request",
4811 "mih.link_ac_attr.data_fwd_req",
4812 FT_BOOLEAN,
4814 NULL,
4815 0x20,
4816 NULL, HFILL
4821 /* Setup protocol subtree array */
4822 static int *ett[] =
4824 &ett_mih,
4825 &ett_ver_flags,
4826 &ett_mid,
4827 &ett_tlv,
4828 &ett_cmd_bitmap,
4829 &ett_event_bitmap,
4830 &ett_mob_mgt_bitmap,
4831 &ett_cfg_mtd_bitmap,
4832 &ett_iq_type_bitmap,
4833 &ett_trans_list_bitmap,
4834 &ett_dev_states_bitmap,
4835 &ett_mihcap_bitmap,
4836 &ett_net_caps_bitmap,
4837 &ett_ac_attr_bitmap,
4838 &ett_subtype_eth_bitmap,
4839 &ett_subtype_wireless_other_bitmap,
4840 &ett_subtype_ieee80211_bitmap,
4841 &ett_subtype_umts_bitmap,
4842 &ett_subtype_cdma2000_bitmap,
4843 &ett_subtype_ieee80216_bitmap,
4844 &ett_min_pk_tx_delay,
4845 &ett_avg_pk_tx_delay,
4846 &ett_max_pk_tx_delay,
4847 &ett_pk_delay_jitter,
4848 &ett_pk_loss_rate,
4849 &ett_list_prefer_link,
4850 &ett_ip_dhcp_server,
4851 &ett_fn_agent,
4852 &ett_access_router,
4853 &ett_link_states_req,
4854 &ett_link_desc_req,
4855 &ett_dev_states_resp
4858 proto_mih = proto_register_protocol("Media-Independent Handover", "MIH", "mih");
4859 proto_register_field_array(proto_mih, hf, array_length(hf));
4860 proto_register_subtree_array(ett, array_length(ett));
4862 mih_handle = register_dissector("mih", dissect_mih, proto_mih);
4866 /*dissector handoff*/
4867 void proto_reg_handoff_mih(void)
4869 /*Layer 3 handle*/
4870 dissector_add_uint_with_preference("udp.port", MIH_PORT, mih_handle);
4871 dissector_add_uint_with_preference("tcp.port", MIH_PORT, mih_handle);
4873 /*Layer 2 handle*/
4874 dissector_add_uint("ethertype", ETHERTYPE_MIH, mih_handle);
4879 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4881 * Local variables:
4882 * c-basic-offset: 8
4883 * tab-width: 8
4884 * indent-tabs-mode: nil
4885 * End:
4887 * vi: set shiftwidth=8 tabstop=8 expandtab:
4888 * :indentSize=8:tabSize=8:noTabs=true: