Coverage Report

Created: 2025-08-04 07:15

/src/wireshark/epan/dissectors/packet-mih.c
Line
Count
Source (jump to first uncovered line)
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
4
 *
5
 * Copyright 2011, ANKITH AGARWAL <ankitha@cdac.in>
6
 *
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
9
 *
10
 * Copyright 2012, Alton MacDonald <alton.kenneth.macdonald@fokus.fraunhofer.de>
11
 *
12
 * Wireshark - Network traffic analyzer
13
 * By Gerald Combs <gerald@wireshark.org>
14
 * Copyright 1998 Gerald Combs
15
 *
16
 * SPDX-License-Identifier: GPL-2.0-or-later
17
 */
18
19
20
21
#include "config.h"
22
23
#include <epan/packet.h>
24
#include <epan/exceptions.h>
25
#include <epan/etypes.h>
26
void proto_register_mih(void);
27
void proto_reg_handoff_mih(void);
28
29
static dissector_handle_t mih_handle;
30
31
28
#define MIH_PORT 4551
32
33
14
#define VERSION_MASK    0xF0
34
14
#define ACKREQ_MASK     0x8
35
14
#define ACKRESP_MASK    0x4
36
14
#define UIR_MASK        0x2
37
14
#define MORE_FRAG_MASK  0x1
38
14
#define FRAG_NO_MASK    0xFE
39
14
#define SID_MASK        0xF000
40
14
#define OPCODE_MASK     0x0C00
41
56
#define AID_MASK        0x03FF
42
14
#define TRANS_ID_MASK   0x0FFF
43
#define LEN_OF_LEN_MASK 0x80
44
45
/*Type values for TLV encoding*/
46
893
#define SRC_MIHF_ID             1
47
1.31k
#define DEST_MIHF_ID            2
48
311
#define STATUS                  3
49
273
#define LINK_TYPE               4
50
401
#define MIH_EVT_LIST            5
51
179
#define MIH_CMD_LIST            6
52
140
#define MIH_IQ_TYPE_LIST        7
53
162
#define MIH_TRANS_LIST          8
54
246
#define LINK_ADDR_LIST          9
55
241
#define MBB_HO_SUPP_LIST        10
56
67
#define REG_REQUEST_CODE        11
57
62
#define VALID_TIME_INTR         12
58
91
#define LINK_ID                 13
59
181
#define NEW_LINK_ID             14
60
128
#define OLD_ACCESS_ROUTER       15
61
245
#define NEW_ACCESS_ROUTER       16
62
75
#define IP_RENEWAL_FLAG         17
63
48
#define IP_MOB_MGMT             18
64
69
#define IP_CFG_MTHDS            19
65
82
#define LINK_DN_REASON          20
66
66
#define TIMER_INTERVAL          21
67
81
#define LINK_GOING_DN_REASON    22
68
228
#define LINK_PARAM_RPT_LIST     23
69
88
#define DEV_STATES_REQ          24
70
81
#define LINK_ID_LIST            25
71
98
#define DEV_STATES_RSP_LIST     26
72
241
#define STATUS_REQ_SET          27
73
296
#define STATUS_RSP_LIST         28
74
181
#define CFG_REQ_LIST            29
75
67
#define CFG_RSP_LIST            30
76
137
#define LINK_POA_LIST           31
77
293
#define PREF_LINK_LIST          32
78
36
#define HO_REQ_QUERY_LIST       33
79
125
#define HO_STATUS               34
80
59
#define ACCESS_ROUTER_ADDR      35
81
207
#define DHCP_SER_ADDR           36
82
269
#define FA_ADDR                 37
83
77
#define LINK_ACTION_REQ_LIST    38
84
251
#define LINK_ACTION_RSP_LIST    39
85
48
#define HO_RESULT               40
86
48
#define LINK_RES_STATUS         41
87
49
#define RES_RETENTION_STATUS    42
88
68
#define IQ_BIN_DATA_LIST        43
89
41
#define IQ_RDF_DATA_LIST        44
90
35
#define IQ_RDF_SCHEMA_URL       45
91
91
#define IQ_RDF_SCHM_LIST        46
92
38
#define MAX_RSP_SIZE            47
93
75
#define IR_BIN_DATA_LIST        48
94
86
#define IR_RDF_DATA_LIST        49
95
73
#define IR_SCHM_URL_LIST        50
96
121
#define IR_RDF_SCHM_LIST        51
97
1.34k
#define MN_MIHF_ID              52
98
41
#define Q_RES_RPT_FLAG          53
99
89
#define EVT_CFG_INFO_LIST       54
100
27
#define TGT_NET_INFO            55
101
82
#define TGT_NET_INFO_LIST       56
102
41
#define ASGN_RES_SET            57
103
89
#define LINK_DET_INFO_LIST      58
104
238
#define MN_LINK_ID              59
105
275
#define POA_LINK_ADDR           60
106
35
#define UNAUTH_INFO_REQ         61
107
19
#define NET_TYPE                62
108
44
#define REQ_RES_SET             63
109
32
#define VEND_SPECIFIC_TLV       100
110
111
/*Bitmasks in 802.21 are encoded in Network-Byte-Order: bit0 is leftmost bit*/
112
113
/*MASK for event list*/
114
14
#define LINK_DETECT_MASK        0x80000000
115
14
#define LINK_UP_MASK            0x40000000
116
14
#define LINK_DOWN_MASK          0x20000000
117
14
#define LINK_PARAM_MASK         0x10000000
118
14
#define LINK_GD_MASK            0x08000000
119
14
#define LINK_HO_IMM_MASK        0x04000000
120
14
#define LINK_HO_COMP_MASK       0x02000000
121
14
#define LINK_PDU_MASK           0x01000000
122
123
/*MASK for command list*/
124
/*1st bit is reserved*/
125
14
#define CMD_EVT_SUBS_MASK       0x40000000
126
14
#define CMD_EVT_UNSUBS_MASK     0x20000000
127
14
#define CMD_GET_PARA_MASK       0x10000000
128
14
#define CMD_CONF_TH_MASK        0x08000000
129
14
#define CMD_LINK_AC_MASK        0x04000000
130
131
/*MASK for Info Query list*/
132
14
#define IQ_BIN_DATA_MASK        0x80000000
133
14
#define IQ_RDF_DATA_MASK        0x40000000
134
14
#define IQ_RDF_SCH_U_MASK       0x20000000
135
14
#define IQ_RDF_SCH_MASK         0x10000000
136
14
#define IQ_IE_NET_TYPE_MASK     0x08000000
137
14
#define IQ_IE_OP_ID_MASK        0x04000000
138
14
#define IQ_SERV_ID_MASK         0x02000000
139
14
#define IQ_IE_COUN_MASK         0x01000000
140
14
#define IQ_NET_ID_MASK          0x00800000
141
14
#define IQ_NET_AUX_MASK         0x00400000
142
14
#define IQ_IE_ROAM_MASK         0x00200000
143
14
#define IQ_IE_COST_MASK         0x00100000
144
14
#define IQ_IE_QOS_MASK          0x00080000
145
14
#define IQ_IE_DATA_MASK         0x00040000
146
14
#define IQ_IE_REGDOM_MASK       0x00020000
147
14
#define IQ_IE_FREQ_MASK         0x00010000
148
14
#define IQ_IE_IP_CFG_MASK       0x00008000
149
14
#define IQ_IE_CAP_MASK          0x00004000
150
14
#define IQ_IE_SUP_MASK          0x00002000
151
14
#define IQ_IE_MOB_MG_MASK       0x00001000
152
14
#define IQ_IE_EM_SERV_MASK      0x00000800
153
14
#define IQ_IE_IMS_MASK          0x00000400
154
14
#define IQ_IE_MOB_NET_MASK      0x00000200
155
14
#define IQ_IE_POA_ADDR_MASK     0x00000100
156
14
#define IQ_IE_POA_LOC_MASK      0x00000080
157
14
#define IQ_IE_POA_CHAN_MASK     0x00000040
158
14
#define IQ_IE_POA_SYS_MASK      0x00000020
159
14
#define IQ_IE_POA_SUB_MASK      0x00000010
160
14
#define IQ_IE_POA_IP_MASK       0x00000008
161
162
/*MASK for mobility Management methods*/
163
14
#define MOB_MIP4_MASK           0x8000
164
14
#define MOB_MIP4_REG_MASK       0x4000
165
14
#define MOB_MIP6_MASK           0x2000
166
14
#define MOB_HMIP6_MASK          0x1000
167
14
#define MOB_LOW_LAT_MASK        0x0800
168
14
#define MOB_FMIP6_MASK          0x0400
169
14
#define MOB_IKE_MULTI_MASK      0x0200
170
171
/*MASK for ip configuration methods*/
172
14
#define IP_CFG_STAT_MASK        0x80000000
173
14
#define IP_CFG_DHCP4_MASK       0x40000000
174
14
#define IP_CFG_MIP4_FA_MASK     0x20000000
175
14
#define IP_CFG_MIP4_NFA_MASK    0x10000000
176
/*bits 4-10 reserved for IPv4 address configuration*/
177
14
#define IP_CFG_IP6_SL_MASK      0x00100000
178
14
#define IP_CFG_DHCP6_MASK       0x00080000
179
14
#define IP_CFG_IP6_MAN_MASK     0x00040000
180
181
/*information holder integers...*/
182
static int proto_mih;
183
static int hf_mih_version;
184
static int hf_mih_ack_req;
185
static int hf_mih_ack_resp;
186
static int hf_mih_uir;
187
static int hf_mih_more_frag;
188
static int hf_mih_frag_no;
189
static int hf_mih_mid;
190
static int hf_mih_service_id;
191
static int hf_mih_opcode;
192
static int hf_mih_serv_actionid;
193
static int hf_mih_event_actionid;
194
static int hf_mih_command_actionid;
195
static int hf_mih_info_actionid;
196
static int hf_mih_tid;
197
static int hf_mih_pay_len;
198
static int hf_mih_type;
199
static int hf_mih_type_length;
200
static int hf_mih_type_length_ext;
201
static int hf_mihf_id;
202
static int hf_mihf_id_mac;
203
static int hf_mihf_id_ipv4;
204
static int hf_mihf_id_ipv6;
205
static int hf_status;
206
static int hf_ip_methods_supported;
207
static int hf_ip_dhcp_services;
208
static int hf_fn_agent;
209
static int hf_access_router;
210
static int hf_link_type;
211
static int hf_link_type_ext;
212
static int hf_ipv4_addr;
213
static int hf_ipv6_addr;
214
static int hf_link_dn_reason;
215
static int hf_link_gdn_reason;
216
static int hf_mac_addr;
217
static int hf_link_param_gen;
218
static int hf_link_param_qos;
219
static int hf_link_param_gg;
220
static int hf_link_param_802_11;
221
static int hf_link_param_fdd;
222
static int hf_link_param_edge;
223
static int hf_link_param_eth;
224
static int hf_link_param_c2k;
225
static int hf_link_param_hrpd;
226
static int hf_link_param_802_16;
227
static int hf_link_param_802_20;
228
static int hf_link_param_802_22;
229
static int hf_link_param_value;
230
static int hf_op_mode;
231
static int hf_link_ac_type;
232
static int hf_link_ac_ext_time;
233
static int hf_link_ac_result;
234
static int hf_ho_reason;
235
static int hf_ho_status;
236
static int hf_reg_request_code;
237
static int hf_ip_renewal;
238
static int hf_max_resp_size;
239
static int hf_time_interval;
240
static int hf_valid_time_interval;
241
static int hf_tsp_carrier;
242
static int hf_mbb_ho_supp;
243
static int hf_link_addr_type;
244
static int hf_link_transport_addr_type;
245
static int hf_link_addr_string;
246
static int hf_link_data_rate;
247
static int hf_plmn_id;
248
static int hf_location_area_id;
249
static int hf_cell_id;
250
static int hf_ci;
251
static int hf_threshold_val;
252
static int hf_threshold_x_dir;
253
static int hf_threshold_action;
254
static int hf_config_status;
255
static int hf_num_cos;
256
static int hf_num_queue;
257
static int hf_channel_id;
258
static int hf_predef_cfg_id;
259
static int hf_network_id;
260
static int hf_net_aux_id;
261
static int hf_sig_strength_dbm;
262
static int hf_sig_strength_per;
263
static int hf_cos_id;
264
static int hf_cos_value;
265
static int hf_sinr;
266
static int hf_rdf_data;
267
static int hf_rdf_mime_type;
268
static int hf_link_res_status;
269
static int hf_res_retention_status;
270
static int hf_res_rpt_flag;
271
static int hf_unauth_info_req;
272
static int hf_rdf_sch;
273
static int hf_rdf_sch_url;
274
static int hf_ir_bin_data;
275
static int hf_iq_bin_data_x;
276
static int hf_vendor_specific_tlv;
277
static int hf_reserved_tlv;
278
static int hf_experimental_tlv;
279
static int hf_unknown_tlv;
280
static int hf_fragmented_tlv;
281
282
/*header fields for event list */
283
static int hf_event_list;
284
static int hf_event_link_detect;
285
static int hf_event_link_up;
286
static int hf_event_link_dn;
287
static int hf_event_link_param;
288
static int hf_event_link_gd;
289
static int hf_event_ho_imm;
290
static int hf_event_ho_comp;
291
static int hf_event_pdu_tx_stat;
292
293
/*header fields for command list*/
294
static int hf_cmd_list;
295
static int hf_cmd_event_subs;
296
static int hf_cmd_event_unsub;
297
static int hf_cmd_get_param;
298
static int hf_cmd_con_thres;
299
static int hf_cmd_link_action;
300
301
/*header fields for iq type list*/
302
static int hf_iq_list;
303
static int hf_iq_bin_data;
304
static int hf_iq_rdf_data;
305
static int hf_iq_rdf_sch_url;
306
static int hf_iq_rdf_sch;
307
static int hf_iq_net_type;
308
static int hf_iq_op_id;
309
static int hf_iq_serv_pro_id;
310
static int hf_iq_country_code;
311
static int hf_iq_net_id;
312
static int hf_iq_net_aux_id;
313
static int hf_iq_roam_part;
314
static int hf_iq_cost;
315
static int hf_iq_net_qos;
316
static int hf_iq_net_dat_rt;
317
static int hf_iq_net_reg_dom;
318
static int hf_iq_freq_bands;
319
static int hf_iq_ip_cfg_mthds;
320
static int hf_iq_net_cap;
321
static int hf_iq_supp_lcp;
322
static int hf_iq_net_mob_mg;
323
static int hf_iq_net_emserv;
324
static int hf_iq_net_ims_pcscf;
325
static int hf_iq_net_mob_net;
326
static int hf_iq_link_addr;
327
static int hf_iq_poa_loc;
328
static int hf_iq_poa_chan_range;
329
static int hf_iq_poa_sys_info;
330
static int hf_iq_poa_sub_info;
331
static int hf_iq_poa_ip;
332
333
/*header fields for mob mgmt*/
334
static int hf_mob_list;
335
static int hf_mob_mip4;
336
static int hf_mob_mip4_reg;
337
static int hf_mob_mip6;
338
static int hf_mob_hmip6;
339
static int hf_mob_low_lat;
340
static int hf_mob_fmip6;
341
static int hf_mob_ike_multi;
342
343
/*header fields for configure methods*/
344
static int hf_cfg_mthds;
345
static int hf_cfg_ip4_stat;
346
static int hf_cfg_dhcp4;
347
static int hf_cfg_mip_fa;
348
static int hf_cfg_mip_wo_fa;
349
static int hf_cfg_ip6_sac;
350
static int hf_cfg_dhcp6;
351
static int hf_cfg_ip6_manual;
352
353
/*header fields for transport list*/
354
static int hf_trans_list;
355
static int hf_trans_udp;
356
static int hf_trans_tcp;
357
358
/*header fields for device state requests and responses*/
359
static int hf_dev_states_req;
360
static int hf_dev_states_req_dev_info;
361
static int hf_dev_states_req_batt_lvl;
362
static int hf_dev_states_resp;
363
static int hf_dev_batt_level;
364
static int hf_dev_info;
365
366
/*header fields for Link Action Attributes*/
367
static int hf_link_ac_attr;
368
static int hf_link_ac_attr_link_scan;
369
static int hf_link_ac_attr_link_res_retain;
370
static int hf_link_ac_attr_data_fwd_req;
371
372
/*header fields for transport subtypes*/
373
static int hf_link_subtype_eth;
374
static int hf_link_subtype_eth_10m;
375
static int hf_link_subtype_eth_100m;
376
static int hf_link_subtype_eth_1000m;
377
static int hf_link_subtype_wireless_other;
378
static int hf_link_subtype_wireless_other_dvb;
379
static int hf_link_subtype_wireless_other_tdmb;
380
static int hf_link_subtype_wireless_other_atsc;
381
static int hf_link_subtype_ieee80211;
382
static int hf_link_subtype_ieee80211_24;
383
static int hf_link_subtype_ieee80211_5;
384
static int hf_link_subtype_ieee80211_49;
385
static int hf_link_subtype_ieee80211_365;
386
static int hf_link_subtype_ieee80211_316;
387
static int hf_link_subtype_umts;
388
static int hf_link_subtype_umts_99;
389
static int hf_link_subtype_umts_4;
390
static int hf_link_subtype_umts_5;
391
static int hf_link_subtype_umts_6;
392
static int hf_link_subtype_umts_7;
393
static int hf_link_subtype_umts_8;
394
static int hf_link_subtype_cdma2000;
395
static int hf_link_subtype_cdma2000_0;
396
static int hf_link_subtype_cdma2000_a;
397
static int hf_link_subtype_cdma2000_b;
398
static int hf_link_subtype_cdma2000_c;
399
static int hf_link_subtype_ieee80216;
400
static int hf_link_subtype_ieee80216_25;
401
static int hf_link_subtype_ieee80216_35;
402
403
/*header fields for MIH Capabilities*/
404
static int hf_mihcap;
405
static int hf_mihcap_es;
406
static int hf_mihcap_cs;
407
static int hf_mihcap_is;
408
409
/*header fields for High Level Network Capabilities*/
410
static int hf_net_caps;
411
static int hf_net_caps_sec;
412
static int hf_net_caps_qos0;
413
static int hf_net_caps_qos1;
414
static int hf_net_caps_qos2;
415
static int hf_net_caps_qos3;
416
static int hf_net_caps_qos4;
417
static int hf_net_caps_qos5;
418
static int hf_net_caps_ia;
419
static int hf_net_caps_es;
420
static int hf_net_caps_mihcap;
421
422
/*trees and subtrees...*/
423
static int ett_mih;
424
static int ett_ver_flags;
425
static int ett_mid;
426
static int ett_tlv;
427
static int ett_cmd_bitmap;
428
static int ett_event_bitmap;
429
static int ett_mob_mgt_bitmap;
430
static int ett_cfg_mtd_bitmap;
431
static int ett_iq_type_bitmap;
432
static int ett_trans_list_bitmap;
433
static int ett_dev_states_bitmap;
434
static int ett_mihcap_bitmap;
435
static int ett_net_caps_bitmap;
436
static int ett_ac_attr_bitmap;
437
static int ett_subtype_eth_bitmap;
438
static int ett_subtype_wireless_other_bitmap;
439
static int ett_subtype_ieee80211_bitmap;
440
static int ett_subtype_umts_bitmap;
441
static int ett_subtype_cdma2000_bitmap;
442
static int ett_subtype_ieee80216_bitmap;
443
static int ett_min_pk_tx_delay;
444
static int ett_avg_pk_tx_delay;
445
static int ett_max_pk_tx_delay;
446
static int ett_pk_delay_jitter;
447
static int ett_pk_loss_rate;
448
static int ett_list_prefer_link;
449
static int ett_ip_dhcp_server;
450
static int ett_fn_agent;
451
static int ett_access_router;
452
static int ett_link_states_req;
453
static int ett_link_desc_req;
454
static int ett_dev_states_resp;
455
456
/*field definitions of evt, cmd, mob mgmt, ip cfg, iq type */
457
static int * const event_fields[] = {
458
        &hf_event_link_detect,
459
        &hf_event_link_up,
460
        &hf_event_link_dn,
461
        &hf_event_link_param,
462
        &hf_event_link_gd,
463
        &hf_event_ho_imm,
464
        &hf_event_ho_comp,
465
        &hf_event_pdu_tx_stat,
466
        NULL
467
};
468
469
static int * const cmd_fields[] = {
470
        &hf_cmd_event_subs,
471
        &hf_cmd_event_unsub,
472
        &hf_cmd_get_param,
473
        &hf_cmd_con_thres,
474
        &hf_cmd_link_action,
475
        NULL
476
};
477
478
static int * const iq_type_fields[] = {
479
        &hf_iq_bin_data,
480
        &hf_iq_rdf_data,
481
        &hf_iq_rdf_sch_url,
482
        &hf_iq_rdf_sch,
483
        &hf_iq_net_type,
484
        &hf_iq_op_id,
485
        &hf_iq_serv_pro_id,
486
        &hf_iq_country_code,
487
        &hf_iq_net_id,
488
        &hf_iq_net_aux_id,
489
        &hf_iq_roam_part,
490
        &hf_iq_cost,
491
        &hf_iq_net_qos,
492
        &hf_iq_net_dat_rt,
493
        &hf_iq_net_reg_dom,
494
        &hf_iq_freq_bands,
495
        &hf_iq_ip_cfg_mthds,
496
        &hf_iq_net_cap,
497
        &hf_iq_supp_lcp,
498
        &hf_iq_net_mob_mg,
499
        &hf_iq_net_emserv,
500
        &hf_iq_net_ims_pcscf,
501
        &hf_iq_net_mob_net,
502
        &hf_iq_link_addr,
503
        &hf_iq_poa_loc,
504
        &hf_iq_poa_chan_range,
505
        &hf_iq_poa_sys_info,
506
        &hf_iq_poa_sub_info,
507
        &hf_iq_poa_ip,
508
        NULL
509
};
510
511
static int * const mob_fields[] = {
512
        &hf_mob_mip4,
513
        &hf_mob_mip4_reg,
514
        &hf_mob_mip6,
515
        &hf_mob_hmip6,
516
        &hf_mob_low_lat,
517
        &hf_mob_fmip6,
518
        &hf_mob_ike_multi,
519
        NULL
520
};
521
522
static int * const cfg_fields[] = {
523
        &hf_cfg_ip4_stat,
524
        &hf_cfg_dhcp4,
525
        &hf_cfg_mip_fa,
526
        &hf_cfg_mip_wo_fa,
527
        &hf_cfg_ip6_sac,
528
        &hf_cfg_dhcp6,
529
        &hf_cfg_ip6_manual,
530
        NULL
531
};
532
533
/*field definitions for various bitmaps */
534
static int * const trans_fields[] = {
535
        &hf_trans_udp,
536
        &hf_trans_tcp,
537
        NULL
538
};
539
540
static int * const dev_states_fields[] = {
541
        &hf_dev_states_req_dev_info,
542
        &hf_dev_states_req_batt_lvl,
543
        NULL
544
};
545
546
static int * const mihcap_fields[] = {
547
        &hf_mihcap_es,
548
        &hf_mihcap_cs,
549
        &hf_mihcap_is,
550
        NULL
551
};
552
553
static int * const net_caps_fields[] = {
554
        &hf_net_caps_sec,
555
        &hf_net_caps_qos0,
556
        &hf_net_caps_qos1,
557
        &hf_net_caps_qos2,
558
        &hf_net_caps_qos3,
559
        &hf_net_caps_qos4,
560
        &hf_net_caps_qos5,
561
        &hf_net_caps_ia,
562
        &hf_net_caps_es,
563
        &hf_net_caps_mihcap,
564
        NULL
565
};
566
567
static int * const ac_attr_fields[] = {
568
        &hf_link_ac_attr_link_scan,
569
        &hf_link_ac_attr_link_res_retain,
570
        &hf_link_ac_attr_data_fwd_req,
571
        NULL
572
};
573
574
static int * const subtype_eth_fields[] = {
575
        &hf_link_subtype_eth_10m,
576
        &hf_link_subtype_eth_100m,
577
        &hf_link_subtype_eth_1000m,
578
        NULL
579
};
580
581
static int * const subtype_wireless_other_fields[] = {
582
        &hf_link_subtype_wireless_other_dvb,
583
        &hf_link_subtype_wireless_other_tdmb,
584
        &hf_link_subtype_wireless_other_atsc,
585
        NULL
586
};
587
588
static int * const subtype_ieee80211_fields[] = {
589
        &hf_link_subtype_ieee80211_24,
590
        &hf_link_subtype_ieee80211_5,
591
        &hf_link_subtype_ieee80211_49,
592
        &hf_link_subtype_ieee80211_365,
593
        &hf_link_subtype_ieee80211_316,
594
        NULL
595
};
596
597
static int * const subtype_umts_fields[] = {
598
        &hf_link_subtype_umts_99,
599
        &hf_link_subtype_umts_4,
600
        &hf_link_subtype_umts_5,
601
        &hf_link_subtype_umts_6,
602
        &hf_link_subtype_umts_7,
603
        &hf_link_subtype_umts_8,
604
        NULL
605
};
606
607
static int * const subtype_cdma2000_fields[] = {
608
        &hf_link_subtype_cdma2000_0,
609
        &hf_link_subtype_cdma2000_a,
610
        &hf_link_subtype_cdma2000_b,
611
        &hf_link_subtype_cdma2000_c,
612
        NULL
613
};
614
615
static int * const subtype_ieee80216_fields[] = {
616
        &hf_link_subtype_ieee80216_25,
617
        &hf_link_subtype_ieee80216_35,
618
        NULL
619
};
620
621
static const value_string servicevalues[] = {
622
{1, "Service Management"},
623
{2, "Event Service"},
624
{3, "Command Service"},
625
{4, "Information Service"},
626
{0, NULL}
627
};
628
629
static const value_string opcodevalues[] = {
630
{0, "Confirm"},
631
{1, "Request"},
632
{2, "Response"},
633
{3, "Indication"},
634
{0, NULL},
635
};
636
637
static const value_string link_ac_result_vals[] = {
638
{0, "Success"},
639
{1, "Failure"},
640
{2, "Refused"},
641
{3, "Incapable"},
642
{0, NULL},
643
};
644
645
static const value_string serv_act_id_values[] = {
646
{1, "MIH_Capability_Discover"},
647
{2, "MIH_Register"},
648
{3, "MIH_DeRegister"},
649
{4, "MIH_Event_Subscribe"},
650
{5, "MIH_Event_Unsubscribe"},
651
{0, NULL}
652
};
653
654
static const value_string event_act_id_values[] = {
655
{1, "MIH_Link_Detected"},
656
{2, "MIH_Link_UP"},
657
{3, "MIH_Link_Down"},
658
{5, "MIH_Link_Parameter_Report"},
659
{6, "MIH_Link_Going_down"},
660
{7, "MIH_Link_Handover_Imminent"},
661
{8, "MIH_Handover_Complete"},
662
{0, NULL}
663
};
664
665
static const value_string status_types[] = {
666
{0, "Success"},
667
{1, "Unspecified Failure"},
668
{2, "Rejected"},
669
{3, "Authorization Failure"},
670
{4, "Network Error"},
671
{0, NULL}
672
};
673
674
static const value_string ho_status_vals[] = {
675
{0, "Handover Permitted"},
676
{1, "Handover Declined"},
677
{0, NULL}
678
};
679
680
static const value_string mbb_ho_supp_vals[] = {
681
{0, "Make before break is not supported."},
682
{1, "Make before break is supported."},
683
{0, NULL}
684
};
685
686
static const value_string reg_request_code_vals[] = {
687
{0, "Make"},
688
{1, "Re-Registration"},
689
{0, NULL}
690
};
691
692
static const value_string ip_renewal_vals[] = {
693
{0, "Change Not Required"},
694
{1, "Change Required"},
695
{0, NULL}
696
};
697
698
static const value_string dev_states_req_vals[] = {
699
{0, "DEVICE_INFO"},
700
{1, "BATT_LEVEL"},
701
{0, NULL}
702
};
703
704
static const value_string link_addr_types[] ={
705
{0, "MAC_ADDR"},
706
{1, "3GPP_3G_CELL_ID"},
707
{2, "3GPP_2G_CELL_ID"},
708
{3, "3GPP_ADDR"},
709
{4, "3GPP2_ADDR"},
710
{5, "OTHER_L2_ADDR"},
711
{0, NULL}
712
};
713
714
static const value_string threshold_x_dir_vals[] ={
715
{0, "Above Threshold"},
716
{1, "Below Threshold"},
717
{0, NULL}
718
};
719
720
static const value_string threshold_action_vals[] ={
721
{0, "Set Normal Threshold"},
722
{1, "Set one-shot Threshold"},
723
{2, "Cancel Threshold"},
724
{0, NULL}
725
};
726
727
static const value_string boolean_types[] ={
728
{0, "False"},
729
{1, "True"},
730
{0, NULL}
731
};
732
733
static const value_string command_act_id_values[] = {
734
{1, "MIH_Link_Get_Parameters"},
735
{2, "MIH_Link_Configure_Thresholds"},
736
{3, "MIH_Link_Actions"},
737
{4, "MIH_Net_HO_Candidate_Query"},
738
{5, "MIH_MN_HO_Candidate_Query"},
739
{6, "MIH_N2N_HO_Query_Resources"},
740
{7, "MIH_MN_HO_Commit"},
741
{8, "MIH_Net_HO-Commit"},
742
{9, "MN_N2N_HO_Commit"},
743
{10, "MIH_MN_HO_Complete"},
744
{11, "MIH_N2N_HO_Complete"},
745
{12, "MIH_Net_HO_Best_Commit"},
746
{0, NULL}
747
};
748
749
static const value_string info_act_id_values[] = {
750
{1, "MIH_Get_Information"},
751
{2, "MIH_Push_information"},
752
{0, NULL}
753
};
754
755
static const value_string link_dn_reason_vals[] = {
756
{0, "Explicit Disconnect"},
757
{1, "Packet Timeout"},
758
{2, "No resource"},
759
{3, "No broadcast"},
760
{4, "Authentication Failure"},
761
{5, "Billing Failure"},
762
{0, NULL}
763
};
764
765
static const value_string link_gdn_reason_vals[] = {
766
{0, "Explicit Disconnect"},
767
{1, "Link Parameter Degrading"},
768
{2, "Low Power"},
769
{3, "No resource"},
770
{0, NULL}
771
};
772
773
static const value_string link_type_vals[] = {
774
{0, "Reserved"},
775
{1, "Wireless - GSM"},
776
{2, "Wireless - GPRS"},
777
{3, "Wireless - EDGE"},
778
{15, "Ethernet"},
779
{18, "Wireless - Other"},
780
{19, "Wireless - IEEE 802.11"},
781
{22, "Wireless - CDMA2000"},
782
{23, "Wireless - UMTS"},
783
{24, "Wireless - cdma2000-HRPD"},
784
{27, "Wireless - IEEE 802.16"},
785
{28, "Wireless - IEEE 802.20"},
786
{29, "Wireless - IEEE 802.22"},
787
{40, "DVB"},
788
{41, "T-DMB"},
789
{42, "ATSC-M/H"},
790
{0, NULL}
791
};
792
793
static const value_string link_param_gen_vals[] = {
794
{0, "Data Rate"},
795
{1, "Signal Strength"},
796
{2, "SINR"},
797
{3, "Throughput"},
798
{4, "Packet Error Rate"},
799
{5, "Channel Frequency"},
800
{6, "Channel Bandwidth"},
801
{7, "Channel TX Power"},
802
{8, "Higher Adjacent Channel Frequency"},
803
{9, "Higher Adjacent Channel Bandwidth"},
804
{10, "Higher Adjacent Channel TX Power"},
805
{11, "Lower Adjacent Channel Frequency"},
806
{12, "Lower Adjacent Channel Bandwidth"},
807
{13, "Lower Adjacent Channel TX Power"},
808
{0, NULL}
809
};
810
811
static const value_string link_ac_type_vals[] = {
812
{0, "NONE"},
813
{1, "LINK_DISCONNECT"},
814
{2, "LINK_LOW_POWER"},
815
{3, "LINK_POWER_DOWN"},
816
{4, "LINK_POWER_UP"},
817
{5, "LINK_CONFIGURE"},
818
{0, NULL}
819
};
820
821
static const value_string link_param_gg_vals[] = {
822
{0, "Rx Qual"},
823
{1, "RsLev"},
824
{2, "Mean BEP"},
825
{3, "StDev BEP"},
826
{0, NULL}
827
};
828
829
static const value_string link_param_fdd_vals[] = {
830
{0, "CPICH RSCP"},
831
{1, "PCCPCH RSCP"},
832
{2, "UTRA carrier RSSI"},
833
{3, "GSM carrier RSSI"},
834
{4, "CPICH Ec/No"},
835
{5, "Transport channel BLER"},
836
{6, "User equipment (UE) transmitted power"},
837
{0, NULL}
838
};
839
840
static const value_string link_param_802_11_vals[] = {
841
{0, "RSSI"},
842
{1, "No QoS resource Available"},
843
{2, "Multicast packet loss rate"},
844
{0, NULL}
845
};
846
847
static const value_string op_mode_vals[] = {
848
{0, "Normal Mode"},
849
{1, "Power Saving Mode"},
850
{2, "Powered Down"},
851
{0, NULL}
852
};
853
854
static const value_string link_param_qos_vals[] = {
855
{0, "Max no of differentiable classes"},
856
{1, "Min Packet transfer delay"},
857
{2, "Avg packet transfer delay"},
858
{3, "Max packet transfer delay"},
859
{4, "delay jitter"},
860
{5, "Packet loss"},
861
{0, NULL}
862
};
863
864
static const value_string link_param_c2k_hrpd_vals[] = {
865
{0, "Pilot Strength"},
866
{0, NULL}
867
};
868
869
static const value_string typevaluenames[] = {
870
{ 1, "Source MIHIF ID" },
871
{ 2, "Destination MIHIF ID" },
872
{ 3, "Status" },
873
{ 4, "Link type" },
874
{ 5, "MIH event list" },
875
{ 6, "MIH command list" },
876
{ 7, "MIIS query type list" },
877
{ 8, "Transport option list" },
878
{ 9, "Link address list" },
879
{ 10, "MBB handover support" },
880
{ 11, "Register request code" },
881
{ 12, "Valid time interval" },
882
{ 13, "Link identifier" },
883
{ 14, "New Link identifier" },
884
{ 15, "Old access router" },
885
{ 16, "New access  router" },
886
{ 17, "IP renewal flag" },
887
{ 18, "Mobility management support" },
888
{ 19, "IP address configuration methods" },
889
{ 20, "Link down reason code" },
890
{ 21, "Time interval" },
891
{ 22, "Link going down reason" },
892
{ 23, "Link parameter report list" },
893
{ 24, "Device states request" },
894
{ 25, "Link identifier list" },
895
{ 26, "Device states response list" },
896
{ 27, "Get status request set" },
897
{ 28, "Get status response list" },
898
{ 29, "Configure request list" },
899
{ 30, "Configure response list" },
900
{ 31, "List of link PoA list" },
901
{ 32, "Preferred link list" },
902
{ 33, "Handover resource query list" },
903
{ 34, "Handover status" },
904
{ 35, "Access router address" },
905
{ 36, "DHCP server address" },
906
{ 37, "FA address" },
907
{ 38, "Link actions list" },
908
{ 39, "Link actions result list" },
909
{ 40, "Handover result" },
910
{ 41, "Resource status" },
911
{ 42, "Resource retention status" },
912
{ 43, "Info query binary data list" },
913
{ 44, "Info query RDF data list" },
914
{ 45, "Info query RDF schema URL" },
915
{ 46, "Info query RDF schema list" },
916
{ 47, "Max response size" },
917
{ 48, "Info response binary data list" },
918
{ 49, "Info response RDF data list" },
919
{ 50, "Info response RDF schema URL list" },
920
{ 51, "Info response RDF schema list" },
921
{ 52, "Mobile node MIHF ID" },
922
{ 53, "Query resource report flag" },
923
{ 54, "Event configuration info list" },
924
{ 55, "Target network info" },
925
{ 56, "List of target network info" },
926
{ 57, "Assigned resource set" },
927
{ 58, "Link detected info list" },
928
{ 59, "MN link ID" },
929
{ 60, "PoA" },
930
{ 61, "Unauthenticated information request" },
931
{ 62, "Network type" },
932
{ 63, "Requested resource set" },
933
{0, NULL}
934
};
935
936
static int16_t dissect_mih_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree, int16_t (*base_dissect)(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree))
937
131k
{
938
131k
        uint8_t i = 0;
939
131k
        uint8_t list_len = tvb_get_uint8(tvb, offset);
940
131k
        offset ++;
941
2.25M
        for(i=0; i < list_len; i++)
942
2.12M
                offset = base_dissect(tvb, offset, tlv_tree);
943
131k
        return (offset);
944
131k
}
945
946
static int16_t dissect_ip_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
947
3.59k
{
948
3.59k
        uint16_t addr_type = tvb_get_ntohs(tvb, offset);
949
3.59k
        uint8_t len = 0;
950
3.59k
        if(addr_type == 1 )
951
539
        {
952
                /*IPv4 Addr*/
953
539
                len = tvb_get_uint8(tvb, offset + 3);
954
539
                proto_tree_add_item(tlv_tree, hf_ipv4_addr, tvb, offset+2, len, ENC_BIG_ENDIAN);
955
539
                return (offset+3+len);
956
539
        }
957
3.06k
        if(addr_type == 2)
958
363
        {
959
                /*IPv6 Addr*/
960
363
                len = tvb_get_uint8(tvb, offset + 3);
961
363
                proto_tree_add_item(tlv_tree,hf_ipv6_addr, tvb, offset+2, len, ENC_NA);
962
363
                return (offset+3+len);
963
363
        }
964
2.69k
        else
965
2.69k
        {
966
2.69k
                len = tvb_get_uint8(tvb, offset + 3);
967
2.69k
                return (offset+3+len);
968
2.69k
        }
969
3.06k
}
970
971
static int16_t dissect_qos_val(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
972
570k
{
973
570k
        proto_tree_add_item(tlv_tree, hf_cos_id, tvb, offset, 1, ENC_BIG_ENDIAN);
974
570k
        offset++ ;
975
570k
        proto_tree_add_item(tlv_tree, hf_cos_value, tvb, offset, 2, ENC_BIG_ENDIAN);
976
570k
        offset += 2;
977
570k
        return (offset);
978
570k
}
979
980
static int16_t dissect_link_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree )
981
1.02M
{
982
1.02M
        uint8_t link_addr_choice = tvb_get_uint8(tvb, offset);
983
1.02M
        uint8_t len = 0;
984
985
1.02M
        proto_tree_add_item(tlv_tree, hf_link_addr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
986
1.02M
        switch (link_addr_choice)
987
1.02M
        {
988
148k
        case 0 : /*MAC_ADDR*/
989
148k
                proto_tree_add_item(tlv_tree, hf_link_transport_addr_type, tvb, offset+1, 2, ENC_BIG_ENDIAN);
990
148k
                if(tvb_get_ntohs(tvb, offset+1) == 0x06)
991
5.14k
                        proto_tree_add_item(tlv_tree, hf_mac_addr, tvb, offset+4, tvb_get_uint8(tvb, offset+3), ENC_NA);
992
148k
                return (offset + 10);
993
994
14.7k
        case 1 :/*3GPP_3G_CELL_ID*/
995
14.7k
                proto_tree_add_item(tlv_tree, hf_plmn_id, tvb, offset+1, 3, ENC_BIG_ENDIAN);
996
14.7k
                proto_tree_add_item(tlv_tree, hf_cell_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
997
14.7k
                return (offset + 8);
998
999
23.8k
        case 2 :/*3GPP_2G_CELL_ID*/
1000
23.8k
                proto_tree_add_item(tlv_tree, hf_plmn_id, tvb, offset+1, 3, ENC_BIG_ENDIAN);
1001
23.8k
                proto_tree_add_item(tlv_tree, hf_location_area_id, tvb, offset+4, 2, ENC_BIG_ENDIAN);
1002
23.8k
                proto_tree_add_item(tlv_tree, hf_ci, tvb, offset+6, 2, ENC_BIG_ENDIAN);
1003
23.8k
                return (offset + 8);
1004
1005
1.59k
        case 3 :/*3GPP_ADDR*/
1006
3.70k
        case 4 :/*3GPP2_ADDR*/
1007
6.50k
        case 5 :/*OTHER_L2_ADDR*/
1008
6.50k
                len = tvb_get_uint8(tvb, offset+1);
1009
6.50k
                proto_tree_add_item(tlv_tree, hf_link_addr_string, tvb, offset+2, len, ENC_ASCII);
1010
6.50k
                return (offset + 2 + len);
1011
1.02M
        }
1012
831k
        return 0;
1013
1.02M
}
1014
1015
static int16_t dissect_tsp_container(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1016
59
{
1017
59
        uint8_t len = 0;
1018
59
        if(tvb_get_uint8(tvb, offset) == 1)
1019
7
        {
1020
7
                proto_tree_add_item(tlv_tree, hf_predef_cfg_id, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1021
7
                return (offset + 2);
1022
7
        }
1023
52
        else if(tvb_get_uint8(tvb, offset) == 2)
1024
4
        {
1025
4
                len = tvb_get_uint8(tvb, offset+1);
1026
4
                proto_tree_add_item(tlv_tree, hf_tsp_carrier, tvb, offset+2, len, ENC_ASCII);
1027
4
                return (offset + len + 2);
1028
4
        }
1029
48
        else
1030
48
                return (offset + 1);
1031
59
}
1032
1033
static int16_t dissect_iq_rdf_data(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1034
1.46k
{
1035
1.46k
        uint8_t len = 0;
1036
1.46k
        if(tvb_get_uint8(tvb, offset))
1037
212
        {
1038
212
                len = tvb_get_uint8(tvb, offset+1);
1039
212
                proto_tree_add_item(tlv_tree, hf_rdf_mime_type, tvb, offset+2, len, ENC_ASCII);
1040
212
                offset += len + 1;
1041
212
        }
1042
1.46k
        offset++;
1043
1.46k
        len = tvb_get_uint8(tvb, offset);
1044
1.46k
        proto_tree_add_item(tlv_tree, hf_rdf_data, tvb, offset+1, len, ENC_ASCII);
1045
1.46k
        return (offset+len+1);
1046
1.46k
}
1047
1048
static int16_t dissect_qos_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1049
11.4k
{
1050
11.4k
        proto_tree *subtree;
1051
1052
11.4k
        proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1053
11.4k
        offset += 1;
1054
11.4k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_min_pk_tx_delay, NULL, "MIN_PK_TX_DELAY");
1055
11.4k
        offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1056
11.4k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_avg_pk_tx_delay, NULL, "AVG_PK_TX_DELAY");
1057
11.4k
        offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1058
11.4k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_max_pk_tx_delay, NULL, "MAX_PK_TX_DELAY");
1059
11.4k
        offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1060
11.4k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_pk_delay_jitter, NULL, "PK_DELAY_JITTER");
1061
11.4k
        offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1062
11.4k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_pk_loss_rate, NULL, "PK_LOSS_RATE");
1063
11.4k
        offset = dissect_mih_list(tvb, offset, subtree, dissect_qos_val);
1064
11.4k
        return (offset);
1065
11.4k
}
1066
1067
static int16_t dissect_dev_states(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1068
2.16k
{
1069
2.16k
        uint8_t len = 0;
1070
2.16k
        proto_item *item;
1071
2.16k
        proto_tree *sub_tree;
1072
1073
2.16k
        item = proto_tree_add_item(tlv_tree, hf_dev_states_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
1074
2.16k
        sub_tree = proto_item_add_subtree(item, ett_dev_states_resp);
1075
2.16k
        if(tvb_get_uint8(tvb, offset))
1076
1.85k
        {
1077
                /*BATT_LEVEL*/
1078
1.85k
                offset++;
1079
1.85k
                proto_tree_add_item(sub_tree, hf_dev_batt_level, tvb, offset, 1, ENC_BIG_ENDIAN);
1080
1.85k
                return (offset+1);
1081
1.85k
        }
1082
309
        else
1083
309
        {
1084
                /*DEVICE INFO*/
1085
309
                offset++;
1086
309
                len = tvb_get_uint8(tvb, offset);
1087
309
                proto_tree_add_item(sub_tree, hf_dev_info, tvb, offset+1, len, ENC_ASCII);
1088
309
                return (offset + len + 1);
1089
1090
309
        }
1091
2.16k
}
1092
1093
static int16_t dissect_net_type(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1094
10.3k
{
1095
10.3k
        uint8_t len = 0;
1096
10.3k
        uint8_t type = 0;
1097
10.3k
        if(!tvb_get_uint8(tvb, offset))
1098
2.66k
        {
1099
                /*LINK_TYPE*/
1100
2.66k
                type = tvb_get_uint8(tvb, offset+1);
1101
2.66k
                proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1102
2.66k
                offset += 1;
1103
2.66k
        }
1104
10.3k
        offset += 1;
1105
10.3k
        if(!tvb_get_uint8(tvb, offset))
1106
4.85k
        {
1107
                /*LINK_SUBTYPE*/
1108
4.85k
                switch (type)
1109
4.85k
                {
1110
                        /* last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1111
                         Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits
1112
                         1 (identifier) + 4(bitmask defined values) + 4 (unused bits) = 9 (final offset)*/
1113
69
                        case 15 : /*subtype ethernet*/
1114
69
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_eth, ett_subtype_eth_bitmap, subtype_eth_fields, ENC_BIG_ENDIAN);
1115
69
                                break;
1116
102
                        case 18 : /*subtype wireless other*/
1117
102
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_wireless_other, ett_subtype_wireless_other_bitmap, subtype_wireless_other_fields, ENC_BIG_ENDIAN);
1118
102
                                break;
1119
4
                        case 19 : /*subtype 802.11*/
1120
4
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80211, ett_subtype_ieee80211_bitmap, subtype_ieee80211_fields, ENC_BIG_ENDIAN);
1121
4
                                break;
1122
60
                        case 23 : /*subtype UMTS*/
1123
60
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_umts, ett_subtype_umts_bitmap, subtype_umts_fields, ENC_BIG_ENDIAN);
1124
60
                                break;
1125
3
                        case 24 : /*subtype cdma2000*/
1126
3
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_cdma2000, ett_subtype_cdma2000_bitmap, subtype_cdma2000_fields, ENC_BIG_ENDIAN);
1127
3
                                break;
1128
10
                        case 27 : /*subtype 802.16*/
1129
10
                                proto_tree_add_bitmask(tlv_tree, tvb, offset+1, hf_link_subtype_ieee80216, ett_subtype_ieee80216_bitmap, subtype_ieee80216_fields, ENC_BIG_ENDIAN);
1130
10
                                break;
1131
4.60k
                        default :
1132
4.60k
                                proto_item_append_text(tlv_tree, "N/A");
1133
4.85k
                }
