FIXUP: WIP: verification_trailer
[wireshark-wip.git] / epan / dissectors / packet-mih.c
blob7c491a78b6e7694efe1721e043dc414f2646aa97
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 * $Id$
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 #include "config.h"
37 #include <epan/packet.h>
38 #include <epan/exceptions.h>
39 #include <epan/prefs.h>
40 #include <epan/reassemble.h>
41 #include <epan/proto.h>
42 #include <epan/etypes.h>
43 #include <glib.h>
46 #define MIH_PORT 4551
48 #define VERSION_MASK 0xF0
49 #define ACKREQ_MASK 0x8
50 #define ACKRESP_MASK 0x4
51 #define UIR_MASK 0x2
52 #define MORE_FRAG_MASK 0x1
53 #define FRAG_NO_MASK 0xFE
54 #define SID_MASK 0xF000
55 #define OPCODE_MASK 0xC00
56 #define AID_MASK 0x3FF
57 #define TRANS_ID_MASK 0x0FFF
58 #define LEN_OF_LEN_MASK 0x80
60 /*Type values for TLV encoding*/
61 #define SRC_MIHF_ID 1
62 #define DEST_MIHF_ID 2
63 #define STATUS 3
64 #define LINK_TYPE 4
65 #define MIH_EVT_LIST 5
66 #define MIH_CMD_LIST 6
67 #define MIH_IQ_TYPE_LIST 7
68 #define MIH_TRANS_LIST 8
69 #define LINK_ADDR_LIST 9
70 #define MBB_HO_SUPP_LIST 10
71 #define REG_REQUEST_CODE 11
72 #define VALID_TIME_INTR 12
73 #define LINK_ID 13
74 #define NEW_LINK_ID 14
75 #define OLD_ACCESS_ROUTER 15
76 #define NEW_ACCESS_ROUTER 16
77 #define IP_RENEWAL_FLAG 17
78 #define IP_MOB_MGMT 18
79 #define IP_CFG_MTHDS 19
80 #define LINK_DN_REASON 20
81 #define TIMER_INTERVAL 21
82 #define LINK_GOING_DN_REASON 22
83 #define LINK_PARAM_RPT_LIST 23
84 #define DEV_STATES_REQ 24
85 #define LINK_ID_LIST 25
86 #define DEV_STATES_RSP_LIST 26
87 #define STATUS_REQ_SET 27
88 #define STATUS_RSP_LIST 28
89 #define CFG_REQ_LIST 29
90 #define CFG_RSP_LIST 30
91 #define LINK_POA_LIST 31
92 #define PREF_LINK_LIST 32
93 #define HO_REQ_QUERY_LIST 33
94 #define HO_STATUS 34
95 #define ACCESS_ROUTER_ADDR 35
96 #define DHCP_SER_ADDR 36
97 #define FA_ADDR 37
98 #define LINK_ACTION_REQ_LIST 38
99 #define LINK_ACTION_RSP_LIST 39
100 #define HO_RESULT 40
101 #define LINK_RES_STATUS 41
102 #define RES_RETENTION_STATUS 42
103 #define IQ_BIN_DATA_LIST 43
104 #define IQ_RDF_DATA_LIST 44
105 #define IQ_RDF_SCHEMA_URL 45
106 #define IQ_RDF_SCHM_LIST 46
107 #define MAX_RSP_SIZE 47
108 #define IR_BIN_DATA_LIST 48
109 #define IR_RDF_DATA_LIST 49
110 #define IR_SCHM_URL_LIST 50
111 #define IR_RDF_SCHM_LIST 51
112 #define MN_MIHF_ID 52
113 #define Q_RES_RPT_FLAG 53
114 #define EVT_CFG_INFO_LIST 54
115 #define TGT_NET_INFO 55
116 #define TGT_NET_INFO_LIST 56
117 #define ASGN_RES_SET 57
118 #define LINK_DET_INFO_LIST 58
119 #define MN_LINK_ID 59
120 #define POA_LINK_ADDR 60
121 #define UNAUTH_INFO_REQ 61
122 #define NET_TYPE 62
123 #define REQ_RES_SET 63
124 #define VEND_SPECIFIC_TLV 100
126 /*Bitmasks in 802.21 are encoded in Network-Byte-Order: bit0 is leftmost bit*/
128 /*MASK for event list*/
129 #define LINK_DETECT_MASK 0x80000000
130 #define LINK_UP_MASK 0x40000000
131 #define LINK_DOWN_MASK 0x20000000
132 #define LINK_PARAM_MASK 0x10000000
133 #define LINK_GD_MASK 0x08000000
134 #define LINK_HO_IMM_MASK 0x04000000
135 #define LINK_HO_COMP_MASK 0x02000000
136 #define LINK_PDU_MASK 0x01000000
138 /*MASK for command list*/
139 /*1st bit is reserved*/
140 #define CMD_EVT_SUBS_MASK 0x40000000
141 #define CMD_EVT_UNSUBS_MASK 0x20000000
142 #define CMD_GET_PARA_MASK 0x10000000
143 #define CMD_CONF_TH_MASK 0x08000000
144 #define CMD_LINK_AC_MASK 0x04000000
146 /*MASK for Info Query list*/
147 #define IQ_BIN_DATA_MASK 0x80000000
148 #define IQ_RDF_DATA_MASK 0x40000000
149 #define IQ_RDF_SCH_U_MASK 0x20000000
150 #define IQ_RDF_SCH_MASK 0x10000000
151 #define IQ_IE_NET_TYPE_MASK 0x08000000
152 #define IQ_IE_OP_ID_MASK 0x04000000
153 #define IQ_SERV_ID_MASK 0x02000000
154 #define IQ_IE_COUN_MASK 0x01000000
155 #define IQ_NET_ID_MASK 0x00800000
156 #define IQ_NET_AUX_MASK 0x00400000
157 #define IQ_IE_ROAM_MASK 0x00200000
158 #define IQ_IE_COST_MASK 0x00100000
159 #define IQ_IE_QOS_MASK 0x00080000
160 #define IQ_IE_DATA_MASK 0x00040000
161 #define IQ_IE_REGDOM_MASK 0x00020000
162 #define IQ_IE_FREQ_MASK 0x00010000
163 #define IQ_IE_IP_CFG_MASK 0x00008000
164 #define IQ_IE_CAP_MASK 0x00004000
165 #define IQ_IE_SUP_MASK 0x00002000
166 #define IQ_IE_MOB_MG_MASK 0x00001000
167 #define IQ_IE_EM_SERV_MASK 0x00000800
168 #define IQ_IE_IMS_MASK 0x00000400
169 #define IQ_IE_MOB_NET_MASK 0x00000200
170 #define IQ_IE_POA_ADDR_MASK 0x00000100
171 #define IQ_IE_POA_LOC_MASK 0x00000080
172 #define IQ_IE_POA_CHAN_MASK 0x00000040
173 #define IQ_IE_POA_SYS_MASK 0x00000020
174 #define IQ_IE_POA_SUB_MASK 0x00000010
175 #define IQ_IE_POA_IP_MASK 0x00000008
177 /*MASK for mobility Management methods*/
178 #define MOB_MIP4_MASK 0x8000
179 #define MOB_MIP4_REG_MASK 0x4000
180 #define MOB_MIP6_MASK 0x2000
181 #define MOB_HMIP6_MASK 0x1000
182 #define MOB_LOW_LAT_MASK 0x0800
183 #define MOB_FMIP6_MASK 0x0400
184 #define MOB_IKE_MULTI_MASK 0x0200
186 /*MASK for ip configuration methods*/
187 #define IP_CFG_STAT_MASK 0x80000000
188 #define IP_CFG_DHCP4_MASK 0x40000000
189 #define IP_CFG_MIP4_FA_MASK 0x20000000
190 #define IP_CFG_MIP4_NFA_MASK 0x10000000
191 /*bits 4-10 reserved for IPv4 address configuration*/
192 #define IP_CFG_IP6_SL_MASK 0x00100000
193 #define IP_CFG_DHCP6_MASK 0x00080000
194 #define IP_CFG_IP6_MAN_MASK 0x00040000
196 /*information holder integers...*/
197 static int proto_mih = -1;
198 static int hf_mih_version = -1;
199 static int hf_mih_ack_req = -1;
200 static int hf_mih_ack_resp = -1;
201 static int hf_mih_uir = -1;
202 static int hf_mih_more_frag = -1;
203 static int hf_mih_frag_no = -1;
204 static int hf_mih_mid = -1;
205 static int hf_mih_service_id = -1;
206 static int hf_mih_opcode = -1;
207 static int hf_mih_serv_actionid = -1;
208 static int hf_mih_event_actionid = -1;
209 static int hf_mih_command_actionid = -1;
210 static int hf_mih_info_actionid = -1;
211 static int hf_mih_tid = -1;
212 static int hf_mih_pay_len = -1;
213 static int hf_mih_type = -1;
214 static int hf_mih_type_length = -1;
215 static int hf_mih_type_length_ext = -1;
216 static int hf_mihf_id = -1;
217 static int hf_mihf_id_mac = -1;
218 static int hf_mihf_id_ipv4 = -1;
219 static int hf_mihf_id_ipv6 = -1;
220 static int hf_status = -1;
221 static int hf_boolean = -1;
222 static int hf_link_type = -1;
223 static int hf_link_type_ext = -1;
224 static int hf_ipv4_addr = -1;
225 static int hf_ipv6_addr = -1;
226 static int hf_link_dn_reason = -1;
227 static int hf_link_gdn_reason = -1;
228 static int hf_mac_addr = -1;
229 static int hf_link_param_gen = -1;
230 static int hf_link_param_qos = -1;
231 static int hf_link_param_gg = -1;
232 static int hf_link_param_802_11 = -1;
233 static int hf_link_param_fdd = -1 ;
234 static int hf_link_param_edge = -1;
235 static int hf_link_param_eth = -1;
236 static int hf_link_param_c2k = -1;
237 static int hf_link_param_hrpd = -1;
238 static int hf_link_param_802_16 = -1;
239 static int hf_link_param_802_20 = -1;
240 static int hf_link_param_802_22 = -1;
241 static int hf_link_param_value = -1;
242 static int hf_op_mode = -1;
243 static int hf_link_ac_type = -1;
244 static int hf_link_ac_ext_time = -1;
245 static int hf_link_ac_result = -1;
246 static int hf_ho_reason = -1;
247 static int hf_ho_status = -1;
248 static int hf_reg_request_code = -1;
249 static int hf_ip_renewal = -1;
250 static int hf_max_resp_size = -1;
251 static int hf_time_interval = -1;
252 static int hf_valid_time_interval = -1;
253 static int hf_tsp_carrier = -1;
254 static int hf_mbb_ho_supp = -1;
255 static int hf_link_addr_type = -1;
256 static int hf_link_transport_addr_type = -1;
257 static int hf_link_addr_string = -1;
258 static int hf_link_data_rate = -1;
259 static int hf_plmn_id = -1;
260 static int hf_location_area_id = -1;
261 static int hf_cell_id = -1;
262 static int hf_ci = -1;
263 static int hf_threshold_val = -1;
264 static int hf_threshold_x_dir = -1;
265 static int hf_threshold_action = -1;
266 static int hf_config_status = -1;
267 static int hf_num_cos = -1;
268 static int hf_num_queue = -1;
269 static int hf_channel_id = -1;
270 static int hf_predef_cfg_id = -1;
271 static int hf_network_id = -1;
272 static int hf_net_aux_id = -1;
273 static int hf_sig_strength_dbm = -1;
274 static int hf_sig_strength_per = -1;
275 static int hf_cos_id = -1;
276 static int hf_cos_value = -1;
277 static int hf_sinr = -1;
278 static int hf_rdf_data = -1;
279 static int hf_rdf_mime_type = -1;
280 static int hf_link_res_status = -1;
281 static int hf_res_retention_status = -1;
282 static int hf_res_rpt_flag = -1;
283 static int hf_unauth_info_req = -1;
284 static int hf_rdf_sch = -1;
285 static int hf_rdf_sch_url = -1;
286 static int hf_ir_bin_data = -1;
287 static int hf_iq_bin_data_x = -1;
289 /*header fields for event list */
290 static int hf_event_list = -1;
291 static int hf_event_link_detect = -1;
292 static int hf_event_link_up = -1;
293 static int hf_event_link_dn = -1;
294 static int hf_event_link_param = -1;
295 static int hf_event_link_gd = -1;
296 static int hf_event_ho_imm = -1;
297 static int hf_event_ho_comp = -1;
298 static int hf_event_pdu_tx_stat = -1;
300 /*header fields for command list*/
301 static int hf_cmd_list = -1;
302 static int hf_cmd_event_subs = -1;
303 static int hf_cmd_event_unsub = -1;
304 static int hf_cmd_get_param = -1;
305 static int hf_cmd_con_thres = -1;
306 static int hf_cmd_link_action = -1;
308 /*header fields for iq type list*/
309 static int hf_iq_list = -1;
310 static int hf_iq_bin_data = -1;
311 static int hf_iq_rdf_data = -1;
312 static int hf_iq_rdf_sch_url = -1;
313 static int hf_iq_rdf_sch = -1;
314 static int hf_iq_net_type = -1;
315 static int hf_iq_op_id = -1;
316 static int hf_iq_serv_pro_id = -1;
317 static int hf_iq_country_code = -1;
318 static int hf_iq_net_id = -1;
319 static int hf_iq_net_aux_id = -1;
320 static int hf_iq_roam_part = -1;
321 static int hf_iq_cost = -1;
322 static int hf_iq_net_qos = -1;
323 static int hf_iq_net_dat_rt = -1;
324 static int hf_iq_net_reg_dom = -1;
325 static int hf_iq_freq_bands = -1;
326 static int hf_iq_ip_cfg_mthds = -1;
327 static int hf_iq_net_cap = -1;
328 static int hf_iq_supp_lcp = -1;
329 static int hf_iq_net_mob_mg = -1;
330 static int hf_iq_net_emserv = -1;
331 static int hf_iq_net_ims_pcscf = -1;
332 static int hf_iq_net_mob_net = -1;
333 static int hf_iq_link_addr = -1;
334 static int hf_iq_poa_loc = -1;
335 static int hf_iq_poa_chan_range = -1;
336 static int hf_iq_poa_sys_info = -1;
337 static int hf_iq_poa_sub_info = -1;
338 static int hf_iq_poa_ip = -1;
340 /*header fields for mob mgmt*/
341 static int hf_mob_list = -1;
342 static int hf_mob_mip4 = -1;
343 static int hf_mob_mip4_reg = -1;
344 static int hf_mob_mip6 = -1;
345 static int hf_mob_hmip6 = -1;
346 static int hf_mob_low_lat = -1;
347 static int hf_mob_fmip6 = -1;
348 static int hf_mob_ike_multi = -1;
350 /*header fields for configure methods*/
351 static int hf_cfg_mthds = -1;
352 static int hf_cfg_ip4_stat = -1;
353 static int hf_cfg_dhcp4 = -1;
354 static int hf_cfg_mip_fa = -1;
355 static int hf_cfg_mip_wo_fa = -1;
356 static int hf_cfg_ip6_sac = -1;
357 static int hf_cfg_dhcp6 = -1;
358 static int hf_cfg_ip6_manual = -1;
360 /*header fields for transport list*/
361 static int hf_trans_list = -1;
362 static int hf_trans_udp = -1;
363 static int hf_trans_tcp = -1;
365 /*header fields for device state requests and responses*/
366 static int hf_dev_states_req = -1;
367 static int hf_dev_states_req_dev_info = -1;
368 static int hf_dev_states_req_batt_lvl = -1;
369 static int hf_dev_states_resp = -1;
370 static int hf_dev_batt_level = -1;
371 static int hf_dev_info = -1;
373 /*header fields for Link Action Attributes*/
374 static int hf_link_ac_attr = -1;
375 static int hf_link_ac_attr_link_scan = -1;
376 static int hf_link_ac_attr_link_res_retain = -1;
377 static int hf_link_ac_attr_data_fwd_req = -1;
379 /*header fields for transport subtypes*/
380 static int hf_link_subtype_eth = -1;
381 static int hf_link_subtype_eth_10m = -1;
382 static int hf_link_subtype_eth_100m = -1;
383 static int hf_link_subtype_eth_1000m = -1;
384 static int hf_link_subtype_wireless_other = -1;
385 static int hf_link_subtype_wireless_other_dvb = -1;
386 static int hf_link_subtype_wireless_other_tdmb = -1;
387 static int hf_link_subtype_wireless_other_atsc = -1;
388 static int hf_link_subtype_ieee80211 = -1;
389 static int hf_link_subtype_ieee80211_24 = -1;
390 static int hf_link_subtype_ieee80211_5 = -1;
391 static int hf_link_subtype_ieee80211_49 = -1;
392 static int hf_link_subtype_ieee80211_365 = -1;
393 static int hf_link_subtype_ieee80211_316 = -1;
394 static int hf_link_subtype_umts = -1;
395 static int hf_link_subtype_umts_99 = -1;
396 static int hf_link_subtype_umts_4 = -1;
397 static int hf_link_subtype_umts_5 = -1;
398 static int hf_link_subtype_umts_6 = -1;
399 static int hf_link_subtype_umts_7 = -1;
400 static int hf_link_subtype_umts_8 = -1;
401 static int hf_link_subtype_cdma2000 = -1;
402 static int hf_link_subtype_cdma2000_0 = -1;
403 static int hf_link_subtype_cdma2000_a = -1;
404 static int hf_link_subtype_cdma2000_b = -1;
405 static int hf_link_subtype_cdma2000_c = -1;
406 static int hf_link_subtype_ieee80216 = -1;
407 static int hf_link_subtype_ieee80216_25 = -1;
408 static int hf_link_subtype_ieee80216_35 = -1;
410 /*header fields for MIH Capabilities*/
411 static int hf_mihcap = -1;
412 static int hf_mihcap_es = -1;
413 static int hf_mihcap_cs = -1;
414 static int hf_mihcap_is = -1;
416 /*header fields for High Level Network Capabilities*/
417 static int hf_net_caps = -1;
418 static int hf_net_caps_sec = -1;
419 static int hf_net_caps_qos0 = -1;
420 static int hf_net_caps_qos1 = -1;
421 static int hf_net_caps_qos2 = -1;
422 static int hf_net_caps_qos3 = -1;
423 static int hf_net_caps_qos4 = -1;
424 static int hf_net_caps_qos5 = -1;
425 static int hf_net_caps_ia = -1;
426 static int hf_net_caps_es = -1;
427 static int hf_net_caps_mihcap = -1;
429 /*trees and subtrees...*/
430 static gint ett_mih = -1;
431 static gint ett_ver_flags = -1;
432 static gint ett_mid = -1;
433 static gint ett_tlv = -1;
434 static gint ett_cmd_bitmap = -1;
435 static gint ett_event_bitmap = -1;
436 static gint ett_mob_mgt_bitmap = -1;
437 static gint ett_cfg_mtd_bitmap = -1;
438 static gint ett_iq_type_bitmap = -1;
439 static gint ett_trans_list_bitmap = -1;
440 static gint ett_dev_states_bitmap = -1;
441 static gint ett_mihcap_bitmap = -1;
442 static gint ett_net_caps_bitmap = -1;
443 static gint ett_ac_attr_bitmap = -1;
444 static gint ett_subtype_eth_bitmap = -1;
445 static gint ett_subtype_wireless_other_bitmap = -1;
446 static gint ett_subtype_ieee80211_bitmap = -1;
447 static gint ett_subtype_umts_bitmap = -1;
448 static gint ett_subtype_cdma2000_bitmap = -1;
449 static gint ett_subtype_ieee80216_bitmap = -1;
451 /*field definitions of evt, cmd, mob mgmt, ip cfg, iq type */
452 static const int *event_fields[] = {
453 &hf_event_link_detect,
454 &hf_event_link_up,
455 &hf_event_link_dn,
456 &hf_event_link_param,
457 &hf_event_link_gd,
458 &hf_event_ho_imm,
459 &hf_event_ho_comp,
460 &hf_event_pdu_tx_stat,
461 NULL
464 static const int *cmd_fields[] = {
465 &hf_cmd_event_subs,
466 &hf_cmd_event_unsub,
467 &hf_cmd_get_param,
468 &hf_cmd_con_thres,
469 &hf_cmd_link_action,
470 NULL
473 static const int *iq_type_fields[] = {
474 &hf_iq_bin_data,
475 &hf_iq_rdf_data,
476 &hf_iq_rdf_sch_url,
477 &hf_iq_rdf_sch,
478 &hf_iq_net_type,
479 &hf_iq_op_id,
480 &hf_iq_serv_pro_id,
481 &hf_iq_country_code,
482 &hf_iq_net_id,
483 &hf_iq_net_aux_id,
484 &hf_iq_roam_part,
485 &hf_iq_cost,
486 &hf_iq_net_qos,
487 &hf_iq_net_dat_rt,
488 &hf_iq_net_reg_dom,
489 &hf_iq_freq_bands,
490 &hf_iq_ip_cfg_mthds,
491 &hf_iq_net_cap,
492 &hf_iq_supp_lcp,
493 &hf_iq_net_mob_mg,
494 &hf_iq_net_emserv,
495 &hf_iq_net_ims_pcscf,
496 &hf_iq_net_mob_net,
497 &hf_iq_link_addr,
498 &hf_iq_poa_loc,
499 &hf_iq_poa_chan_range,
500 &hf_iq_poa_sys_info,
501 &hf_iq_poa_sub_info,
502 &hf_iq_poa_ip,
503 NULL
506 static const int *mob_fields[] = {
507 &hf_mob_mip4,
508 &hf_mob_mip4_reg,
509 &hf_mob_mip6,
510 &hf_mob_hmip6,
511 &hf_mob_low_lat,
512 &hf_mob_fmip6,
513 &hf_mob_ike_multi,
514 NULL
517 static const int *cfg_fields[] = {
518 &hf_cfg_ip4_stat,
519 &hf_cfg_dhcp4,
520 &hf_cfg_mip_fa,
521 &hf_cfg_mip_wo_fa,
522 &hf_cfg_ip6_sac,
523 &hf_cfg_dhcp6,
524 &hf_cfg_ip6_manual,
525 NULL
528 /*field definitions for various bitmaps */
529 static const int *trans_fields[] = {
530 &hf_trans_udp,
531 &hf_trans_tcp,
532 NULL
535 static const int *dev_states_fields[] = {
536 &hf_dev_states_req_dev_info,
537 &hf_dev_states_req_batt_lvl,
538 NULL
541 static const int *mihcap_fields[] = {
542 &hf_mihcap_es,
543 &hf_mihcap_cs,
544 &hf_mihcap_is,
545 NULL
548 static const int *net_caps_fields[] = {
549 &hf_net_caps_sec,
550 &hf_net_caps_qos0,
551 &hf_net_caps_qos1,
552 &hf_net_caps_qos2,
553 &hf_net_caps_qos3,
554 &hf_net_caps_qos4,
555 &hf_net_caps_qos5,
556 &hf_net_caps_ia,
557 &hf_net_caps_es,
558 &hf_net_caps_mihcap,
559 NULL
562 static const int *ac_attr_fields[] = {
563 &hf_link_ac_attr_link_scan,
564 &hf_link_ac_attr_link_res_retain,
565 &hf_link_ac_attr_data_fwd_req,
566 NULL
569 static const int *subtype_eth_fields[] = {
570 &hf_link_subtype_eth_10m,
571 &hf_link_subtype_eth_100m,
572 &hf_link_subtype_eth_1000m,
573 NULL
576 static const int *subtype_wireless_other_fields[] = {
577 &hf_link_subtype_wireless_other_dvb,
578 &hf_link_subtype_wireless_other_tdmb,
579 &hf_link_subtype_wireless_other_atsc,
580 NULL
583 static const int *subtype_ieee80211_fields[] = {
584 &hf_link_subtype_ieee80211_24,
585 &hf_link_subtype_ieee80211_5,
586 &hf_link_subtype_ieee80211_49,
587 &hf_link_subtype_ieee80211_365,
588 &hf_link_subtype_ieee80211_316,
589 NULL
592 static const int *subtype_umts_fields[] = {
593 &hf_link_subtype_umts_99,
594 &hf_link_subtype_umts_4,
595 &hf_link_subtype_umts_5,
596 &hf_link_subtype_umts_6,
597 &hf_link_subtype_umts_7,
598 &hf_link_subtype_umts_8,
599 NULL
602 static const int *subtype_cdma2000_fields[] = {
603 &hf_link_subtype_cdma2000_0,
604 &hf_link_subtype_cdma2000_a,
605 &hf_link_subtype_cdma2000_b,
606 &hf_link_subtype_cdma2000_c,
607 NULL
610 static const int *subtype_ieee80216_fields[] = {
611 &hf_link_subtype_ieee80216_25,
612 &hf_link_subtype_ieee80216_35,
613 NULL
616 static const value_string servicevalues[] = {
617 {1, "Service Management"},
618 {2, "Event Service"},
619 {3, "Command Service"},
620 {4, "Information Service"},
621 {0, NULL}
624 static const value_string opcodevalues[] = {
625 {0, "Confirm"},
626 {1, "Request"},
627 {2, "Response"},
628 {3, "Indication"},
629 {0, NULL},
632 static const value_string link_ac_result_vals[] = {
633 {0, "Success"},
634 {1, "Failure"},
635 {2, "Refused"},
636 {3, "Incapable"},
637 {0, NULL},
640 static const value_string serv_act_id_values[] = {
641 {1, "MIH_Capability_Discover"},
642 {2, "MIH_Register"},
643 {3, "MIH_DeRegister"},
644 {4, "MIH_Event_Subscribe"},
645 {5, "MIH_Event_Unsubscribe"},
646 {0, NULL}
649 static const value_string event_act_id_values[] = {
650 {1, "MIH_Link_Detected"},
651 {2, "MIH_Link_UP"},
652 {3, "MIH_Link_Down"},
653 {5, "MIH_Link_Parameter_Report"},
654 {6, "MIH_Link_Going_down"},
655 {7, "MIH_Link_Handover_Imminent"},
656 {8, "MIH_Handover_Complete"},
657 {0, NULL}
660 static const value_string status_types[] = {
661 {0, "Success"},
662 {1, "Unspecified Failure"},
663 {2, "Rejected"},
664 {3, "Authorization Failure"},
665 {4, "Network Error"},
666 {0, NULL}
669 static const value_string ho_status_vals[] = {
670 {0, "Handover Permitted"},
671 {1, "Handover Declined"},
672 {0, NULL}
675 static const value_string mbb_ho_supp_vals[] = {
676 {0, "Make before break is not supported."},
677 {1, "Make before break is supported."},
678 {0, NULL}
681 static const value_string reg_request_code_vals[] = {
682 {0, "Make"},
683 {1, "Re-Registration"},
684 {0, NULL}
687 static const value_string ip_renewal_vals[] = {
688 {0, "Change Not Requiered"},
689 {1, "Change Required"},
690 {0, NULL}
693 static const value_string dev_states_req_vals[] = {
694 {0, "DEVICE_INFO"},
695 {1, "BATT_LEVEL"},
696 {0, NULL}
699 static const value_string link_addr_types[] ={
700 {0, "MAC_ADDR"},
701 {1, "3GPP_3G_CELL_ID"},
702 {2, "3GPP_2G_CELL_ID"},
703 {3, "3GPP_ADDR"},
704 {4, "3GPP2_ADDR"},
705 {5, "OTHER_L2_ADDR"},
706 {0, NULL}
709 static const value_string threshold_x_dir_vals[] ={
710 {0, "Above Threshold"},
711 {1, "Below Threshold"},
712 {0, NULL}
715 static const value_string threshold_action_vals[] ={
716 {0, "Set Normal Threshold"},
717 {1, "Set one-shot Threshold"},
718 {2, "Cancel Threshold"},
719 {0, NULL}
722 static const value_string boolean_types[] ={
723 {0, "False"},
724 {1, "True"},
725 {0, NULL}
728 static const value_string command_act_id_values[] = {
729 {1, "MIH_Link_Get_Parameters"},
730 {2, "MIH_Link_Configure_Thresholds"},
731 {3, "MIH_Link_Actions"},
732 {4, "MIH_Net_HO_Candidate_Query"},
733 {5, "MIH_MN_HO_Candidate_Query"},
734 {6, "MIH_N2N_HO_Query_Resources"},
735 {7, "MIH_MN_HO_Commit"},
736 {8, "MIH_Net_HO-Commit"},
737 {9, "MN_N2N_HO_Commit"},
738 {10, "MIH_MN_HO_Complete"},
739 {11, "MIH_N2N_HO_Complete"},
740 {12, "MIH_Net_HO_Best_Commit"},
741 {0, NULL}
744 static const value_string info_act_id_values[] = {
745 {1, "MIH_Get_Information"},
746 {2, "MIH_Push_information"},
747 {0, NULL}
750 static const value_string link_dn_reason_vals[] = {
751 {0, "Explicit Disconnect"},
752 {1, "Packet Timeout"},
753 {2, "No resource"},
754 {3, "No broadcast"},
755 {4, "Authentication Failure"},
756 {5, "Billing Failure"},
757 {0, NULL}
760 static const value_string link_gdn_reason_vals[] = {
761 {0, "Explicit Disconnect"},
762 {1, "Link Parameter Degrading"},
763 {2, "Low Power"},
764 {3, "No resource"},
765 {0, NULL}
768 static const value_string link_type_vals[] = {
769 {0, "Reserved"},
770 {1, "Wireless - GSM"},
771 {2, "Wireless - GPRS"},
772 {3, "Wireless - EDGE"},
773 {15, "Ethernet"},
774 {18, "Wireless - Other"},
775 {19, "Wireless - IEEE 802.11"},
776 {22, "Wireless - CDMA2000"},
777 {23, "Wireless - UMTS"},
778 {24, "Wireless - cdma2000-HRPD"},
779 {27, "Wireless - IEEE 802.16"},
780 {28, "Wireless - IEEE 802.20"},
781 {29, "Wireless - IEEE 802.22"},
782 {40, "DVB"},
783 {41, "T-DMB"},
784 {42, "ATSC-M/H"},
785 {0, NULL}
788 static const value_string link_param_gen_vals[] = {
789 {0, "Data Rate"},
790 {1, "Signal Strength"},
791 {2, "SINR"},
792 {3, "Throughput"},
793 {4, "Packet Error Rate"},
794 {5, "Channel Frequency"},
795 {6, "Channel Bandwidth"},
796 {7, "Channel TX Power"},
797 {8, "Higher Adjacent Channel Frequency"},
798 {9, "Higher Adjacent Channel Bandwidth"},
799 {10, "Higher Adjacent Channel TX Power"},
800 {11, "Lower Adjacent Channel Frequency"},
801 {12, "Lower Adjacent Channel Bandwidth"},
802 {13, "Lower Adjacent Channel TX Power"},
803 {0, NULL}
806 static const value_string link_ac_type_vals[] = {
807 {0, "NONE"},
808 {1, "LINK_DISCONNECT"},
809 {2, "LINK_LOW_POWER"},
810 {3, "LINK_POWER_DOWN"},
811 {4, "LINK_POWER_UP"},
812 {5, "LINK_CONFIGURE"},
813 {0, NULL}
816 static const value_string link_param_gg_vals[] = {
817 {0, "Rx Qual"},
818 {1, "RsLev"},
819 {2, "Mean BEP"},
820 {3, "StDev BEP"},
821 {0, NULL}
824 static const value_string link_param_fdd_vals[] = {
825 {0, "CPICH RSCP"},
826 {1, "PCCPCH RSCP"},
827 {2, "UTRA carrier RSSI"},
828 {3, "GSM carrier RSSI"},
829 {4, "CPICH Ec/No"},
830 {5, "Transport channel BLER"},
831 {6, "User equipment (UE) transmitted power"},
832 {0, NULL}
835 static const value_string link_param_802_11_vals[] = {
836 {0, "RSSI"},
837 {1, "No QoS resource Available"},
838 {2, "Multiast packet loss rate"},
839 {0, NULL}
842 static const value_string op_mode_vals[] = {
843 {0, "Normal Mode"},
844 {1, "Power Saving Mode"},
845 {2, "Powered Down"},
846 {0, NULL}
849 static const value_string link_param_qos_vals[] = {
850 {0, "Max no of differentiable classes"},
851 {1, "Min Packet transfer delay"},
852 {2, "Avg packet ransfer delay"},
853 {3, "Max packet ransfer delay"},
854 {4, "delay jitter"},
855 {5, "Packet loss"},
856 {0, NULL}
859 static const value_string link_param_c2k_hrpd_vals[] = {
860 {0, "Pilot Strength"},
861 {0, NULL}
864 static const value_string typevaluenames[] = {
865 { 1, "Source MIHIF ID" },
866 { 2, "Destination MIHIF ID" },
867 { 3, "Status" },
868 { 4, "Link type" },
869 { 5, "MIH event list" },
870 { 6, "MIH command list" },
871 { 7, "MIIS query type list" },
872 { 8, "Transport option list" },
873 { 9, "Link address list" },
874 { 10, "MBB handover support" },
875 { 11, "Register request code" },
876 { 12, "Valid time interval" },
877 { 13, "Link identifier" },
878 { 14, "New Link identifier" },
879 { 15, "Old access router" },
880 { 16, "New access router" },
881 { 17, "IP renewal flag" },
882 { 18, "Mobility management support" },
883 { 19, "IP address configuration methods" },
884 { 20, "Link down reason code" },
885 { 21, "Time interval" },
886 { 22, "Link going down reason" },
887 { 23, "Link parameter report list" },
888 { 24, "Device states request" },
889 { 25, "Link identifier list" },
890 { 26, "Device states response list" },
891 { 27, "Get status request set" },
892 { 28, "Get status response list" },
893 { 29, "Configure request list" },
894 { 30, "Configure response list" },
895 { 31, "List of link PoA list" },
896 { 32, "Preferred link list" },
897 { 33, "Handover resource query list" },
898 { 34, "Handover status" },
899 { 35, "Access router address" },
900 { 36, "DHCP server address" },
901 { 37, "FA address" },
902 { 38, "Link actions list" },
903 { 39, "Link actions result list" },
904 { 40, "Handover result" },
905 { 41, "Resource status" },
906 { 42, "Resource retention status" },
907 { 43, "Info query binary data list" },
908 { 44, "Info query RDF data list" },
909 { 45, "Info query RDF schema URL" },
910 { 46, "Info query RDF schema list" },
911 { 47, "Max response size" },
912 { 48, "Info response binary data list" },
913 { 49, "Info response RDF data list" },
914 { 50, "Info response RDF schema URL list" },
915 { 51, "Info response RDF schema list" },
916 { 52, "Mobile node MIHF ID" },
917 { 53, "Query resource report flag" },
918 { 54, "Event configuration info list" },
919 { 55, "Target network info" },
920 { 56, "List of target network info" },
921 { 57, "Assigned resource set" },
922 { 58, "Link detected info list" },
923 { 59, "MN link ID" },
924 { 60, "PoA" },
925 { 61, "Unauthenticated information request" },
926 { 62, "Network type" },
927 { 63, "Requested resource set" },
928 {0, NULL}
931 static gint16 dissect_mih_list(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree, gint16 (*base_dissect)(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree))
933 guint8 i = 0;
934 guint8 list_len = tvb_get_guint8(tvb, offset);
935 offset ++;
936 for(i=0; i < list_len; i++)
937 offset = base_dissect(tvb, offset, tlv_tree);
938 return (offset);
941 static gint16 dissect_ip_addr(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
943 guint16 addr_type = tvb_get_ntohs(tvb, offset);
944 guint8 len = 0;
945 if(addr_type == 1 )
947 /*IPv4 Addr*/
948 len = tvb_get_guint8(tvb, offset + 3);
949 proto_tree_add_item(tlv_tree, hf_ipv4_addr, tvb, offset+2, len, ENC_BIG_ENDIAN);
950 return (offset+3+len);
952 if(addr_type == 2)
954 /*IPv6 Addr*/
955 len = tvb_get_guint8(tvb, offset + 3);
956 proto_tree_add_item(tlv_tree,hf_ipv6_addr, tvb, offset+2, len, ENC_BIG_ENDIAN);
957 return (offset+3+len);
959 else
961 len = tvb_get_guint8(tvb, offset + 3);
962 return (offset+3+len);
966 static gint16 dissect_qos_val(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
968 proto_tree_add_item(tlv_tree, hf_cos_id, tvb, offset, 1, ENC_BIG_ENDIAN);
969 offset++ ;
970 proto_tree_add_item(tlv_tree, hf_cos_value, tvb, offset, 2, ENC_BIG_ENDIAN);
971 offset += 2;
972 return (offset);
975 static gint16 dissect_link_addr(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree )
977 guint8 link_addr_choice = tvb_get_guint8(tvb, offset);
978 guint8 len = 0;
980 proto_tree_add_item(tlv_tree, hf_link_addr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
981 switch (link_addr_choice)
983 case 0 : /*MAC_ADDR*/
984 proto_tree_add_item(tlv_tree, hf_link_transport_addr_type, tvb, offset+1, 2, ENC_BIG_ENDIAN);
985 if(tvb_get_ntohs(tvb, offset+1) == 0x06)
986 proto_tree_add_item(tlv_tree, hf_mac_addr, tvb, offset+4, tvb_get_guint8(tvb, offset+3), ENC_NA);
987 return (offset + 10);
989 case 1 :/*3GPP_3G_CELL_ID*/
990 proto_tree_add_item(tlv_tree, hf_plmn_id, tvb, offset+1, 3, ENC_BIG_ENDIAN);
991 proto_tree_add_item(tlv_tree, hf_cell_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
992 return (offset + 8);
994 case 2 :/*3GPP_2G_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_location_area_id, tvb, offset+4, 2, ENC_BIG_ENDIAN);
997 proto_tree_add_item(tlv_tree, hf_ci, tvb, offset+6, 2, ENC_BIG_ENDIAN);
998 return (offset + 8);
1000 case 3 :/*3GPP_ADDR*/
1001 case 4 :/*3GPP2_ADDR*/
1002 case 5 :/*OTHER_L2_ADDR*/
1003 len = tvb_get_guint8(tvb, offset+1);
1004 proto_tree_add_item(tlv_tree, hf_link_addr_string, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1005 return (offset + 2 + len);
1007 return 0;
1010 static gint16 dissect_tsp_container(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1012 guint8 len = 0;
1013 if(tvb_get_guint8(tvb, offset) == 1)
1015 proto_tree_add_item(tlv_tree, hf_predef_cfg_id, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1016 return (offset + 2);
1018 else if(tvb_get_guint8(tvb, offset) == 2)
1020 len = tvb_get_guint8(tvb, offset+1);
1021 proto_tree_add_item(tlv_tree, hf_tsp_carrier, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1022 return (offset + len + 2);
1024 else
1025 return (offset + 1);
1028 static gint16 dissect_iq_rdf_data(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1030 guint8 len = 0;
1031 if(tvb_get_guint8(tvb, offset))
1033 len = tvb_get_guint8(tvb, offset+1);
1034 proto_tree_add_item(tlv_tree, hf_rdf_mime_type, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1035 offset += len + 1;
1037 offset++;
1038 len = tvb_get_guint8(tvb, offset);
1039 proto_tree_add_item(tlv_tree, hf_rdf_data, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1040 return (offset+len+1);
1043 static gint16 dissect_qos_list(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1045 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1046 offset += 1;
1047 proto_tree_add_text(tlv_tree, tvb, offset, 1, "MIN_PK_TX_DELAY- ");
1048 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_qos_val);
1049 proto_tree_add_text(tlv_tree, tvb, offset, 1, "AVG_PK_TX_DELAY- ");
1050 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_qos_val);
1051 proto_tree_add_text(tlv_tree, tvb, offset, 1, "MAX_PK_TX_DELAY- ");
1052 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_qos_val);
1053 proto_tree_add_text(tlv_tree, tvb, offset, 1, "PK_DELAY_JITTER - ");
1054 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_qos_val);
1055 proto_tree_add_text(tlv_tree, tvb, offset, 1, "PK_LOSS_RATE- ");
1056 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_qos_val);
1057 return (offset);
1060 static gint16 dissect_dev_states(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1062 guint8 len = 0;
1063 proto_tree *sub_tree = NULL;
1065 sub_tree = proto_tree_add_item(tlv_tree, hf_dev_states_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
1066 if(tvb_get_guint8(tvb, offset))
1068 /*BATT_LEVEL*/
1069 offset++;
1070 proto_tree_add_item(sub_tree, hf_dev_batt_level, tvb, offset, 1, ENC_BIG_ENDIAN);
1071 return (offset+1);
1073 else
1075 /*DEVICE INFO*/
1076 offset++;
1077 len = tvb_get_guint8(tvb, offset);
1078 proto_tree_add_item(sub_tree, hf_dev_info, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1079 return (offset + len + 1);
1084 static gint16 dissect_net_type(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1086 guint8 len = 0;
1087 guint8 type = 0;
1088 if(!tvb_get_guint8(tvb, offset))
1090 /*LINK_TYPE*/
1091 type = tvb_get_guint8(tvb, offset+1);
1092 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1093 offset += 1;
1095 offset += 1;
1096 if(!tvb_get_guint8(tvb, offset))
1098 /*LINK_SUBTYPE*/
1099 switch (type)
1101 /* last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1102 Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits
1103 1 (identifier) + 4(bitmask defined values) + 4 (unused bits) = 9 (final offset)*/
1104 case 15 : /*subtype ethernet*/
1105 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_eth, ett_subtype_eth_bitmap, subtype_eth_fields, ENC_BIG_ENDIAN);
1106 break;
1107 case 18 : /*subtype wireless other*/
1108 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);
1109 break;
1110 case 19 : /*subtype 802.11*/
1111 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80211, ett_subtype_ieee80211_bitmap, subtype_ieee80211_fields, ENC_BIG_ENDIAN);
1112 break;
1113 case 23 : /*subtype UMTS*/
1114 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_umts, ett_subtype_umts_bitmap, subtype_umts_fields, ENC_BIG_ENDIAN);
1115 break;
1116 case 24 : /*subtype cdma2000*/
1117 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_cdma2000, ett_subtype_cdma2000_bitmap, subtype_cdma2000_fields, ENC_BIG_ENDIAN);
1118 break;
1119 case 27 : /*subtype 802.16*/
1120 proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80216, ett_subtype_ieee80216_bitmap, subtype_ieee80216_fields, ENC_BIG_ENDIAN);
1121 break;
1122 default :
1123 proto_item_append_text(tlv_tree, "N/A");
1125 /*4(bitmask defined values) + 4 (unused bits) = 8 bits*/
1126 offset += 8;
1128 /*1 (identifier) = 1 bit*/
1129 offset += 1;
1130 if(!tvb_get_guint8(tvb, offset))
1132 /*TYPE_EXT*/
1133 len = tvb_get_guint8(tvb, offset+1);
1134 proto_tree_add_item(tlv_tree, hf_link_type_ext, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1135 offset += len + 2;
1137 return (offset);
1140 static gint16 dissect_net_type_addr(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1142 offset = dissect_net_type(tvb, offset, tlv_tree);
1143 offset = dissect_link_addr(tvb, offset, tlv_tree);
1144 return (offset) ;
1147 static gint16 dissect_mbb_ho_supp(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1149 offset = dissect_net_type(tvb, offset, tlv_tree);
1150 offset = dissect_net_type(tvb, offset, tlv_tree);
1151 proto_tree_add_item(tlv_tree, hf_mbb_ho_supp, tvb, offset, 1, ENC_BIG_ENDIAN);
1152 offset++;
1153 return (offset);
1156 static gint16 dissect_tgt_net_info(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1158 guint8 len = 0;
1159 if(!tvb_get_guint8(tvb, offset))
1161 offset +=1;
1163 /*NETWORK_ID*/
1164 len = tvb_get_guint8(tvb, offset);
1165 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1166 offset += len + 2;
1167 if(!tvb_get_guint8(tvb, offset))
1169 /*NET_AUX_ID*/
1170 offset +=1;
1171 len = tvb_get_guint8(tvb, offset);
1172 proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1173 return (offset + 1);
1175 return (offset + 2);
1177 else
1179 /*LINK_ADDR*/
1180 offset +=1;
1181 offset = dissect_link_addr(tvb, offset, tlv_tree);
1182 return (offset);
1186 static gint16 dissect_link_id(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1189 gint16 next_offset = 0;
1191 /*LINK_TYPE*/
1192 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1193 next_offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1194 return (next_offset);
1197 static gint16 dissect_link_poa(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1199 offset = dissect_link_id(tvb, offset, tlv_tree);
1200 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_addr);
1201 return (offset);
1204 static gint16 dissect_rq_result(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1206 proto_tree *temp = NULL;
1207 temp = proto_tree_add_text(tlv_tree, tvb, offset, 1, "List of preffered links:");
1208 offset = dissect_link_poa(tvb, offset, temp);
1209 offset = dissect_qos_list(tvb, offset, tlv_tree);
1210 offset++;
1211 switch(tvb_get_guint8(tvb, offset-1))
1213 case 1: proto_tree_add_text(tlv_tree, tvb, offset, 1, "IP methods supported: ");
1214 proto_tree_add_item(tlv_tree, hf_boolean, tvb, offset, 1, ENC_BIG_ENDIAN);
1215 offset++;
1216 break;
1217 case 2: temp = proto_tree_add_text(tlv_tree, tvb, offset, 2, "ip configuration methods- ");
1218 proto_tree_add_bitmask(temp, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1219 offset += 2;
1220 break;
1222 offset++;
1223 switch(tvb_get_guint8(tvb, offset-1))
1225 case 1: proto_tree_add_text(tlv_tree, tvb, offset, 1, "IP DHCP services: ");
1226 proto_tree_add_item(tlv_tree, hf_boolean, tvb, offset, 1, ENC_BIG_ENDIAN);
1227 offset++;
1228 break;
1229 case 2: proto_tree_add_text(tlv_tree, tvb, offset, 1, "IP DHCP server: ");
1230 offset = dissect_ip_addr(tvb, offset, tlv_tree);
1231 break;
1233 offset++;
1234 switch(tvb_get_guint8(tvb, offset-1))
1236 case 1: proto_tree_add_text(tlv_tree, tvb, offset, 1, "FN Agent ");
1237 proto_tree_add_item(tlv_tree, hf_boolean, tvb, offset, 1, ENC_BIG_ENDIAN);
1238 offset++;
1239 break;
1240 case 2: proto_tree_add_text(tlv_tree, tvb, offset, 1, "FN Agent: ");
1241 offset = dissect_ip_addr(tvb, offset, tlv_tree);
1242 break;
1244 offset++;
1245 switch(tvb_get_guint8(tvb, offset-1))
1247 case 1: proto_tree_add_text(tlv_tree, tvb, offset, 1, "Access Router ");
1248 proto_tree_add_item(tlv_tree, hf_boolean, tvb, offset, 1, ENC_BIG_ENDIAN);
1249 offset++;
1250 break;
1251 case 2: proto_tree_add_text(tlv_tree, tvb, offset, 1, "Access Router: ");
1252 offset = dissect_ip_addr(tvb, offset, tlv_tree);
1253 break;
1255 return (offset+1);
1258 static gint16 dissect_link_det_info(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1260 guint8 len = 0;
1261 offset = dissect_link_id(tvb, offset, tlv_tree);
1262 if(tvb_get_guint8(tvb, offset))
1264 offset++;
1265 offset = dissect_link_addr(tvb, offset, tlv_tree);
1266 offset --;
1268 offset++;
1269 len = tvb_get_guint8(tvb, offset);
1270 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1271 offset += len + 1;
1272 len = tvb_get_guint8(tvb, offset);
1273 proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1274 offset += len + 1;
1275 if(tvb_get_guint8(tvb, offset))
1276 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1277 else
1278 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1279 offset += 2;
1280 proto_tree_add_item(tlv_tree, hf_sinr, tvb, offset, 2, ENC_BIG_ENDIAN);
1281 offset += 2;
1282 proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset,4, ENC_BIG_ENDIAN);
1283 offset += 4;
1284 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mihcap, ett_mihcap_bitmap, mihcap_fields, ENC_BIG_ENDIAN);
1285 offset++;
1286 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_net_caps, ett_net_caps_bitmap, net_caps_fields, ENC_BIG_ENDIAN);
1287 offset += 4;
1288 return (offset);
1291 static gint16 dissect_link_scan_rsp(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1293 guint8 len = 0;
1294 offset = dissect_link_addr(tvb, offset, tlv_tree);
1295 len = tvb_get_guint8(tvb, offset);
1296 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII|ENC_NA);
1297 offset = offset + len + 1;
1298 if(tvb_get_guint8(tvb, offset))
1299 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1300 else
1301 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1302 return offset+2;
1305 static gint16 dissect_link_action_rsp(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1307 offset = dissect_link_id(tvb, offset, tlv_tree);
1308 proto_tree_add_item(tlv_tree, hf_link_ac_result, tvb, offset, 1, ENC_BIG_ENDIAN);
1309 offset++;
1310 if(tvb_get_guint8(tvb, offset))
1312 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_link_scan_rsp);
1313 return offset;
1315 else
1316 return (offset+1);
1320 static gint16 dissect_link_action_req(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1322 offset = dissect_link_id(tvb, offset, tlv_tree);
1323 if(tvb_get_guint8(tvb, offset))
1325 offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1327 else
1329 offset++;
1331 proto_tree_add_item(tlv_tree, hf_link_ac_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1332 offset++;
1333 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_link_ac_attr, ett_ac_attr_bitmap, ac_attr_fields, ENC_BIG_ENDIAN);
1334 offset++;
1335 proto_tree_add_item(tlv_tree, hf_link_ac_ext_time, tvb, offset, 2, ENC_BIG_ENDIAN);
1336 return (offset+2);
1339 static gint16 dissect_link_states_rsp(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1341 if(!tvb_get_guint8(tvb, offset))
1343 proto_tree_add_item(tlv_tree, hf_op_mode, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1344 offset += 2;
1346 else
1348 proto_tree_add_item(tlv_tree, hf_channel_id, tvb, offset+1, 2, ENC_BIG_ENDIAN);
1349 offset += 3;
1351 return (offset);
1354 static gint16 dissect_link_param_type(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1356 guint8 type = tvb_get_guint8(tvb, offset);
1357 offset++;
1359 /*LINK_PARAM_TYPE*/
1360 switch (type)
1362 case 0 :/*LINK_PARAM_GEN*/
1363 proto_tree_add_item(tlv_tree, hf_link_param_gen, tvb, offset, 1, ENC_BIG_ENDIAN);
1364 break;
1366 case 1 :/*LINK_PARAM_QOS*/
1367 proto_tree_add_item(tlv_tree, hf_link_param_qos, tvb, offset, 1, ENC_BIG_ENDIAN);
1368 break;
1370 case 2 :/*LINK_PARAM_GG*/
1371 proto_tree_add_item(tlv_tree, hf_link_param_gg, tvb, offset, 1, ENC_BIG_ENDIAN);
1372 break;
1374 case 3 :/*LINK_PARAM_EDGE*/
1375 proto_tree_add_item(tlv_tree, hf_link_param_edge, tvb, offset, 1, ENC_BIG_ENDIAN);
1376 break;
1378 case 4 :/*LINK_PARAM_ETH*/
1379 proto_tree_add_item(tlv_tree, hf_link_param_eth, tvb, offset, 1, ENC_BIG_ENDIAN);
1380 break;
1382 case 5 :/*LINK_PARAM_802_11*/
1383 proto_tree_add_item(tlv_tree, hf_link_param_802_11, tvb, offset, 1, ENC_BIG_ENDIAN);
1384 break;
1386 case 6 :/*LINK_PARAM_C2K*/
1387 proto_tree_add_item(tlv_tree, hf_link_param_c2k, tvb, offset, 1, ENC_BIG_ENDIAN);
1388 break;
1390 case 7 :/*LINK_PARAM_FDD*/
1391 proto_tree_add_item(tlv_tree, hf_link_param_fdd, tvb, offset, 1, ENC_BIG_ENDIAN);
1392 break;
1394 case 8 :/*LINK_PARAM_HRPD*/
1395 proto_tree_add_item(tlv_tree, hf_link_param_hrpd, tvb, offset, 1, ENC_BIG_ENDIAN);
1396 break;
1398 case 9 :/*LINK_PARAM_802_16*/
1399 proto_tree_add_item(tlv_tree, hf_link_param_802_16, tvb, offset, 1, ENC_BIG_ENDIAN);
1400 break;
1402 case 10 :/*LINK_PARAM_802_20*/
1403 proto_tree_add_item(tlv_tree, hf_link_param_802_20, tvb, offset, 1, ENC_BIG_ENDIAN);
1404 break;
1406 case 11 :/*LINK_PARAM_802_22*/
1407 proto_tree_add_item(tlv_tree, hf_link_param_802_22, tvb, offset, 1, ENC_BIG_ENDIAN);
1408 break;
1410 return (offset+1);
1413 static void dissect_link_status_req(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1415 proto_tree *tree_temp;
1417 /*LINK_STATES_REQ*/
1418 guint16 temp = tvb_get_ntohs(tvb, offset);
1419 if(!temp)
1421 tree_temp = proto_tree_add_text(tlv_tree, tvb, offset, 3, "LINK_STATES_REQ: ");
1422 proto_tree_add_item(tree_temp, hf_op_mode, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1423 offset+=3;
1425 else
1427 tree_temp = proto_tree_add_text(tlv_tree, tvb, offset, 4, "LINK_STATES_REQ: ");
1428 proto_tree_add_item(tree_temp, hf_channel_id, tvb, offset+2, 2, ENC_BIG_ENDIAN);
1429 offset+=4;
1432 /*LINK_PARAM_TYPE_LIST*/
1433 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_type);
1435 /*LINK_DESC_REQ*/
1436 temp = tvb_get_ntohs(tvb, offset);
1437 tree_temp = proto_tree_add_text(tlv_tree, tvb, offset, 3, "LINK_DESC_REQ: ");
1438 offset+=2;
1439 if(!temp)
1440 proto_tree_add_item(tree_temp, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1441 else
1442 proto_tree_add_item(tree_temp, hf_num_queue, tvb, offset, 1, ENC_BIG_ENDIAN);
1443 return ;
1446 static gint16 dissect_link_cfg_status(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1448 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1449 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1450 offset += 2;
1451 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1452 offset ++;
1453 proto_tree_add_item(tlv_tree, hf_config_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1454 return (offset+1);
1457 static gint16 dissect_link_param(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1459 /*LINK_PARAM_TYPE*/
1460 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1461 if(!tvb_get_guint8(tvb, offset))
1463 offset ++;
1464 /*LINK_PARAM_VALUE*/
1465 proto_tree_add_item(tlv_tree, hf_link_param_value, tvb, offset, 2, ENC_BIG_ENDIAN);
1466 offset += 2;
1468 else
1470 offset ++;
1471 /*QOS_PARAM_VALUE*/
1472 switch(tvb_get_guint8(tvb, offset))
1474 case 0:
1475 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1476 offset += 2;
1477 break;
1478 case 1:
1479 proto_tree_add_text(tlv_tree, tvb, offset+1, 1, "MIN_PK_TX_DELAY- ");
1480 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_qos_val);
1481 break;
1482 case 2:
1483 proto_tree_add_text(tlv_tree, tvb, offset+1, 1, "AVG_PK_TX_DELAY- ");
1484 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_qos_val);
1485 break;
1486 case 3:
1487 proto_tree_add_text(tlv_tree, tvb, offset+1, 1, "MAX_PK_TX_DELAY- ");
1488 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_qos_val);
1489 break;
1490 case 4:
1491 proto_tree_add_text(tlv_tree, tvb, offset+1, 1, "PK_DELAY_JITTER - ");
1492 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_qos_val);
1493 break;
1494 case 5:
1495 proto_tree_add_text(tlv_tree, tvb, offset+1, 1, "PK_LOSS_RATE- ");
1496 offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_qos_val);
1497 break;
1500 return offset;
1503 static gint16 dissect_link_param_rpt(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1505 /*LINK_PARAM*/
1506 offset = dissect_link_param(tvb, offset, tlv_tree);
1507 if(tvb_get_guint8(tvb, offset))
1509 /*Threshold*/
1510 offset++;
1511 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1512 offset += 2;
1513 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1514 return (offset+1);
1516 else
1517 return (offset+1);
1520 static gint16 dissect_link_desc_rsp(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1522 if(!tvb_get_guint8(tvb, offset))
1523 proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1524 else
1525 proto_tree_add_item(tlv_tree, hf_num_queue, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1526 return (offset+2);
1529 static gint16 dissect_status_list(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1531 /*LINK_ID*/
1532 offset = dissect_link_id(tvb, offset, tlv_tree);
1534 /*LINK_STATES_RSP*/
1535 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_states_rsp);
1537 /*LINK_PARAM*/
1538 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param);
1540 /*LINK_DESC_RSP*/
1541 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_desc_rsp);
1542 return offset;
1545 static gint16 dissect_link_det_cfg(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1547 guint8 len = 0;
1548 if(tvb_get_guint8(tvb, offset))
1550 len = tvb_get_guint8(tvb, offset+1);
1551 proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1552 offset += len + 1;
1554 offset++;
1555 if(tvb_get_guint8(tvb, offset))
1557 if(tvb_get_guint8(tvb, offset+1))
1558 proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1559 else
1560 proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1561 offset += 2;
1563 offset++;
1564 if(tvb_get_guint8(tvb, offset))
1566 proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset+1,4, ENC_BIG_ENDIAN);
1567 offset += 4;
1569 return (offset+1);
1572 static gint16 dissect_link_cfg_param(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1574 offset = dissect_link_param_type(tvb, offset, tlv_tree);
1575 if(tvb_get_guint8(tvb, offset))
1577 proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1578 offset += 2;
1580 offset++;
1581 proto_tree_add_item(tlv_tree, hf_threshold_action, tvb, offset, 1, ENC_BIG_ENDIAN);
1582 offset++;
1583 proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1584 offset += 2;
1585 proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1586 return (offset+1) ;
1589 static gint16 dissect_mih_evt_cfg_info(tvbuff_t *tvb, gint16 offset, proto_tree *tlv_tree)
1591 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_cfg);
1592 offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1593 return offset;
1596 static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, guint8 type, guint32 length)
1599 guint8 mihf_id_len = 0;
1600 char mihf_id_first_char = 0;
1601 guint8 i = 0;
1602 guint8 len = 0;
1604 tvbuff_t *volatile tvb_mihf_id = NULL;
1605 tvbuff_t* tvb_temp = NULL;
1606 volatile gboolean composite_error = FALSE;
1608 /*For Value fields*/
1609 switch (type)
1611 case SRC_MIHF_ID :
1612 case DEST_MIHF_ID :
1613 case MN_MIHF_ID :
1614 /*MIHF ID*/
1615 mihf_id_len = tvb_get_guint8(tvb, offset);
1616 /*taken from the 802.21 standard:
1617 If L2 communication is used then MIHF_ID is the NAI-encoded linklayer
1618 address (LINK_ADDR) of the entity that hosts the MIH services.
1619 In an NAI-encoded IP address or link-layer address, each octet
1620 of binary-encoded IP4_ADDR, IP6_ADDR and LINK_ADDR data is
1621 encoded in the username part of the NAI as "\" followed by the octet
1622 value.*/
1623 mihf_id_first_char = (char)tvb_get_guint8(tvb, offset+1);
1624 if(mihf_id_first_char!='\\')
1625 proto_tree_add_item(tlv_tree, hf_mihf_id, tvb, offset+1, mihf_id_len, ENC_ASCII|ENC_NA);
1626 else
1628 if(mihf_id_len<tvb_length_remaining(tvb,0) && (mihf_id_len==12 || mihf_id_len==64 || mihf_id_len==128))
1630 tvb_mihf_id = tvb_new_composite();
1631 for(i=0; i < mihf_id_len/2; i++)
1633 tvb_temp = tvb_new_subset(tvb, offset + 2 + 2*i, 1 , 1);
1634 tvb_composite_append(tvb_mihf_id, tvb_temp);
1638 tvb_composite_finalize(tvb_mihf_id);
1640 CATCH_ALL
1642 composite_error = TRUE;
1644 ENDTRY;
1646 if(!composite_error)
1648 switch(mihf_id_len)
1650 case 12: /* checks if the length corresponds to a MAC address */
1651 proto_tree_add_item(tlv_tree, hf_mihf_id_mac, tvb_mihf_id, 0, mihf_id_len/2, ENC_BIG_ENDIAN);
1652 break;
1653 case 64: /* checks if the length corresponds to an IPv4 address */
1654 proto_tree_add_item(tlv_tree, hf_mihf_id_ipv4, tvb_mihf_id, 0, mihf_id_len/2, ENC_BIG_ENDIAN);
1655 break;
1656 case 128: /* checks if the length corresponds to an IPv6 address */
1657 proto_tree_add_item(tlv_tree, hf_mihf_id_ipv6, tvb_mihf_id, 0, mihf_id_len/2, ENC_BIG_ENDIAN);
1658 break;
1661 else
1662 tvb_free(tvb_mihf_id);
1665 break;
1667 case STATUS :
1668 /*STATUS*/
1669 proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1670 break;
1672 case LINK_TYPE :
1673 /*LINK_TYPE*/
1674 proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1675 break;
1677 case MIH_EVT_LIST :
1678 /*MIH_EVT_LIST*/
1679 proto_tree_add_bitmask(tlv_tree/*evt_list_tree*/, tvb, offset, hf_event_list, ett_event_bitmap, event_fields, ENC_BIG_ENDIAN);
1680 break;
1682 case MIH_CMD_LIST :
1683 /*MIH_CMD_LSIT*/
1684 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cmd_list, ett_cmd_bitmap, cmd_fields, ENC_BIG_ENDIAN);
1685 break;
1687 case MIH_IQ_TYPE_LIST :
1688 /*MIH_IQ_TYPE_LIST*/
1689 /*last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1690 Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits*/
1691 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_iq_list, ett_iq_type_bitmap, iq_type_fields, ENC_BIG_ENDIAN);
1692 break;
1694 case MIH_TRANS_LIST :
1695 /*MIH_TRANS_LIST*/
1696 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_trans_list, ett_trans_list_bitmap, trans_fields, ENC_BIG_ENDIAN);
1697 break;
1699 case LINK_ADDR_LIST :
1700 /*NET_TYPE_ADDR_LIST*/
1701 dissect_mih_list(tvb, offset, tlv_tree, dissect_net_type_addr);
1702 break;
1704 case MBB_HO_SUPP_LIST :
1705 /*MBB_HO_SUPP_LIST*/
1706 dissect_mih_list(tvb, offset, tlv_tree, dissect_mbb_ho_supp);
1707 break;
1709 case REG_REQUEST_CODE :
1710 /*REG_REQUEST_CODE*/
1711 proto_tree_add_item(tlv_tree, hf_reg_request_code, tvb, offset, 1, ENC_BIG_ENDIAN);
1712 break;
1714 case VALID_TIME_INTR :
1715 /*Valid Time interval*/
1716 proto_tree_add_item(tlv_tree, hf_valid_time_interval, tvb, offset, 4, ENC_BIG_ENDIAN);
1717 break;
1719 case LINK_ID :
1720 case NEW_LINK_ID :
1721 case MN_LINK_ID :
1722 /*Link identifier*/
1723 dissect_link_id(tvb, offset, tlv_tree);
1724 break;
1726 case OLD_ACCESS_ROUTER :
1727 case NEW_ACCESS_ROUTER :
1728 case POA_LINK_ADDR :
1729 /*LINK ADDR*/
1730 dissect_link_addr(tvb, offset, tlv_tree);
1731 break;
1733 case IP_RENEWAL_FLAG :
1734 /*IP_RENEWAL_FLAG*/
1735 proto_tree_add_item(tlv_tree, hf_ip_renewal, tvb, offset, 1, ENC_BIG_ENDIAN);
1736 break;
1738 case IP_MOB_MGMT :
1739 /*IP_MOB_MGMT*/
1740 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mob_list, ett_mob_mgt_bitmap, mob_fields, ENC_BIG_ENDIAN);
1741 break;
1743 case IP_CFG_MTHDS :
1744 /*IP_CFG_MTHDS*/
1745 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1746 break;
1748 case LINK_DN_REASON :
1749 /*LINK_DN_REASON*/
1750 proto_tree_add_item(tlv_tree, hf_link_dn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1751 break;
1753 case TIMER_INTERVAL :
1754 /*Time interval*/
1755 proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1756 break;
1758 case LINK_GOING_DN_REASON :
1759 /*LINK_GOING_DN REASON*/
1760 proto_tree_add_item(tlv_tree, hf_link_gdn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1761 break;
1763 case LINK_PARAM_RPT_LIST :
1764 /*LINK_PARAM_RPT_LIST*/
1765 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_rpt);
1766 break;
1768 case DEV_STATES_REQ :
1769 /*DEV_STATES_REQ*/
1770 proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_dev_states_req, ett_dev_states_bitmap, dev_states_fields, ENC_BIG_ENDIAN);
1771 break;
1773 case LINK_ID_LIST :
1774 /*LINK ID List*/
1775 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_id);
1776 break;
1778 case DEV_STATES_RSP_LIST :
1779 /*DEV_STATES_RSP List*/
1780 dissect_mih_list(tvb, offset, tlv_tree, dissect_dev_states);
1781 break;
1783 case STATUS_REQ_SET :
1784 /*LINK_STATUS_REQ*/
1785 dissect_link_status_req(tvb, offset, tlv_tree);
1786 break;
1788 case STATUS_RSP_LIST :
1789 /*Status Response List*/
1790 dissect_mih_list(tvb, offset, tlv_tree, dissect_status_list);
1791 break;
1793 case CFG_REQ_LIST :
1794 /*LINK_CFG_PARAM_LIST*/
1795 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1796 break;
1798 case CFG_RSP_LIST :
1799 /*LINK_CFG_STATUS_LIST*/
1800 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_status);
1801 break;
1803 case LINK_POA_LIST :
1804 /*LINK_POA_LIST*/
1805 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_poa);
1806 break;
1808 case PREF_LINK_LIST :
1809 /*RQ_RESULT*/
1810 dissect_mih_list(tvb, offset, tlv_tree, dissect_rq_result);
1811 break;
1813 case HO_REQ_QUERY_LIST :
1814 /*QoS_LIST*/
1815 dissect_qos_list(tvb, offset, tlv_tree);
1816 break;
1818 case HO_STATUS:
1819 /*HO_STATUS*/
1820 proto_tree_add_item(tlv_tree, hf_ho_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1821 break;
1823 case ACCESS_ROUTER_ADDR :
1824 case DHCP_SER_ADDR :
1825 case FA_ADDR :
1826 /*IP_ADDR*/
1827 dissect_ip_addr(tvb, offset, tlv_tree);
1828 break;
1830 case LINK_ACTION_REQ_LIST :
1831 /*LINK_ACTION_REQ LIST*/
1832 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_req);
1833 break;
1835 case LINK_ACTION_RSP_LIST :
1836 /*LINK_ACTION_RSP LIST*/
1837 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_rsp);
1838 break;
1840 case HO_RESULT :
1841 /*HO_RESULT*/
1842 proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1843 break;
1845 case LINK_RES_STATUS :
1846 /*LINK_RES_STATUS*/
1847 proto_tree_add_item(tlv_tree, hf_link_res_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1848 break;
1850 case RES_RETENTION_STATUS :
1851 /*BOOLEAN*/
1852 proto_tree_add_item(tlv_tree, hf_res_retention_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1853 break;
1855 case IQ_RDF_SCHEMA_URL :
1856 /*BOOLEAN*/
1857 proto_tree_add_item(tlv_tree, hf_iq_rdf_sch_url, tvb, offset, 1, ENC_BIG_ENDIAN);
1858 break;
1860 case Q_RES_RPT_FLAG :
1861 /*BOOLEAN*/
1862 proto_tree_add_item(tlv_tree, hf_res_rpt_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
1863 break;
1865 case UNAUTH_INFO_REQ :
1866 /*BOOLEAN*/
1867 proto_tree_add_item(tlv_tree, hf_unauth_info_req, tvb, offset, 1, ENC_BIG_ENDIAN);
1868 break;
1870 case IQ_BIN_DATA_LIST :
1871 /*IQ_BIN_DATA LIST*/
1872 proto_tree_add_item(tlv_tree, hf_iq_bin_data_x, tvb, offset, length, ENC_ASCII|ENC_NA);
1873 break;
1875 case IQ_RDF_DATA_LIST :
1876 case IR_RDF_DATA_LIST :
1877 case IR_RDF_SCHM_LIST :
1878 /*IQ_RDF_DATA LIST*/
1879 dissect_mih_list(tvb, offset, tlv_tree, dissect_iq_rdf_data);
1880 break;
1882 case IQ_RDF_SCHM_LIST :
1883 /*IQ_RDF_SCHM*/
1884 for(i=0; i < tvb_get_guint8(tvb, offset); i++)
1886 len = tvb_get_guint8(tvb, offset+1);
1887 proto_tree_add_item(tlv_tree, hf_rdf_sch, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1888 offset += len;
1890 break;
1892 case MAX_RSP_SIZE :
1893 /*Max Response Size*/
1894 proto_tree_add_item(tlv_tree, hf_max_resp_size, tvb, offset, 2, ENC_BIG_ENDIAN);
1895 break;
1897 case IR_BIN_DATA_LIST :
1898 /*IR_BIN_DATA LIST*/
1899 proto_tree_add_item(tlv_tree, hf_ir_bin_data, tvb, offset, length, ENC_ASCII|ENC_NA);
1900 break;
1902 case IR_SCHM_URL_LIST :
1903 /*IR_SCHM_URL*/
1904 for(i=0; i < tvb_get_guint8(tvb, offset); i++)
1906 len = tvb_get_guint8(tvb, offset+1);
1907 proto_tree_add_item(tlv_tree, hf_rdf_sch_url, tvb, offset+2, len, ENC_ASCII|ENC_NA);
1908 offset += len;
1910 break;
1912 case EVT_CFG_INFO_LIST :
1913 /*EVT_CFG_INFO LIST*/
1914 dissect_mih_list(tvb, offset, tlv_tree, dissect_mih_evt_cfg_info);
1915 break;
1917 case TGT_NET_INFO :
1918 /*TGT_NET_INFO*/
1919 dissect_tgt_net_info(tvb, offset, tlv_tree);
1920 break;
1922 case TGT_NET_INFO_LIST :
1923 /*List of TGT_NET_INFO*/
1924 dissect_mih_list(tvb, offset, tlv_tree, dissect_tgt_net_info);
1925 break;
1927 case ASGN_RES_SET :
1928 /*ASGN_RES_SET*/
1929 offset = dissect_qos_list(tvb, offset, tlv_tree);
1930 dissect_tsp_container(tvb, offset, tlv_tree);
1931 break;
1933 case LINK_DET_INFO_LIST :
1934 /*LINK_DET_INFO LIST*/
1935 dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_info);
1936 break;
1938 case NET_TYPE :
1939 /*NETWORK TYPE*/
1940 dissect_net_type(tvb, offset, tlv_tree);
1941 break;
1943 case REQ_RES_SET :
1944 /*REQ_RES_SET*/
1945 offset = dissect_qos_list(tvb, offset, tlv_tree);
1946 offset = dissect_tsp_container(tvb, offset, tlv_tree);
1947 proto_tree_add_item(tlv_tree, hf_ho_reason, tvb, offset, 1, ENC_BIG_ENDIAN );
1948 break;
1950 case VEND_SPECIFIC_TLV :
1951 /*Vendor specific tlv*/
1952 proto_tree_add_text(tlv_tree, tvb, offset, length, "Vendor Specific TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
1953 break;
1955 default :/*did not match type*/
1956 /*do switch case for range of numbers*/
1958 /*RESERVED TLVs*/
1959 if(type > 63 && type < 100)
1960 proto_tree_add_text(tlv_tree, tvb, offset, length, "Reserved TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
1962 /*EXPERIMENTAL TLVs*/
1963 else if(type > 100 && type < 255)
1964 proto_tree_add_text(tlv_tree, tvb, offset, length, "Experimental TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
1966 /*UNKNOWN TLVs*/
1967 else
1968 proto_tree_add_text(tlv_tree, tvb, offset, length, "UNKNOWN TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
1970 return;
1973 static void dissect_mih(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1975 proto_item *ti = NULL;
1976 int offset = 0;
1977 proto_item *item = NULL;
1978 proto_tree *mih_tree = NULL;
1979 proto_tree *ver_flags_tree = NULL;
1980 guint8 serviceid = 0;
1981 guint8 opcode = 0;
1982 guint8 service = 0;
1983 guint16 action = 0;
1984 gint16 payload_length = 0;
1985 guint64 len = 0;
1986 guint8 len_of_len = 0;
1987 guint8 type = 0;
1988 proto_tree *mid_tree = NULL;
1989 proto_tree *tlv_tree = NULL;
1990 guint8 fragment = 0;
1992 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MIH");
1993 col_clear(pinfo->cinfo,COL_INFO);
1994 if (tree)
1996 /* we are being asked for details */
1997 ti = proto_tree_add_item(tree, proto_mih, tvb, 0, -1, ENC_NA);
2000 mih_tree = proto_item_add_subtree(ti, ett_mih);
2001 if(mih_tree)
2002 item = proto_tree_add_item(mih_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2003 if(item)
2005 ver_flags_tree = proto_item_add_subtree(item, ett_ver_flags);
2006 proto_tree_add_item(ver_flags_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2007 proto_tree_add_item(ver_flags_tree, hf_mih_ack_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2008 proto_tree_add_item(ver_flags_tree, hf_mih_ack_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
2009 proto_tree_add_item(ver_flags_tree, hf_mih_uir, tvb, offset, 1, ENC_BIG_ENDIAN);
2010 proto_tree_add_item(ver_flags_tree, hf_mih_more_frag, tvb, offset, 1, ENC_BIG_ENDIAN);
2011 fragment = tvb_get_guint8(tvb, offset);
2012 fragment = fragment << 7;
2014 offset += 1;
2016 if(mih_tree)
2018 /*flags and version tree is done.....*/
2019 proto_tree_add_item(mih_tree, hf_mih_frag_no, tvb, offset, 1, ENC_BIG_ENDIAN);
2020 fragment = fragment + (tvb_get_guint8(tvb, offset)>>1);
2022 /*for MIH message ID*/
2023 item = proto_tree_add_item(mih_tree, hf_mih_mid, tvb, offset + 1, 2, ENC_BIG_ENDIAN);
2025 offset += 1;
2026 mid_tree = proto_item_add_subtree(item, ett_mid);
2027 serviceid = tvb_get_guint8(tvb, offset);
2028 serviceid = serviceid & 0xF0;
2029 serviceid >>= 4;
2030 proto_tree_add_item(mid_tree, hf_mih_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2032 /*filling the info column with the service type...*/
2033 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(serviceid, servicevalues, "Unknown"));
2034 opcode = tvb_get_guint8(tvb, offset);
2035 opcode = opcode & 0x0C;
2036 opcode >>= 2;
2037 if(mid_tree)
2038 proto_tree_add_item(mid_tree, hf_mih_opcode, tvb, offset, 2, ENC_BIG_ENDIAN);
2040 /*filling the info column with the opcode type...*/
2041 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(opcode, opcodevalues, "Unknown"));
2043 /*check for type of service..*/
2044 service = tvb_get_guint8(tvb, offset);
2045 service = service & 0xF0;
2046 service >>= 4;
2048 /*get the action id.*/
2049 action = tvb_get_ntohs(tvb, offset);
2050 action = action & 0x03FF;
2051 switch (service)
2053 case 1 :/*for Service Management..*/
2054 if(mid_tree)
2055 proto_tree_add_item(mid_tree, hf_mih_serv_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2056 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str(action, serv_act_id_values, "Unknown"));
2057 break;
2058 case 2 :/*for event services..*/
2059 if(mid_tree)
2060 proto_tree_add_item(mid_tree, hf_mih_event_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2061 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str(action, event_act_id_values, "Unknown"));
2062 break;
2063 case 3 :/*for Command Services..*/
2064 if(mid_tree)
2065 proto_tree_add_item(mid_tree, hf_mih_command_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2066 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str(action, command_act_id_values, "Unknown"));
2067 break;
2068 case 4 :/*for Information Services..*/
2069 if(mid_tree)
2070 proto_tree_add_item(mid_tree, hf_mih_info_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2071 col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str(action, info_act_id_values, "Unknown"));
2072 break;
2074 offset += 2;
2075 if(mih_tree)
2078 /* displaying the transaction id*/
2079 proto_tree_add_item(mih_tree, hf_mih_tid, tvb, offset, 2, ENC_BIG_ENDIAN );
2081 /*displaying the payload length...*/
2082 proto_tree_add_item(mih_tree, hf_mih_pay_len, tvb, offset + 2, 2, ENC_BIG_ENDIAN );
2084 offset += 2;
2085 payload_length = tvb_get_ntohs(tvb, offset);
2086 offset += 2;
2088 /*now the type length values list is present get them and decode it...
2089 loop for showing all the tlvs....*/
2090 while(payload_length > 0 && fragment==0)
2092 /* Adding a third case here since the 802.21 standard defines 3 cases */
2093 /*extract length*/
2094 /*case 1: If the number of octets occupied by the Value field is LESS THAN 128, the size of the Length field is always
2095 one octet and the MSB of the octet is set to the value 0. The values of the other seven bits of this octet
2096 indicate the actual length of the Value field.
2098 /*case 2: If the number of octets occupied by the Value field is EXACTLY 128, the size of the Length field is one octet.
2099 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'.
2101 /*case 3: If the number of octets occupied by the Value field is GREATER THAN 128, then the Length field is always greater
2102 than one octet. The MSB of the first octet of the Length field is set to the value 1 and the remaining seven
2103 bits of the first octet indicate the number of octets that are appended further. The number represented by the
2104 second and subsequent octets of the Length field, when added to 128, indicates the total size of the Value field, in octets.
2106 /*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. */
2108 /*code for testing if length is less than or equal to 128*/
2109 len = tvb_get_guint8(tvb, offset+1);
2110 if(len > 128)
2112 /*length is greater than 128 => len of len is greater than 1 byte*/
2113 /*Expanding conditions where the length values can be from 1- 8 octets long*/
2114 /*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*/
2115 len_of_len = (guint8)len - 128;
2116 switch (len_of_len) /*depending on the detected length , we read a different amount of bytes from the tvb buffer*/
2118 case 1:
2119 len = tvb_get_guint8(tvb, offset+2);
2120 break;
2121 case 2:
2122 len = tvb_get_ntohs(tvb, offset+2);
2123 break;
2124 case 3:
2125 len = tvb_get_ntoh24(tvb, offset+2);
2126 break;
2127 case 4:
2128 len = tvb_get_ntohl(tvb, offset+2);
2129 break;
2130 case 5:
2131 len = tvb_get_ntoh40(tvb, offset+2);
2132 break;
2133 case 6:
2134 len = tvb_get_ntoh48(tvb, offset+2);
2135 break;
2136 case 7:
2137 len = tvb_get_ntoh56(tvb, offset+2);
2138 break;
2139 case 8:
2140 len = tvb_get_ntoh64(tvb, offset+2);
2142 len_of_len++;
2143 len = 128 + len;
2145 else
2146 len_of_len = 1;
2149 /*TODO: TLVs greater than the payload_length are fragmented, and currently not parsed*/
2150 if(len <= (guint64)payload_length)
2152 /*for type...*/
2153 item = proto_tree_add_text(mih_tree, tvb, offset, 1 + len_of_len + (guint32)len, "MIH TLV : %s", val_to_str(tvb_get_guint8(tvb, offset), typevaluenames, "UNKNOWN"));
2154 tlv_tree = proto_item_add_subtree(item, ett_tlv);
2155 if(tlv_tree)
2157 proto_tree_add_item(tlv_tree, hf_mih_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2158 type = tvb_get_guint8(tvb, offset);
2160 /*for length...*/
2161 if(len_of_len == 1)
2163 proto_tree_add_item(tlv_tree, hf_mih_type_length, tvb, offset+1, len_of_len, ENC_BIG_ENDIAN);
2165 else if(len_of_len>1 && len_of_len<=5)
2167 proto_tree_add_item(tlv_tree, hf_mih_type_length_ext, tvb, offset+2, len_of_len-1, ENC_BIG_ENDIAN);
2171 offset += 1 + len_of_len;
2173 /*For Value fields*/
2174 /*TODO: this assumes the maximum value length is 2^32. Dissecting bigger data fields would require breaking the data into chunks*/
2175 if(len<(2^32)){
2176 dissect_mih_tlv(tvb, offset, tlv_tree, type, (guint32)len);
2177 offset += (guint32)len;
2178 payload_length -= (1 + len_of_len + (guint16)len);
2179 }else{
2180 return;
2183 else
2185 proto_tree_add_text(mih_tree, tvb, offset, -1, "FRAGMENTED TLV");
2186 payload_length = 0;
2189 if(fragment!=0)
2190 proto_tree_add_text(mih_tree, tvb, offset, -1, "FRAGMENTED TLV");
2193 /*dissector initialistaion*/
2194 void proto_register_mih(void)
2196 static hf_register_info hf[] =
2199 &hf_mih_version,
2201 "MIH Version",
2202 "mih.version",
2203 FT_UINT8,
2204 BASE_DEC,
2205 NULL,
2206 VERSION_MASK,
2207 NULL, HFILL
2211 &hf_mih_ack_req,
2213 "MIH ACK-Req",
2214 "mih.acq_req",
2215 FT_BOOLEAN,
2217 NULL,
2218 ACKREQ_MASK,
2219 NULL, HFILL
2223 &hf_mih_ack_resp,
2225 "MIH ACK-Resp",
2226 "mih.acq_resp",
2227 FT_BOOLEAN,
2229 NULL,
2230 ACKRESP_MASK,
2231 NULL, HFILL
2235 &hf_mih_uir,
2237 "MIH Unauthenticated info request",
2238 "mih.uir",
2239 FT_BOOLEAN,
2241 NULL,
2242 UIR_MASK,
2243 NULL, HFILL
2247 &hf_mih_more_frag,
2249 "MIH more fragment",
2250 "mih.more_frag",
2251 FT_BOOLEAN,
2253 NULL,
2254 MORE_FRAG_MASK,
2255 NULL, HFILL
2259 &hf_mih_frag_no,
2261 "Fragment No",
2262 "mih.frag_no",
2263 FT_UINT8,
2264 BASE_DEC,
2265 NULL,
2266 FRAG_NO_MASK,
2267 NULL, HFILL
2271 &hf_mih_mid,
2273 "MIH message ID",
2274 "mih.mid",
2275 FT_UINT16,
2276 BASE_HEX,
2277 NULL,
2278 0x0,
2279 NULL, HFILL
2283 &hf_mih_service_id,
2285 "Service ID",
2286 "mih.service_id",
2287 FT_UINT16,
2288 BASE_HEX,
2289 VALS(servicevalues),
2290 SID_MASK,
2291 NULL, HFILL
2295 &hf_mih_opcode,
2297 "Opcode",
2298 "mih.opcode",
2299 FT_UINT16,
2300 BASE_HEX,
2301 VALS(opcodevalues),
2302 OPCODE_MASK,
2303 NULL, HFILL
2307 &hf_mih_serv_actionid,
2309 "Action ID",
2310 "mih.action_id",
2311 FT_UINT16,
2312 BASE_HEX,
2313 VALS(serv_act_id_values),
2314 AID_MASK,
2315 NULL, HFILL
2319 &hf_mih_event_actionid,
2321 "Action ID",
2322 "mih.action_id",
2323 FT_UINT16,
2324 BASE_HEX,
2325 VALS(event_act_id_values),
2326 AID_MASK,
2327 NULL, HFILL
2331 &hf_mih_command_actionid,
2333 "Action ID",
2334 "mih.action_id",
2335 FT_UINT16,
2336 BASE_HEX,
2337 VALS(command_act_id_values),
2338 AID_MASK,
2339 NULL, HFILL
2343 &hf_mih_info_actionid,
2345 "Action ID",
2346 "mih.action_id",
2347 FT_UINT16,
2348 BASE_HEX,
2349 VALS(info_act_id_values),
2350 AID_MASK,
2351 NULL, HFILL
2355 &hf_mih_tid,
2357 "TID",
2358 "mih.tid",
2359 FT_UINT16,
2360 BASE_DEC,
2361 NULL,
2362 TRANS_ID_MASK,
2363 NULL, HFILL
2367 &hf_mih_pay_len,
2369 "Payload length",
2370 "mih.pay_len",
2371 FT_UINT16,
2372 BASE_DEC,
2373 NULL,
2374 0x0,
2375 NULL, HFILL
2379 &hf_mih_type,
2381 "MIH TLV type",
2382 "mih.tlv_type",
2383 FT_UINT8,
2384 BASE_DEC,
2385 VALS(typevaluenames),
2386 0x0,
2387 NULL, HFILL
2391 &hf_mih_type_length,
2393 "MIH TLV length",
2394 "mih.tlv_length",
2395 FT_UINT8,
2396 BASE_DEC,
2397 NULL,
2398 0x0,
2399 NULL, HFILL
2403 &hf_mih_type_length_ext,
2405 "MIH TLV length",
2406 "mih.tlv_length",
2407 FT_UINT64,
2408 BASE_DEC,
2409 NULL,
2410 0x0,
2411 NULL, HFILL
2415 &hf_mihf_id,
2417 "MIHF_ID",
2418 "mih.mihf_id",
2419 FT_STRING,
2420 BASE_NONE,
2421 NULL,
2422 0x0,
2423 NULL, HFILL
2427 &hf_mihf_id_mac,
2429 "MIHF_ID",
2430 "mih.mihf_id",
2431 FT_ETHER,
2432 BASE_NONE,
2433 NULL,
2434 0x0,
2435 NULL, HFILL
2439 &hf_mihf_id_ipv4,
2441 "MIHF_ID",
2442 "mih.mihf_id",
2443 FT_IPv4,
2444 BASE_NONE,
2445 NULL,
2446 0x0,
2447 NULL, HFILL
2451 &hf_mihf_id_ipv6,
2453 "MIHF_ID",
2454 "mih.mihf_id",
2455 FT_IPv6,
2456 BASE_NONE,
2457 NULL,
2458 0x0,
2459 NULL, HFILL
2463 &hf_status,
2465 "STATUS",
2466 "mih.status",
2467 FT_UINT8,
2468 BASE_DEC,
2469 VALS(status_types),
2470 0x0,
2471 NULL, HFILL
2475 &hf_boolean,
2477 "flag",
2478 "mih.bool",
2479 FT_UINT8,
2480 BASE_DEC,
2481 VALS(boolean_types),
2482 0x0,
2483 NULL, HFILL
2487 &hf_link_type,
2489 "Link Type",
2490 "mih.link_type",
2491 FT_UINT8,
2492 BASE_DEC,
2493 VALS(link_type_vals),
2494 0x0,
2495 NULL, HFILL
2499 &hf_link_subtype_eth,
2501 "Ethernet - IEEE802.3 Subtype",
2502 "mih.link_subtype_eth",
2503 FT_UINT32,
2504 BASE_HEX,
2505 NULL,
2506 0x0,
2507 NULL, HFILL
2511 &hf_link_subtype_eth_10m,
2513 "Ethernet 10 Mb",
2514 "mih.link_subtype_eth.10mb",
2515 FT_BOOLEAN,
2517 NULL,
2518 0x0001,
2519 NULL, HFILL
2523 &hf_link_subtype_eth_100m,
2525 "Ethernet 100 Mb",
2526 "mih.link_subtype_eth.100mb",
2527 FT_BOOLEAN,
2529 NULL,
2530 0x0002,
2531 NULL, HFILL
2535 &hf_link_subtype_eth_1000m,
2537 "Ethernet 1000 Mb",
2538 "mih.link_subtype_eth.1000mb",
2539 FT_BOOLEAN,
2541 NULL,
2542 0x0004,
2543 NULL, HFILL
2547 &hf_link_subtype_wireless_other,
2549 "Wireless Other Subtype",
2550 "mih.link_subtype_wireless_other",
2551 FT_UINT32,
2552 BASE_HEX,
2553 NULL,
2554 0x0,
2555 NULL, HFILL
2559 &hf_link_subtype_wireless_other_dvb,
2561 "DVB",
2562 "mih.link_subtype_wireless_other.dvb",
2563 FT_BOOLEAN,
2565 NULL,
2566 0x0001,
2567 NULL, HFILL
2571 &hf_link_subtype_wireless_other_tdmb,
2573 "T-DVB",
2574 "mih.link_subtype_wireless_other.tdmb",
2575 FT_BOOLEAN,
2577 NULL,
2578 0x0002,
2579 NULL, HFILL
2583 &hf_link_subtype_wireless_other_atsc,
2585 "ATSC-M/H",
2586 "mih.link_subtype_wireless_other.atsc",
2587 FT_BOOLEAN,
2589 NULL,
2590 0x0004,
2591 NULL, HFILL
2595 &hf_link_subtype_ieee80211,
2597 "Wireless - IEEE 802.11 Subtype",
2598 "mih.link_subtype_ieee80211",
2599 FT_UINT32,
2600 BASE_HEX,
2601 NULL,
2602 0x0,
2603 NULL, HFILL
2607 &hf_link_subtype_ieee80211_24,
2609 "2.4 GHz",
2610 "mih.link_subtype_ieee80211.2_4ghz",
2611 FT_BOOLEAN,
2613 NULL,
2614 0x0001,
2615 NULL, HFILL
2619 &hf_link_subtype_ieee80211_5,
2621 "5 GHz",
2622 "mih.link_subtype_ieee80211.5ghz",
2623 FT_BOOLEAN,
2625 NULL,
2626 0x0002,
2627 NULL, HFILL
2631 &hf_link_subtype_ieee80211_49,
2633 "4.9 GHz",
2634 "mih.link_subtype_ieee80211.4_9ghz",
2635 FT_BOOLEAN,
2637 NULL,
2638 0x0004,
2639 NULL, HFILL
2643 &hf_link_subtype_ieee80211_365,
2645 "3.65 GHz",
2646 "mih.link_subtype_ieee80211.3_65ghz",
2647 FT_BOOLEAN,
2649 NULL,
2650 0x0008,
2651 NULL, HFILL
2655 &hf_link_subtype_ieee80211_316,
2657 "316 THz",
2658 "mih.link_subtype_ieee80211.316thz",
2659 FT_BOOLEAN,
2661 NULL,
2662 0x0010,
2663 NULL, HFILL
2667 &hf_link_subtype_umts,
2669 "Wireless - UMTS Subtype",
2670 "mih.link_subtype_umts",
2671 FT_UINT32,
2672 BASE_HEX,
2673 NULL,
2674 0x0,
2675 NULL, HFILL
2679 &hf_link_subtype_umts_99,
2681 "Rel-99",
2682 "mih.link_subtype_umts.rel99",
2683 FT_BOOLEAN,
2685 NULL,
2686 0x0001,
2687 NULL, HFILL
2691 &hf_link_subtype_umts_4,
2693 "Rel-4",
2694 "mih.link_subtype_umts.rel4",
2695 FT_BOOLEAN,
2697 NULL,
2698 0x0002,
2699 NULL, HFILL
2703 &hf_link_subtype_umts_5,
2705 "Rel-5 (w/HSDPA)",
2706 "mih.link_subtype_umts.rel5",
2707 FT_BOOLEAN,
2709 NULL,
2710 0x0004,
2711 NULL, HFILL
2715 &hf_link_subtype_umts_6,
2717 "Rel-6 (w/ HSUPA)",
2718 "mih.link_subtype_umts.rel6",
2719 FT_BOOLEAN,
2721 NULL,
2722 0x0008,
2723 NULL, HFILL
2727 &hf_link_subtype_umts_7,
2729 "Rel-7 (MIMO/OFDM)",
2730 "mih.link_subtype_umts.rel7",
2731 FT_BOOLEAN,
2733 NULL,
2734 0x0010,
2735 NULL, HFILL
2739 &hf_link_subtype_umts_8,
2741 "Rel-8",
2742 "mih.link_subtype_umts.rel8",
2743 FT_BOOLEAN,
2745 NULL,
2746 0x0020,
2747 NULL, HFILL
2751 &hf_link_subtype_cdma2000,
2753 "Wireless - cdma2000-HRPD",
2754 "mih.link_subtype_cdma2000",
2755 FT_UINT32,
2756 BASE_HEX,
2757 NULL,
2758 0x0,
2759 NULL, HFILL
2763 &hf_link_subtype_cdma2000_0,
2765 "Rev-0",
2766 "mih.link_subtype_cdma2000.rev0",
2767 FT_BOOLEAN,
2769 NULL,
2770 0x0001,
2771 NULL, HFILL
2775 &hf_link_subtype_cdma2000_a,
2777 "Rev-A",
2778 "mih.link_subtype_cdma2000.reva",
2779 FT_BOOLEAN,
2781 NULL,
2782 0x0002,
2783 NULL, HFILL
2787 &hf_link_subtype_cdma2000_b,
2789 "Rev-B",
2790 "mih.link_subtype_cdma2000.revb",
2791 FT_BOOLEAN,
2793 NULL,
2794 0x0004,
2795 NULL, HFILL
2799 &hf_link_subtype_cdma2000_c,
2801 "Rev-C",
2802 "mih.link_subtype_cdma2000.revc",
2803 FT_BOOLEAN,
2805 NULL,
2806 0x0008,
2807 NULL, HFILL
2811 &hf_link_subtype_ieee80216,
2813 "Wireless - IEEE 802.16",
2814 "mih.link_subtype_ieee80216",
2815 FT_UINT32,
2816 BASE_HEX,
2817 NULL,
2818 0x0,
2819 NULL, HFILL
2823 &hf_link_subtype_ieee80216_25,
2825 "2.5 GHz",
2826 "mih.link_subtype_ieee80216.2_5ghz",
2827 FT_BOOLEAN,
2829 NULL,
2830 0x0001,
2831 NULL, HFILL
2835 &hf_link_subtype_ieee80216_35,
2837 "3.5 GHz",
2838 "mih.link_subtype_ieee80216.3_5ghz",
2839 FT_BOOLEAN,
2841 NULL,
2842 0x0002,
2843 NULL, HFILL
2847 &hf_link_type_ext,
2849 "LINK_TYPE_EXT",
2850 "mih.link_type_ext",
2851 FT_STRING,
2852 BASE_NONE,
2853 NULL,
2854 0x0,
2855 NULL, HFILL
2859 &hf_ipv4_addr,
2861 "IP Address",
2862 "mih.ipv4_addr",
2863 FT_IPv4,
2864 BASE_NONE,
2865 NULL,
2866 0x0,
2867 NULL, HFILL
2871 &hf_ipv6_addr,
2873 "IP Address",
2874 "mih.ipv6_addr",
2875 FT_IPv6,
2876 BASE_NONE,
2877 NULL,
2878 0x0,
2879 NULL, HFILL
2883 &hf_link_dn_reason,
2885 "LINK Down Reason",
2886 "mih.link_dn_reason",
2887 FT_UINT8,
2888 BASE_DEC,
2889 VALS(link_dn_reason_vals),
2890 0x0,
2891 NULL, HFILL
2895 &hf_link_gdn_reason,
2897 "LINK Going Down Reason",
2898 "mih.link_gdn_reason",
2899 FT_UINT8,
2900 BASE_DEC,
2901 VALS(link_gdn_reason_vals),
2902 0x0,
2903 NULL, HFILL
2907 &hf_mac_addr,
2909 "MAC ADDRESS",
2910 "mih.mac_addr",
2911 FT_ETHER,
2912 BASE_NONE,
2913 NULL,
2914 0x0,
2915 NULL, HFILL
2919 &hf_link_param_gen,
2921 "LINK_PARAM",
2922 "mih.link_param_gen",
2923 FT_UINT8,
2924 BASE_DEC,
2925 VALS(link_param_gen_vals),
2926 0x0,
2927 NULL, HFILL
2931 &hf_link_param_qos,
2933 "LINK_PARAM",
2934 "mih.link_param_qos",
2935 FT_UINT8,
2936 BASE_DEC,
2937 VALS(link_param_qos_vals),
2938 0x0,
2939 NULL, HFILL
2943 &hf_link_param_gg,
2945 "LINK_PARAM",
2946 "mih.link_param_gg",
2947 FT_UINT8,
2948 BASE_DEC,
2949 VALS(link_param_gg_vals),
2950 0x0,
2951 NULL, HFILL
2955 &hf_link_param_edge,
2957 "LINK_PARAM",
2958 "mih.link_param_edge",
2959 FT_UINT8,
2960 BASE_DEC,
2961 NULL,
2962 0x0,
2963 NULL, HFILL
2967 &hf_link_param_eth,
2969 "LINK_PARAM",
2970 "mih.link_param_eth",
2971 FT_UINT8,
2972 BASE_DEC,
2973 NULL,
2974 0x0,
2975 NULL, HFILL
2979 &hf_link_param_802_11,
2981 "LINK_PARAM",
2982 "mih.link_param_802_11",
2983 FT_UINT8,
2984 BASE_DEC,
2985 VALS(link_param_802_11_vals),
2986 0x0,
2987 NULL, HFILL
2991 &hf_link_param_c2k,
2993 "LINK_PARAM",
2994 "mih.link_param_c2k",
2995 FT_UINT8,
2996 BASE_DEC,
2997 VALS(link_param_c2k_hrpd_vals),
2998 0x0,
2999 NULL, HFILL
3003 &hf_link_param_fdd,
3005 "LINK_PARAM",
3006 "mih.link_param_fdd",
3007 FT_UINT8,
3008 BASE_DEC,
3009 VALS(link_param_fdd_vals),
3010 0x0,
3011 NULL, HFILL
3015 &hf_link_param_hrpd,
3017 "LINK_PARAM",
3018 "mih.link_param_hrpd",
3019 FT_UINT8,
3020 BASE_DEC,
3021 VALS(link_param_c2k_hrpd_vals),
3022 0x0,
3023 NULL, HFILL
3027 &hf_link_param_802_16,
3029 "LINK_PARAM",
3030 "mih.link_param_802_16",
3031 FT_UINT8,
3032 BASE_DEC,
3033 NULL,
3034 0x0,
3035 NULL, HFILL
3039 &hf_link_param_802_20,
3041 "LINK_PARAM",
3042 "mih.link_param_802_20",
3043 FT_UINT8,
3044 BASE_DEC,
3045 NULL,
3046 0x0,
3047 NULL, HFILL
3051 &hf_link_param_802_22,
3053 "LINK_PARAM",
3054 "mih.link_param_802_22",
3055 FT_UINT8,
3056 BASE_DEC,
3057 NULL,
3058 0x0,
3059 NULL, HFILL
3063 &hf_link_param_value,
3065 "LINK_VALUE",
3066 "mih.link_param_value",
3067 FT_UINT16,
3068 BASE_DEC,
3069 NULL,
3070 0x0,
3071 NULL, HFILL
3075 &hf_op_mode,
3077 "OP_MODE",
3078 "mih.op_mode",
3079 FT_UINT8,
3080 BASE_DEC,
3081 VALS(op_mode_vals),
3082 0x0,
3083 NULL, HFILL
3087 &hf_link_ac_type,
3089 "LINK_AC_TYPE",
3090 "mih.link_ac_type",
3091 FT_UINT8,
3092 BASE_DEC,
3093 VALS(link_ac_type_vals),
3094 0x0,
3095 NULL, HFILL
3099 &hf_link_ac_ext_time,
3101 "LINK_AC_ext_time",
3102 "mih.link_ac_ext_time",
3103 FT_UINT16,
3104 BASE_DEC,
3105 NULL,
3106 0x0,
3107 NULL, HFILL
3111 &hf_link_ac_result,
3113 "LINK_AC_RESULT",
3114 "mih.link_ac_result",
3115 FT_UINT8,
3116 BASE_DEC,
3117 VALS(link_ac_result_vals),
3118 0x0,
3119 NULL, HFILL
3123 &hf_ho_reason,
3125 "HO CAUSE",
3126 "mih.ho_reason",
3127 FT_UINT8,
3128 BASE_DEC,
3129 VALS(link_dn_reason_vals),
3130 0x0,
3131 NULL, HFILL
3135 &hf_ho_status,
3137 "HO STATUS",
3138 "mih.ho_status",
3139 FT_UINT8,
3140 BASE_DEC,
3141 VALS(ho_status_vals),
3142 0x0,
3143 NULL, HFILL
3147 &hf_mbb_ho_supp,
3149 "MBB HO SUPP",
3150 "mih.mbb_ho_supp",
3151 FT_UINT8,
3152 BASE_DEC,
3153 VALS(mbb_ho_supp_vals),
3154 0x0,
3155 NULL, HFILL
3159 &hf_reg_request_code,
3161 "REGISTER REQUEST CODE",
3162 "mih.reg_request_code",
3163 FT_UINT8,
3164 BASE_DEC,
3165 VALS(reg_request_code_vals),
3166 0x0,
3167 NULL, HFILL
3171 &hf_ip_renewal,
3173 "IP RENEWAL FLAG",
3174 "mih.ip_renewal",
3175 FT_UINT8,
3176 BASE_DEC,
3177 VALS(ip_renewal_vals),
3178 0x0,
3179 NULL, HFILL
3183 &hf_dev_states_resp,
3185 "SUPPORTED TRANSPORTS",
3186 "mih.dev_states_resp",
3187 FT_UINT8,
3188 BASE_DEC,
3189 VALS(dev_states_req_vals),
3190 0x0,
3191 NULL, HFILL
3195 &hf_dev_batt_level,
3197 "Battery Level",
3198 "mih.dev_states_resp.batt_level",
3199 FT_INT8,
3200 BASE_DEC,
3201 NULL,
3202 0x0,
3203 NULL, HFILL
3207 &hf_dev_info,
3209 "Device Info",
3210 "mih.dev_states_resp.dev_info",
3211 FT_STRING,
3212 BASE_NONE,
3213 NULL,
3214 0x0,
3215 NULL, HFILL
3219 &hf_max_resp_size,
3221 "Maximum Response Size",
3222 "mih.max_resp_size",
3223 FT_UINT16,
3224 BASE_DEC,
3225 NULL,
3226 0x0,
3227 NULL, HFILL
3231 &hf_time_interval,
3233 "Time Interval",
3234 "mih.time_interval",
3235 FT_UINT16,
3236 BASE_DEC,
3237 NULL,
3238 0x0,
3239 NULL, HFILL
3243 &hf_valid_time_interval,
3245 "Valid Time Interval",
3246 "mih.valid_time_interval",
3247 FT_UINT32,
3248 BASE_DEC,
3249 NULL,
3250 0x0,
3251 NULL, HFILL
3255 &hf_tsp_carrier,
3257 "TSP Carrier",
3258 "mih.tsp_carrier",
3259 FT_STRING,
3260 BASE_NONE,
3261 NULL,
3262 0x0,
3263 NULL, HFILL
3267 &hf_link_addr_type,
3269 "Link Address Type",
3270 "mih.link_addr_type",
3271 FT_UINT8,
3272 BASE_DEC,
3273 VALS(link_addr_types),
3274 0x0,
3275 NULL, HFILL
3279 &hf_link_transport_addr_type,
3281 "Link Transport Address Type",
3282 "mih.link_transport_addr_type",
3283 FT_UINT16,
3284 BASE_DEC,
3285 NULL,
3286 0x0,
3287 NULL, HFILL
3291 &hf_link_addr_string,
3293 "Link Address String",
3294 "mih.link_addr_string",
3295 FT_STRING,
3296 BASE_NONE,
3297 NULL,
3298 0x0,
3299 NULL, HFILL
3303 &hf_cell_id,
3305 "3G Cell ID",
3306 "mih.cell_id",
3307 FT_UINT32,
3308 BASE_DEC,
3309 NULL,
3310 0x0,
3311 NULL, HFILL
3315 &hf_ci,
3317 "2G Cell ID",
3318 "mih.ci",
3319 FT_UINT16,
3320 BASE_DEC,
3321 NULL,
3322 0x0,
3323 NULL, HFILL
3327 &hf_plmn_id,
3329 "Public Land Mobile Network (PLMN) ID",
3330 "mih.plmn_id",
3331 FT_UINT24,
3332 BASE_DEC,
3333 NULL,
3334 0x0,
3335 NULL, HFILL
3339 &hf_location_area_id,
3341 "Location Area Code (LAC)",
3342 "mih.lac",
3343 FT_UINT16,
3344 BASE_DEC,
3345 NULL,
3346 0x0,
3347 NULL, HFILL
3351 &hf_threshold_val,
3353 "Threshold Value",
3354 "mih.threshold_val",
3355 FT_UINT16,
3356 BASE_DEC,
3357 NULL,
3358 0x0,
3359 NULL, HFILL
3363 &hf_threshold_x_dir,
3365 "Threshold Direction",
3366 "mih.threshold_x_dir",
3367 FT_UINT8,
3368 BASE_DEC,
3369 VALS(threshold_x_dir_vals),
3370 0x0,
3371 NULL, HFILL
3375 &hf_threshold_action,
3377 "Threshold Action",
3378 "mih.threshold_action",
3379 FT_UINT8,
3380 BASE_DEC,
3381 VALS(threshold_action_vals),
3382 0x0,
3383 NULL, HFILL
3387 &hf_config_status,
3389 "Config Status",
3390 "mih.config_status",
3391 FT_UINT8,
3392 BASE_DEC,
3393 VALS(boolean_types),
3394 0x0,
3395 NULL, HFILL
3399 &hf_num_cos,
3401 "Number of differentiable classes",
3402 "mih.num_cos",
3403 FT_UINT8,
3404 BASE_DEC,
3405 NULL,
3406 0x0,
3407 NULL, HFILL
3411 &hf_num_queue,
3413 "Number of transmit queues supported",
3414 "mih.num_queue",
3415 FT_UINT8,
3416 BASE_DEC,
3417 NULL,
3418 0x0,
3419 NULL, HFILL
3423 &hf_channel_id,
3425 "Channel ID",
3426 "mih.channel_id",
3427 FT_UINT16,
3428 BASE_DEC,
3429 NULL,
3430 0x0,
3431 NULL, HFILL
3435 &hf_predef_cfg_id,
3437 "Pre-defined Configuration Identifier",
3438 "mih.predef_cfg_id",
3439 FT_INT8,
3440 BASE_DEC,
3441 NULL,
3442 0x0,
3443 NULL, HFILL
3447 &hf_network_id,
3449 "Network ID",
3450 "mih.network_id",
3451 FT_STRING,
3452 BASE_NONE,
3453 NULL,
3454 0x0,
3455 NULL, HFILL
3459 &hf_net_aux_id,
3461 "Auxiliary Network ID",
3462 "mih.net_aux_id",
3463 FT_STRING,
3464 BASE_NONE,
3465 NULL,
3466 0x0,
3467 NULL, HFILL
3471 &hf_sig_strength_dbm,
3473 "Signal Strength (dBm)",
3474 "mih.sig_strength",
3475 FT_INT8,
3476 BASE_DEC,
3477 NULL,
3478 0x0,
3479 NULL, HFILL
3483 &hf_sig_strength_per,
3485 "Signal Strength (%)",
3486 "mih.sig_strength",
3487 FT_INT8,
3488 BASE_DEC,
3489 NULL,
3490 0x0,
3491 NULL, HFILL
3495 &hf_cos_id,
3497 "Class of Service ID",
3498 "mih.cos_id",
3499 FT_INT8,
3500 BASE_DEC,
3501 NULL,
3502 0x0,
3503 NULL, HFILL
3507 &hf_cos_value,
3509 "Class of Service Value",
3510 "mih.cos_value",
3511 FT_INT16,
3512 BASE_DEC,
3513 NULL,
3514 0x0,
3515 NULL, HFILL
3519 &hf_sinr,
3521 "SINR",
3522 "mih.sinr",
3523 FT_INT16,
3524 BASE_DEC,
3525 NULL,
3526 0x0,
3527 NULL, HFILL
3531 &hf_link_data_rate,
3533 "Link Data Rate (kb/s)",
3534 "mih.link_data_rate",
3535 FT_UINT32,
3536 BASE_DEC,
3537 NULL,
3538 0x0,
3539 NULL, HFILL
3543 &hf_rdf_data,
3545 "RDF data",
3546 "mih.rdf_data",
3547 FT_STRING,
3548 BASE_NONE,
3549 NULL,
3550 0x0,
3551 NULL, HFILL
3555 &hf_rdf_mime_type,
3557 "RDF data",
3558 "mih.rdf_mime_type",
3559 FT_STRING,
3560 BASE_NONE,
3561 NULL,
3562 0x0,
3563 NULL, HFILL
3567 &hf_link_res_status,
3569 "Resource Status",
3570 "mih.res_status",
3571 FT_UINT8,
3572 BASE_DEC,
3573 VALS(boolean_types),
3574 0x0,
3575 NULL, HFILL
3579 &hf_res_retention_status,
3581 "Info query RDF schema URL",
3582 "mih.res_retention_status",
3583 FT_UINT8,
3584 BASE_DEC,
3585 VALS(boolean_types),
3586 0x0,
3587 NULL, HFILL
3591 &hf_res_rpt_flag,
3593 "Query resource report flag",
3594 "mih.res_rpt_flag",
3595 FT_UINT8,
3596 BASE_DEC,
3597 VALS(boolean_types),
3598 0x0,
3599 NULL, HFILL
3603 &hf_unauth_info_req,
3605 "Unauthenticated information request",
3606 "mih.unauth_info_req",
3607 FT_UINT8,
3608 BASE_DEC,
3609 VALS(boolean_types),
3610 0x0,
3611 NULL, HFILL
3615 &hf_rdf_sch,
3617 "RDF Schema",
3618 "mih.rdf_sch",
3619 FT_STRING,
3620 BASE_NONE,
3621 NULL,
3622 0x0,
3623 NULL, HFILL
3627 &hf_rdf_sch_url,
3629 "RDF Schema URL",
3630 "mih.rdf_sch_url",
3631 FT_STRING,
3632 BASE_NONE,
3633 NULL,
3634 0x0,
3635 NULL, HFILL
3639 &hf_ir_bin_data,
3641 "IR Binary Data",
3642 "mih.ir_bin_data",
3643 FT_STRING,
3644 BASE_NONE,
3645 NULL,
3646 0x0,
3647 NULL, HFILL
3651 &hf_iq_bin_data_x,
3653 "IQ Binary Data",
3654 "mih.iq_bin_data",
3655 FT_STRING,
3656 BASE_NONE,
3657 NULL,
3658 0x0,
3659 NULL, HFILL
3663 /*event related hf fields*/
3665 &hf_event_list,
3667 "List of Events",
3668 "mih.event_list",
3669 FT_UINT32,
3670 BASE_HEX,
3671 NULL,
3672 0x0,
3673 NULL, HFILL
3677 &hf_event_link_detect,
3679 "MIH LINK Detected",
3680 "mih.event_list.link_detect",
3681 FT_BOOLEAN,
3683 NULL,
3684 LINK_DETECT_MASK,
3685 NULL, HFILL
3689 &hf_event_link_up,
3691 "MIH LINK UP",
3692 "mih.event_list.link_up",
3693 FT_BOOLEAN,
3695 NULL,
3696 LINK_UP_MASK,
3697 NULL, HFILL
3701 &hf_event_link_dn,
3703 "MIH LINK DOWN",
3704 "mih.event_list.link_down",
3705 FT_BOOLEAN,
3707 NULL,
3708 LINK_DOWN_MASK,
3709 NULL, HFILL
3713 &hf_event_link_param,
3715 "MIH LINK Parameters Report",
3716 "mih.event_list.link_param_rpt",
3717 FT_BOOLEAN,
3719 NULL,
3720 LINK_PARAM_MASK,
3721 NULL, HFILL
3725 &hf_event_link_gd,
3727 "MIH LINK Going Down",
3728 "mih.event_list.link_gd",
3729 FT_BOOLEAN,
3731 NULL,
3732 LINK_GD_MASK,
3733 NULL, HFILL
3737 &hf_event_ho_imm,
3739 "Link Handover Imminent",
3740 "mih.event_list.link_ho_imm",
3741 FT_BOOLEAN,
3743 NULL,
3744 LINK_HO_IMM_MASK,
3745 NULL, HFILL
3749 &hf_event_ho_comp,
3751 "MIH LINK Handover Complete",
3752 "mih.event_list.link_ho_comp",
3753 FT_BOOLEAN,
3755 NULL,
3756 LINK_HO_COMP_MASK,
3757 NULL, HFILL
3761 &hf_event_pdu_tx_stat,
3763 "MIH LINK PDU Transmit Status",
3764 "mih.event_list.link_pdu_tx_stat",
3765 FT_BOOLEAN,
3767 NULL,
3768 LINK_PDU_MASK,
3769 NULL, HFILL
3773 /* cmd related hf fields */
3775 &hf_cmd_list,
3777 "List of Commands",
3778 "mih.command_list",
3779 FT_UINT32,
3780 BASE_HEX,
3781 NULL,
3782 0x0,
3783 NULL, HFILL
3788 &hf_cmd_event_subs,
3790 "MIH LINK Event Subscribe",
3791 "mih.cmd_list.evt_subs",
3792 FT_BOOLEAN,
3794 NULL,
3795 CMD_EVT_SUBS_MASK,
3796 NULL, HFILL
3800 &hf_cmd_event_unsub,
3802 "Link Event Unsubscribe",
3803 "mih.cmd_list.evt_unsubs",
3804 FT_BOOLEAN,
3806 NULL,
3807 CMD_EVT_UNSUBS_MASK,
3808 NULL, HFILL
3812 &hf_cmd_get_param,
3814 "MIH LINK Get Parameters",
3815 "mih.cmd_list.evt_get_param",
3816 FT_BOOLEAN,
3818 NULL,
3819 CMD_GET_PARA_MASK,
3820 NULL, HFILL
3824 &hf_cmd_con_thres,
3826 "Link Configure Thresholds",
3827 "mih.cmd_list.evt_conf_th",
3828 FT_BOOLEAN,
3830 NULL,
3831 CMD_CONF_TH_MASK,
3832 NULL, HFILL
3836 &hf_cmd_link_action,
3838 "MIH LINK Action",
3839 "mih.cmd_list.evt_link_action",
3840 FT_BOOLEAN,
3842 NULL,
3843 CMD_LINK_AC_MASK,
3844 NULL, HFILL
3848 /*header fields for iq type list*/
3850 &hf_iq_list,
3852 "List of of IS query types",
3853 "mih.iq_type_list",
3854 FT_UINT32,
3855 BASE_HEX,
3856 NULL,
3857 0x0,
3858 NULL, HFILL
3862 &hf_iq_bin_data,
3864 "Binary data",
3865 "mih.iq_type_list.bin_data",
3866 FT_BOOLEAN,
3868 NULL,
3869 IQ_BIN_DATA_MASK,
3870 NULL, HFILL
3874 &hf_iq_rdf_data,
3876 "RDF data",
3877 "mih.iq_type_list.rdf_data",
3878 FT_BOOLEAN,
3880 NULL,
3881 IQ_RDF_DATA_MASK,
3882 NULL, HFILL
3886 &hf_iq_rdf_sch_url,
3888 "RDF schema URL",
3889 "mih.iq_type_list.rdf_sch_u",
3890 FT_BOOLEAN,
3892 NULL,
3893 IQ_RDF_SCH_U_MASK,
3894 NULL, HFILL
3898 &hf_iq_rdf_sch,
3900 "RDF schema",
3901 "mih.iq_type_list.rdf_sch",
3902 FT_BOOLEAN,
3904 NULL,
3905 IQ_RDF_SCH_MASK,
3906 NULL, HFILL
3910 &hf_iq_net_type,
3912 "IE_NETWORK_TYPE",
3913 "mih.iq_type_list.ie_net_type",
3914 FT_BOOLEAN,
3916 NULL,
3917 IQ_IE_NET_TYPE_MASK,
3918 NULL, HFILL
3922 &hf_iq_op_id,
3924 "IE_OPERATOR_ID",
3925 "mih.iq_type_list.ie_op_id",
3926 FT_BOOLEAN,
3928 NULL,
3929 IQ_IE_OP_ID_MASK,
3930 NULL, HFILL
3934 &hf_iq_serv_pro_id,
3936 "IE_SERVICE_PROVIDER_ID",
3937 "mih.iq_type_list.ie_serv_id",
3938 FT_BOOLEAN,
3940 NULL,
3941 IQ_SERV_ID_MASK,
3942 NULL, HFILL
3946 &hf_iq_country_code,
3948 "IE_COUNTRY_CODE",
3949 "mih.iq_type_list.ie_country_code",
3950 FT_BOOLEAN,
3952 NULL,
3953 IQ_IE_COUN_MASK,
3954 NULL, HFILL
3958 &hf_iq_net_id,
3960 "IE_NETWORK_ID",
3961 "mih.iq_type_list.ie_net_id",
3962 FT_BOOLEAN,
3964 NULL,
3965 IQ_NET_ID_MASK,
3966 NULL, HFILL
3970 &hf_iq_net_aux_id,
3972 "IE_NETWORK_AUX_ID",
3973 "mih.iq_type_list.net_aux_id",
3974 FT_BOOLEAN,
3976 NULL,
3977 IQ_NET_AUX_MASK,
3978 NULL, HFILL
3982 &hf_iq_roam_part,
3984 "IE_ROAMING_PARTNERS",
3985 "mih.iq_type_list.ie_roam_part",
3986 FT_BOOLEAN,
3988 NULL,
3989 IQ_IE_ROAM_MASK,
3990 NULL, HFILL
3994 &hf_iq_cost,
3996 "IE_COST",
3997 "mih.iq_type_list.ie_cost",
3998 FT_BOOLEAN,
4000 NULL,
4001 IQ_IE_COST_MASK,
4002 NULL, HFILL
4006 &hf_iq_net_qos,
4008 "IE_NETWORK_QOS",
4009 "mih.iq_type_list.ie_net_qos",
4010 FT_BOOLEAN,
4012 NULL,
4013 IQ_IE_QOS_MASK,
4014 NULL, HFILL
4018 &hf_iq_net_dat_rt,
4020 "IE_NETWORK_DATA_RATE",
4021 "mih.iq_type_list.ie_net_dat_rt",
4022 FT_BOOLEAN,
4024 NULL,
4025 IQ_IE_DATA_MASK,
4026 NULL, HFILL
4030 &hf_iq_net_reg_dom,
4032 "IE_NET_REGULT_DOMAIN",
4033 "mih.iq_type_list.ie_net_reg_dom",
4034 FT_BOOLEAN,
4036 NULL,
4037 IQ_IE_REGDOM_MASK,
4038 NULL, HFILL
4042 &hf_iq_freq_bands,
4044 "IE_NET_FREQUENCY_BANDS",
4045 "mih.iq_type_list.ie_net_freq",
4046 FT_BOOLEAN,
4048 NULL,
4049 IQ_IE_FREQ_MASK,
4050 NULL, HFILL
4054 &hf_iq_ip_cfg_mthds,
4056 "IE_NET_IP_CFG_METHODS",
4057 "mih.iq_type_list.ie_net_ip_cfg",
4058 FT_BOOLEAN,
4060 NULL,
4061 IQ_IE_IP_CFG_MASK,
4062 NULL, HFILL
4066 &hf_iq_net_cap,
4068 "IE_NET_CAPABILITIES",
4069 "mih.iq_type_list.ie_net_cap",
4070 FT_BOOLEAN,
4072 NULL,
4073 IQ_IE_CAP_MASK,
4074 NULL, HFILL
4078 &hf_iq_supp_lcp,
4080 "IE_NET_SUPPORTED_LCP",
4081 "mih.iq_type_list.ie_net_sup_lcp",
4082 FT_BOOLEAN,
4084 NULL,
4085 IQ_IE_SUP_MASK,
4086 NULL, HFILL
4090 &hf_iq_net_mob_mg,
4092 "IE_NET_MOB_MGMT_PROT",
4093 "mih.iq_type_list.ie_net_mob_mg",
4094 FT_BOOLEAN,
4096 NULL,
4097 IQ_IE_MOB_MG_MASK,
4098 NULL, HFILL
4102 &hf_iq_net_emserv,
4104 "IE_NET_EMSERV_PROXY",
4105 "mih.iq_type_list.ie_net_emer_serv",
4106 FT_BOOLEAN,
4108 NULL,
4109 IQ_IE_EM_SERV_MASK,
4110 NULL, HFILL
4114 &hf_iq_net_ims_pcscf,
4116 "IE_NET_IMS_PROXY_CSCF",
4117 "mih.iq_type_list.ie_net_ims_pcscf",
4118 FT_BOOLEAN,
4120 NULL,
4121 IQ_IE_IMS_MASK,
4122 NULL, HFILL
4126 &hf_iq_net_mob_net,
4128 "IE_NET_MOBILE_NETWORK",
4129 "mih.iq_type_list.ie_net_mob_net",
4130 FT_BOOLEAN,
4132 NULL,
4133 IQ_IE_MOB_NET_MASK,
4134 NULL, HFILL
4138 &hf_iq_link_addr,
4140 "IE_POA_LINK_ADDR",
4141 "mih.iq_type_list.ie_poa_link",
4142 FT_BOOLEAN,
4144 NULL,
4145 IQ_IE_POA_ADDR_MASK,
4146 NULL, HFILL
4150 &hf_iq_poa_loc,
4152 "IE_POA_LOCATION",
4153 "mih.iq_type_list.ie_poa_loc",
4154 FT_BOOLEAN,
4156 NULL,
4157 IQ_IE_POA_LOC_MASK,
4158 NULL, HFILL
4162 &hf_iq_poa_chan_range,
4164 "IE_POA_CHANNEL_RANGE",
4165 "mih.iq_type_list.ie_poa_chan_rg",
4166 FT_BOOLEAN,
4168 NULL,
4169 IQ_IE_POA_CHAN_MASK,
4170 NULL, HFILL
4174 &hf_iq_poa_sys_info,
4176 "IE_POA_SYSTEM_INFO",
4177 "mih.iq_type_list.ie_poa_syst_info",
4178 FT_BOOLEAN,
4180 NULL,
4181 IQ_IE_POA_SYS_MASK,
4182 NULL, HFILL
4186 &hf_iq_poa_sub_info,
4188 "IE_POA_SUBNET_INFO",
4189 "mih.iq_type_list.ie_poa_sub_info",
4190 FT_BOOLEAN,
4192 NULL,
4193 IQ_IE_POA_SUB_MASK,
4194 NULL, HFILL
4198 &hf_iq_poa_ip,
4200 "IE_POA_IP_ADDR",
4201 "mih.iq_type_list.ie_poa_ip",
4202 FT_BOOLEAN,
4204 NULL,
4205 IQ_IE_POA_IP_MASK,
4206 NULL, HFILL
4210 /*header fields for mob mgmt*/
4212 &hf_mob_list,
4214 "List of supported mobility management protocols",
4215 "mih.mob_list",
4216 FT_UINT16,
4217 BASE_HEX,
4218 NULL,
4219 0x0,
4220 NULL, HFILL
4224 &hf_mob_mip4,
4226 "Mobile IPv4",
4227 "mih.mob_list.mip4",
4228 FT_BOOLEAN,
4230 NULL,
4231 MOB_MIP4_MASK,
4232 NULL, HFILL
4236 &hf_mob_mip4_reg,
4238 "Mobile IPv4 Regional Registration",
4239 "mih.mob_list.mip4_reg",
4240 FT_BOOLEAN,
4242 NULL,
4243 MOB_MIP4_REG_MASK,
4244 NULL, HFILL
4248 &hf_mob_mip6,
4250 "Mobile IPv6",
4251 "mih.mob_list.mip6",
4252 FT_BOOLEAN,
4254 NULL,
4255 MOB_MIP6_MASK,
4256 NULL, HFILL
4260 &hf_mob_hmip6,
4262 "Hierarchical Mobile IPv6",
4263 "mih.mob_list.hmip6",
4264 FT_BOOLEAN,
4266 NULL,
4267 MOB_HMIP6_MASK,
4268 NULL, HFILL
4272 &hf_mob_low_lat,
4274 "Low Latency Handoffs",
4275 "mih.mob_list.low_lat",
4276 FT_BOOLEAN,
4278 NULL,
4279 MOB_LOW_LAT_MASK,
4280 NULL, HFILL
4284 &hf_mob_fmip6,
4286 "Mobile IPv6 Fast Handovers",
4287 "mih.mob_list.fmip6",
4288 FT_BOOLEAN,
4290 NULL,
4291 MOB_FMIP6_MASK,
4292 NULL, HFILL
4296 &hf_mob_ike_multi,
4298 "IKEv2 Mobility and Multihoming Protocol",
4299 "mih.mob_list.ike_multi",
4300 FT_BOOLEAN,
4302 NULL,
4303 MOB_IKE_MULTI_MASK,
4304 NULL, HFILL
4308 /*header fields for configure methods*/
4310 &hf_cfg_mthds,
4312 "A set of IP configuration methods",
4313 "mih.cfg_mthds",
4314 FT_UINT32,
4315 BASE_HEX,
4316 NULL,
4317 0x0,
4318 NULL, HFILL
4322 &hf_cfg_ip4_stat,
4324 "IPv4 static configuration",
4325 "mih.ip_cfg_mthds.static",
4326 FT_BOOLEAN,
4328 NULL,
4329 IP_CFG_STAT_MASK,
4330 NULL, HFILL
4334 &hf_cfg_dhcp4,
4336 "DHCPv4",
4337 "mih.ip_cfg_mthds.dhcp4",
4338 FT_BOOLEAN,
4340 NULL,
4341 IP_CFG_DHCP4_MASK,
4342 NULL, HFILL
4346 &hf_cfg_mip_fa,
4348 "Mobile IPv4 with foreign agent",
4349 "mih.ip_cfg_mthds.mip4_fa",
4350 FT_BOOLEAN,
4352 NULL,
4353 IP_CFG_MIP4_FA_MASK,
4354 NULL, HFILL
4358 &hf_cfg_mip_wo_fa,
4360 "Mobile IPv4 without FA",
4361 "mih.ip_cfg_mthds.mip4_wo_fa",
4362 FT_BOOLEAN,
4364 NULL,
4365 IP_CFG_MIP4_NFA_MASK,
4366 NULL, HFILL
4370 &hf_cfg_ip6_sac,
4372 "IPv6 stateless address configuration",
4373 "mih.ip_cfg_mthds.ip6_state_less",
4374 FT_BOOLEAN,
4376 NULL,
4377 IP_CFG_IP6_SL_MASK,
4378 NULL, HFILL
4382 &hf_cfg_dhcp6,
4384 "DHCPv6",
4385 "mih.ip_cfg_mthds.dhcp6",
4386 FT_BOOLEAN,
4388 NULL,
4389 IP_CFG_DHCP6_MASK,
4390 NULL, HFILL
4394 &hf_cfg_ip6_manual,
4396 "IPv6 manual configuration",
4397 "mih.ip_cfg_mthds.ip6_manual",
4398 FT_BOOLEAN,
4400 NULL,
4401 IP_CFG_IP6_MAN_MASK,
4402 NULL, HFILL
4406 /*header fields for transport lists*/
4408 &hf_trans_list,
4410 "Supported Transports",
4411 "mih.trans_list",
4412 FT_UINT16,
4413 BASE_HEX,
4414 NULL,
4415 0x0,
4416 NULL, HFILL
4420 &hf_trans_udp,
4422 "UDP",
4423 "mih.trans_list.udp",
4424 FT_BOOLEAN,
4426 NULL,
4427 0x8000,
4428 NULL, HFILL
4432 &hf_trans_tcp,
4434 "TCP",
4435 "mih.trans_list.tcp",
4436 FT_BOOLEAN,
4438 NULL,
4439 0x4000,
4440 NULL, HFILL
4444 /*header fields for device state request*/
4446 &hf_dev_states_req,
4448 "Device Status Request",
4449 "mih.dev_states_req",
4450 FT_UINT16,
4451 BASE_HEX,
4452 NULL,
4453 0x0,
4454 NULL, HFILL
4458 &hf_dev_states_req_dev_info,
4460 "Device Info",
4461 "mih.dev_states_req.dev_info",
4462 FT_BOOLEAN,
4464 NULL,
4465 0x8000,
4466 NULL, HFILL
4470 &hf_dev_states_req_batt_lvl,
4472 "Battery Level",
4473 "mih.dev_states_req.batt_level",
4474 FT_BOOLEAN,
4476 NULL,
4477 0x4000,
4478 NULL, HFILL
4482 /*header fields for MIH Capabilities*/
4484 &hf_mihcap,
4486 "Supported MIH Capability",
4487 "mih.mihcap",
4488 FT_UINT8,
4489 BASE_HEX,
4490 NULL,
4491 0x0,
4492 NULL, HFILL
4496 &hf_mihcap_es,
4498 "Event Service (ES)",
4499 "mih.mihcap.event_service",
4500 FT_BOOLEAN,
4502 NULL,
4503 0x80,
4504 NULL, HFILL
4508 &hf_mihcap_cs,
4510 "Command Service (CS)",
4511 "mih.mihcap.command_service",
4512 FT_BOOLEAN,
4514 NULL,
4515 0x40,
4516 NULL, HFILL
4520 &hf_mihcap_is,
4522 "Information Service (IS)",
4523 "mih.mihcap.information_service",
4524 FT_BOOLEAN,
4526 NULL,
4527 0x20,
4528 NULL, HFILL
4532 /*header fields for High Level Network Capabilities*/
4534 &hf_net_caps,
4536 "High Level Network Capability",
4537 "mih.net_caps",
4538 FT_UINT32,
4539 BASE_HEX,
4540 NULL,
4541 0x0,
4542 NULL, HFILL
4546 &hf_net_caps_sec,
4548 "Security",
4549 "mih.net_caps.sec",
4550 FT_BOOLEAN,
4552 NULL,
4553 0x80000000,
4554 NULL, HFILL
4558 &hf_net_caps_qos0,
4560 "QoS Class 0",
4561 "mih.net_caps.qos0",
4562 FT_BOOLEAN,
4564 NULL,
4565 0x40000000,
4566 NULL, HFILL
4570 &hf_net_caps_qos1,
4572 "QoS Class 1",
4573 "mih.net_caps.qos1",
4574 FT_BOOLEAN,
4576 NULL,
4577 0x20000000,
4578 NULL, HFILL
4582 &hf_net_caps_qos2,
4584 "QoS Class 2",
4585 "mih.net_caps.qos2",
4586 FT_BOOLEAN,
4588 NULL,
4589 0x10000000,
4590 NULL, HFILL
4594 &hf_net_caps_qos3,
4596 "QoS Class 3",
4597 "mih.net_caps.qos3",
4598 FT_BOOLEAN,
4600 NULL,
4601 0x08000000,
4602 NULL, HFILL
4606 &hf_net_caps_qos4,
4608 "QoS Class 4",
4609 "mih.net_caps.qos4",
4610 FT_BOOLEAN,
4612 NULL,
4613 0x04000000,
4614 NULL, HFILL
4618 &hf_net_caps_qos5,
4620 "QoS Class 5",
4621 "mih.net_caps.qos5",
4622 FT_BOOLEAN,
4624 NULL,
4625 0x02000000,
4626 NULL, HFILL
4630 &hf_net_caps_ia,
4632 "Internet Access",
4633 "mih.net_caps.internet_access",
4634 FT_BOOLEAN,
4636 NULL,
4637 0x01000000,
4638 NULL, HFILL
4642 &hf_net_caps_es,
4644 "Emergency Services",
4645 "mih.net_caps.emergency_services",
4646 FT_BOOLEAN,
4648 NULL,
4649 0x00800000,
4650 NULL, HFILL
4654 &hf_net_caps_mihcap,
4656 "MIH Capability",
4657 "mih.net_caps.mihcap",
4658 FT_BOOLEAN,
4660 NULL,
4661 0x00400000,
4662 NULL, HFILL
4666 /*header fields for Link Action attributes*/
4668 &hf_link_ac_attr,
4670 "Link Action Attribute",
4671 "mih.link_ac_attr",
4672 FT_UINT8,
4673 BASE_HEX,
4674 NULL,
4675 0x0,
4676 NULL, HFILL
4680 &hf_link_ac_attr_link_scan,
4682 "Link_Scan",
4683 "mih.link_ac_attr.link_scan",
4684 FT_BOOLEAN,
4686 NULL,
4687 0x80,
4688 NULL, HFILL
4692 &hf_link_ac_attr_link_res_retain,
4694 "Link Resource Retain",
4695 "mih.link_ac_attr.link_res_retain",
4696 FT_BOOLEAN,
4698 NULL,
4699 0x40,
4700 NULL, HFILL
4704 &hf_link_ac_attr_data_fwd_req,
4706 "Forward Data Request",
4707 "mih.link_ac_attr.data_fwd_req",
4708 FT_BOOLEAN,
4710 NULL,
4711 0x20,
4712 NULL, HFILL
4717 /* Setup protocol subtree array */
4718 static gint *ett[] =
4720 &ett_mih,
4721 &ett_ver_flags,
4722 &ett_mid,
4723 &ett_tlv,
4724 &ett_cmd_bitmap,
4725 &ett_event_bitmap,
4726 &ett_mob_mgt_bitmap,
4727 &ett_cfg_mtd_bitmap,
4728 &ett_iq_type_bitmap,
4729 &ett_trans_list_bitmap,
4730 &ett_dev_states_bitmap,
4731 &ett_mihcap_bitmap,
4732 &ett_net_caps_bitmap,
4733 &ett_ac_attr_bitmap,
4734 &ett_subtype_eth_bitmap,
4735 &ett_subtype_wireless_other_bitmap,
4736 &ett_subtype_ieee80211_bitmap,
4737 &ett_subtype_umts_bitmap,
4738 &ett_subtype_cdma2000_bitmap,
4739 &ett_subtype_ieee80216_bitmap
4742 proto_mih = proto_register_protocol("Media-Independent Handover", "MIH", "mih");
4743 proto_register_field_array(proto_mih, hf, array_length(hf));
4744 proto_register_subtree_array(ett, array_length(ett));
4748 /*dissector handoff*/
4749 void proto_reg_handoff_mih(void)
4751 dissector_handle_t mih_handle;
4753 mih_handle = create_dissector_handle(dissect_mih, proto_mih);
4754 /*Layer 3 handle*/
4755 dissector_add_uint("udp.port", MIH_PORT, mih_handle);
4756 dissector_add_uint("tcp.port", MIH_PORT, mih_handle);
4758 /*Layer 2 handle*/
4759 dissector_add_uint("ethertype", ETHERTYPE_MIH, mih_handle);