1134
                /*4(bitmask defined values) + 4 (unused bits) = 8 bits*/
1135
4.85k
                offset += 8;
1136
4.85k
        }
1137
        /*1 (identifier) = 1 bit*/
1138
10.3k
        offset += 1;
1139
10.3k
        if(!tvb_get_uint8(tvb, offset))
1140
3.44k
        {
1141
                /*TYPE_EXT*/
1142
3.44k
                len = tvb_get_uint8(tvb, offset+1);
1143
3.44k
                proto_tree_add_item(tlv_tree, hf_link_type_ext, tvb, offset+2, len, ENC_ASCII);
1144
3.44k
                offset += len + 2;
1145
3.44k
        }
1146
10.3k
        return (offset);
1147
10.3k
}
1148
1149
static int16_t dissect_net_type_addr(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1150
5.76k
{
1151
5.76k
        offset = dissect_net_type(tvb, offset, tlv_tree);
1152
5.76k
        offset = dissect_link_addr(tvb, offset, tlv_tree);
1153
5.76k
        return (offset) ;
1154
5.76k
}
1155
1156
static int16_t dissect_mbb_ho_supp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1157
2.27k
{
1158
2.27k
        offset = dissect_net_type(tvb, offset, tlv_tree);
1159
2.27k
        offset = dissect_net_type(tvb, offset, tlv_tree);
1160
2.27k
        proto_tree_add_item(tlv_tree, hf_mbb_ho_supp, tvb, offset, 1, ENC_BIG_ENDIAN);
1161
2.27k
        offset++;
1162
2.27k
        return (offset);
1163
2.27k
}
1164
1165
static int16_t dissect_tgt_net_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1166
4.29k
{
1167
4.29k
        uint8_t len = 0;
1168
4.29k
        if(!tvb_get_uint8(tvb, offset))
1169
1.77k
        {
1170
1.77k
                offset +=1;
1171
1172
                /*NETWORK_ID*/
1173
1.77k
                len = tvb_get_uint8(tvb, offset);
1174
1.77k
                proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1175
1.77k
                offset += len + 2;
1176
1.77k
                if(!tvb_get_uint8(tvb, offset))
1177
1.00k
                {
1178
                        /*NET_AUX_ID*/
1179
1.00k
                        offset +=1;
1180
1.00k
                        len = tvb_get_uint8(tvb, offset);
1181
1.00k
                        proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII);
1182
1.00k
                        return (offset + 1);
1183
1.00k
                }
1184
777
                return (offset + 2);
1185
1.77k
        }
1186
2.51k
        else
1187
2.51k
        {
1188
                /*LINK_ADDR*/
1189
2.51k
                offset +=1;
1190
2.51k
                offset = dissect_link_addr(tvb, offset, tlv_tree);
1191
2.51k
                return (offset);
1192
2.51k
        }
1193
4.29k
}
1194
1195
static int16_t dissect_link_id(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1196
50.6k
{
1197
1198
50.6k
        int16_t next_offset = 0;
1199
1200
        /*LINK_TYPE*/
1201
50.6k
        proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1202
50.6k
        next_offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1203
50.6k
        return (next_offset);
1204
50.6k
}
1205
1206
static int16_t dissect_link_poa(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1207
21.4k
{
1208
21.4k
        offset = dissect_link_id(tvb, offset, tlv_tree);
1209
21.4k
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_addr);
1210
21.4k
        return (offset);
1211
21.4k
}
1212
1213
static int16_t dissect_rq_result(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1214
11.3k
{
1215
11.3k
        proto_tree *subtree;
1216
11.3k
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_list_prefer_link, NULL, "List of preferred links");
1217
11.3k
        offset = dissect_link_poa(tvb, offset, subtree);
1218
11.3k
        offset = dissect_qos_list(tvb, offset, tlv_tree);
1219
11.3k
        offset++;
1220
11.3k
        switch(tvb_get_uint8(tvb, offset-1))
1221
11.3k
        {
1222
1.66k
                case 1:
1223
1.66k
                        proto_tree_add_item(tlv_tree, hf_ip_methods_supported, tvb, offset, 1, ENC_BIG_ENDIAN);
1224
1.66k
                        offset++;
1225
1.66k
                        break;
1226
539
                case 2:
1227
539
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1228
539
                        offset += 2;
1229
539
                        break;
1230
11.3k
        }
1231
11.2k
        offset++;
1232
11.2k
        switch(tvb_get_uint8(tvb, offset-1))
1233
11.2k
        {
1234
1.03k
                case 1:
1235
1.03k
                        proto_tree_add_item(tlv_tree, hf_ip_dhcp_services, tvb, offset, 1, ENC_BIG_ENDIAN);
1236
1.03k
                        offset++;
1237
1.03k
                        break;
1238
663
                case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_ip_dhcp_server, NULL, "IP DHCP server");
1239
663
                        offset = dissect_ip_addr(tvb, offset, subtree);
1240
663
                        break;
1241
11.2k
        }
1242
11.2k
        offset++;
1243
11.2k
        switch(tvb_get_uint8(tvb, offset-1))
1244
11.2k
        {
1245
1.21k
                case 1:
1246
1.21k
                        proto_tree_add_item(tlv_tree, hf_fn_agent, tvb, offset, 1, ENC_BIG_ENDIAN);
1247
1.21k
                        offset++;
1248
1.21k
                        break;
1249
1.60k
                case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_fn_agent, NULL, "FN Agent");
1250
1.60k
                        offset = dissect_ip_addr(tvb, offset, subtree);
1251
1.60k
                        break;
1252
11.2k
        }
1253
11.2k
        offset++;
1254
11.2k
        switch(tvb_get_uint8(tvb, offset-1))
1255
11.2k
        {
1256
1.21k
                case 1:
1257
1.21k
                        proto_tree_add_item(tlv_tree, hf_access_router, tvb, offset, 1, ENC_BIG_ENDIAN);
1258
1.21k
                        offset++;
1259
1.21k
                        break;
1260
1.06k
                case 2: subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 1, ett_access_router, NULL, "Access Router");
1261
1.06k
                        offset = dissect_ip_addr(tvb, offset, subtree);
1262
1.06k
                        break;
1263
11.2k
        }
1264
11.2k
        return (offset+1);
1265
11.2k
}
1266
1267
static int16_t dissect_link_det_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1268
4.36k
{
1269
4.36k
        uint8_t len = 0;
1270
4.36k
        offset = dissect_link_id(tvb, offset, tlv_tree);
1271
4.36k
        if(tvb_get_uint8(tvb, offset))
1272
2.14k
        {
1273
2.14k
                offset++;
1274
2.14k
                offset = dissect_link_addr(tvb, offset, tlv_tree);
1275
2.14k
                offset --;
1276
2.14k
        }
1277
4.36k
        offset++;
1278
4.36k
        len = tvb_get_uint8(tvb, offset);
1279
4.36k
        proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1280
4.36k
        offset += len + 1;
1281
4.36k
        len = tvb_get_uint8(tvb, offset);
1282
4.36k
        proto_tree_add_item(tlv_tree, hf_net_aux_id, tvb, offset+1, len, ENC_ASCII);
1283
4.36k
        offset += len + 1;
1284
4.36k
        if(tvb_get_uint8(tvb, offset))
1285
2.38k
                proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1286
1.98k
        else
1287
1.98k
                proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1288
4.36k
        offset += 2;
1289
4.36k
        proto_tree_add_item(tlv_tree, hf_sinr, tvb, offset, 2, ENC_BIG_ENDIAN);
1290
4.36k
        offset += 2;
1291
4.36k
        proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset,4, ENC_BIG_ENDIAN);
1292
4.36k
        offset += 4;
1293
4.36k
        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mihcap, ett_mihcap_bitmap, mihcap_fields, ENC_BIG_ENDIAN);
1294
4.36k
        offset++;
1295
4.36k
        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_net_caps, ett_net_caps_bitmap, net_caps_fields, ENC_BIG_ENDIAN);
1296
4.36k
        offset += 4;
1297
4.36k
        return (offset);
1298
4.36k
}
1299
1300
static int16_t dissect_link_scan_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1301
188k
{
1302
188k
        uint8_t len = 0;
1303
188k
        offset = dissect_link_addr(tvb, offset, tlv_tree);
1304
188k
        len = tvb_get_uint8(tvb, offset);
1305
188k
        proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+1, len, ENC_ASCII);
1306
188k
        offset = offset + len + 1;
1307
188k
        if(tvb_get_uint8(tvb, offset))
1308
145k
                proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1309
42.8k
        else
1310
42.8k
                proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1311
188k
        return offset+2;
1312
188k
}
1313
1314
static int16_t dissect_link_action_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1315
7.99k
{
1316
7.99k
        offset = dissect_link_id(tvb, offset, tlv_tree);
1317
7.99k
        proto_tree_add_item(tlv_tree, hf_link_ac_result, tvb, offset, 1, ENC_BIG_ENDIAN);
1318
7.99k
        offset++;
1319
7.99k
        if(tvb_get_uint8(tvb, offset))
1320
3.70k
        {
1321
3.70k
                offset = dissect_mih_list(tvb, offset+1, tlv_tree, dissect_link_scan_rsp);
1322
3.70k
                return offset;
1323
3.70k
        }
1324
4.29k
        else
1325
4.29k
                return (offset+1);
1326
1327
7.99k
}
1328
1329
static int16_t dissect_link_action_req(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1330
3.20k
{
1331
3.20k
        offset = dissect_link_id(tvb, offset, tlv_tree);
1332
3.20k
        if(tvb_get_uint8(tvb, offset))
1333
1.62k
        {
1334
1.62k
                offset = dissect_link_addr(tvb, offset+1, tlv_tree);
1335
1.62k
        }
1336
1.58k
        else
1337
1.58k
        {
1338
1.58k
                offset++;
1339
1.58k
        }
1340
3.20k
        proto_tree_add_item(tlv_tree, hf_link_ac_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1341
3.20k
        offset++;
1342
3.20k
        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_link_ac_attr, ett_ac_attr_bitmap, ac_attr_fields, ENC_BIG_ENDIAN);
1343
3.20k
        offset++;
1344
3.20k
        proto_tree_add_item(tlv_tree, hf_link_ac_ext_time, tvb, offset, 2, ENC_BIG_ENDIAN);
1345
3.20k
        return (offset+2);
1346
3.20k
}
1347
1348
static int16_t dissect_link_states_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1349
161k
{
1350
161k
        if(!tvb_get_uint8(tvb, offset))
1351
37.4k
        {
1352
37.4k
                proto_tree_add_item(tlv_tree, hf_op_mode, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1353
37.4k
                offset += 2;
1354
37.4k
        }
1355
123k
        else
1356
123k
        {
1357
123k
                proto_tree_add_item(tlv_tree, hf_channel_id, tvb, offset+1, 2, ENC_BIG_ENDIAN);
1358
123k
                offset += 3;
1359
123k
        }
1360
161k
        return (offset);
1361
161k
}
1362
1363
static int16_t dissect_link_param_type(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1364
206k
{
1365
206k
        uint8_t type = tvb_get_uint8(tvb, offset);
1366
206k
        offset++;
1367
1368
        /*LINK_PARAM_TYPE*/
1369
206k
        switch (type)
1370
206k
        {
1371
26.7k
                case 0 :/*LINK_PARAM_GEN*/
1372
26.7k
                        proto_tree_add_item(tlv_tree, hf_link_param_gen, tvb, offset, 1, ENC_BIG_ENDIAN);
1373
26.7k
                        break;
1374
1375
1.41k
                case 1 :/*LINK_PARAM_QOS*/
1376
1.41k
                        proto_tree_add_item(tlv_tree, hf_link_param_qos, tvb, offset, 1, ENC_BIG_ENDIAN);
1377
1.41k
                        break;
1378
1379
3.57k
                case 2 :/*LINK_PARAM_GG*/
1380
3.57k
                        proto_tree_add_item(tlv_tree, hf_link_param_gg, tvb, offset, 1, ENC_BIG_ENDIAN);
1381
3.57k
                        break;
1382
1383
1.13k
                case 3 :/*LINK_PARAM_EDGE*/
1384
1.13k
                        proto_tree_add_item(tlv_tree, hf_link_param_edge, tvb, offset, 1, ENC_BIG_ENDIAN);
1385
1.13k
                        break;
1386
1387
1.02k
                case 4 :/*LINK_PARAM_ETH*/
1388
1.02k
                        proto_tree_add_item(tlv_tree, hf_link_param_eth, tvb, offset, 1, ENC_BIG_ENDIAN);
1389
1.02k
                        break;
1390
1391
639
                case 5 :/*LINK_PARAM_802_11*/
1392
639
                        proto_tree_add_item(tlv_tree, hf_link_param_802_11, tvb, offset, 1, ENC_BIG_ENDIAN);
1393
639
                        break;
1394
1395
5.14k
                case 6 :/*LINK_PARAM_C2K*/
1396
5.14k
                         proto_tree_add_item(tlv_tree, hf_link_param_c2k, tvb, offset, 1, ENC_BIG_ENDIAN);
1397
5.14k
                        break;
1398
1399
1.83k
                case 7 :/*LINK_PARAM_FDD*/
1400
1.83k
                        proto_tree_add_item(tlv_tree, hf_link_param_fdd, tvb, offset, 1, ENC_BIG_ENDIAN);
1401
1.83k
                        break;
1402
1403
993
                case 8 :/*LINK_PARAM_HRPD*/
1404
993
                        proto_tree_add_item(tlv_tree, hf_link_param_hrpd, tvb, offset, 1, ENC_BIG_ENDIAN);
1405
993
                        break;
1406
1407
590
                case 9 :/*LINK_PARAM_802_16*/
1408
590
                        proto_tree_add_item(tlv_tree, hf_link_param_802_16, tvb, offset, 1, ENC_BIG_ENDIAN);
1409
590
                        break;
1410
1411
2.12k
                case 10 :/*LINK_PARAM_802_20*/
1412
2.12k
                        proto_tree_add_item(tlv_tree, hf_link_param_802_20, tvb, offset, 1, ENC_BIG_ENDIAN);
1413
2.12k
                        break;
1414
1415
385
                case 11 :/*LINK_PARAM_802_22*/
1416
385
                        proto_tree_add_item(tlv_tree, hf_link_param_802_22, tvb, offset, 1, ENC_BIG_ENDIAN);
1417
385
                        break;
1418
206k
        }
1419
206k
        return (offset+1);
1420
206k
}
1421
1422
static void dissect_link_status_req(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1423
241
{
1424
241
        proto_tree *subtree;
1425
1426
        /*LINK_STATES_REQ*/
1427
241
        uint16_t temp = tvb_get_ntohs(tvb, offset);
1428
241
        if(!temp)
1429
31
        {
1430
31
                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 3, ett_link_states_req, NULL, "LINK_STATES_REQ: ");
1431
31
                proto_tree_add_item(subtree, hf_op_mode, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1432
31
                offset+=3;
1433
31
        }
1434
210
        else
1435
210
        {
1436
210
                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 4, ett_link_states_req, NULL, "LINK_STATES_REQ: ");
1437
210
                proto_tree_add_item(subtree, hf_channel_id, tvb, offset+2, 2, ENC_BIG_ENDIAN);
1438
210
                offset+=4;
1439
210
        }
1440
1441
        /*LINK_PARAM_TYPE_LIST*/
1442
241
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_type);
1443
1444
        /*LINK_DESC_REQ*/
1445
241
        temp = tvb_get_ntohs(tvb, offset);
1446
241
        subtree = proto_tree_add_subtree(tlv_tree, tvb, offset, 3, ett_link_desc_req, NULL, "LINK_DESC_REQ");
1447
241
        offset+=2;
1448
241
        if(!temp)
1449
86
                proto_tree_add_item(subtree, hf_num_cos, tvb, offset, 1, ENC_BIG_ENDIAN);
1450
155
        else
1451
155
                proto_tree_add_item(subtree, hf_num_queue, tvb, offset, 1, ENC_BIG_ENDIAN);
1452
241
}
1453
1454
static int16_t dissect_link_cfg_status(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1455
1.44k
{
1456
1.44k
        offset = dissect_link_param_type(tvb, offset, tlv_tree);
1457
1.44k
        proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1458
1.44k
        offset += 2;
1459
1.44k
        proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1460
1.44k
        offset ++;
1461
1.44k
        proto_tree_add_item(tlv_tree, hf_config_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1462
1.44k
        return (offset+1);
1463
1.44k
}
1464
1465
static int16_t dissect_link_param(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1466
194k
{
1467
        /*LINK_PARAM_TYPE*/
1468
194k
        offset = dissect_link_param_type(tvb, offset, tlv_tree);
1469
194k
        if(!tvb_get_uint8(tvb, offset))
1470
32.2k
        {
1471
32.2k
                offset ++;
1472
                /*LINK_PARAM_VALUE*/
1473
32.2k
                proto_tree_add_item(tlv_tree, hf_link_param_value, tvb, offset, 2, ENC_BIG_ENDIAN);
1474
32.2k
                offset += 2;
1475
32.2k
        }
1476
162k
        else
1477
162k
        {
1478
162k
                proto_tree *subtree;
1479
162k
                offset ++;
1480
                /*QOS_PARAM_VALUE*/
1481
162k
                switch(tvb_get_uint8(tvb, offset))
1482
162k
                {
1483
12.5k
                        case 0:
1484
12.5k
                                proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1485
12.5k
                                offset += 2;
1486
12.5k
                                break;
1487
3.33k
                        case 1:
1488
3.33k
                                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_min_pk_tx_delay, NULL, "MIN_PK_TX_DELAY");
1489
3.33k
                                offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1490
3.33k
                                break;
1491
2.71k
                        case 2:
1492
2.71k
                                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_avg_pk_tx_delay, NULL, "AVG_PK_TX_DELAY");
1493
2.71k
                                offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1494
2.71k
                                break;
1495
1.37k
                        case 3:
1496
1.37k
                                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_max_pk_tx_delay, NULL, "MAX_PK_TX_DELAY");
1497
1.37k
                                offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1498
1.37k
                                break;
1499
2.29k
                        case 4:
1500
2.29k
                                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_pk_delay_jitter, NULL, "PK_DELAY_JITTER");
1501
2.29k
                                offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1502
2.29k
                                break;
1503
2.60k
                        case 5:
1504
2.60k
                                subtree = proto_tree_add_subtree(tlv_tree, tvb, offset+1, 1, ett_pk_loss_rate, NULL, "PK_LOSS_RATE");
1505
2.60k
                                offset = dissect_mih_list(tvb, offset+1, subtree, dissect_qos_val);
1506
2.60k
                                break;
1507
162k
                }
1508
162k
        }
1509
194k
        return offset;
1510
194k
}
1511
1512
static int16_t dissect_link_param_rpt(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1513
3.40k
{
1514
        /*LINK_PARAM*/
1515
3.40k
        offset = dissect_link_param(tvb, offset, tlv_tree);
1516
3.40k
        if(tvb_get_uint8(tvb, offset))
1517
2.57k
        {
1518
                /*Threshold*/
1519
2.57k
                offset++;
1520
2.57k
                proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1521
2.57k
                offset += 2;
1522
2.57k
                proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1523
2.57k
                return (offset+1);
1524
2.57k
        }
1525
829
        else
1526
829
                return (offset+1);
1527
3.40k
}
1528
1529
static int16_t dissect_link_desc_rsp(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1530
155k
{
1531
155k
        if(!tvb_get_uint8(tvb, offset))
1532
29.1k
                proto_tree_add_item(tlv_tree, hf_num_cos, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1533
126k
        else
1534
126k
                proto_tree_add_item(tlv_tree, hf_num_queue, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1535
155k
        return (offset+2);
1536
155k
}
1537
1538
static int16_t dissect_status_list(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1539
10.9k
{
1540
        /*LINK_ID*/
1541
10.9k
        offset = dissect_link_id(tvb, offset, tlv_tree);
1542
1543
        /*LINK_STATES_RSP*/
1544
10.9k
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_states_rsp);
1545
1546
        /*LINK_PARAM*/
1547
10.9k
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param);
1548
1549
        /*LINK_DESC_RSP*/
1550
10.9k
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_desc_rsp);
1551
10.9k
        return offset;
1552
10.9k
}
1553
1554
static int16_t dissect_link_det_cfg(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1555
1.21k
{
1556
1.21k
        uint8_t len = 0;
1557
1.21k
        if(tvb_get_uint8(tvb, offset))
1558
286
        {
1559
286
                len = tvb_get_uint8(tvb, offset+1);
1560
286
                proto_tree_add_item(tlv_tree, hf_network_id, tvb, offset+2, len, ENC_ASCII);
1561
286
                offset += len + 1;
1562
286
        }
1563
1.21k
        offset++;
1564
1.21k
        if(tvb_get_uint8(tvb, offset))
1565
286
        {
1566
286
                if(tvb_get_uint8(tvb, offset+1))
1567
206
                        proto_tree_add_item(tlv_tree, hf_sig_strength_per, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1568
80
                else
1569
80
                        proto_tree_add_item(tlv_tree, hf_sig_strength_dbm, tvb, offset+2, 1, ENC_BIG_ENDIAN);
1570
286
                offset += 2;
1571
286
        }
1572
1.21k
        offset++;
1573
1.21k
        if(tvb_get_uint8(tvb, offset))
1574
288
        {
1575
288
                proto_tree_add_item(tlv_tree, hf_link_data_rate, tvb, offset+1,4, ENC_BIG_ENDIAN);
1576
288
                offset += 4;
1577
288
        }
1578
1.21k
        return (offset+1);
1579
1.21k
}
1580
1581
static int16_t dissect_link_cfg_param(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1582
4.91k
{
1583
4.91k
        offset = dissect_link_param_type(tvb, offset, tlv_tree);
1584
4.91k
        if(tvb_get_uint8(tvb, offset))
1585
3.78k
        {
1586
3.78k
                proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1587
3.78k
                offset += 2;
1588
3.78k
        }
1589
4.91k
        offset++;
1590
4.91k
        proto_tree_add_item(tlv_tree, hf_threshold_action, tvb, offset, 1, ENC_BIG_ENDIAN);
1591
4.91k
        offset++;
1592
4.91k
        proto_tree_add_item(tlv_tree, hf_threshold_val, tvb, offset, 2, ENC_BIG_ENDIAN);
1593
4.91k
        offset += 2;
1594
4.91k
        proto_tree_add_item(tlv_tree, hf_threshold_x_dir, tvb, offset, 1, ENC_BIG_ENDIAN);
1595
4.91k
        return (offset+1) ;
1596
4.91k
}
1597
1598
static int16_t dissect_mih_evt_cfg_info(tvbuff_t *tvb, int16_t offset, proto_tree *tlv_tree)
1599
718
{
1600
718
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_cfg);
1601
718
        offset = dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1602
718
        return offset;
1603
718
}
1604
1605
static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, uint8_t type, uint32_t length)
1606
18.6k
{
1607
1608
18.6k
        uint8_t mihf_id_len = 0;
1609
18.6k
        char mihf_id_first_char = 0;
1610
18.6k
        uint8_t i = 0;
1611
18.6k
        uint8_t len = 0;
1612
1613
18.6k
        tvbuff_t *volatile tvb_mihf_id = NULL;
1614
18.6k
        tvbuff_t* tvb_temp = NULL;
1615
18.6k
        volatile bool composite_error = false;
1616
1617
        /*For Value fields*/
1618
18.6k
        switch (type)
1619
18.6k
        {
1620
893
                case SRC_MIHF_ID :
1621
1.31k
                case DEST_MIHF_ID :
1622
1.34k
                case MN_MIHF_ID :
1623
                        /*MIHF ID*/
1624
1.34k
                        mihf_id_len = tvb_get_uint8(tvb, offset);
1625
                        /*taken from the 802.21 standard:
1626
                        If L2 communication is used then MIHF_ID is the NAI-encoded linklayer
1627
                        address (LINK_ADDR) of the entity that hosts the MIH services.
1628
                        In an NAI-encoded IP address or link-layer address, each octet
1629
                        of binary-encoded IP4_ADDR, IP6_ADDR and LINK_ADDR data is
1630
                        encoded in the username part of the NAI as "\" followed by the octet
1631
                        value.*/
1632
1.34k
                        mihf_id_first_char = (char)tvb_get_uint8(tvb, offset+1);
1633
1.34k
                        if(mihf_id_first_char!='\\')
1634
1.33k
                                proto_tree_add_item(tlv_tree, hf_mihf_id, tvb, offset+1, mihf_id_len, ENC_ASCII);
1635
19
                        else
1636
19
                        {
1637
19
                                if(mihf_id_len<tvb_reported_length_remaining(tvb,0) && (mihf_id_len==12 || mihf_id_len==64 || mihf_id_len==128))
1638
1
                                {
1639
1
                                        tvb_mihf_id = tvb_new_composite();
1640
7
                                        for(i=0; i < mihf_id_len/2; i++)
1641
6
                                        {
1642
6
                                                tvb_temp = tvb_new_subset_length(tvb, offset + 2 + 2*i, 1);
1643
6
                                                if (tvb_captured_length(tvb_temp)) {
1644
6
                                                        tvb_composite_append(tvb_mihf_id, tvb_temp);
1645
6
                                                }
1646
6
                                        }
1647
1
                                        TRY
1648
1
                                        {
1649
1
                                                tvb_composite_finalize(tvb_mihf_id);
1650
1
                                        }
1651
1
                                        CATCH_ALL
1652
0
                                        {
1653
0
                                                composite_error = true;
1654
0
                                        }
1655
1
                                        ENDTRY;
1656
1657
1
                                        if(!composite_error)
1658
1
                                        {
1659
1
                                                switch(mihf_id_len)
1660
1
                                                {
1661
1
                                                        case 12:  /* checks if the length corresponds to a MAC address */
1662
1
                                                                proto_tree_add_item(tlv_tree, hf_mihf_id_mac, tvb_mihf_id, 0, mihf_id_len/2, ENC_NA);
1663
1
                                                                break;
1664
0
                                                        case 64:  /* checks if the length corresponds to an IPv4 address */
1665
0
                                                                proto_tree_add_item(tlv_tree, hf_mihf_id_ipv4, tvb_mihf_id, 0, mihf_id_len/2, ENC_BIG_ENDIAN);
1666
0
                                                                break;
1667
0
                                                        case 128: /* checks if the length corresponds to an IPv6 address */
1668
0
                                                                proto_tree_add_item(tlv_tree, hf_mihf_id_ipv6, tvb_mihf_id, 0, mihf_id_len/2, ENC_NA);
1669
0
                                                                break;
1670
1
                                                }
1671
1
                                        }
1672
0
                                        else
1673
0
                                                tvb_free(tvb_mihf_id);
1674
1
                                }
1675
19
                        }
1676
1.34k
                        break;
1677
1678
1.34k
                case STATUS :
1679
                        /*STATUS*/
1680
311
                        proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1681
311
                        break;
1682
1683
273
                case LINK_TYPE :
1684
                        /*LINK_TYPE*/
1685
273
                        proto_tree_add_item(tlv_tree, hf_link_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1686
273
                        break;
1687
1688
401
                case MIH_EVT_LIST :
1689
                        /*MIH_EVT_LIST*/
1690
401
                        proto_tree_add_bitmask(tlv_tree/*evt_list_tree*/, tvb, offset, hf_event_list, ett_event_bitmap, event_fields, ENC_BIG_ENDIAN);
1691
401
                        break;
1692
1693
179
                case MIH_CMD_LIST :
1694
                        /*MIH_CMD_LSIT*/
1695
179
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cmd_list, ett_cmd_bitmap, cmd_fields, ENC_BIG_ENDIAN);
1696
179
                        break;
1697
1698
140
                case MIH_IQ_TYPE_LIST :
1699
                        /*MIH_IQ_TYPE_LIST*/
1700
                        /*last 32 bits are not read since proto_tree_add_bitmask only handles bitmasks of length 32
1701
                         Even though the standard defines a bitmasks of length 64, there are no definitions in the standard that require more than 32 bits*/
1702
140
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_iq_list, ett_iq_type_bitmap, iq_type_fields, ENC_BIG_ENDIAN);
1703
140
                        break;
1704
1705
162
                case MIH_TRANS_LIST :
1706
                        /*MIH_TRANS_LIST*/
1707
162
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_trans_list, ett_trans_list_bitmap, trans_fields, ENC_BIG_ENDIAN);
1708
162
                        break;
1709
1710
246
                case LINK_ADDR_LIST :
1711
                        /*NET_TYPE_ADDR_LIST*/
1712
246
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_net_type_addr);
1713
246
                        break;
1714
1715
241
                case MBB_HO_SUPP_LIST :
1716
                        /*MBB_HO_SUPP_LIST*/
1717
241
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_mbb_ho_supp);
1718
241
                        break;
1719
1720
67
                case REG_REQUEST_CODE :
1721
                        /*REG_REQUEST_CODE*/
1722
67
                        proto_tree_add_item(tlv_tree, hf_reg_request_code, tvb, offset, 1, ENC_BIG_ENDIAN);
1723
67
                        break;
1724
1725
62
                case VALID_TIME_INTR :
1726
                        /*Valid Time interval*/
1727
62
                        proto_tree_add_item(tlv_tree, hf_valid_time_interval, tvb, offset, 4, ENC_BIG_ENDIAN);
1728
62
                        break;
1729
1730
91
                case LINK_ID :
1731
181
                case NEW_LINK_ID :
1732
238
                case MN_LINK_ID :
1733
                        /*Link identifier*/
1734
238
                        dissect_link_id(tvb, offset, tlv_tree);
1735
238
                        break;
1736
1737
128
                case OLD_ACCESS_ROUTER :
1738
245
                case NEW_ACCESS_ROUTER :
1739
275
                case POA_LINK_ADDR :
1740
                        /*LINK ADDR*/
1741
275
                        dissect_link_addr(tvb, offset, tlv_tree);
1742
275
                        break;
1743
1744
75
                case IP_RENEWAL_FLAG :
1745
                        /*IP_RENEWAL_FLAG*/
1746
75
                        proto_tree_add_item(tlv_tree, hf_ip_renewal, tvb, offset, 1, ENC_BIG_ENDIAN);
1747
75
                        break;
1748
1749
48
                case IP_MOB_MGMT :
1750
                        /*IP_MOB_MGMT*/
1751
48
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_mob_list, ett_mob_mgt_bitmap, mob_fields, ENC_BIG_ENDIAN);
1752
48
                        break;
1753
1754
69
                case IP_CFG_MTHDS :
1755
                        /*IP_CFG_MTHDS*/
1756
69
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_cfg_mthds, ett_cfg_mtd_bitmap, cfg_fields, ENC_BIG_ENDIAN);
1757
69
                        break;
1758
1759
82
                case LINK_DN_REASON :
1760
                        /*LINK_DN_REASON*/
1761
82
                        proto_tree_add_item(tlv_tree, hf_link_dn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1762
82
                        break;
1763
1764
66
                case TIMER_INTERVAL :
1765
                        /*Time interval*/
1766
66
                        proto_tree_add_item(tlv_tree, hf_time_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
1767
66
                        break;
1768
1769
81
                case LINK_GOING_DN_REASON :
1770
                        /*LINK_GOING_DN REASON*/
1771
81
                        proto_tree_add_item(tlv_tree, hf_link_gdn_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1772
81
                        break;
1773
1774
228
                case LINK_PARAM_RPT_LIST :
1775
                        /*LINK_PARAM_RPT_LIST*/
1776
228
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_param_rpt);
1777
228
                        break;
1778
1779
88
                case DEV_STATES_REQ :
1780
                        /*DEV_STATES_REQ*/
1781
88
                        proto_tree_add_bitmask(tlv_tree, tvb, offset, hf_dev_states_req, ett_dev_states_bitmap, dev_states_fields, ENC_BIG_ENDIAN);
1782
88
                        break;
1783
1784
81
                case LINK_ID_LIST :
1785
                        /*LINK ID List*/
1786
81
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_id);
1787
81
                        break;
1788
1789
98
                case DEV_STATES_RSP_LIST :
1790
                        /*DEV_STATES_RSP List*/
1791
98
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_dev_states);
1792
98
                        break;
1793
1794
241
                case STATUS_REQ_SET :
1795
                        /*LINK_STATUS_REQ*/
1796
241
                        dissect_link_status_req(tvb, offset, tlv_tree);
1797
241
                        break;
1798
1799
296
                case STATUS_RSP_LIST :
1800
                        /*Status Response List*/
1801
296
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_status_list);
1802
296
                        break;
1803
1804
181
                case CFG_REQ_LIST :
1805
                        /*LINK_CFG_PARAM_LIST*/
1806
181
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_param);
1807
181
                        break;
1808
1809
67
                case CFG_RSP_LIST :
1810
                        /*LINK_CFG_STATUS_LIST*/
1811
67
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_cfg_status);
1812
67
                        break;
1813
1814
137
                case LINK_POA_LIST :
1815
                        /*LINK_POA_LIST*/
1816
137
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_poa);
1817
137
                        break;
1818
1819
293
                case PREF_LINK_LIST :
1820
                        /*RQ_RESULT*/
1821
293
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_rq_result);
1822
293
                        break;
1823
1824
36
                case HO_REQ_QUERY_LIST :
1825
                        /*QoS_LIST*/
1826
36
                        dissect_qos_list(tvb, offset, tlv_tree);
1827
36
                        break;
1828
1829
125
                case HO_STATUS:
1830
                        /*HO_STATUS*/
1831
125
                        proto_tree_add_item(tlv_tree, hf_ho_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1832
125
                        break;
1833
1834
59
                case ACCESS_ROUTER_ADDR :
1835
207
                case DHCP_SER_ADDR :
1836
269
                case FA_ADDR :
1837
                        /*IP_ADDR*/
1838
269
                        dissect_ip_addr(tvb, offset, tlv_tree);
1839
269
                        break;
1840
1841
77
                case LINK_ACTION_REQ_LIST :
1842
                        /*LINK_ACTION_REQ LIST*/
1843
77
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_req);
1844
77
                        break;
1845
1846
251
                case LINK_ACTION_RSP_LIST :
1847
                        /*LINK_ACTION_RSP LIST*/
1848
251
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_action_rsp);
1849
251
                        break;
1850
1851
48
                case HO_RESULT :
1852
                        /*HO_RESULT*/
1853
48
                        proto_tree_add_item(tlv_tree, hf_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1854
48
                        break;
1855
1856
48
                case LINK_RES_STATUS :
1857
                        /*LINK_RES_STATUS*/
1858
48
                        proto_tree_add_item(tlv_tree, hf_link_res_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1859
48
                        break;
1860
1861
49
                case RES_RETENTION_STATUS :
1862
                        /*BOOLEAN*/
1863
49
                        proto_tree_add_item(tlv_tree, hf_res_retention_status, tvb, offset, 1, ENC_BIG_ENDIAN);
1864
49
                        break;
1865
1866
35
                case IQ_RDF_SCHEMA_URL :
1867
                        /*BOOLEAN*/
1868
35
                        proto_tree_add_item(tlv_tree, hf_iq_rdf_sch_url, tvb, offset, 1, ENC_BIG_ENDIAN);
1869
35
                        break;
1870
1871
41
                case Q_RES_RPT_FLAG :
1872
                        /*BOOLEAN*/
1873
41
                        proto_tree_add_item(tlv_tree, hf_res_rpt_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
1874
41
                        break;
1875
1876
35
                case UNAUTH_INFO_REQ :
1877
                        /*BOOLEAN*/
1878
35
                        proto_tree_add_item(tlv_tree, hf_unauth_info_req, tvb, offset, 1, ENC_BIG_ENDIAN);
1879
35
                        break;
1880
1881
68
                case IQ_BIN_DATA_LIST :
1882
                        /*IQ_BIN_DATA LIST*/
1883
68
                        proto_tree_add_item(tlv_tree, hf_iq_bin_data_x, tvb, offset, length, ENC_ASCII);
1884
68
                        break;
1885
1886
41
                case IQ_RDF_DATA_LIST :
1887
86
                case IR_RDF_DATA_LIST :
1888
121
                case IR_RDF_SCHM_LIST :
1889
                        /*IQ_RDF_DATA LIST*/
1890
121
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_iq_rdf_data);
1891
121
                        break;
1892
1893
91
                case IQ_RDF_SCHM_LIST :
1894
                        /*IQ_RDF_SCHM*/
1895
1.79k
                        for(i=0; i < tvb_get_uint8(tvb, offset); i++)
1896
1.69k
                        {
1897
1.69k
                                len = tvb_get_uint8(tvb, offset+1);
1898
1.69k
                                proto_tree_add_item(tlv_tree, hf_rdf_sch, tvb, offset+2, len, ENC_ASCII);
1899
1.69k
                                offset += len;
1900
1.69k
                        }
1901
91
                        break;
1902
1903
38
                case MAX_RSP_SIZE :
1904
                        /*Max Response Size*/
1905
38
                        proto_tree_add_item(tlv_tree, hf_max_resp_size, tvb, offset, 2, ENC_BIG_ENDIAN);
1906
38
                        break;
1907
1908
75
                case IR_BIN_DATA_LIST :
1909
                        /*IR_BIN_DATA LIST*/
1910
75
                        proto_tree_add_item(tlv_tree, hf_ir_bin_data, tvb, offset, length, ENC_ASCII);
1911
75
                        break;
1912
1913
73
                case IR_SCHM_URL_LIST :
1914
                        /*IR_SCHM_URL*/
1915
2.78k
                        for(i=0; i < tvb_get_uint8(tvb, offset); i++)
1916
2.71k
                        {
1917
2.71k
                                len = tvb_get_uint8(tvb, offset+1);
1918
2.71k
                                proto_tree_add_item(tlv_tree, hf_rdf_sch_url, tvb, offset+2, len, ENC_ASCII);
1919
2.71k
                                offset += len;
1920
2.71k
                        }
1921
73
                        break;
1922
1923
89
                case EVT_CFG_INFO_LIST :
1924
                        /*EVT_CFG_INFO LIST*/
1925
89
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_mih_evt_cfg_info);
1926
89
                        break;
1927
1928
27
                case TGT_NET_INFO :
1929
                        /*TGT_NET_INFO*/
1930
27
                        dissect_tgt_net_info(tvb, offset, tlv_tree);
1931
27
                        break;
1932
1933
82
                case TGT_NET_INFO_LIST :
1934
                        /*List of TGT_NET_INFO*/
1935
82
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_tgt_net_info);
1936
82
                        break;
1937
1938
41
                case ASGN_RES_SET :
1939
                        /*ASGN_RES_SET*/
1940
41
                        offset = dissect_qos_list(tvb, offset, tlv_tree);
1941
41
                        dissect_tsp_container(tvb, offset, tlv_tree);
1942
41
                        break;
1943
1944
89
                case LINK_DET_INFO_LIST :
1945
                        /*LINK_DET_INFO LIST*/
1946
89
                        dissect_mih_list(tvb, offset, tlv_tree, dissect_link_det_info);
1947
89
                        break;
1948
1949
19
                case NET_TYPE :
1950
                        /*NETWORK TYPE*/
1951
19
                        dissect_net_type(tvb, offset, tlv_tree);
1952
19
                        break;
1953
1954
44
                case REQ_RES_SET :
1955
                        /*REQ_RES_SET*/
1956
44
                        offset = dissect_qos_list(tvb, offset, tlv_tree);
1957
44
                        offset = dissect_tsp_container(tvb, offset, tlv_tree);
1958
44
                        proto_tree_add_item(tlv_tree, hf_ho_reason, tvb, offset, 1, ENC_BIG_ENDIAN );
1959
44
                        break;
1960
1961
32
                case VEND_SPECIFIC_TLV :
1962
                        /*Vendor specific tlv*/
1963
32
                        proto_tree_add_item(tlv_tree, hf_vendor_specific_tlv, tvb, offset, length, ENC_ASCII);
1964
32
                        break;
1965
1966
10.6k
                default :/*did not match type*/
1967
                        /*do switch case for range of numbers*/
1968
1969
                        /*RESERVED TLVs*/
1970
10.6k
                        if(type > 63 && type < 100)
1971
466
                                proto_tree_add_item(tlv_tree, hf_reserved_tlv, tvb, offset, length, ENC_ASCII);
1972
1973
                                                /*EXPERIMENTAL TLVs*/
1974
10.2k
                        else if(type > 100 && type < 255)
1975
826
                                proto_tree_add_item(tlv_tree, hf_experimental_tlv, tvb, offset, length, ENC_ASCII);
1976
1977
                        /*UNKNOWN TLVs*/
1978
9.37k
                        else
1979
9.37k
                                proto_tree_add_item(tlv_tree, hf_unknown_tlv, tvb, offset, length, ENC_ASCII);
1980
18.6k
        }
1981
17.4k
        return;
1982
18.6k
}
1983
1984
static int dissect_mih(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1985
1.50k
{
1986
1.50k
        proto_item *ti = NULL;
1987
1.50k
        int offset = 0;
1988
1.50k
        proto_item *item = NULL;
1989
1.50k
        proto_tree *mih_tree = NULL;
1990
1.50k
        proto_tree *ver_flags_tree = NULL;
1991
1.50k
        uint8_t serviceid = 0;
1992
1.50k
        uint8_t opcode = 0;
1993
1.50k
        uint8_t service = 0;
1994
1.50k
        uint16_t action = 0;
1995
1.50k
        int32_t payload_length = 0;
1996
1.50k
        uint64_t len = 0;
1997
1.50k
        uint8_t len_of_len = 0;
1998
1.50k
        uint8_t type = 0;
1999
1.50k
        proto_tree *mid_tree = NULL;
2000
1.50k
        proto_tree *tlv_tree = NULL;
2001
1.50k
        uint8_t fragment = 0;
2002
2003
1.50k
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "MIH");
2004
1.50k
        col_clear(pinfo->cinfo,COL_INFO);
2005
2006
        /* we are being asked for details */
2007
1.50k
        ti = proto_tree_add_item(tree, proto_mih, tvb, 0, -1, ENC_NA);
2008
1.50k
        mih_tree = proto_item_add_subtree(ti, ett_mih);
2009
1.50k
        if(mih_tree)
2010
1.50k
        {
2011
                /* TODO: should have a different hf item for this version root */
2012
1.50k
                item = proto_tree_add_item(mih_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2013
2014
1.50k
                ver_flags_tree = proto_item_add_subtree(item, ett_ver_flags);
2015
1.50k
                proto_tree_add_item(ver_flags_tree, hf_mih_version, tvb, offset, 1, ENC_BIG_ENDIAN);
2016
1.50k
                proto_tree_add_item(ver_flags_tree, hf_mih_ack_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2017
1.50k
                proto_tree_add_item(ver_flags_tree, hf_mih_ack_resp, tvb, offset, 1, ENC_BIG_ENDIAN);
2018
1.50k
                proto_tree_add_item(ver_flags_tree, hf_mih_uir, tvb, offset, 1, ENC_BIG_ENDIAN);
2019
1.50k
                proto_tree_add_item(ver_flags_tree, hf_mih_more_frag, tvb, offset, 1, ENC_BIG_ENDIAN);
2020
1.50k
        }
2021
1.50k
        fragment = tvb_get_uint8(tvb, offset);
2022
1.50k
        fragment = fragment << 7;
2023
2024
1.50k
        offset += 1;
2025
2026
1.50k
        if(mih_tree)
2027
1.50k
        {
2028
                /*flags and version tree is done.....*/
2029
1.50k
                proto_tree_add_item(mih_tree, hf_mih_frag_no, tvb, offset, 1, ENC_BIG_ENDIAN);
2030
2031
                /*for MIH message ID*/
2032
1.50k
                item = proto_tree_add_item(mih_tree, hf_mih_mid, tvb, offset + 1, 2, ENC_BIG_ENDIAN);
2033
1.50k
        }
2034
1.50k
        fragment = fragment + (tvb_get_uint8(tvb, offset)>>1);
2035
1.50k
        offset += 1;
2036
1.50k
        mid_tree = proto_item_add_subtree(item, ett_mid);
2037
1.50k
        serviceid = tvb_get_uint8(tvb, offset);
2038
1.50k
        serviceid = serviceid & 0xF0;
2039
1.50k
        serviceid >>= 4;
2040
1.50k
        proto_tree_add_item(mid_tree, hf_mih_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2041
2042
        /*filling the info column with the service type...*/
2043
1.50k
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(serviceid, servicevalues, "Unknown"));
2044
1.50k
        opcode = tvb_get_uint8(tvb, offset);
2045
1.50k
        opcode = opcode & 0x0C;
2046
1.50k
        opcode >>= 2;
2047
1.50k
        if(mid_tree)
2048
1.50k
                proto_tree_add_item(mid_tree, hf_mih_opcode, tvb, offset, 2, ENC_BIG_ENDIAN);
2049
2050
        /*filling the info column with the opcode type...*/
2051
1.50k
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(opcode, opcodevalues, "Unknown"));
2052
2053
        /*check for type of service..*/
2054
1.50k
        service = tvb_get_uint8(tvb, offset);
2055
1.50k
        service = service & 0xF0;
2056
1.50k
        service >>= 4;
2057
2058
        /*get the action id.*/
2059
1.50k
        action = tvb_get_ntohs(tvb, offset);
2060
1.50k
        action = action & 0x03FF;
2061
1.50k
        switch (service)
2062
1.50k
        {
2063
70
        case 1 :/*for Service Management..*/
2064
70
                proto_tree_add_item(mid_tree, hf_mih_serv_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2065
70
                col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, serv_act_id_values, "Unknown"));
2066
70
                break;
2067
144
        case 2 :/*for event services..*/
2068
144
                proto_tree_add_item(mid_tree, hf_mih_event_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2069
144
                col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, event_act_id_values, "Unknown"));
2070
144
                break;
2071
20
        case 3 :/*for Command Services..*/
2072
20
                proto_tree_add_item(mid_tree, hf_mih_command_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2073
20
                col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, command_act_id_values, "Unknown"));
2074
20
                break;
2075
145
        case 4 :/*for Information Services..*/
2076
145
                proto_tree_add_item(mid_tree, hf_mih_info_actionid, tvb, offset, 2, ENC_BIG_ENDIAN);
2077
145
                col_append_fstr(pinfo->cinfo, COL_INFO, "\"%s\"", val_to_str_const(action, info_act_id_values, "Unknown"));
2078
145
                break;
2079
1.50k
        }
2080
1.50k
        offset += 2;
2081
1.50k
        if(mih_tree)
2082
1.50k
        {
2083
2084
                /* displaying the transaction id*/
2085
1.50k
                proto_tree_add_item(mih_tree, hf_mih_tid, tvb, offset, 2, ENC_BIG_ENDIAN );
2086
2087
                /*displaying the payload length...*/
2088
1.50k
                proto_tree_add_item(mih_tree, hf_mih_pay_len, tvb, offset + 2, 2, ENC_BIG_ENDIAN );
2089
1.50k
        }
2090
1.50k
        offset += 2;
2091
1.50k
        payload_length = tvb_get_ntohs(tvb, offset);
2092
1.50k
        offset += 2;
2093
2094
        /*now the type length values list is present get them and decode it...
2095
        loop for showing all the tlvs....*/
2096
20.4k
        while(payload_length > 0 && fragment==0)
2097
18.9k
        {
2098
                /* Adding a third case here since the 802.21 standard defines 3 cases */
2099
                /*extract length*/
2100
                /*case 1: If the number of octets occupied by the Value field is LESS THAN 128, the size of the Length field is always
2101
                        one octet and the MSB of the octet is set to the value 0. The values of the other seven bits of this octet
2102
                        indicate the actual length of the Value field.
2103
                */
2104
                /*case 2: If the number of octets occupied by the Value field is EXACTLY 128, the size of the Length field is one octet.
2105
                        The MSB of the Length octet is set to the value '1' and the other seven bits of this octet are all set to the value '0'.
2106
                */
2107
                /*case 3: If the number of octets occupied by the Value field is GREATER THAN 128, then the Length field is always greater
2108
                        than one octet. The MSB of the first octet of the Length field is set to the value 1 and the remaining seven
2109
                        bits of the first octet indicate the number of octets that are appended further. The number represented by the
2110
                        second and subsequent octets of the Length field, when added to 128, indicates the total size of the Value field, in octets.
2111
                */
2112
                /*cases 2 and 3 can be logically programmed as the same condition since the whole octet is used to represent the len_of_len parameter. */
2113
2114
                /*code for testing if length is less than or equal to 128*/
2115
18.9k
                len = tvb_get_uint8(tvb, offset+1);
2116
18.9k
                if(len > 128)
2117
525
                {
2118
                        /*length is greater than 128 => len of len is greater than 1 byte*/
2119
                        /*Expanding conditions where the length values can be from 1- 8 octets long*/
2120
                        /*TODO: this assumes the maximum value length is 2^64. If larger data types are used, we have to implement our own tvb_get function*/
2121
525
                        len_of_len = (uint8_t)len - 128;
2122
525
                        switch (len_of_len) /*depending on the detected length , we read a different amount of bytes from the tvb buffer*/
2123
525
                        {
2124
20
                                case 1:
2125
20
                                        len = tvb_get_uint8(tvb, offset+2);
2126
20
                                        break;
2127
12
                                case 2:
2128
12
                                        len = tvb_get_ntohs(tvb, offset+2);
2129
12
                                        break;
2130
7
                                case 3:
2131
7
                                        len = tvb_get_ntoh24(tvb, offset+2);
2132
7
                                        break;
2133
11
                                case 4:
2134
11
                                        len = tvb_get_ntohl(tvb, offset+2);
2135
11
                                        break;
2136
7
                                case 5:
2137
7
                                        len = tvb_get_ntoh40(tvb, offset+2);
2138
7
                                        break;
2139
10
                                case 6:
2140
10
                                        len = tvb_get_ntoh48(tvb, offset+2);
2141
10
                                        break;
2142
11
                                case 7:
2143
11
                                        len = tvb_get_ntoh56(tvb, offset+2);
2144
11
                                        break;
2145
12
                                case 8:
2146
12
                                        len = tvb_get_ntoh64(tvb, offset+2);
2147
525
                        }
2148
522
                        len_of_len++;
2149
522
                        len = 128 + len;
2150
522
                }
2151
18.4k
                else
2152
18.4k
                        len_of_len = 1;
2153
2154
2155
                /*TODO: TLVs greater than the payload_length are fragmented, and currently not parsed*/
2156
18.9k
                if(len <= (uint64_t)payload_length)
2157
18.6k
                {
2158
                        /*for type...*/
2159
18.6k
                        tlv_tree = proto_tree_add_subtree_format(mih_tree, tvb, offset, 1 + len_of_len + (uint32_t)len, ett_tlv, NULL,
2160
18.6k
                                                "MIH TLV : %s", val_to_str_const(tvb_get_uint8(tvb, offset), typevaluenames, "UNKNOWN"));
2161
18.6k
                        if(tlv_tree)
2162
18.6k
                        {
2163
18.6k
                                proto_tree_add_item(tlv_tree, hf_mih_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2164
18.6k
                                type = tvb_get_uint8(tvb, offset);
2165
2166
                                /*for length...*/
2167
18.6k
                                if(len_of_len == 1)
2168
18.1k
                                {
2169
18.1k
                                        proto_tree_add_item(tlv_tree, hf_mih_type_length, tvb, offset+1, len_of_len, ENC_BIG_ENDIAN);
2170
18.1k
                                }
2171
454
                                else if(len_of_len>1 && len_of_len<=5)
2172
34
                                {
2173
34
                                        proto_tree_add_item(tlv_tree, hf_mih_type_length_ext, tvb, offset+2, len_of_len-1, ENC_BIG_ENDIAN);
2174
34
                                }
2175
2176
18.6k
                        }
2177
18.6k
                        offset += 1 + len_of_len;
2178
2179
                        /*For Value fields*/
2180
                        /*TODO: this assumes the maximum value length is 2^32. Dissecting bigger data fields would require breaking the data into chunks*/
2181
18.6k
                        if(len < (UINT64_C(1) << 32)){  /* XXX: always true ? see above */
2182
18.6k
                                dissect_mih_tlv(tvb, offset, tlv_tree, type, (uint32_t)len);
2183
18.6k
                                offset += (uint32_t)len;
2184
18.6k
                                payload_length -= (1 + len_of_len + (uint32_t)len);
2185
18.6k
                        }else{
2186
0
                            return offset;
2187
0
                        }
2188
18.6k
                }
2189
333
                else
2190
333
                {
2191
333
                        proto_tree_add_item(mih_tree, hf_fragmented_tlv, tvb, offset, -1, ENC_NA);
2192
333
                        payload_length = 0;
2193
333
                }
2194
18.9k
        }
2195
1.50k
        if(fragment!=0)
2196
6
                proto_tree_add_item(mih_tree, hf_fragmented_tlv, tvb, offset, -1, ENC_NA);
2197
2198
1.50k
        return tvb_captured_length(tvb);
2199
1.50k
}
2200
2201
/*dissector initialisation*/
2202
void proto_register_mih(void)
2203
14
{
2204
14
        static hf_register_info hf[] =
2205
14
        {
2206
14
                {
2207
14
                        &hf_mih_version,
2208
14
                        {
2209
14
                                "MIH Version",
2210
14
                                "mih.version",
2211
14
                                FT_UINT8,
2212
14
                                BASE_DEC,
2213
14
                                NULL,
2214
14
                                VERSION_MASK,
2215
14
                                NULL, HFILL
2216
14
                        }
2217
14
                },
2218
14
                {
2219
14
                        &hf_mih_ack_req,
2220
14
                        {
2221
14
                                "MIH ACK-Req",
2222
14
                                "mih.acq_req",
2223
14
                                FT_BOOLEAN,
2224
14
                                8,
2225
14
                                NULL,
2226
14
                                ACKREQ_MASK,
2227
14
                                NULL, HFILL
2228
14
                        }
2229
14
                },
2230
14
                {
2231
14
                        &hf_mih_ack_resp,
2232
14
                        {
2233
14
                                "MIH ACK-Resp",
2234
14
                                "mih.acq_resp",
2235
14
                                FT_BOOLEAN,
2236
14
                                8,
2237
14
                                NULL,
2238
14
                                ACKRESP_MASK,
2239
14
                                NULL, HFILL
2240
14
                        }
2241
14
                },
2242
14
                {
2243
14
                        &hf_mih_uir,
2244
14
                        {
2245
14
                                "MIH Unauthenticated info request",
2246
14
                                "mih.uir",
2247
14
                                FT_BOOLEAN,
2248
14
                                8,
2249
14
                                NULL,
2250
14
                                UIR_MASK,
2251
14
                                NULL, HFILL
2252
14
                        }
2253
14
                },
2254
14
                {
2255
14
                        &hf_mih_more_frag,
2256
14
                        {
2257
14
                                "MIH more fragment",
2258
14
                                "mih.more_frag",
2259
14
                                FT_BOOLEAN,
2260
14
                                8,
2261
14
                                NULL,
2262
14
                                MORE_FRAG_MASK,
2263
14
                                NULL, HFILL
2264
14
                        }
2265
14
                },
2266
14
                {
2267
14
                        &hf_mih_frag_no,
2268
14
                        {
2269
14
                                "Fragment No",
2270
14
                                "mih.frag_no",
2271
14
                                FT_UINT8,
2272
14
                                BASE_DEC,
2273
14
                                NULL,
2274
14
                                FRAG_NO_MASK,
2275
14
                                NULL, HFILL
2276
14
                        }
2277
14
                },
2278
14
                {
2279
14
                        &hf_mih_mid,
2280
14
                        {
2281
14
                                "MIH message ID",
2282
14
                                "mih.mid",
2283
14
                                FT_UINT16,
2284
14
                                BASE_HEX,
2285
14
                                NULL,
2286
14
                                0x0,
2287
14
                                NULL, HFILL
2288
14
                        }
2289
14
                },
2290
14
                {
2291
14
                        &hf_mih_service_id,
2292
14
                        {
2293
14
                                "Service ID",
2294
14
                                "mih.service_id",
2295
14
                                FT_UINT16,
2296
14
                                BASE_HEX,
2297
14
                                VALS(servicevalues),
2298
14
                                SID_MASK,
2299
14
                                NULL, HFILL
2300
14
                        }
2301
14
                },
2302
14
                {
2303
14
                        &hf_mih_opcode,
2304
14
                        {
2305
14
                                "Opcode",
2306
14
                                "mih.opcode",
2307
14
                                FT_UINT16,
2308
14
                                BASE_HEX,
2309
14
                                VALS(opcodevalues),
2310
14
                                OPCODE_MASK,
2311
14
                                NULL, HFILL
2312
14
                        }
2313
14
                },
2314
14
                {
2315
14
                        &hf_mih_serv_actionid,
2316
14
                        {
2317
14
                                "Action ID",
2318
14
                                "mih.action_id",
2319
14
                                FT_UINT16,
2320
14
                                BASE_HEX,
2321
14
                                VALS(serv_act_id_values),
2322
14
                                AID_MASK,
2323
14
                                NULL, HFILL
2324
14
                        }
2325
14
                },
2326
14
                {
2327
14
                        &hf_mih_event_actionid,
2328
14
                        {
2329
14
                                "Action ID",
2330
14
                                "mih.action_id",
2331
14
                                FT_UINT16,
2332
14
                                BASE_HEX,
2333
14
                                VALS(event_act_id_values),
2334
14
                                AID_MASK,
2335
14
                                NULL, HFILL
2336
14
                        }
2337
14
                },
2338
14
                {
2339
14
                        &hf_mih_command_actionid,
2340
14
                        {
2341
14
                                "Action ID",
2342
14
                                "mih.action_id",
2343
14
                                FT_UINT16,
2344
14
                                BASE_HEX,
2345
14
                                VALS(command_act_id_values),
2346
14
                                AID_MASK,
2347
14
                                NULL, HFILL
2348
14
                        }
2349
14
                },
2350
14
                {
2351
14
                        &hf_mih_info_actionid,
2352
14
                        {
2353
14
                                "Action ID",
2354
14
                                "mih.action_id",
2355
14
                                FT_UINT16,
2356
14
                                BASE_HEX,
2357
14
                                VALS(info_act_id_values),
2358
14
                                AID_MASK,
2359
14
                                NULL, HFILL
2360
14
                        }
2361
14
                },
2362
14
                {
2363
14
                        &hf_mih_tid,
2364
14
                        {
2365
14
                                "TID",
2366
14
                                "mih.tid",
2367
14
                                FT_UINT16,
2368
14
                                BASE_DEC,
2369
14
                                NULL,
2370
14
                                TRANS_ID_MASK,
2371
14
                                NULL, HFILL
2372
14
                        }
2373
14
                },
2374
14
                {
2375
14
                        &hf_mih_pay_len,
2376
14
                        {
2377
14
                                "Payload length",
2378
14
                                "mih.pay_len",
2379
14
                                FT_UINT16,
2380
14
                                BASE_DEC,
2381
14
                                NULL,
2382
14
                                0x0,
2383
14
                                NULL, HFILL
2384
14
                        }
2385
14
                },
2386
14
                {
2387
14
                        &hf_mih_type,
2388
14
                        {
2389
14
                                "MIH TLV type",
2390
14
                                "mih.tlv_type",
2391
14
                                FT_UINT8,
2392
14
                                BASE_DEC,
2393
14
                                VALS(typevaluenames),
2394
14
                                0x0,
2395
14
                                NULL, HFILL
2396
14
                        }
2397
14
                },
2398
14
                {
2399
14
                        &hf_mih_type_length,
2400
14
                        {
2401
14
                                "MIH TLV length",
2402
14
                                "mih.tlv_length",
2403
14
                                FT_UINT8,
2404
14
                                BASE_DEC,
2405
14
                                NULL,
2406
14
                                0x0,
2407
14
                                NULL, HFILL
2408
14
                        }
2409
14
                },
2410
14
                {
2411
14
                        &hf_mih_type_length_ext,
2412
14
                        {
2413
14
                                "MIH TLV length",
2414
14
                                "mih.tlv_length_ext",
2415
14
                                FT_UINT64,
2416
14
                                BASE_DEC,
2417
14
                                NULL,
2418
14
                                0x0,
2419
14
                                NULL, HFILL
2420
14
                        }
2421
14
                },
2422
14
                {
2423
14
                        &hf_mihf_id,
2424
14
                        {
2425
14
                                "MIHF_ID",
2426
14
                                "mih.mihf_id",
2427
14
                                FT_STRING,
2428
14
                                BASE_NONE,
2429
14
                                NULL,
2430
14
                                0x0,
2431
14
                                NULL, HFILL
2432
14
                        }
2433
14
                },
2434
14
                {
2435
14
                        &hf_mihf_id_mac,
2436
14
                        {
2437
14
                                "MIHF_ID",
2438
14
                                "mih.mihf_id.mac",
2439
14
                                FT_ETHER,
2440
14
                                BASE_NONE,
2441
14
                                NULL,
2442
14
                                0x0,
2443
14
                                NULL, HFILL
2444
14
                        }
2445
14
                },
2446
14
                {
2447
14
                        &hf_mihf_id_ipv4,
2448
14
                        {
2449
14
                                "MIHF_ID",
2450
14
                                "mih.mihf_id.ipv4",
2451
14
                                FT_IPv4,
2452
14
                                BASE_NONE,
2453
14
                                NULL,
2454
14
                                0x0,
2455
14
                                NULL, HFILL
2456
14
                        }
2457
14
                },
2458
14
                {
2459
14
                        &hf_mihf_id_ipv6,
2460
14
                        {
2461
14
                                "MIHF_ID",
2462
14
                                "mih.mihf_id.ipv6",
2463
14
                                FT_IPv6,
2464
14
                                BASE_NONE,
2465
14
                                NULL,
2466
14
                                0x0,
2467
14
                                NULL, HFILL
2468
14
                        }
2469
14
                },
2470
14
                {
2471
14
                        &hf_status,
2472
14
                        {
2473
14
                                "STATUS",
2474
14
                                "mih.status",
2475
14
                                FT_UINT8,
2476
14
                                BASE_DEC,
2477
14
                                VALS(status_types),
2478
14
                                0x0,
2479
14
                                NULL, HFILL
2480
14
                        }
2481
14
                },
2482
14
                {
2483
14
                        &hf_ip_methods_supported,
2484
14
                        {
2485
14
                                "IP methods supported",
2486
14
                                "mih.ip_methods_supported",
2487
14
                                FT_UINT8,
2488
14
                                BASE_DEC,
2489
14
                                VALS(boolean_types),
2490
14
                                0x0,
2491
14
                                NULL, HFILL
2492
14
                        }
2493
14
                },
2494
14
                {
2495
14
                        &hf_ip_dhcp_services,
2496
14
                        {
2497
14
                                "IP DHCP services",
2498
14
                                "mih.ip_dhcp_services",
2499
14
                                FT_UINT8,
2500
14
                                BASE_DEC,
2501
14
                                VALS(boolean_types),
2502
14
                                0x0,
2503
14
                                NULL, HFILL
2504
14
                        }
2505
14
                },
2506
14
                {
2507
14
                        &hf_fn_agent,
2508
14
                        {
2509
14
                                "FN Agent",
2510
14
                                "mih.fn_agent",
2511
14
                                FT_UINT8,
2512
14
                                BASE_DEC,
2513
14
                                VALS(boolean_types),
2514
14
                                0x0,
2515
14
                                NULL, HFILL
2516
14
                        }
2517
14
                },
2518
14
                {
2519
14
                        &hf_access_router,
2520
14
                        {
2521
14
                                "Access Router",
2522
14
                                "mih.access_router",
2523
14
                                FT_UINT8,
2524
14
                                BASE_DEC,
2525
14
                                VALS(boolean_types),
2526
14
                                0x0,
2527
14
                                NULL, HFILL
2528
14
                        }
2529
14
                },
2530
14
                {
2531
14
                        &hf_link_type,
2532
14
                        {
2533
14
                                "Link Type",
2534
14
                                "mih.link_type",
2535
14
                                FT_UINT8,
2536
14
                                BASE_DEC,
2537
14
                                VALS(link_type_vals),
2538
14
                                0x0,
2539
14
                                NULL, HFILL
2540
14
                        }
2541
14
                },
2542
14
{
2543
14
                        &hf_link_subtype_eth,
2544
14
                        {
2545
14
                                "Ethernet - IEEE802.3 Subtype",
2546
14
                                "mih.link_subtype_eth",
2547
14
                                FT_UINT32,
2548
14
                                BASE_HEX,
2549
14
                                NULL,
2550
14
                                0x0,
2551
14
                                NULL, HFILL
2552
14
                        }
2553
14
                },
2554
14
                {
2555
14
                        &hf_link_subtype_eth_10m,
2556
14
                        {
2557
14
                                "Ethernet 10 Mb",
2558
14
                                "mih.link_subtype_eth.10mb",
2559
14
                                FT_BOOLEAN,
2560
14
                                32,
2561
14
                                NULL,
2562
14
                                0x00000001,
2563
14
                                NULL, HFILL
2564
14
                        }
2565
14
                },
2566
14
                {
2567
14
                        &hf_link_subtype_eth_100m,
2568
14
                        {
2569
14
                                "Ethernet 100 Mb",
2570
14
                                "mih.link_subtype_eth.100mb",
2571
14
                                FT_BOOLEAN,
2572
14
                                32,
2573
14
                                NULL,
2574
14
                                0x00000002,
2575
14
                                NULL, HFILL
2576
14
                        }
2577
14
                },
2578
14
                {
2579
14
                        &hf_link_subtype_eth_1000m,
2580
14
                        {
2581
14
                                "Ethernet 1000 Mb",
2582
14
                                "mih.link_subtype_eth.1000mb",
2583
14
                                FT_BOOLEAN,
2584
14
                                32,
2585
14
                                NULL,
2586
14
                                0x00000004,
2587
14
                                NULL, HFILL
2588
14
                        }
2589
14
                },
2590
14
                {
2591
14
                        &hf_link_subtype_wireless_other,
2592
14
                        {
2593
14
                                "Wireless Other Subtype",
2594
14
                                "mih.link_subtype_wireless_other",
2595
14
                                FT_UINT32,
2596
14
                                BASE_HEX,
2597
14
                                NULL,
2598
14
                                0x0,
2599
14
                                NULL, HFILL
2600
14
                        }
2601
14
                },
2602
14
                {
2603
14
                        &hf_link_subtype_wireless_other_dvb,
2604
14
                        {
2605
14
                                "DVB",
2606
14
                                "mih.link_subtype_wireless_other.dvb",
2607
14
                                FT_BOOLEAN,
2608
14
                                32,
2609
14
                                NULL,
2610
14
                                0x00000001,
2611
14
                                NULL, HFILL
2612
14
                        }
2613
14
                },
2614
14
                {
2615
14
                        &hf_link_subtype_wireless_other_tdmb,
2616
14
                        {
2617
14
                                "T-DVB",
2618
14
                                "mih.link_subtype_wireless_other.tdmb",
2619
14
                                FT_BOOLEAN,
2620
14
                                32,
2621
14
                                NULL,
2622
14
                                0x00000002,
2623
14
                                NULL, HFILL
2624
14
                        }
2625
14
                },
2626
14
                {
2627
14
                        &hf_link_subtype_wireless_other_atsc,
2628
14
                        {
2629
14
                                "ATSC-M/H",
2630
14
                               "mih.link_subtype_wireless_other.atsc",
2631
14
                                FT_BOOLEAN,
2632
14
                                32,
2633
14
                                NULL,
2634
14
                                0x00000004,
2635
14
                                NULL, HFILL
2636
14
                        }
2637
14
                },
2638
14
                {
2639
14
                        &hf_link_subtype_ieee80211,
2640
14
                        {
2641
14
                                "Wireless - IEEE 802.11 Subtype",
2642
14
                                "mih.link_subtype_ieee80211",
2643
14
                                FT_UINT32,
2644
14
                                BASE_HEX,
2645
14
                                NULL,
2646
14
                                0x0,
2647
14
                                NULL, HFILL
2648
14
                        }
2649
14
                },
2650
14
                {
2651
14
                        &hf_link_subtype_ieee80211_24,
2652
14
                        {
2653
14
                                "2.4 GHz",
2654
14
                                "mih.link_subtype_ieee80211.2_4ghz",
2655
14
                                FT_BOOLEAN,
2656
14
                                32,
2657
14
                                NULL,
2658
14
                                0x00000001,
2659
14
                                NULL, HFILL
2660
14
                        }
2661
14
                },
2662
14
                {
2663
14
                        &hf_link_subtype_ieee80211_5,
2664
14
                        {
2665
14
                                "5 GHz",
2666
14
                                "mih.link_subtype_ieee80211.5ghz",
2667
14
                                FT_BOOLEAN,
2668
14
                                32,
2669
14
                                NULL,
2670
14
                                0x00000002,
2671
14
                                NULL, HFILL
2672
14
                        }
2673
14
                },
2674
14
                {
2675
14
                        &hf_link_subtype_ieee80211_49,
2676
14
                        {
2677
14
                                "4.9 GHz",
2678
14
                                "mih.link_subtype_ieee80211.4_9ghz",
2679
14
                                FT_BOOLEAN,
2680
14
                                32,
2681
14
                                NULL,
2682
14
                                0x00000004,
2683
14
                                NULL, HFILL
2684
14
                        }
2685
14
                },
2686
14
                {
2687
14
                        &hf_link_subtype_ieee80211_365,
2688
14
                        {
2689
14
                                "3.65 GHz",
2690
14
                                "mih.link_subtype_ieee80211.3_65ghz",
2691
14
                                FT_BOOLEAN,
2692
14
                                32,
2693
14
                                NULL,
2694
14
                                0x00000008,
2695
14
                                NULL, HFILL
2696
14
                        }
2697
14
                },
2698
14
                {
2699
14
                        &hf_link_subtype_ieee80211_316,
2700
14
                        {
2701
14
                                "316 THz",
2702
14
                               "mih.link_subtype_ieee80211.316thz",
2703
14
                                FT_BOOLEAN,
2704
14
                                32,
2705
14
                                NULL,
2706
14
                                0x00000010,
2707
14
                                NULL, HFILL
2708
14
                        }
2709
14
                },
2710
14
                {
2711
14
                        &hf_link_subtype_umts,
2712
14
                        {
2713
14
                                "Wireless - UMTS Subtype",
2714
14
                                "mih.link_subtype_umts",
2715
14
                                FT_UINT32,
2716
14
                                BASE_HEX,
2717
14
                                NULL,
2718
14
                                0x0,
2719
14
                                NULL, HFILL
2720
14
                        }
2721
14
                },
2722
14
                {
2723
14
                        &hf_link_subtype_umts_99,
2724
14
                        {
2725
14
                                "Rel-99",
2726
14
                                "mih.link_subtype_umts.rel99",
2727
14
                                FT_BOOLEAN,
2728
14
                                32,
2729
14
                                NULL,
2730
14
                                0x00000001,
2731
14
                                NULL, HFILL
2732
14
                        }
2733
14
                },
2734
14
                {
2735
14
                        &hf_link_subtype_umts_4,
2736
14
                        {
2737
14
                                "Rel-4",
2738
14
                                "mih.link_subtype_umts.rel4",
2739
14
                                FT_BOOLEAN,
2740
14
                                32,
2741
14
                                NULL,
2742
14
                                0x00000002,
2743
14
                                NULL, HFILL
2744
14
                        }
2745
14
                },
2746
14
                {
2747
14
                        &hf_link_subtype_umts_5,
2748
14
                        {
2749
14
                                "Rel-5 (w/HSDPA)",
2750
14
                                "mih.link_subtype_umts.rel5",
2751
14
                                FT_BOOLEAN,
2752
14
                                32,
2753
14
                                NULL,
2754
14
                                0x00000004,
2755
14
                                NULL, HFILL
2756
14
                        }
2757
14
                },
2758
14
                {
2759
14
                        &hf_link_subtype_umts_6,
2760
14
                        {
2761
14
                                "Rel-6 (w/ HSUPA)",
2762
14
                                "mih.link_subtype_umts.rel6",
2763
14
                                FT_BOOLEAN,
2764
14
                                32,
2765
14
                                NULL,
2766
14
                                0x00000008,
2767
14
                                NULL, HFILL
2768
14
                        }
2769
14
                },
2770
14
                {
2771
14
                        &hf_link_subtype_umts_7,
2772
14
                        {
2773
14
                                "Rel-7 (MIMO/OFDM)",
2774
14
                                "mih.link_subtype_umts.rel7",
2775
14
                                FT_BOOLEAN,
2776
14
                                32,
2777
14
                                NULL,
2778
14
                                0x00000010,
2779
14
                                NULL, HFILL
2780
14
                        }
2781
14
                },
2782
14
                {
2783
14
                        &hf_link_subtype_umts_8,
2784
14
                        {
2785
14
                                "Rel-8",
2786
14
                               "mih.link_subtype_umts.rel8",
2787
14
                                FT_BOOLEAN,
2788
14
                                32,
2789
14
                                NULL,
2790
14
                                0x00000020,
2791
14
                                NULL, HFILL
2792
14
                        }
2793
14
                },
2794
14
                {
2795
14
                        &hf_link_subtype_cdma2000,
2796
14
                        {
2797
14
                                "Wireless - cdma2000-HRPD",
2798
14
                                "mih.link_subtype_cdma2000",
2799
14
                                FT_UINT32,
2800
14
                                BASE_HEX,
2801
14
                                NULL,
2802
14
                                0x0,
2803
14
                                NULL, HFILL
2804
14
                        }
2805
14
                },
2806
14
                {
2807
14
                        &hf_link_subtype_cdma2000_0,
2808
14
                        {
2809
14
                                "Rev-0",
2810
14
                                "mih.link_subtype_cdma2000.rev0",
2811
14
                                FT_BOOLEAN,
2812
14
                                32,
2813
14
                                NULL,
2814
14
                                0x00000001,
2815
14
                                NULL, HFILL
2816
14
                        }
2817
14
                },
2818
14
                {
2819
14
                        &hf_link_subtype_cdma2000_a,
2820
14
                        {
2821
14
                                "Rev-A",
2822
14
                                "mih.link_subtype_cdma2000.reva",
2823
14
                                FT_BOOLEAN,
2824
14
                                32,
2825
14
                                NULL,
2826
14
                                0x00000002,
2827
14
                                NULL, HFILL
2828
14
                        }
2829
14
                },
2830
14
                {
2831
14
                        &hf_link_subtype_cdma2000_b,
2832
14
                        {
2833
14
                                "Rev-B",
2834
14
                                "mih.link_subtype_cdma2000.revb",
2835
14
                                FT_BOOLEAN,
2836
14
                                32,
2837
14
                                NULL,
2838
14
                                0x00000004,
2839
14
                                NULL, HFILL
2840
14
                        }
2841
14
                },
2842
14
                {
2843
14
                        &hf_link_subtype_cdma2000_c,
2844
14
                        {
2845
14
                                "Rev-C",
2846
14
                                "mih.link_subtype_cdma2000.revc",
2847
14
                                FT_BOOLEAN,
2848
14
                                32,
2849
14
                                NULL,
2850
14
                                0x00000008,
2851
14
                                NULL, HFILL
2852
14
                        }
2853
14
                },
2854
14
                {
2855
14
                        &hf_link_subtype_ieee80216,
2856
14
                        {
2857
14
                                "Wireless - IEEE 802.16",
2858
14
                                "mih.link_subtype_ieee80216",
2859
14
                                FT_UINT32,
2860
14
                                BASE_HEX,
2861
14
                                NULL,
2862
14
                                0x0,
2863
14
                                NULL, HFILL
2864
14
                        }
2865
14
                },
2866
14
                {
2867
14
                        &hf_link_subtype_ieee80216_25,
2868
14
                        {
2869
14
                                "2.5 GHz",
2870
14
                                "mih.link_subtype_ieee80216.2_5ghz",
2871
14
                                FT_BOOLEAN,
2872
14
                                32,
2873
14
                                NULL,
2874
14
                                0x00000001,
2875
14
                                NULL, HFILL
2876
14
                        }
2877
14
                },
2878
14
                {
2879
14
                        &hf_link_subtype_ieee80216_35,
2880
14
                        {
2881
14
                                "3.5 GHz",
2882
14
                                "mih.link_subtype_ieee80216.3_5ghz",
2883
14
                                FT_BOOLEAN,
2884
14
                                32,
2885
14
                                NULL,
2886
14
                                0x00000002,
2887
14
                                NULL, HFILL
2888
14
                        }
2889
14
                },
2890
14
                {
2891
14
                        &hf_link_type_ext,
2892
14
                        {
2893
14
                                "LINK_TYPE_EXT",
2894
14
                                "mih.link_type_ext",
2895
14
                                FT_STRING,
2896
14
                                BASE_NONE,
2897
14
                                NULL,
2898
14
                                0x0,
2899
14
                                NULL, HFILL
2900
14
                        }
2901
14
                },
2902
14
                {
2903
14
                        &hf_ipv4_addr,
2904
14
                        {
2905
14
                                "IP Address",
2906
14
                                "mih.ipv4_addr",
2907
14
                                FT_IPv4,
2908
14
                                BASE_NONE,
2909
14
                                NULL,
2910
14
                                0x0,
2911
14
                                NULL, HFILL
2912
14
                        }
2913
14
                },
2914
14
                {
2915
14
                        &hf_ipv6_addr,
2916
14
                        {
2917
14
                                "IP Address",
2918
14
                                "mih.ipv6_addr",
2919
14
                                FT_IPv6,
2920
14
                                BASE_NONE,
2921
14
                                NULL,
2922
14
                                0x0,
2923
14
                                NULL, HFILL
2924
14
                        }
2925
14
                },
2926
14
                {
2927
14
                        &hf_link_dn_reason,
2928
14
                        {
2929
14
                                "LINK Down Reason",
2930
14
                                "mih.link_dn_reason",
2931
14
                                FT_UINT8,
2932
14
                                BASE_DEC,
2933
14
                                VALS(link_dn_reason_vals),
2934
14
                                0x0,
2935
14
                                NULL, HFILL
2936
14
                        }
2937
14
                },
2938
14
                {
2939
14
                        &hf_link_gdn_reason,
2940
14
                        {
2941
14
                                "LINK Going Down Reason",
2942
14
                                "mih.link_gdn_reason",
2943
14
                                FT_UINT8,
2944
14
                                BASE_DEC,
2945
14
                                VALS(link_gdn_reason_vals),
2946
14
                                0x0,
2947
14
                                NULL, HFILL
2948
14
                        }
2949
14
                },
2950
14
                {
2951
14
                        &hf_mac_addr,
2952
14
                        {
2953
14
                                "MAC ADDRESS",
2954
14
                                "mih.mac_addr",
2955
14
                                FT_ETHER,
2956
14
                                BASE_NONE,
2957
14
                                NULL,
2958
14
                                0x0,
2959
14
                                NULL, HFILL
2960
14
                        }
2961
14
                },
2962
14
                {
2963
14
                        &hf_link_param_gen,
2964
14
                        {
2965
14
                                "LINK_PARAM",
2966
14
                                "mih.link_param_gen",
2967
14
                                FT_UINT8,
2968
14
                                BASE_DEC,
2969
14
                                VALS(link_param_gen_vals),
2970
14
                                0x0,
2971
14
                                NULL, HFILL
2972
14
                        }
2973
14
                },
2974
14
                {
2975
14
                        &hf_link_param_qos,
2976
14
                        {
2977
14
                                "LINK_PARAM",
2978
14
                                "mih.link_param_qos",
2979
14
                                FT_UINT8,
2980
14
                                BASE_DEC,
2981
14
                                VALS(link_param_qos_vals),
2982
14
                                0x0,
2983
14
                                NULL, HFILL
2984
14
                        }
2985
14
                },
2986
14
                {
2987
14
                        &hf_link_param_gg,
2988
14
                        {
2989
14
                                "LINK_PARAM",
2990
14
                                "mih.link_param_gg",
2991
14
                                FT_UINT8,
2992
14
                                BASE_DEC,
2993
14
                                VALS(link_param_gg_vals),
2994
14
                                0x0,
2995
14
                                NULL, HFILL
2996
14
                        }
2997
14
                },
2998
14
                {
2999
14
                        &hf_link_param_edge,
3000
14
                        {
3001
14
                                "LINK_PARAM",
3002
14
                                "mih.link_param_edge",
3003
14
                                FT_UINT8,
3004
14
                                BASE_DEC,
3005
14
                                NULL,
3006
14
                                0x0,
3007
14
                                NULL, HFILL
3008
14
                        }
3009
14
                },
3010
14
                {
3011
14
                        &hf_link_param_eth,
3012
14
                        {
3013
14
                                "LINK_PARAM",
3014
14
                                "mih.link_param_eth",
3015
14
                                FT_UINT8,
3016
14
                                BASE_DEC,
3017
14
                                NULL,
3018
14
                                0x0,
3019
14
                                NULL, HFILL
3020
14
                        }
3021
14
                },
3022
14
                {
3023
14
                        &hf_link_param_802_11,
3024
14
                        {
3025
14
                                "LINK_PARAM",
3026
14
                                "mih.link_param_802_11",
3027
14
                                FT_UINT8,
3028
14
                                BASE_DEC,
3029
14
                                VALS(link_param_802_11_vals),
3030
14
                                0x0,
3031
14
                                NULL, HFILL
3032
14
                        }
3033
14
                },
3034
14
                {
3035
14
                        &hf_link_param_c2k,
3036
14
                        {
3037
14
                                "LINK_PARAM",
3038
14
                                "mih.link_param_c2k",
3039
14
                                FT_UINT8,
3040
14
                                BASE_DEC,
3041
14
                                VALS(link_param_c2k_hrpd_vals),
3042
14
                                0x0,
3043
14
                                NULL, HFILL
3044
14
                        }
3045
14
                },
3046
14
                {
3047
14
                        &hf_link_param_fdd,
3048
14
                        {
3049
14
                                "LINK_PARAM",
3050
14
                                "mih.link_param_fdd",
3051
14
                                FT_UINT8,
3052
14
                                BASE_DEC,
3053
14
                                VALS(link_param_fdd_vals),
3054
14
                                0x0,
3055
14
                                NULL, HFILL
3056
14
                        }
3057
14
                },
3058
14
                {
3059
14
                        &hf_link_param_hrpd,
3060
14
                        {
3061
14
                                "LINK_PARAM",
3062
14
                                "mih.link_param_hrpd",
3063
14
                                FT_UINT8,
3064
14
                                BASE_DEC,
3065
14
                                VALS(link_param_c2k_hrpd_vals),
3066
14
                                0x0,
3067
14
                                NULL, HFILL
3068
14
                        }
3069
14
                },
3070
14
                {
3071
14
                        &hf_link_param_802_16,
3072
14
                        {
3073
14
                                "LINK_PARAM",
3074
14
                                "mih.link_param_802_16",
3075
14
                                FT_UINT8,
3076
14
                                BASE_DEC,
3077
14
                                NULL,
3078
14
                                0x0,
3079
14
                                NULL, HFILL
3080
14
                        }
3081
14
                },
3082
14
                {
3083
14
                        &hf_link_param_802_20,
3084
14
                        {
3085
14
                                "LINK_PARAM",
3086
14
                                "mih.link_param_802_20",
3087
14
                                FT_UINT8,
3088
14
                                BASE_DEC,
3089
14
                                NULL,
3090
14
                                0x0,
3091
14
                                NULL, HFILL
3092
14
                        }
3093
14
                },
3094
14
                {
3095
14
                        &hf_link_param_802_22,
3096
14
                        {
3097
14
                                "LINK_PARAM",
3098
14
                                "mih.link_param_802_22",
3099
14
                                FT_UINT8,
3100
14
                                BASE_DEC,
3101
14
                                NULL,
3102
14
                                0x0,
3103
14
                                NULL, HFILL
3104
14
                        }
3105
14
                },
3106
14
                {
3107
14
                        &hf_link_param_value,
3108
14
                        {
3109
14
                                "LINK_VALUE",
3110
14
                                "mih.link_param_value",
3111
14
                                FT_UINT16,
3112
14
                                BASE_DEC,
3113
14
                                NULL,
3114
14
                                0x0,
3115
14
                                NULL, HFILL
3116
14
                        }
3117
14
                },
3118
14
                {
3119
14
                        &hf_op_mode,
3120
14
                        {
3121
14
                                "OP_MODE",
3122
14
                                "mih.op_mode",
3123
14
                                FT_UINT8,
3124
14
                                BASE_DEC,
3125
14
                                VALS(op_mode_vals),
3126
14
                                0x0,
3127
14
                                NULL, HFILL
3128
14
                        }
3129
14
                },
3130
14
                {
3131
14
                        &hf_link_ac_type,
3132
14
                        {
3133
14
                                "LINK_AC_TYPE",
3134
14
                                "mih.link_ac_type",
3135
14
                                FT_UINT8,
3136
14
                                BASE_DEC,
3137
14
                                VALS(link_ac_type_vals),
3138
14
                                0x0,
3139
14
                                NULL, HFILL
3140
14
                        }
3141
14
                },
3142
14
                {
3143
14
                        &hf_link_ac_ext_time,
3144
14
                        {
3145
14
                                "LINK_AC_ext_time",
3146
14
                                "mih.link_ac_ext_time",
3147
14
                                FT_UINT16,
3148
14
                                BASE_DEC,
3149
14
                                NULL,
3150
14
                                0x0,
3151
14
                                NULL, HFILL
3152
14
                        }
3153
14
                },
3154
14
                {
3155
14
                        &hf_link_ac_result,
3156
14
                        {
3157
14
                                "LINK_AC_RESULT",
3158
14
                                "mih.link_ac_result",
3159
14
                                FT_UINT8,
3160
14
                                BASE_DEC,
3161
14
                                VALS(link_ac_result_vals),
3162
14
                                0x0,
3163
14
                                NULL, HFILL
3164
14
                        }
3165
14
                },
3166
14
                {
3167
14
                        &hf_ho_reason,
3168
14
                        {
3169
14
                                "HO CAUSE",
3170
14
                                "mih.ho_reason",
3171
14
                                FT_UINT8,
3172
14
                                BASE_DEC,
3173
14
                                VALS(link_dn_reason_vals),
3174
14
                                0x0,
3175
14
                                NULL, HFILL
3176
14
                        }
3177
14
                },
3178
14
                {
3179
14
                        &hf_ho_status,
3180
14
                        {
3181
14
                                "HO STATUS",
3182
14
                                "mih.ho_status",
3183
14
                                FT_UINT8,
3184
14
                                BASE_DEC,
3185
14
                                VALS(ho_status_vals),
3186
14
                                0x0,
3187
14
                                NULL, HFILL
3188
14
                        }
3189
14
                },
3190
14
                {
3191
14
                        &hf_mbb_ho_supp,
3192
14
                        {
3193
14
                                "MBB HO SUPP",
3194
14
                                "mih.mbb_ho_supp",
3195
14
                                FT_UINT8,
3196
14
                                BASE_DEC,
3197
14
                                VALS(mbb_ho_supp_vals),
3198
14
                                0x0,
3199
14
                                NULL, HFILL
3200
14
                        }
3201
14
                },
3202
14
                {
3203
14
                        &hf_reg_request_code,
3204
14
                        {
3205
14
                                "REGISTER REQUEST CODE",
3206
14
                                "mih.reg_request_code",
3207
14
                                FT_UINT8,
3208
14
                                BASE_DEC,
3209
14
                                VALS(reg_request_code_vals),
3210
14
                                0x0,
3211
14
                                NULL, HFILL
3212
14
                        }
3213
14
                },
3214
14
                {
3215
14
                        &hf_ip_renewal,
3216
14
                        {
3217
14
                                "IP RENEWAL FLAG",
3218
14
                                "mih.ip_renewal",
3219
14
                                FT_UINT8,
3220
14
                                BASE_DEC,
3221
14
                                VALS(ip_renewal_vals),
3222
14
                                0x0,
3223
14
                                NULL, HFILL
3224
14
                        }
3225
14
                },
3226
14
                {
3227
14
                        &hf_dev_states_resp,
3228
14
                        {
3229
14
                                "SUPPORTED TRANSPORTS",
3230
14
                                "mih.dev_states_resp",
3231
14
                                FT_UINT8,
3232
14
                                BASE_DEC,
3233
14
                                VALS(dev_states_req_vals),
3234
14
                                0x0,
3235
14
                                NULL, HFILL
3236
14
                        }
3237
14
                },
3238
14
                {
3239
14
                        &hf_dev_batt_level,
3240
14
                        {
3241
14
                                "Battery Level",
3242
14
                                "mih.dev_states_resp.batt_level",
3243
14
                                FT_INT8,
3244
14
                                BASE_DEC,
3245
14
                                NULL,
3246
14
                                0x0,
3247
14
                                NULL, HFILL
3248
14
                        }
3249
14
                },
3250
14
                {
3251
14
                        &hf_dev_info,
3252
14
                        {
3253
14
                                "Device Info",
3254
14
                                "mih.dev_states_resp.dev_info",
3255
14
                                FT_STRING,
3256
14
                                BASE_NONE,
3257
14
                                NULL,
3258
14
                                0x0,
3259
14
                                NULL, HFILL
3260
14
                        }
3261
14
                },
3262
14
                {
3263
14
                        &hf_max_resp_size,
3264
14
                        {
3265
14
                                "Maximum Response Size",
3266
14
                                "mih.max_resp_size",
3267
14
                                FT_UINT16,
3268
14
                                BASE_DEC,
3269
14
                                NULL,
3270
14
                                0x0,
3271
14
                                NULL, HFILL
3272
14
                        }
3273
14
                },
3274
14
                {
3275
14
                        &hf_time_interval,
3276
14
                        {
3277
14
                                "Time Interval",
3278
14
                                "mih.time_interval",
3279
14
                                FT_UINT16,
3280
14
                                BASE_DEC,
3281
14
                                NULL,
3282
14
                                0x0,
3283
14
                                NULL, HFILL
3284
14
                        }
3285
14
                },
3286
14
                {
3287
14
                        &hf_valid_time_interval,
3288
14
                        {
3289
14
                                "Valid Time Interval",
3290
14
                                "mih.valid_time_interval",
3291
14
                                FT_UINT32,
3292
14
                                BASE_DEC,
3293
14
                                NULL,
3294
14
                                0x0,
3295
14
                                NULL, HFILL
3296
14
                        }
3297
14
                },
3298
14
                {
3299
14
                        &hf_tsp_carrier,
3300
14
                        {
3301
14
                                "TSP Carrier",
3302
14
                                "mih.tsp_carrier",
3303
14
                                FT_STRING,
3304
14
                                BASE_NONE,
3305
14
                                NULL,
3306
14
                                0x0,
3307
14
                                NULL, HFILL
3308
14
                        }
3309
14
                },
3310
14
                {
3311
14
                        &hf_link_addr_type,
3312
14
                        {
3313
14
                                "Link Address Type",
3314
14
                                "mih.link_addr_type",
3315
14
                                FT_UINT8,
3316
14
                                BASE_DEC,
3317
14
                                VALS(link_addr_types),
3318
14
                                0x0,
3319
14
                                NULL, HFILL
3320
14
                        }
3321
14
                },
3322
14
                {
3323
14
                        &hf_link_transport_addr_type,
3324
14
                        {
3325
14
                                "Link Transport Address Type",
3326
14
                                "mih.link_transport_addr_type",
3327
14
                                FT_UINT16,
3328
14
                                BASE_DEC,
3329
14
                                NULL,
3330
14
                                0x0,
3331
14
                                NULL, HFILL
3332
14
                        }
3333
14
                },
3334
14
                {
3335
14
                        &hf_link_addr_string,
3336
14
                        {
3337
14
                                "Link Address String",
3338
14
                                "mih.link_addr_string",
3339
14
                                FT_STRING,
3340
14
                                BASE_NONE,
3341
14
                                NULL,
3342
14
                                0x0,
3343
14
                                NULL, HFILL
3344
14
                        }
3345
14
                },
3346
14
                {
3347
14
                        &hf_cell_id,
3348
14
                        {
3349
14
                                "3G Cell ID",
3350
14
                                "mih.cell_id",
3351
14
                                FT_UINT32,
3352
14
                                BASE_DEC,
3353
14
                                NULL,
3354
14
                                0x0,
3355
14
                                NULL, HFILL
3356
14
                        }
3357
14
                },
3358
14
                {
3359
14
                        &hf_ci,
3360
14
                        {
3361
14
                                "2G Cell ID",
3362
14
                                "mih.ci",
3363
14
                                FT_UINT16,
3364
14
                                BASE_DEC,
3365
14
                                NULL,
3366
14
                                0x0,
3367
14
                                NULL, HFILL
3368
14
                        }
3369
14
                },
3370
14
                {
3371
14
                        &hf_plmn_id,
3372
14
                        {
3373
14
                                "Public Land Mobile Network (PLMN) ID",
3374
14
                                "mih.plmn_id",
3375
14
                                FT_UINT24,
3376
14
                                BASE_DEC,
3377
14
                                NULL,
3378
14
                                0x0,
3379
14
                                NULL, HFILL
3380
14
                        }
3381
14
                },
3382
14
                {
3383
14
                        &hf_location_area_id,
3384
14
                        {
3385
14
                                "Location Area Code (LAC)",
3386
14
                                "mih.lac",
3387
14
                                FT_UINT16,
3388
14
                                BASE_DEC,
3389
14
                                NULL,
3390
14
                                0x0,
3391
14
                                NULL, HFILL
3392
14
                        }
3393
14
                },
3394
14
                {
3395
14
                        &hf_threshold_val,
3396
14
                        {
3397
14
                                "Threshold Value",
3398
14
                                "mih.threshold_val",
3399
14
                                FT_UINT16,
3400
14
                                BASE_DEC,
3401
14
                                NULL,
3402
14
                                0x0,
3403
14
                                NULL, HFILL
3404
14
                        }
3405
14
                },
3406
14
                {
3407
14
                        &hf_threshold_x_dir,
3408
14
                        {
3409
14
                                "Threshold Direction",
3410
14
                                "mih.threshold_x_dir",
3411
14
                                FT_UINT8,
3412
14
                                BASE_DEC,
3413
14
                                VALS(threshold_x_dir_vals),
3414
14
                                0x0,
3415
14
                                NULL, HFILL
3416
14
                        }
3417
14
                },
3418
14
                {
3419
14
                        &hf_threshold_action,
3420
14
                        {
3421
14
                                "Threshold Action",
3422
14
                                "mih.threshold_action",
3423
14
                                FT_UINT8,
3424
14
                                BASE_DEC,
3425
14
                                VALS(threshold_action_vals),
3426
14
                                0x0,
3427
14
                                NULL, HFILL
3428
14
                        }
3429
14
                },
3430
14
                {
3431
14
                        &hf_config_status,
3432
14
                        {
3433
14
                                "Config Status",
3434
14
                                "mih.config_status",
3435
14
                                FT_UINT8,
3436
14
                                BASE_DEC,
3437
14
                                VALS(boolean_types),
3438
14
                                0x0,
3439
14
                                NULL, HFILL
3440
14
                        }
3441
14
                },
3442
14
                {
3443
14
                        &hf_num_cos,
3444
14
                        {
3445
14
                                "Number of differentiable classes",
3446
14
                                "mih.num_cos",
3447
14
                                FT_UINT8,
3448
14
                                BASE_DEC,
3449
14
                                NULL,
3450
14
                                0x0,
3451
14
                                NULL, HFILL
3452
14
                        }
3453
14
                },
3454
14
                {
3455
14
                        &hf_num_queue,
3456
14
                        {
3457
14
                                "Number of transmit queues supported",
3458
14
                                "mih.num_queue",
3459
14
                                FT_UINT8,
3460
14
                                BASE_DEC,
3461
14
                                NULL,
3462
14
                                0x0,
3463
14
                                NULL, HFILL
3464
14
                        }
3465
14
                },
3466
14
                {
3467
14
                        &hf_channel_id,
3468
14
                        {
3469
14
                                "Channel ID",
3470
14
                                "mih.channel_id",
3471
14
                                FT_UINT16,
3472
14
                                BASE_DEC,
3473
14
                                NULL,
3474
14
                                0x0,
3475
14
                                NULL, HFILL
3476
14
                        }
3477
14
                },
3478
14
                {
3479
14
                        &hf_predef_cfg_id,
3480
14
                        {
3481
14
                                "Pre-defined Configuration Identifier",
3482
14
                                "mih.predef_cfg_id",
3483
14
                                FT_INT8,
3484
14
                                BASE_DEC,
3485
14
                                NULL,
3486
14
                                0x0,
3487
14
                                NULL, HFILL
3488
14
                        }
3489
14
                },
3490
14
                {
3491
14
                        &hf_network_id,
3492
14
                        {
3493
14
                                "Network ID",
3494
14
                                "mih.network_id",
3495
14
                                FT_STRING,
3496
14
                                BASE_NONE,
3497
14
                                NULL,
3498
14
                                0x0,
3499
14
                                NULL, HFILL
3500
14
                        }
3501
14
                },
3502
14
                {
3503
14
                        &hf_net_aux_id,
3504
14
                        {
3505
14
                                "Auxiliary Network ID",
3506
14
                                "mih.net_aux_id",
3507
14
                                FT_STRING,
3508
14
                                BASE_NONE,
3509
14
                                NULL,
3510
14
                                0x0,
3511
14
                                NULL, HFILL
3512
14
                        }
3513
14
                },
3514
14
                {
3515
14
                        &hf_sig_strength_dbm,
3516
14
                        {
3517
14
                                "Signal Strength (dBm)",
3518
14
                                "mih.sig_strength",
3519
14
                                FT_INT8,
3520
14
                                BASE_DEC,
3521
14
                                NULL,
3522
14
                                0x0,
3523
14
                                NULL, HFILL
3524
14
                        }
3525
14
                },
3526
14
                {
3527
14
                        &hf_sig_strength_per,
3528
14
                        {
3529
14
                                "Signal Strength (%)",
3530
14
                                "mih.sig_strength",
3531
14
                                FT_INT8,
3532
14
                                BASE_DEC,
3533
14
                                NULL,
3534
14
                                0x0,
3535
14
                                NULL, HFILL
3536
14
                        }
3537
14
                },
3538
14
                {
3539
14
                        &hf_cos_id,
3540
14
                        {
3541
14
                                "Class of Service ID",
3542
14
                                "mih.cos_id",
3543
14
                                FT_INT8,
3544
14
                                BASE_DEC,
3545
14
                                NULL,
3546
14
                                0x0,
3547
14
                                NULL, HFILL
3548
14
                        }
3549
14
                },
3550
14
                {
3551
14
                        &hf_cos_value,
3552
14
                        {
3553
14
                                "Class of Service Value",
3554
14
                                "mih.cos_value",
3555
14
                                FT_INT16,
3556
14
                                BASE_DEC,
3557
14
                                NULL,
3558
14
                                0x0,
3559
14
                                NULL, HFILL
3560
14
                        }
3561
14
                },
3562
14
                {
3563
14
                        &hf_sinr,
3564
14
                        {
3565
14
                                "SINR",
3566
14
                                "mih.sinr",
3567
14
                                FT_INT16,
3568
14
                                BASE_DEC,
3569
14
                                NULL,
3570
14
                                0x0,
3571
14
                                NULL, HFILL
3572
14
                        }
3573
14
                },
3574
14
                {
3575
14
                        &hf_link_data_rate,
3576
14
                        {
3577
14
                                "Link Data Rate (kb/s)",
3578
14
                                "mih.link_data_rate",
3579
14
                                FT_UINT32,
3580
14
                                BASE_DEC,
3581
14
                                NULL,
3582
14
                                0x0,
3583
14
                                NULL, HFILL
3584
14
                        }
3585
14
                },
3586
14
                {
3587
14
                        &hf_rdf_data,
3588
14
                        {
3589
14
                                "RDF data",
3590
14
                                "mih.rdf_data",
3591
14
                                FT_STRING,
3592
14
                                BASE_NONE,
3593
14
                                NULL,
3594
14
                                0x0,
3595
14
                                NULL, HFILL
3596
14
                        }
3597
14
                },
3598
14
                {
3599
14
                        &hf_rdf_mime_type,
3600
14
                        {
3601
14
                                "RDF data",
3602
14
                                "mih.rdf_mime_type",
3603
14
                                FT_STRING,
3604
14
                                BASE_NONE,
3605
14
                                NULL,
3606
14
                                0x0,
3607
14
                                NULL, HFILL
3608
14
                        }
3609
14
                },
3610
14
                {
3611
14
                        &hf_link_res_status,
3612
14
                        {
3613
14
                                "Resource Status",
3614
14
                                "mih.res_status",
3615
14
                                FT_UINT8,
3616
14
                                BASE_DEC,
3617
14
                                VALS(boolean_types),
3618
14
                                0x0,
3619
14
                                NULL, HFILL
3620
14
                        }
3621
14
                },
3622
14
                {
3623
14
                        &hf_res_retention_status,
3624
14
                        {
3625
14
                                "Info query RDF schema URL",
3626
14
                                "mih.res_retention_status",
3627
14
                                FT_UINT8,
3628
14
                                BASE_DEC,
3629
14
                                VALS(boolean_types),
3630
14
                                0x0,
3631
14
                                NULL, HFILL
3632
14
                        }
3633
14
                },
3634
14
                {
3635
14
                        &hf_res_rpt_flag,
3636
14
                        {
3637
14
                                "Query resource report flag",
3638
14
                                "mih.res_rpt_flag",
3639
14
                                FT_UINT8,
3640
14
                                BASE_DEC,
3641
14
                                VALS(boolean_types),
3642
14
                                0x0,
3643
14
                                NULL, HFILL
3644
14
                        }
3645
14
                },
3646
14
                {
3647
14
                       &hf_unauth_info_req,
3648
14
                        {
3649
14
                                "Unauthenticated information request",
3650
14
                                "mih.unauth_info_req",
3651
14
                                FT_UINT8,
3652
14
                                BASE_DEC,
3653
14
                                VALS(boolean_types),
3654
14
                                0x0,
3655
14
                                NULL, HFILL
3656
14
                        }
3657
14
                },
3658
14
                {
3659
14
                       &hf_rdf_sch,
3660
14
                        {
3661
14
                                "RDF Schema",
3662
14
                                "mih.rdf_sch",
3663
14
                                FT_STRING,
3664
14
                                BASE_NONE,
3665
14
                                NULL,
3666
14
                                0x0,
3667
14
                                NULL, HFILL
3668
14
                        }
3669
14
                },
3670
14
                {
3671
14
                       &hf_rdf_sch_url,
3672
14
                        {
3673
14
                                "RDF Schema URL",
3674
14
                                "mih.rdf_sch_url",
3675
14
                                FT_STRING,
3676
14
                                BASE_NONE,
3677
14
                                NULL,
3678
14
                                0x0,
3679
14
                                NULL, HFILL
3680
14
                        }
3681
14
                },
3682
14
                {
3683
14
                       &hf_ir_bin_data,
3684
14
                        {
3685
14
                                "IR Binary Data",
3686
14
                                "mih.ir_bin_data",
3687
14
                                FT_STRING,
3688
14
                                BASE_NONE,
3689
14
                                NULL,
3690
14
                                0x0,
3691
14
                                NULL, HFILL
3692
14
                        }
3693
14
                },
3694
14
                {
3695
14
                       &hf_iq_bin_data_x,
3696
14
                        {
3697
14
                                "IQ Binary Data",
3698
14
                                "mih.iq_bin_data",
3699
14
                                FT_STRING,
3700
14
                                BASE_NONE,
3701
14
                                NULL,
3702
14
                                0x0,
3703
14
                                NULL, HFILL
3704
14
                        }
3705
14
                },
3706
14
                {
3707
14
                       &hf_vendor_specific_tlv,
3708
14
                        {
3709
14
                                "Vendor Specific TLV",
3710
14
                                "mih.vendor_specific_tlv",
3711
14
                                FT_STRING,
3712
14
                                BASE_NONE,
3713
14
                                NULL,
3714
14
                                0x0,
3715
14
                                NULL, HFILL
3716
14
                        }
3717
14
                },
3718
14
                {
3719
14
                       &hf_reserved_tlv,
3720
14
                        {
3721
14
                                "Reserved TLV",
3722
14
                                "mih.reserved_tlv",
3723
14
                                FT_STRING,
3724
14
                                BASE_NONE,
3725
14
                                NULL,
3726
14
                                0x0,
3727
14
                                NULL, HFILL
3728
14
                        }
3729
14
                },
3730
14
                {
3731
14
                       &hf_experimental_tlv,
3732
14
                        {
3733
14
                                "Experimental TLV",
3734
14
                                "mih.experimental_tlv",
3735
14
                                FT_STRING,
3736
14
                                BASE_NONE,
3737
14
                                NULL,
3738
14
                                0x0,
3739
14
                                NULL, HFILL
3740
14
                        }
3741
14
                },
3742
14
                {
3743
14
                       &hf_unknown_tlv,
3744
14
                        {
3745
14
                                "UNKNOWN TLV",
3746
14
                                "mih.unknown_tlv",
3747
14
                                FT_STRING,
3748
14
                                BASE_NONE,
3749
14
                                NULL,
3750
14
                                0x0,
3751
14
                                NULL, HFILL
3752
14
                        }
3753
14
                },
3754
14
                {
3755
14
                       &hf_fragmented_tlv,
3756
14
                        {
3757
14
                                "FRAGMENTED TLV",
3758
14
                                "mih.fragmented_tlv",
3759
14
                                FT_BYTES,
3760
14
                                BASE_NONE,
3761
14
                                NULL,
3762
14
                                0x0,
3763
14
                                NULL, HFILL
3764
14
                        }
3765
14
                },
3766
3767
                /*event related hf fields*/
3768
14
                {
3769
14
                        &hf_event_list,
3770
14
                        {
3771
14
                                "List of Events",
3772
14
                                "mih.event_list",
3773
14
                                FT_UINT32,
3774
14
                                BASE_HEX,
3775
14
                                NULL,
3776
14
                                0x0,
3777
14
                                NULL, HFILL
3778
14
                        }
3779
14
                },
3780
14
                {
3781
14
                        &hf_event_link_detect,
3782
14
                        {
3783
14
                                "MIH LINK Detected",
3784
14
                                "mih.event_list.link_detect",
3785
14
                                FT_BOOLEAN,
3786
14
                                32,
3787
14
                                NULL,
3788
14
                                LINK_DETECT_MASK,
3789
14
                                NULL, HFILL
3790
14
                        }
3791
14
                },
3792
14
                {
3793
14
                        &hf_event_link_up,
3794
14
                        {
3795
14
                                "MIH LINK UP",
3796
14
                                "mih.event_list.link_up",
3797
14
                                FT_BOOLEAN,
3798
14
                                32,
3799
14
                                NULL,
3800
14
                                LINK_UP_MASK,
3801
14
                                NULL, HFILL
3802
14
                        }
3803
14
                },
3804
14
                {
3805
14
                        &hf_event_link_dn,
3806
14
                        {
3807
14
                                "MIH LINK DOWN",
3808
14
                                "mih.event_list.link_down",
3809
14
                                FT_BOOLEAN,
3810
14
                                32,
3811
14
                                NULL,
3812
14
                                LINK_DOWN_MASK,
3813
14
                                NULL, HFILL
3814
14
                        }
3815
14
                },
3816
14
                {
3817
14
                        &hf_event_link_param,
3818
14
                        {
3819
14
                                "MIH LINK Parameters Report",
3820
14
                                "mih.event_list.link_param_rpt",
3821
14
                                FT_BOOLEAN,
3822
14
                                32,
3823
14
                                NULL,
3824
14
                                LINK_PARAM_MASK,
3825
14
                                NULL, HFILL
3826
14
                        }
3827
14
                },
3828
14
                {
3829
14
                        &hf_event_link_gd,
3830
14
                        {
3831
14
                                "MIH LINK Going Down",
3832
14
                                "mih.event_list.link_gd",
3833
14
                                FT_BOOLEAN,
3834
14
                                32,
3835
14
                                NULL,
3836
14
                                LINK_GD_MASK,
3837
14
                                NULL, HFILL
3838
14
                        }
3839
14
                },
3840
14
                {
3841
14
                        &hf_event_ho_imm,
3842
14
                        {
3843
14
                                "Link Handover Imminent",
3844
14
                                "mih.event_list.link_ho_imm",
3845
14
                                FT_BOOLEAN,
3846
14
                                32,
3847
14
                                NULL,
3848
14
                                LINK_HO_IMM_MASK,
3849
14
                                NULL, HFILL
3850
14
                        }
3851
14
                },
3852
14
                {
3853
14
                        &hf_event_ho_comp,
3854
14
                        {
3855
14
                                "MIH LINK Handover Complete",
3856
14
                                "mih.event_list.link_ho_comp",
3857
14
                                FT_BOOLEAN,
3858
14
                                32,
3859
14
                                NULL,
3860
14
                                LINK_HO_COMP_MASK,
3861
14
                                NULL, HFILL
3862
14
                        }
3863
14
                },
3864
14
                {
3865
14
                        &hf_event_pdu_tx_stat,
3866
14
                        {
3867
14
                                "MIH LINK PDU Transmit Status",
3868
14
                                "mih.event_list.link_pdu_tx_stat",
3869
14
                                FT_BOOLEAN,
3870
14
                                32,
3871
14
                                NULL,
3872
14
                                LINK_PDU_MASK,
3873
14
                                NULL, HFILL
3874
14
                        }
3875
14
                },
3876
3877
                /* cmd related hf fields */
3878
14
                {
3879
14
                        &hf_cmd_list,
3880
14
                        {
3881
14
                                "List of Commands",
3882
14
                                "mih.command_list",
3883
14
                                FT_UINT32,
3884
14
                                BASE_HEX,
3885
14
                                NULL,
3886
14
                                0x0,
3887
14
                                NULL, HFILL
3888
14
                        }
3889
14
                },
3890
14
                {
3891
3892
14
                        &hf_cmd_event_subs,
3893
14
                        {
3894
14
                                "MIH LINK Event Subscribe",
3895
14
                                "mih.cmd_list.evt_subs",
3896
14
                                FT_BOOLEAN,
3897
14
                                32,
3898
14
                                NULL,
3899
14
                                CMD_EVT_SUBS_MASK,
3900
14
                                NULL, HFILL
3901
14
                        }
3902
14
                },
3903
14
                {
3904
14
                        &hf_cmd_event_unsub,
3905
14
                        {
3906
14
                                "Link Event Unsubscribe",
3907
14
                                "mih.cmd_list.evt_unsubs",
3908
14
                                FT_BOOLEAN,
3909
14
                                32,
3910
14
                                NULL,
3911
14
                                CMD_EVT_UNSUBS_MASK,
3912
14
                                NULL, HFILL
3913
14
                        }
3914
14
                },
3915
14
                {
3916
14
                        &hf_cmd_get_param,
3917
14
                        {
3918
14
                                "MIH LINK Get Parameters",
3919
14
                                "mih.cmd_list.evt_get_param",
3920
14
                                FT_BOOLEAN,
3921
14
                                32,
3922
14
                                NULL,
3923
14
                                CMD_GET_PARA_MASK,
3924
14
                                NULL, HFILL
3925
14
                        }
3926
14
                },
3927
14
                {
3928
14
                        &hf_cmd_con_thres,
3929
14
                        {
3930
14
                                "Link Configure Thresholds",
3931
14
                                "mih.cmd_list.evt_conf_th",
3932
14
                                FT_BOOLEAN,
3933
14
                                32,
3934
14
                                NULL,
3935
14
                                CMD_CONF_TH_MASK,
3936
14
                                NULL, HFILL
3937
14
                        }
3938
14
                },
3939
14
                {
3940
14
                        &hf_cmd_link_action,
3941
14
                        {
3942
14
                                "MIH LINK Action",
3943
14
                                "mih.cmd_list.evt_link_action",
3944
14
                                FT_BOOLEAN,
3945
14
                                32,
3946
14
                                NULL,
3947
14
                                CMD_LINK_AC_MASK,
3948
14
                                NULL, HFILL
3949
14
                        }
3950
14
                },
3951
3952
                /*header fields for iq type list*/
3953
14
                {
3954
14
                        &hf_iq_list,
3955
14
                        {
3956
14
                                "List of of IS query types",
3957
14
                                "mih.iq_type_list",
3958
14
                                FT_UINT32,
3959
14
                                BASE_HEX,
3960
14
                                NULL,
3961
14
                                0x0,
3962
14
                                NULL, HFILL
3963
14
                        }
3964
14
                },
3965
14
                {
3966
14
                        &hf_iq_bin_data,
3967
14
                        {
3968
14
                                "Binary data",
3969
14
                                "mih.iq_type_list.bin_data",
3970
14
                                FT_BOOLEAN,
3971
14
                                32,
3972
14
                                NULL,
3973
14
                                IQ_BIN_DATA_MASK,
3974
14
                                NULL, HFILL
3975
14
                        }
3976
14
                },
3977
14
                {
3978
14
                        &hf_iq_rdf_data,
3979
14
                        {
3980
14
                                "RDF data",
3981
14
                                "mih.iq_type_list.rdf_data",
3982
14
                                FT_BOOLEAN,
3983
14
                                32,
3984
14
                                NULL,
3985
14
                                IQ_RDF_DATA_MASK,
3986
14
                                NULL, HFILL
3987
14
                        }
3988
14
                },
3989
14
                {
3990
14
                        &hf_iq_rdf_sch_url,
3991
14
                        {
3992
14
                                "RDF schema URL",
3993
14
                                "mih.iq_type_list.rdf_sch_u",
3994
14
                                FT_BOOLEAN,
3995
14
                                32,
3996
14
                                NULL,
3997
14
                                IQ_RDF_SCH_U_MASK,
3998
14
                                NULL, HFILL
3999
14
                        }
4000
14
                },
4001
14
                {
4002
14
                        &hf_iq_rdf_sch,
4003
14
                        {
4004
14
                                "RDF schema",
4005
14
                                "mih.iq_type_list.rdf_sch",
4006
14
                                FT_BOOLEAN,
4007
14
                                32,
4008
14
                                NULL,
4009
14
                                IQ_RDF_SCH_MASK,
4010
14
                                NULL, HFILL
4011
14
                        }
4012
14
                },
4013
14
                {
4014
14
                        &hf_iq_net_type,
4015
14
                        {
4016
14
                                "IE_NETWORK_TYPE",
4017
14
                                "mih.iq_type_list.ie_net_type",
4018
14
                                FT_BOOLEAN,
4019
14
                                32,
4020
14
                                NULL,
4021
14
                                IQ_IE_NET_TYPE_MASK,
4022
14
                                NULL, HFILL
4023
14
                        }
4024
14
                },
4025
14
                {
4026
14
                        &hf_iq_op_id,
4027
14
                        {
4028
14
                                "IE_OPERATOR_ID",
4029
14
                                "mih.iq_type_list.ie_op_id",
4030
14
                                FT_BOOLEAN,
4031
14
                                32,
4032
14
                                NULL,
4033
14
                                IQ_IE_OP_ID_MASK,
4034
14
                                NULL, HFILL
4035
14
                        }
4036
14
                },
4037
14
                {
4038
14
                        &hf_iq_serv_pro_id,
4039
14
                        {
4040
14
                                "IE_SERVICE_PROVIDER_ID",
4041
14
                                "mih.iq_type_list.ie_serv_id",
4042
14
                                FT_BOOLEAN,
4043
14
                                32,
4044
14
                                NULL,
4045
14
                                IQ_SERV_ID_MASK,
4046
14
                                NULL, HFILL
4047
14
                        }
4048
14
                },
4049
14
                {
4050
14
                        &hf_iq_country_code,
4051
14
                        {
4052
14
                                "IE_COUNTRY_CODE",
4053
14
                                "mih.iq_type_list.ie_country_code",
4054
14
                                FT_BOOLEAN,
4055
14
                                32,
4056
14
                                NULL,
4057
14
                                IQ_IE_COUN_MASK,
4058
14
                                NULL, HFILL
4059
14
                        }
4060
14
                },
4061
14
                {
4062
14
                        &hf_iq_net_id,
4063
14
                        {
4064
14
                                "IE_NETWORK_ID",
4065
14
                                "mih.iq_type_list.ie_net_id",
4066
14
                                FT_BOOLEAN,
4067
14
                                32,
4068
14
                                NULL,
4069
14
                                IQ_NET_ID_MASK,
4070
14
                                NULL, HFILL
4071
14
                        }
4072
14
                },
4073
14
                {
4074
14
                        &hf_iq_net_aux_id,
4075
14
                        {
4076
14
                                "IE_NETWORK_AUX_ID",
4077
14
                                "mih.iq_type_list.net_aux_id",
4078
14
                                FT_BOOLEAN,
4079
14
                                32,
4080
14
                                NULL,
4081
14
                                IQ_NET_AUX_MASK,
4082
14
                                NULL, HFILL
4083
14
                        }
4084
14
                },
4085
14
                {
4086
14
                        &hf_iq_roam_part,
4087
14
                        {
4088
14
                                "IE_ROAMING_PARTNERS",
4089
14
                                "mih.iq_type_list.ie_roam_part",
4090
14
                                FT_BOOLEAN,
4091
14
                                32,
4092
14
                                NULL,
4093
14
                                IQ_IE_ROAM_MASK,
4094
14
                                NULL, HFILL
4095
14
                        }
4096
14
                },
4097
14
                {
4098
14
                        &hf_iq_cost,
4099
14
                        {
4100
14
                                "IE_COST",
4101
14
                                "mih.iq_type_list.ie_cost",
4102
14
                                FT_BOOLEAN,
4103
14
                                32,
4104
14
                                NULL,
4105
14
                                IQ_IE_COST_MASK,
4106
14
                                NULL, HFILL
4107
14
                        }
4108
14
                },
4109
14
                {
4110
14
                        &hf_iq_net_qos,
4111
14
                        {
4112
14
                                "IE_NETWORK_QOS",
4113
14
                                "mih.iq_type_list.ie_net_qos",
4114
14
                                FT_BOOLEAN,
4115
14
                                32,
4116
14
                                NULL,
4117
14
                                IQ_IE_QOS_MASK,
4118
14
                                NULL, HFILL
4119
14
                        }
4120
14
                },
4121
14
                {
4122
14
                        &hf_iq_net_dat_rt,
4123
14
                        {
4124
14
                                "IE_NETWORK_DATA_RATE",
4125
14
                                "mih.iq_type_list.ie_net_dat_rt",
4126
14
                                FT_BOOLEAN,
4127
14
                                32,
4128
14
                                NULL,
4129
14
                                IQ_IE_DATA_MASK,
4130
14
                                NULL, HFILL
4131
14
                        }
4132
14
                },
4133
14
                {
4134
14
                        &hf_iq_net_reg_dom,
4135
14
                        {
4136
14
                                "IE_NET_REGULT_DOMAIN",
4137
14
                                "mih.iq_type_list.ie_net_reg_dom",
4138
14
                                FT_BOOLEAN,
4139
14
                                32,
4140
14
                                NULL,
4141
14
                                IQ_IE_REGDOM_MASK,
4142
14
                                NULL, HFILL
4143
14
                        }
4144
14
                },
4145
14
                {
4146
14
                        &hf_iq_freq_bands,
4147
14
                        {
4148
14
                                "IE_NET_FREQUENCY_BANDS",
4149
14
                                "mih.iq_type_list.ie_net_freq",
4150
14
                                FT_BOOLEAN,
4151
14
                                32,
4152
14
                                NULL,
4153
14
                                IQ_IE_FREQ_MASK,
4154
14
                                NULL, HFILL
4155
14
                        }
4156
14
                },
4157
14
                {
4158
14
                        &hf_iq_ip_cfg_mthds,
4159
14
                        {
4160
14
                                "IE_NET_IP_CFG_METHODS",
4161
14
                                "mih.iq_type_list.ie_net_ip_cfg",
4162
14
                                FT_BOOLEAN,
4163
14
                                32,
4164
14
                                NULL,
4165
14
                                IQ_IE_IP_CFG_MASK,
4166
14
                                NULL, HFILL
4167
14
                        }
4168
14
                },
4169
14
                {
4170
14
                        &hf_iq_net_cap,
4171
14
                        {
4172
14
                                "IE_NET_CAPABILITIES",
4173
14
                                "mih.iq_type_list.ie_net_cap",
4174
14
                                FT_BOOLEAN,
4175
14
                                32,
4176
14
                                NULL,
4177
14
                                IQ_IE_CAP_MASK,
4178
14
                                NULL, HFILL
4179
14
                        }
4180
14
                },
4181
14
                {
4182
14
                        &hf_iq_supp_lcp,
4183
14
                        {
4184
14
                                "IE_NET_SUPPORTED_LCP",
4185
14
                                "mih.iq_type_list.ie_net_sup_lcp",
4186
14
                                FT_BOOLEAN,
4187
14
                                32,
4188
14
                                NULL,
4189
14
                                IQ_IE_SUP_MASK,
4190
14
                                NULL, HFILL
4191
14
                        }
4192
14
                },
4193
14
                {
4194
14
                        &hf_iq_net_mob_mg,
4195
14
                        {
4196
14
                                "IE_NET_MOB_MGMT_PROT",
4197
14
                                "mih.iq_type_list.ie_net_mob_mg",
4198
14
                                FT_BOOLEAN,
4199
14
                                32,
4200
14
                                NULL,
4201
14
                                IQ_IE_MOB_MG_MASK,
4202
14
                                NULL, HFILL
4203
14
                        }
4204
14
                },
4205
14
                {
4206
14
                        &hf_iq_net_emserv,
4207
14
                        {
4208
14
                                "IE_NET_EMSERV_PROXY",
4209
14
                                "mih.iq_type_list.ie_net_emer_serv",
4210
14
                                FT_BOOLEAN,
4211
14
                                32,
4212
14
                                NULL,
4213
14
                                IQ_IE_EM_SERV_MASK,
4214
14
                                NULL, HFILL
4215
14
                        }
4216
14
                },
4217
14
                {
4218
14
                        &hf_iq_net_ims_pcscf,
4219
14
                        {
4220
14
                                "IE_NET_IMS_PROXY_CSCF",
4221
14
                                "mih.iq_type_list.ie_net_ims_pcscf",
4222
14
                                FT_BOOLEAN,
4223
14
                                32,
4224
14
                                NULL,
4225
14
                                IQ_IE_IMS_MASK,
4226
14
                                NULL, HFILL
4227
14
                        }
4228
14
                },
4229
14
                {
4230
14
                        &hf_iq_net_mob_net,
4231
14
                        {
4232
14
                                "IE_NET_MOBILE_NETWORK",
4233
14
                                "mih.iq_type_list.ie_net_mob_net",
4234
14
                                FT_BOOLEAN,
4235
14
                                32,
4236
14
                                NULL,
4237
14
                                IQ_IE_MOB_NET_MASK,
4238
14
                                NULL, HFILL
4239
14
                        }
4240
14
                },
4241
14
                {
4242
14
                        &hf_iq_link_addr,
4243
14
                        {
4244
14
                                "IE_POA_LINK_ADDR",
4245
14
                                "mih.iq_type_list.ie_poa_link",
4246
14
                                FT_BOOLEAN,
4247
14
                                32,
4248
14
                                NULL,
4249
14
                                IQ_IE_POA_ADDR_MASK,
4250
14
                                NULL, HFILL
4251
14
                        }
4252
14
                },
4253
14
                {
4254
14
                        &hf_iq_poa_loc,
4255
14
                        {
4256
14
                                "IE_POA_LOCATION",
4257
14
                                "mih.iq_type_list.ie_poa_loc",
4258
14
                                FT_BOOLEAN,
4259
14
                                32,
4260
14
                                NULL,
4261
14
                                IQ_IE_POA_LOC_MASK,
4262
14
                                NULL, HFILL
4263
14
                        }
4264
14
                },
4265
14
                {
4266
14
                        &hf_iq_poa_chan_range,
4267
14
                        {
4268
14
                                "IE_POA_CHANNEL_RANGE",
4269
14
                                "mih.iq_type_list.ie_poa_chan_rg",
4270
14
                                FT_BOOLEAN,
4271
14
                                32,
4272
14
                                NULL,
4273
14
                                IQ_IE_POA_CHAN_MASK,
4274
14
                                NULL, HFILL
4275
14
                        }
4276
14
                },
4277
14
                {
4278
14
                        &hf_iq_poa_sys_info,
4279
14
                        {
4280
14
                                "IE_POA_SYSTEM_INFO",
4281
14
                                "mih.iq_type_list.ie_poa_syst_info",
4282
14
                                FT_BOOLEAN,
4283
14
                                32,
4284
14
                                NULL,
4285
14
                                IQ_IE_POA_SYS_MASK,
4286
14
                                NULL, HFILL
4287
14
                        }
4288
14
                },
4289
14
                {
4290
14
                        &hf_iq_poa_sub_info,
4291
14
                        {
4292
14
                                "IE_POA_SUBNET_INFO",
4293
14
                                "mih.iq_type_list.ie_poa_sub_info",
4294
14
                                FT_BOOLEAN,
4295
14
                                32,
4296
14
                                NULL,
4297
14
                                IQ_IE_POA_SUB_MASK,
4298
14
                                NULL, HFILL
4299
14
                        }
4300
14
                },
4301
14
                {
4302
14
                        &hf_iq_poa_ip,
4303
14
                        {
4304
14
                                "IE_POA_IP_ADDR",
4305
14
                                "mih.iq_type_list.ie_poa_ip",
4306
14
                                FT_BOOLEAN,
4307
14
                                32,
4308
14
                                NULL,
4309
14
                                IQ_IE_POA_IP_MASK,
4310
14
                                NULL, HFILL
4311
14
                        }
4312
14
                },
4313
4314
                /*header fields for mob mgmt*/
4315
14
                {
4316
14
                        &hf_mob_list,
4317
14
                        {
4318
14
                                "List of supported mobility management protocols",
4319
14
                                "mih.mob_list",
4320
14
                                FT_UINT16,
4321
14
                                BASE_HEX,
4322
14
                                NULL,
4323
14
                                0x0,
4324
14
                                NULL, HFILL
4325
14
                        }
4326
14
                },
4327
14
                {
4328
14
                        &hf_mob_mip4,
4329
14
                        {
4330
14
                                "Mobile IPv4",
4331
14
                                "mih.mob_list.mip4",
4332
14
                                FT_BOOLEAN,
4333
14
                                16,
4334
14
                                NULL,
4335
14
                                MOB_MIP4_MASK,
4336
14
                                NULL, HFILL
4337
14
                        }
4338
14
                },
4339
14
                {
4340
14
                        &hf_mob_mip4_reg,
4341
14
                        {
4342
14
                                "Mobile IPv4 Regional Registration",
4343
14
                                "mih.mob_list.mip4_reg",
4344
14
                                FT_BOOLEAN,
4345
14
                                16,
4346
14
                                NULL,
4347
14
                                MOB_MIP4_REG_MASK,
4348
14
                                NULL, HFILL
4349
14
                        }
4350
14
                },
4351
14
                {
4352
14
                        &hf_mob_mip6,
4353
14
                        {
4354
14
                                "Mobile IPv6",
4355
14
                                "mih.mob_list.mip6",
4356
14
                                FT_BOOLEAN,
4357
14
                                16,
4358
14
                                NULL,
4359
14
                                MOB_MIP6_MASK,
4360
14
                                NULL, HFILL
4361
14
                        }
4362
14
                },
4363
14
                {
4364
14
                        &hf_mob_hmip6,
4365
14
                        {
4366
14
                                "Hierarchical Mobile IPv6",
4367
14
                                "mih.mob_list.hmip6",
4368
14
                                FT_BOOLEAN,
4369
14
                                16,
4370
14
                                NULL,
4371
14
                                MOB_HMIP6_MASK,
4372
14
                                NULL, HFILL
4373
14
                        }
4374
14
                },
4375
14
                {
4376
14
                        &hf_mob_low_lat,
4377
14
                        {
4378
14
                                "Low Latency Handoffs",
4379
14
                                "mih.mob_list.low_lat",
4380
14
                                FT_BOOLEAN,
4381
14
                                16,
4382
14
                                NULL,
4383
14
                                MOB_LOW_LAT_MASK,
4384
14
                                NULL, HFILL
4385
14
                        }
4386
14
                },
4387
14
                {
4388
14
                        &hf_mob_fmip6,
4389
14
                        {
4390
14
                                "Mobile IPv6 Fast Handovers",
4391
14
                                "mih.mob_list.fmip6",
4392
14
                                FT_BOOLEAN,
4393
14
                                16,
4394
14
                                NULL,
4395
14
                                MOB_FMIP6_MASK,
4396
14
                                NULL, HFILL
4397
14
                        }
4398
14
                },
4399
14
                {
4400
14
                        &hf_mob_ike_multi,
4401
14
                        {
4402
14
                                "IKEv2 Mobility and Multihoming Protocol",
4403
14
                                "mih.mob_list.ike_multi",
4404
14
                                FT_BOOLEAN,
4405
14
                                16,
4406
14
                                NULL,
4407
14
                                MOB_IKE_MULTI_MASK,
4408
14
                                NULL, HFILL
4409
14
                        }
4410
14
                },
4411
4412
                /*header fields for configure methods*/
4413
14
                {
4414
14
                        &hf_cfg_mthds,
4415
14
                        {
4416
14
                                "A set of IP configuration methods",
4417
14
                                "mih.cfg_mthds",
4418
14
                                FT_UINT32,
4419
14
                                BASE_HEX,
4420
14
                                NULL,
4421
14
                                0x0,
4422
14
                                NULL, HFILL
4423
14
                        }
4424
14
                },
4425
14
                {
4426
14
                        &hf_cfg_ip4_stat,
4427
14
                        {
4428
14
                                "IPv4 static configuration",
4429
14
                                "mih.ip_cfg_mthds.static",
4430
14
                                FT_BOOLEAN,
4431
14
                                32,
4432
14
                                NULL,
4433
14
                                IP_CFG_STAT_MASK,
4434
14
                                NULL, HFILL
4435
14
                        }
4436
14
                },
4437
14
                {
4438
14
                        &hf_cfg_dhcp4,
4439
14
                        {
4440
14
                                "DHCPv4",
4441
14
                                "mih.ip_cfg_mthds.dhcp4",
4442
14
                                FT_BOOLEAN,
4443
14
                                32,
4444
14
                                NULL,
4445
14
                                IP_CFG_DHCP4_MASK,
4446
14
                                NULL, HFILL
4447
14
                        }
4448
14
                },
4449
14
                {
4450
14
                        &hf_cfg_mip_fa,
4451
14
                        {
4452
14
                                "Mobile IPv4 with foreign agent",
4453
14
                                "mih.ip_cfg_mthds.mip4_fa",
4454
14
                                FT_BOOLEAN,
4455
14
                                32,
4456
14
                                NULL,
4457
14
                                IP_CFG_MIP4_FA_MASK,
4458
14
                                NULL, HFILL
4459
14
                        }
4460
14
                },
4461
14
                {
4462
14
                        &hf_cfg_mip_wo_fa,
4463
14
                        {
4464
14
                                "Mobile IPv4 without FA",
4465
14
                                "mih.ip_cfg_mthds.mip4_wo_fa",
4466
14
                                FT_BOOLEAN,
4467
14
                                32,
4468
14
                                NULL,
4469
14
                                IP_CFG_MIP4_NFA_MASK,
4470
14
                                NULL, HFILL
4471
14
                        }
4472
14
                },
4473
14
                {
4474
14
                        &hf_cfg_ip6_sac,
4475
14
                        {
4476
14
                                "IPv6 stateless address configuration",
4477
14
                                "mih.ip_cfg_mthds.ip6_state_less",
4478
14
                                FT_BOOLEAN,
4479
14
                                32,
4480
14
                                NULL,
4481
14
                                IP_CFG_IP6_SL_MASK,
4482
14
                                NULL, HFILL
4483
14
                        }
4484
14
                },
4485
14
                {
4486
14
                        &hf_cfg_dhcp6,
4487
14
                        {
4488
14
                                "DHCPv6",
4489
14
                                "mih.ip_cfg_mthds.dhcp6",
4490
14
                                FT_BOOLEAN,
4491
14
                                32,
4492
14
                                NULL,
4493
14
                                IP_CFG_DHCP6_MASK,
4494
14
                                NULL, HFILL
4495
14
                        }
4496
14
                },
4497
14
                {
4498
14
                        &hf_cfg_ip6_manual,
4499
14
                        {
4500
14
                                "IPv6 manual configuration",
4501
14
                                "mih.ip_cfg_mthds.ip6_manual",
4502
14
                                FT_BOOLEAN,
4503
14
                                32,
4504
14
                                NULL,
4505
14
                                IP_CFG_IP6_MAN_MASK,
4506
14
                                NULL, HFILL
4507
14
                        }
4508
14
                },
4509
4510
                /*header fields for transport lists*/
4511
14
                {
4512
14
                        &hf_trans_list,
4513
14
                        {
4514
14
                                "Supported Transports",
4515
14
                                "mih.trans_list",
4516
14
                                FT_UINT16,
4517
14
                                BASE_HEX,
4518
14
                                NULL,
4519
14
                                0x0,
4520
14
                                NULL, HFILL
4521
14
                        }
4522
14
                },
4523
14
                {
4524
14
                        &hf_trans_udp,
4525
14
                        {
4526
14
                                "UDP",
4527
14
                                "mih.trans_list.udp",
4528
14
                                FT_BOOLEAN,
4529
14
                                16,
4530
14
                                NULL,
4531
14
                                0x8000,
4532
14
                                NULL, HFILL
4533
14
                        }
4534
14
                },
4535
14
                {
4536
14
                        &hf_trans_tcp,
4537
14
                        {
4538
14
                                "TCP",
4539
14
                                "mih.trans_list.tcp",
4540
14
                                FT_BOOLEAN,
4541
14
                                16,
4542
14
                                NULL,
4543
14
                                0x4000,
4544
14
                                NULL, HFILL
4545
14
                        }
4546
14
                },
4547
4548
                /*header fields for device state request*/
4549
14
                {
4550
14
                        &hf_dev_states_req,
4551
14
                        {
4552
14
                                "Device Status Request",
4553
14
                                "mih.dev_states_req",
4554
14
                                FT_UINT16,
4555
14
                                BASE_HEX,
4556
14
                                NULL,
4557
14
                                0x0,
4558
14
                                NULL, HFILL
4559
14
                        }
4560
14
                },
4561
14
                {
4562
14
                        &hf_dev_states_req_dev_info,
4563
14
                        {
4564
14
                                "Device Info",
4565
14
                                "mih.dev_states_req.dev_info",
4566
14
                                FT_BOOLEAN,
4567
14
                                16,
4568
14
                                NULL,
4569
14
                                0x8000,
4570
14
                                NULL, HFILL
4571
14
                        }
4572
14
                },
4573
14
                {
4574
14
                        &hf_dev_states_req_batt_lvl,
4575
14
                        {
4576
14
                                "Battery Level",
4577
14
                                "mih.dev_states_req.batt_level",
4578
14
                                FT_BOOLEAN,
4579
14
                                16,
4580
14
                                NULL,
4581
14
                                0x4000,
4582
14
                                NULL, HFILL
4583
14
                        }
4584
14
                },
4585
4586
                /*header fields for MIH Capabilities*/
4587
14
                {
4588
14
                        &hf_mihcap,
4589
14
                        {
4590
14
                                "Supported MIH Capability",
4591
14
                                "mih.mihcap",
4592
14
                                FT_UINT8,
4593
14
                                BASE_HEX,
4594
14
                                NULL,
4595
14
                                0x0,
4596
14
                                NULL, HFILL
4597
14
                        }
4598
14
                },
4599
14
                {
4600
14
                        &hf_mihcap_es,
4601
14
                        {
4602
14
                                "Event Service (ES)",
4603
14
                                "mih.mihcap.event_service",
4604
14
                                FT_BOOLEAN,
4605
14
                                8,
4606
14
                                NULL,
4607
14
                                0x80,
4608
14
                                NULL, HFILL
4609
14
                        }
4610
14
                },
4611
14
                {
4612
14
                        &hf_mihcap_cs,
4613
14
                        {
4614
14
                                "Command Service (CS)",
4615
14
                                "mih.mihcap.command_service",
4616
14
                                FT_BOOLEAN,
4617
14
                                8,
4618
14
                                NULL,
4619
14
                                0x40,
4620
14
                                NULL, HFILL
4621
14
                        }
4622
14
                },
4623
14
                {
4624
14
                        &hf_mihcap_is,
4625
14
                        {
4626
14
                                "Information Service (IS)",
4627
14
                                "mih.mihcap.information_service",
4628
14
                                FT_BOOLEAN,
4629
14
                                8,
4630
14
                                NULL,
4631
14
                                0x20,
4632
14
                                NULL, HFILL
4633
14
                        }
4634
14
                },
4635
4636
                /*header fields for High Level Network Capabilities*/
4637
14
                {
4638
14
                        &hf_net_caps,
4639
14
                        {
4640
14
                                "High Level Network Capability",
4641
14
                                "mih.net_caps",
4642
14
                                FT_UINT32,
4643
14
                                BASE_HEX,
4644
14
                                NULL,
4645
14
                                0x0,
4646
14
                                NULL, HFILL
4647
14
                        }
4648
14
                },
4649
14
                {
4650
14
                        &hf_net_caps_sec,
4651
14
                        {
4652
14
                                "Security",
4653
14
                                "mih.net_caps.sec",
4654
14
                                FT_BOOLEAN,
4655
14
                                32,
4656
14
                                NULL,
4657
14
                                0x80000000,
4658
14
                                NULL, HFILL
4659
14
                        }
4660
14
                },
4661
14
                {
4662
14
                        &hf_net_caps_qos0,
4663
14
                        {
4664
14
                                "QoS Class 0",
4665
14
                                "mih.net_caps.qos0",
4666
14
                                FT_BOOLEAN,
4667
14
                                32,
4668
14
                                NULL,
4669
14
                                0x40000000,
4670
14
                                NULL, HFILL
4671
14
                        }
4672
14
                },
4673
14
                {
4674
14
                        &hf_net_caps_qos1,
4675
14
                        {
4676
14
                                "QoS Class 1",
4677
14
                                "mih.net_caps.qos1",
4678
14
                                FT_BOOLEAN,
4679
14
                                32,
4680
14
                                NULL,
4681
14
                                0x20000000,
4682
14
                                NULL, HFILL
4683
14
                        }
4684
14
                },
4685
14
                {
4686
14
                        &hf_net_caps_qos2,
4687
14
                        {
4688
14
                                "QoS Class 2",
4689
14
                                "mih.net_caps.qos2",
4690
14
                                FT_BOOLEAN,
4691
14
                                32,
4692
14
                                NULL,
4693
14
                                0x10000000,
4694
14
                                NULL, HFILL
4695
14
                        }
4696
14
                },
4697
14
                {
4698
14
                        &hf_net_caps_qos3,
4699
14
                        {
4700
14
                                "QoS Class 3",
4701
14
                                "mih.net_caps.qos3",
4702
14
                                FT_BOOLEAN,
4703
14
                                32,
4704
14
                                NULL,
4705
14
                                0x08000000,
4706
14
                                NULL, HFILL
4707
14
                        }
4708
14
                },
4709
14
                {
4710
14
                        &hf_net_caps_qos4,
4711
14
                        {
4712
14
                                "QoS Class 4",
4713
14
                                "mih.net_caps.qos4",
4714
14
                                FT_BOOLEAN,
4715
14
                                32,
4716
14
                                NULL,
4717
14
                                0x04000000,
4718
14
                                NULL, HFILL
4719
14
                        }
4720
14
                },
4721
14
                {
4722
14
                        &hf_net_caps_qos5,
4723
14
                        {
4724
14
                                "QoS Class 5",
4725
14
                                "mih.net_caps.qos5",
4726
14
                                FT_BOOLEAN,
4727
14
                                32,
4728
14
                                NULL,
4729
14
                                0x02000000,
4730
14
                                NULL, HFILL
4731
14
                        }
4732
14
                },
4733
14
                {
4734
14
                        &hf_net_caps_ia,
4735
14
                        {
4736
14
                                "Internet Access",
4737
14
                                "mih.net_caps.internet_access",
4738
14
                                FT_BOOLEAN,
4739
14
                                32,
4740
14
                                NULL,
4741
14
                                0x01000000,
4742
14
                                NULL, HFILL
4743
14
                        }
4744
14
                },
4745
14
                {
4746
14
                        &hf_net_caps_es,
4747
14
                        {
4748
14
                                "Emergency Services",
4749
14
                                "mih.net_caps.emergency_services",
4750
14
                                FT_BOOLEAN,
4751
14
                                32,
4752
14
                                NULL,
4753
14
                                0x00800000,
4754
14
                                NULL, HFILL
4755
14
                        }
4756
14
                },
4757
14
                {
4758
14
                        &hf_net_caps_mihcap,
4759
14
                        {
4760
14
                                "MIH Capability",
4761
14
                                "mih.net_caps.mihcap",
4762
14
                                FT_BOOLEAN,
4763
14
                                32,
4764
14
                                NULL,
4765
14
                                0x00400000,
4766
14
                                NULL, HFILL
4767
14
                        }
4768
14
                },
4769
4770
                /*header fields for Link Action attributes*/
4771
14
                {
4772
14
                        &hf_link_ac_attr,
4773
14
                        {
4774
14
                                "Link Action Attribute",
4775
14
                                "mih.link_ac_attr",
4776
14
                                FT_UINT8,
4777
14
                                BASE_HEX,
4778
14
                                NULL,
4779
14
                                0x0,
4780
14
                                NULL, HFILL
4781
14
                        }
4782
14
                },
4783
14
                {
4784
14
                        &hf_link_ac_attr_link_scan,
4785
14
                        {
4786
14
                                "Link_Scan",
4787
14
                                "mih.link_ac_attr.link_scan",
4788
14
                                FT_BOOLEAN,
4789
14
                                8,
4790
14
                                NULL,
4791
14
                                0x80,
4792
14
                                NULL, HFILL
4793
14
                        }
4794
14
                },
4795
14
                {
4796
14
                        &hf_link_ac_attr_link_res_retain,
4797
14
                        {
4798
14
                                "Link Resource Retain",
4799
14
                                "mih.link_ac_attr.link_res_retain",
4800
14
                                FT_BOOLEAN,
4801
14
                                8,
4802
14
                                NULL,
4803
14
                                0x40,
4804
14
                                NULL, HFILL
4805
14
                        }
4806
14
                },
4807
14
                {
4808
14
                        &hf_link_ac_attr_data_fwd_req,
4809
14
                        {
4810
14
                                "Forward Data Request",
4811
14
                                "mih.link_ac_attr.data_fwd_req",
4812
14
                                FT_BOOLEAN,
4813
14
                                8,
4814
14
                                NULL,
4815
14
                                0x20,
4816
14
                                NULL, HFILL
4817
14
                        }
4818
14
                }
4819
14
        };
4820
4821
        /* Setup protocol subtree array */
4822
14
        static int *ett[] =
4823
14
        {
4824
14
                &ett_mih,
4825
14
                &ett_ver_flags,
4826
14
                &ett_mid,
4827
14
                &ett_tlv,
4828
14
                &ett_cmd_bitmap,
4829
14
                &ett_event_bitmap,
4830
14
                &ett_mob_mgt_bitmap,
4831
14
                &ett_cfg_mtd_bitmap,
4832
14
                &ett_iq_type_bitmap,
4833
14
                &ett_trans_list_bitmap,
4834
14
                &ett_dev_states_bitmap,
4835
14
                &ett_mihcap_bitmap,
4836
14
                &ett_net_caps_bitmap,
4837
14
                &ett_ac_attr_bitmap,
4838
14
                &ett_subtype_eth_bitmap,
4839
14
                &ett_subtype_wireless_other_bitmap,
4840
14
                &ett_subtype_ieee80211_bitmap,
4841
14
                &ett_subtype_umts_bitmap,
4842
14
                &ett_subtype_cdma2000_bitmap,
4843
14
                &ett_subtype_ieee80216_bitmap,
4844
14
                &ett_min_pk_tx_delay,
4845
14
                &ett_avg_pk_tx_delay,
4846
14
                &ett_max_pk_tx_delay,
4847
14
                &ett_pk_delay_jitter,
4848
14
                &ett_pk_loss_rate,
4849
14
                &ett_list_prefer_link,
4850
14
                &ett_ip_dhcp_server,
4851
14
                &ett_fn_agent,
4852
14
                &ett_access_router,
4853
14
                &ett_link_states_req,
4854
14
                &ett_link_desc_req,
4855
14
                &ett_dev_states_resp
4856
14
        };
4857
4858
14
        proto_mih = proto_register_protocol("Media-Independent Handover", "MIH", "mih");
4859
14
        proto_register_field_array(proto_mih, hf, array_length(hf));
4860
14
        proto_register_subtree_array(ett, array_length(ett));
4861
4862
14
        mih_handle = register_dissector("mih", dissect_mih, proto_mih);
4863
14
}
4864
4865
4866
/*dissector handoff*/
4867
void proto_reg_handoff_mih(void)
4868
14
{
4869
        /*Layer 3 handle*/
4870
14
        dissector_add_uint_with_preference("udp.port", MIH_PORT, mih_handle);
4871
14
        dissector_add_uint_with_preference("tcp.port", MIH_PORT, mih_handle);
4872
4873
        /*Layer 2 handle*/
4874
14
        dissector_add_uint("ethertype", ETHERTYPE_MIH, mih_handle);
4875
14
}
4876
4877
4878
/*
4879
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
4880
 *
4881
 * Local variables:
4882
 * c-basic-offset: 8
4883
 * tab-width: 8
4884
 * indent-tabs-mode: nil
4885
 * End:
4886
 *
4887
 * vi: set shiftwidth=8 tabstop=8 expandtab:
4888
 * :indentSize=8:tabSize=8:noTabs=true:
4889
 */