3 * Routines for CDMA2000 A11 packet trace
4 * Copyright 2002, Ryuji Somegawa <somegawa@wide.ad.jp>
5 * packet-3g-a11.c was written based on 'packet-mip.c'.
7 * packet-3g-a11.c updated by Ravi Valmikam for 3GPP2 TIA-878-A
8 * Copyright 2005, Ravi Valmikam <rvalmikam@airvananet.com>
11 * Routines for Mobile IP dissection
12 * Copyright 2000, Stefan Raab <sraab@cisco.com>
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * as published by the Free Software Foundation; either version 2
23 * of the License, or (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 * http://www.3gpp2.org/Public_html/specs/A.S0009-C_v3.0_100621.pdf
36 * http://www.3gpp2.org/Public_html/specs/A.S0017-D_v1.0_070624.pdf (IOS 5.1)
37 * http://www.3gpp2.org/public_html/specs/A.S0017-D_v2.0_090825.pdf
38 * http://www.3gpp2.org/public_html/specs/A.S0017-D%20v3.0_Interoperability%20Specification%20%28IOS%29%20for%20cdma2000%20Access%20Network%20Interfaces%20-%20Part%207%20%28A10%20and%20A11%20Interfaces%29_20110701.pdf
39 * http://www.3gpp2.org/Public_html/specs/A00-20110419-002Er0%20A.S0008-C%20v4.0%20HRPD%20IOS-Pub_20110513.pdf
40 * http://www.3gpp2.org/Public_html/specs/A.S0022-0_v2.0_100426.pdf
47 #include <epan/packet.h>
48 #include <epan/expert.h>
49 #include <epan/wmem/wmem.h>
50 /* Include vendor id translation */
51 #include <epan/sminmpec.h>
52 #include <epan/to_str.h>
54 #include "packet-radius.h"
56 /* Forward declarations */
57 void proto_register_a11(void);
58 void proto_reg_handoff_a11(void);
60 static int registration_request_msg
=0;
62 /* Initialize the protocol and registered fields */
63 static int proto_a11
= -1;
64 static int hf_a11_type
= -1;
65 static int hf_a11_flags
= -1;
66 static int hf_a11_s
= -1;
67 static int hf_a11_b
= -1;
68 static int hf_a11_d
= -1;
69 static int hf_a11_m
= -1;
70 static int hf_a11_g
= -1;
71 static int hf_a11_v
= -1;
72 static int hf_a11_t
= -1;
73 static int hf_a11_code
= -1;
74 static int hf_a11_status
= -1;
75 static int hf_a11_life
= -1;
76 static int hf_a11_homeaddr
= -1;
77 static int hf_a11_haaddr
= -1;
78 static int hf_a11_coa
= -1;
79 static int hf_a11_ident
= -1;
80 static int hf_a11_ext_type
= -1;
81 static int hf_a11_ext_stype
= -1;
82 static int hf_a11_ext_len
= -1;
83 static int hf_a11_ext
= -1;
84 static int hf_a11_aext_spi
= -1;
85 static int hf_a11_aext_auth
= -1;
86 static int hf_a11_next_nai
= -1;
88 static int hf_a11_ses_key
= -1;
89 static int hf_a11_ses_mnsrid
= -1;
90 static int hf_a11_ses_sidver
= -1;
91 static int hf_a11_ses_msid_type
= -1;
92 static int hf_a11_ses_msid_len
= -1;
93 static int hf_a11_ses_msid
= -1;
94 static int hf_a11_ses_ptype
= -1;
96 static int hf_a11_vse_vid
= -1;
97 static int hf_a11_vse_apptype
= -1;
98 static int hf_a11_vse_canid
= -1;
99 static int hf_a11_vse_panid
= -1;
100 static int hf_a11_vse_srvopt
= -1;
101 static int hf_a11_vse_qosmode
= -1;
102 static int hf_a11_vse_pdit
= -1;
103 static int hf_a11_vse_code
= -1;
104 static int hf_a11_vse_dormant
= -1;
105 static int hf_a11_vse_ehrpd_mode
= -1;
106 static int hf_a11_vse_ehrpd_pmk
= -1;
107 static int hf_a11_vse_ehrpd_handoff_info
= -1;
108 static int hf_a11_vse_ehrpd_tunnel_mode
= -1;
109 static int hf_a11_vse_ppaddr
= -1;
111 /* Additional Session Information */
112 static int hf_a11_ase_len_type
= -1;
113 static int hf_a11_ase_srid_type
= -1;
114 static int hf_a11_ase_servopt_type
= -1;
115 static int hf_a11_ase_gre_proto_type
= -1;
116 static int hf_a11_ase_gre_key
= -1;
117 static int hf_a11_ase_pcf_addr_key
= -1;
119 static int hf_a11_ase_forward_rohc_info_len
= -1;
120 static int hf_a11_ase_forward_maxcid
= -1;
121 static int hf_a11_ase_forward_mrru
= -1;
122 static int hf_a11_ase_forward_large_cids
= -1;
123 static int hf_a11_ase_forward_profile_count
= -1;
124 static int hf_a11_ase_forward_profile
= -1;
126 static int hf_a11_ase_reverse_rohc_info_len
= -1;
127 static int hf_a11_ase_reverse_maxcid
= -1;
128 static int hf_a11_ase_reverse_mrru
= -1;
129 static int hf_a11_ase_reverse_large_cids
= -1;
130 static int hf_a11_ase_reverse_profile_count
= -1;
131 static int hf_a11_ase_reverse_profile
= -1;
132 static int hf_a11_aut_flow_prof_sub_type
= -1;
133 static int hf_a11_aut_flow_prof_sub_type_len
= -1;
134 static int hf_a11_aut_flow_prof_sub_type_value
= -1;
135 static int hf_a11_serv_opt_prof_max_serv
= -1;
136 static int hf_a11_sub_type
= -1;
137 static int hf_a11_sub_type_length
= -1;
138 static int hf_a11_serv_opt
= -1;
139 static int hf_a11_max_num_serv_opt
= -1;
140 static int hf_a11_bcmcs_stype
= -1;
141 static int hf_a11_bcmcs_entry_len
= -1;
143 /* Forward QoS Information */
144 static int hf_a11_fqi_srid
= -1;
145 static int hf_a11_fqi_flags
= -1;
146 static int hf_a11_fqi_flags_ip_flow
= -1;
147 static int hf_a11_fqi_flags_dscp
= -1;
148 static int hf_a11_fqi_entry_flag
= -1;
149 static int hf_a11_fqi_entry_flag_dscp
= -1;
150 static int hf_a11_fqi_entry_flag_flow_state
= -1;
151 static int hf_a11_fqi_flowcount
= -1;
152 static int hf_a11_fqi_flowid
= -1;
153 static int hf_a11_fqi_entrylen
= -1;
154 /* static int hf_a11_fqi_flowstate = -1; */
155 static int hf_a11_fqi_requested_qoslen
= -1;
156 static int hf_a11_fqi_flow_priority
= -1;
157 static int hf_a11_fqi_num_qos_attribute_set
= -1;
158 static int hf_a11_fqi_qos_attribute_setlen
= -1;
159 static int hf_a11_fqi_qos_attribute_setid
= -1;
160 static int hf_a11_fqi_qos_granted_attribute_setid
= -1;
161 static int hf_a11_fqi_verbose
= -1;
162 static int hf_a11_fqi_flow_profileid
= -1;
163 static int hf_a11_fqi_granted_qoslen
= -1;
165 /* Reverse QoS Information */
166 static int hf_a11_rqi_srid
= -1;
167 static int hf_a11_rqi_flowcount
= -1;
168 static int hf_a11_rqi_flowid
= -1;
169 static int hf_a11_rqi_entrylen
= -1;
170 static int hf_a11_rqi_entry_flag
= -1;
171 static int hf_a11_rqi_entry_flag_flow_state
= -1;
172 /* static int hf_a11_rqi_flowstate = -1; */
173 static int hf_a11_rqi_requested_qoslen
= -1;
174 static int hf_a11_rqi_flow_priority
= -1;
175 static int hf_a11_rqi_num_qos_attribute_set
= -1;
176 static int hf_a11_rqi_qos_attribute_setlen
= -1;
177 static int hf_a11_rqi_qos_attribute_setid
= -1;
178 static int hf_a11_rqi_qos_granted_attribute_setid
= -1;
179 static int hf_a11_rqi_verbose
= -1;
180 static int hf_a11_rqi_flow_profileid
= -1;
181 /* static int hf_a11_rqi_requested_qos = -1; */
182 static int hf_a11_rqi_granted_qoslen
= -1;
183 /* static int hf_a11_rqi_granted_qos = -1; */
185 /* QoS Update Information */
186 static int hf_a11_fqui_flowcount
= -1;
187 static int hf_a11_rqui_flowcount
= -1;
188 static int hf_a11_fqui_updated_qoslen
= -1;
189 static int hf_a11_fqui_updated_qos
= -1;
190 static int hf_a11_rqui_updated_qoslen
= -1;
191 static int hf_a11_rqui_updated_qos
= -1;
192 static int hf_a11_subsciber_profile
= -1;
193 /* static int hf_a11_subsciber_profile_len = -1; */
195 /* Initialize the subtree pointers */
196 static gint ett_a11
= -1;
197 static gint ett_a11_flags
= -1;
198 static gint ett_a11_ext
= -1;
199 static gint ett_a11_exts
= -1;
200 static gint ett_a11_radius
= -1;
201 static gint ett_a11_radiuses
= -1;
202 static gint ett_a11_ase
= -1;
203 static gint ett_a11_fqi_flowentry
= -1;
204 static gint ett_a11_fqi_requestedqos
= -1;
205 static gint ett_a11_fqi_qos_attribute_set
= -1;
206 static gint ett_a11_fqi_grantedqos
= -1;
207 static gint ett_a11_rqi_flowentry
= -1;
208 static gint ett_a11_rqi_requestedqos
= -1;
209 static gint ett_a11_rqi_qos_attribute_set
= -1;
210 static gint ett_a11_rqi_grantedqos
= -1;
211 static gint ett_a11_fqi_flags
= -1;
212 static gint ett_a11_fqi_entry_flags
= -1;
213 static gint ett_a11_rqi_entry_flags
= -1;
214 static gint ett_a11_fqui_flowentry
= -1;
215 static gint ett_a11_rqui_flowentry
= -1;
216 static gint ett_a11_subscriber_profile
= -1;
217 static gint ett_a11_forward_rohc
= -1;
218 static gint ett_a11_reverse_rohc
= -1;
219 static gint ett_a11_forward_profile
= -1;
220 static gint ett_a11_reverse_profile
= -1;
221 static gint ett_a11_aut_flow_profile_ids
= -1;
222 static gint ett_a11_bcmcs_entry
= -1;
224 static expert_field ei_a11_sub_type_length_not2
= EI_INIT
;
226 /* Port used for Mobile IP based Tunneling Protocol (A11) */
227 #define UDP_PORT_3GA11 699
230 REGISTRATION_REQUEST
= 1,
231 REGISTRATION_REPLY
= 3,
232 REGISTRATION_UPDATE
= 20,
233 REGISTRATION_ACK
= 21,
236 CAPABILITIES_INFO
= 24,
237 CAPABILITIES_INFO_ACK
= 25,
238 BC_SERVICE_REQUEST
= 0xb0, /* 3GPP2 A.S0019-A v2.0 */
239 BC_SERVICE_REPLY
= 0xb1,
240 BC_REGISTRATION_REQUEST
= 0xb2,
241 BC_REGISTRATION_REPLY
= 0xb3,
242 BC_REGISTRATION_UPDATE
= 0xb4,
243 BC_REGISTRATION_ACK
= 0xb5
247 static const value_string a11_types
[] = {
248 {REGISTRATION_REQUEST
, "Registration Request"},
249 {REGISTRATION_REPLY
, "Registration Reply"},
250 {REGISTRATION_UPDATE
, "Registration Update"},
251 {REGISTRATION_ACK
, "Registration Ack"},
252 {SESSION_UPDATE
, "Session Update"},
253 {SESSION_ACK
, "Session Update Ack"},
254 {CAPABILITIES_INFO
, "Capabilities Info"},
255 {CAPABILITIES_INFO_ACK
, "Capabilities Info Ack"},
256 {BC_SERVICE_REQUEST
, "BC Service Request"},
257 {BC_SERVICE_REPLY
, "BC Service Response"},
258 {BC_REGISTRATION_REQUEST
, "BC Registration RequestT"},
259 {BC_REGISTRATION_REPLY
, "BC Registration Reply"},
260 {BC_REGISTRATION_UPDATE
, "BC Registration Update"},
261 {BC_REGISTRATION_ACK
, "BC Registration Acknowledge"},
266 static const value_string a11_ses_ptype_vals
[] = {
267 {0x8881, "Unstructured Byte Stream"},
268 {0x88D2, "3GPP2 Packet"},
272 static const value_string a11_reply_codes
[]= {
274 {9, "Connection Update"},
276 {1, "Reg Accepted, but Simultaneous Bindings Unsupported."},
277 {64, "Reg Deny (FA)- Unspecified Reason"},
278 {65, "Reg Deny (FA)- Administratively Prohibited"},
279 {66, "Reg Deny (FA)- Insufficient Resources"},
280 {67, "Reg Deny (FA)- MN failed Authentication"},
281 {68, "Reg Deny (FA)- HA failed Authentication"},
282 {69, "Reg Deny (FA)- Requested Lifetime too Long"},
283 {70, "Reg Deny (FA)- Poorly Formed Request"},
284 {71, "Reg Deny (FA)- Poorly Formed Reply"},
285 {72, "Reg Deny (FA)- Requested Encapsulation Unavailable"},
286 {73, "Reg Deny (FA)- VJ Compression Unavailable"},
287 {74, "Reg Deny (FA)- Requested Reverse Tunnel Unavailable"},
288 {75, "Reg Deny (FA)- Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
289 {76, "Reg Deny (FA)- Mobile Node Too Distant"},
290 {79, "Reg Deny (FA)- Delivery Style Not Supported"},
291 {80, "Reg Deny (FA)- Home Network Unreachable"},
292 {81, "Reg Deny (FA)- HA Host Unreachable"},
293 {82, "Reg Deny (FA)- HA Port Unreachable"},
294 {88, "Reg Deny (FA)- HA Unreachable"},
295 {96, "Reg Deny (FA)(NAI) - Non Zero Home Address Required"},
296 {97, "Reg Deny (FA)(NAI) - Missing NAI"},
297 {98, "Reg Deny (FA)(NAI) - Missing Home Agent"},
298 {99, "Reg Deny (FA)(NAI) - Missing Home Address"},
300 {128, "Registration Denied - Unspecified"}, /* 3GPP2 A.S0017-D v4.0 */
301 {129, "Registration Denied - Administratively Prohibited"},
302 {130, "Registration Denied - Insufficient Resources"},
303 {131, "Registration Denied - PCF Failed Authentication"},
304 /* {132, "Reg Deny (HA)- FA Failed Authentication"}, */
305 {133, "Registration Denied - Identification Mismatch"},
306 {134, "Registration Denied - Poorly Formed Request"},
307 /* {135, "Reg Deny (HA)- Too Many Simultaneous Bindings"}, */
308 {136, "Registration Denied - Unknown PDSN Address"},
309 {137, "Registration Denied - Requested Reverse Tunnel Unavailable"},
310 {138, "Registration Denied - Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
311 {139, "Registration Denied - service option not supported"},
312 {140, "Registration Denied - no CID available"},
313 {141, "Registration Denied - unsupported Vendor ID / Application Type in CVSE"},
314 {142, "Registration Denied - nonexistent A10 or IP flow"},
319 static const value_string a11_ack_status
[]= {
320 {0x00, "Update Accepted"},
321 {0x01, "Partial QoS updated"},
322 {0x80, "Update Denied - reason unspecified"},
323 {0x83, "Update Denied - sending node failed authentication"},
324 {0x85, "Update Denied - identification mismatch)"},
325 {0x86, "Update Denied - poorly formed registration update"},
326 {0xc9, "Update Denied - Session Parameter Not Updated"},
327 {0xca, "Update Denied - PMK not requested"},
328 {0xfd, "Update Denied - QoS profileID not supported"},
329 {0xfe, "Update Denied - insufficient resources"},
330 {0xff, "Update Denied - handoff in progress"},
338 GEN_AUTH_EXT
= 36, /* RFC 3012 */
339 OLD_CVSE_EXT
= 37, /* RFC 3115 */
340 CVSE_EXT
= 38, /* RFC 3115 */
341 SS_EXT
= 39, /* 3GPP2 IOS4.2 */
342 RU_AUTH_EXT
= 40, /* 3GPP2 IOS4.2 */
344 MF_CHALLENGE_EXT
= 132, /* RFC 3012 */
345 OLD_NVSE_EXT
= 133, /* RFC 3115 */
346 NVSE_EXT
= 134, /* RFC 3115 */
347 BCMCS_EXT
= 0xb0 /* 3GPP2 A.S0019-A v2.0 */
351 static const value_string a11_ext_types
[]= {
352 {MH_AUTH_EXT
, "Mobile-Home Authentication Extension"},
353 {MF_AUTH_EXT
, "Mobile-Foreign Authentication Extension"},
354 {FH_AUTH_EXT
, "Foreign-Home Authentication Extension"},
355 {GEN_AUTH_EXT
, "Generalized Mobile-IP Authentication Extension"},
356 {OLD_CVSE_EXT
, "Critical Vendor/Organization Specific Extension (OLD)"},
357 {CVSE_EXT
, "Critical Vendor/Organization Specific Extension"},
358 {SS_EXT
, "Session Specific Extension"},
359 {RU_AUTH_EXT
, "Registration Update Authentication Extension"},
360 {MN_NAI_EXT
, "Mobile Node NAI Extension"},
361 {MF_CHALLENGE_EXT
, "MN-FA Challenge Extension"},
362 {NVSE_EXT
, "Normal Vendor/Organization Specific Extension"},
363 {OLD_NVSE_EXT
, "Normal Vendor/Organization Specific Extension (OLD)"},
364 {BCMCS_EXT
, "BCMCS Session Extension"},
368 static const value_string a11_ext_stypes
[]= {
369 {1, "MN AAA Extension"},
373 static const value_string a11_ext_nvose_qosmode
[]= {
374 {0x00, "QoS Disabled"},
375 {0x01, "QoS Enabled"},
379 static const value_string a11_ext_nvose_srvopt
[]= {
380 {0x0021, "3G High Speed Packet Data"},
381 {0x003B, "HRPD Main Service Connection"},
382 {0x003C, "Link Layer Assisted Header Removal"},
383 {0x003D, "Link Layer Assisted Robust Header Compression"},
384 {0x0040, "HRPD Accounting Records Identifier"}, /* 3GPP2 A.S0009-C v4.0 */
385 {0x0043, "HRPD Packet Data IP Service where Higher Layer Protocol is IP or ROHC"}, /* 3GPP2 A.S0009-C v4.0 */
386 {0x0047, "HRPD AltPPP operation"}, /* 3GPP2 A.S0009-C v4.0 */
390 static const value_string a11_ext_nvose_pdsn_code
[]= {
391 {0xc1, "Connection Release - reason unspecified"},
392 {0xc2, "Connection Release - PPP time-out"},
393 {0xc3, "Connection Release - registration time-out"},
394 {0xc4, "Connection Release - PDSN error"},
395 {0xc5, "Connection Release - inter-PCF handoff"},
396 {0xc6, "Connection Release - inter-PDSN handoff"},
397 {0xc7, "Connection Release - PDSN OAM&P intervention"},
398 {0xc8, "Connection Release - accounting error"},
399 {0xca, "Connection Release - user (NAI) failed authentication"},
403 static const value_string a11_ext_dormant
[]= {
404 {0x0000, "all MS packet data service instances are dormant"},
409 static const true_false_string a11_tfs_ehrpd_mode
= {
410 "eAT is operating in evolved mode",
411 "eAT is operating in legacy mode"
414 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
415 static const true_false_string a11_tfs_ehrpd_pmk
= {
416 "eAT is requesting PMK information",
417 "eAT is not requesting PMK information",
420 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
421 static const true_false_string a11_tfs_ehrpd_handoff_info
= {
422 "eAT is requesting information for E-UTRAN handoff",
423 "eAT is not requesting information for E-UTRAN handoff",
426 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
427 static const true_false_string a11_tfs_ehrpd_tunnel_mode
= {
428 "eAT is communicating via tunnel from non-eHRPD",
429 "eAT is communicating directly via eHRPD",
432 static const value_string a11_ext_app
[]= {
433 {0x0101, "Accounting (RADIUS)"},
434 {0x0102, "Accounting (DIAMETER)"},
435 {0x0201, "Mobility Event Indicator (Mobility)"},
436 {0x0301, "Data Available Indicator (Data Ready to Send)"},
437 {0x0401, "Access Network Identifiers (ANID)"},
438 {0x0501, "PDSN Identifiers (Anchor P-P Address)"},
439 {0x0601, "Indicators (All Dormant Indicator)"},
440 {0x0602, "Indicators (eHRPD Mode)"}, /* 3GPP2 A.S0022-B v1.0 */
441 {0x0603, "Indicators (eHRPD Indicators)"}, /* 3GPP2 A.S0009-C v4.0 */
442 {0x0701, "PDSN Code (PDSN Code)"},
443 {0x0801, "Session Parameter (RN-PDIT:Radio Network Packet Data Inactivity Timer)"},
444 {0x0802, "Session Parameter (Always On)"},
445 {0x0803, "Session Parameter (QoS Mode)"},
446 {0x0901, "Service Option (Service Option Value)"},
447 {0x0A01, "PDSN Enabled Features (Flow Control Enabled)"},
448 {0x0A02, "PDSN Enabled Features (Packet Boundary Enabled)"},
449 {0x0A03, "PDSN Enabled Features (GRE Segmentation Enabled)"},
450 {0x0B01, "PCF Enabled Features (Short Data Indication Supported)"},
451 {0x0B02, "PCF Enabled Features (GRE Segmentation Enabled)"},
452 {0x0C01, "Additional Session Info"},
453 {0x0D01, "QoS Information (Forward QoS Information)"},
454 {0x0D02, "QoS Information (Reverse QoS Information)"},
455 {0x0D03, "QoS Information (Subscriber QoS Profile)"},
456 {0x0D04, "QoS Information (Forward Flow Priority Update Information)"},
457 {0x0D05, "QoS Information (Reverse Flow Priority Update Information)"},
458 {0x0DFE, "QoS Information (Forward QoS Update Information)"},
459 {0x0DFF, "QoS Information (Reverse QoS Update Information)"},
460 {0x0E01, "Header Compression (ROHC Configuration Parameters)"},
461 {0x0F01, "Information (Cause Code)"},
462 {0x0F04, "Information (Additional HSGW Information)"},
463 {0x1001, "HRPD Indicators (Emergency Services)"},
464 {0xB001, "System Identifiers (BSID / HRPD Subnet)"},
469 static const value_string a11_airlink_types
[]= {
470 {1, "Session Setup (Y=1)"},
471 {2, "Active Start (Y=2)"},
472 {3, "Active Stop (Y=3)"},
473 {4, "Short Data Burst (Y=4)"},
478 static const true_false_string tfs_included_not_included
= { "Included", "Not Included" };
480 static const value_string a11_bcmcs_stype_vals
[] = {
481 {1, "BCMCS Flow and Registration Information"},
482 {2, "Session Information"},
483 {3, "BCMCS Registration Result"},
484 {4, "Enhanced Session Information"},
488 #define A11_MSG_MSID_ELEM_LEN_MAX 8
489 #define A11_MSG_MSID_LEN_MAX 15
493 /* XXXX ToDo This should be imported from packet-rohc.h */
494 static const value_string a11_rohc_profile_vals
[] =
496 { 0x0000, "ROHC uncompressed" }, /*RFC 5795*/
497 { 0x0001, "ROHC RTP" }, /*RFC 3095*/
498 { 0x0002, "ROHC UDP" }, /*RFC 3095*/
499 { 0x0003, "ROHC ESP" }, /*RFC 3095*/
500 { 0x0004, "ROHC IP" }, /*RFC 3843*/
501 { 0x0005, "ROHC LLA" }, /*RFC 3242*/
502 { 0x0105, "ROHC LLA with R-mode" }, /*RFC 3408*/
503 { 0x0006, "ROHC TCP" }, /*RFC 4996*/
504 { 0x0007, "ROHC RTP/UDP-Lite" }, /*RFC 4019*/
505 { 0x0008, "ROHC UDP-Lite" }, /*RFC 4019*/
506 { 0x0101, "ROHCv2 RTP" }, /*RFC 5225*/
507 { 0x0102, "ROHCv2 UDP" }, /*RFC 5225*/
508 { 0x0103, "ROHCv2 ESP" }, /*RFC 5225*/
509 { 0x0104, "ROHCv2 IP" }, /*RFC 5225*/
510 { 0x0107, "ROHCv2 RTP/UDP-Lite" }, /*RFC 5225*/
511 { 0x0108, "ROHCv2 UDP-Lite" }, /*RFC 5225*/
515 #define NUM_ATTR (sizeof(attrs)/sizeof(struct radius_attribute))
517 #define RADIUS_VENDOR_SPECIFIC 26
518 #define SKIP_HDR_LEN 6
520 /* decode MSID from SSE */
522 /* MSID is encoded in Binary Coded Decimal format
523 First Byte: [odd-indicator] [Digit 1]
524 Second Byte: [Digit 3] [Digit 2]
527 Last Byte: [Digit N] [Digit N-1]
529 Last Byte: [F] [Digit N]
533 /* 3GPP2 A.S0008-C v4.0, 3GPP2 A.S0019-A v2.0 */
534 static const value_string a11_ses_msid_type_vals
[] =
536 { 0x0000, "No Identity Code" },
540 { 0x0008, "BCMCS Flow ID" },
545 decode_sse(proto_tree
*ext_tree
, tvbuff_t
*tvb
, int offset
, guint ext_len
)
548 guint8 msid_start_offset
;
549 guint8 msid_num_digits
;
553 gboolean odd_even_ind
;
555 /* Decode Protocol Type */
557 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
558 "Cannot decode Protocol Type - SSE too short");
561 proto_tree_add_item(ext_tree
, hf_a11_ses_ptype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
565 /* Decode Session Key */
567 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
568 "Cannot decode Session Key - SSE too short");
571 proto_tree_add_item(ext_tree
, hf_a11_ses_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
576 /* Decode Session Id Version */
578 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
579 "Cannot decode Session Id Version - SSE too short");
582 proto_tree_add_item(ext_tree
, hf_a11_ses_sidver
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
589 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
590 "Cannot decode SRID - SSE too short");
593 proto_tree_add_item(ext_tree
, hf_a11_ses_mnsrid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
599 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
600 "Cannot decode MSID Type - SSE too short");
603 proto_tree_add_item(ext_tree
, hf_a11_ses_msid_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
610 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
611 "Cannot decode MSID Length - SSE too short");
614 msid_len
= tvb_get_guint8(tvb
, offset
);
615 proto_tree_add_item(ext_tree
, hf_a11_ses_msid_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
620 if (ext_len
< msid_len
) {
621 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
622 "Cannot decode MSID - SSE too short");
626 msid_digits
= (char *)wmem_alloc(wmem_packet_scope(), A11_MSG_MSID_LEN_MAX
+2);
627 msid_start_offset
= offset
;
629 if (msid_len
> A11_MSG_MSID_ELEM_LEN_MAX
) {
630 p_msid
= "MSID is too long";
631 } else if (msid_len
== 0) {
632 p_msid
= "MSID is too short";
634 /* Decode the BCD digits */
635 for (msid_index
=0; msid_index
<msid_len
; msid_index
++) {
636 guint8 msid_digit
= tvb_get_guint8(tvb
, offset
);
640 msid_digits
[msid_index
*2] = (msid_digit
& 0x0F) + '0';
641 msid_digits
[(msid_index
*2) + 1] = ((msid_digit
& 0xF0) >> 4) + '0';
644 odd_even_ind
= (msid_digits
[0] == '1');
647 msid_num_digits
= ((msid_len
-1) * 2) + 1;
649 msid_num_digits
= (msid_len
-1) * 2;
652 msid_digits
[msid_num_digits
+ 1] = '\0';
653 p_msid
= msid_digits
+ 1;
657 proto_tree_add_string
658 (ext_tree
, hf_a11_ses_msid
, tvb
, msid_start_offset
, msid_len
, p_msid
);
664 decode_bcmcs(proto_tree
* ext_tree
, tvbuff_t
* tvb
, int offset
, guint ext_len
)
667 guint8 bc_stype
, entry_len
;
669 /* Decode Protocol Type */
671 proto_tree_add_text(ext_tree
, tvb
, offset
, 0,
672 "Cannot decode Protocol Type - BCMCS too short");
676 bc_stype
=tvb_get_guint8(tvb
, offset
);
677 proto_tree_add_item(ext_tree
, hf_a11_bcmcs_stype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
686 proto_tree
*entry_tree
;
687 while (ext_len
> 0) {
689 entry_len
= tvb_get_guint8(tvb
, offset
);
690 if (entry_len
== 0) {
694 ext_len
= ext_len
- entry_len
;
696 ti
= proto_tree_add_text(ext_tree
, tvb
, offset
, entry_len
, "BCMCS Information Entry %u", i
);
697 entry_tree
= proto_item_add_subtree(ti
, ett_a11_bcmcs_entry
);
698 proto_tree_add_item(entry_tree
, hf_a11_bcmcs_entry_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
700 proto_tree_add_text(ext_tree
, tvb
, offset
, entry_len
-1, "Entry Data, Not dissected yet");
701 offset
= offset
+entry_len
;
706 proto_tree_add_text(ext_tree
, tvb
, offset
, -1, "Session Data Type %u Not dissected yet",bc_stype
);
714 /* RADIUS attributed */
716 dissect_a11_radius( tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
, int app_len
)
719 proto_tree
*radius_tree
;
721 /* None of this really matters if we don't have a tree */
725 /* return if length of extension is not valid */
726 if (tvb_reported_length_remaining(tvb
, offset
) < 12) {
730 ti
= proto_tree_add_text(tree
, tvb
, offset
- 2, app_len
, "Airlink Record");
732 radius_tree
= proto_item_add_subtree(ti
, ett_a11_radiuses
);
734 dissect_attribute_value_pairs(radius_tree
, pinfo
, tvb
, offset
, app_len
-2);
739 /* X.S0011-005-D v2.0 Service Option Profile */
741 dissect_3gpp2_service_option_profile(proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
)
744 guint8 sub_type
, sub_type_length
;
747 /* Maximum service connections/Link Flows total 32 bit*/
748 proto_tree_add_item(tree
, hf_a11_serv_opt_prof_max_serv
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
751 while (tvb_length_remaining(tvb
,offset
) > 0) {
752 sub_type_length
= tvb_get_guint8(tvb
,offset
+1);
754 sub_type
= tvb_get_guint8(tvb
,offset
);
755 proto_tree_add_item(tree
, hf_a11_sub_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
757 pi
= proto_tree_add_item(tree
, hf_a11_sub_type_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
759 if (sub_type_length
< 2) {
760 expert_add_info(pinfo
, pi
, &ei_a11_sub_type_length_not2
);
764 proto_tree_add_item(tree
, hf_a11_serv_opt
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
766 /* Max number of service instances of Service Option n */
767 proto_tree_add_item(tree
, hf_a11_max_num_serv_opt
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
771 offset
= offset
+ sub_type_length
-2;
778 static const value_string a11_aut_flow_prof_subtype_vals
[] = {
779 {0x1, "ProfileID-Forward"},
780 {0x2, "ProfileID-Reverse"},
781 {0x3, "ProfileID-Bi-direction"},
785 /* X.S0011-005-D v2.0 Authorized Flow Profile IDs for the User */
787 dissect_3gpp2_radius_aut_flow_profile_ids(proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
)
789 proto_tree
*sub_tree
;
792 guint8 sub_type
, sub_type_length
;
795 while (tvb_length_remaining(tvb
,offset
) > 0) {
796 sub_type
= tvb_get_guint8(tvb
,offset
);
797 sub_type_length
= tvb_get_guint8(tvb
,offset
+1);
798 /* value is 2 octets */
799 value
= tvb_get_ntohs(tvb
,offset
+2);
800 item
= proto_tree_add_text(tree
, tvb
, offset
, sub_type_length
, "%s = %u",
801 val_to_str_const(sub_type
, a11_aut_flow_prof_subtype_vals
, "Unknown"), value
);
802 sub_tree
= proto_item_add_subtree(item
, ett_a11_aut_flow_profile_ids
);
804 proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
806 item
= proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
807 if (sub_type_length
< 2) {
808 expert_add_info(pinfo
, item
, &ei_a11_sub_type_length_not2
);
812 proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
814 offset
= offset
+sub_type_length
- 2;
820 /* Code to dissect Additional Session Info */
822 dissect_ase(tvbuff_t
*tvb
, int offset
, guint ase_len
, proto_tree
*ext_tree
)
824 guint clen
= 0; /* consumed length */
826 while (clen
< ase_len
) {
827 proto_tree
*exts_tree
;
828 guint8 srid
= tvb_get_guint8(tvb
, offset
+1);
829 guint16 service_option
= tvb_get_ntohs(tvb
, offset
+2);
832 int entry_start_offset
;
835 entry_start_offset
= offset
;
836 entry_lenght
= tvb_get_guint8(tvb
, offset
);
838 if (registration_request_msg
&& ((service_option
== 64) || (service_option
== 67)))
839 ti
= proto_tree_add_text(ext_tree
, tvb
, offset
, entry_lenght
+1, "GRE Key Entry (SRID: %d)", srid
);
841 ti
= proto_tree_add_text(ext_tree
, tvb
, offset
, entry_lenght
, "GRE Key Entry (SRID: %d)", srid
);
843 exts_tree
= proto_item_add_subtree(ti
, ett_a11_ase
);
845 proto_tree_add_item(exts_tree
, hf_a11_ase_len_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
849 proto_tree_add_item(exts_tree
, hf_a11_ase_srid_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
853 proto_tree_add_item(exts_tree
, hf_a11_ase_servopt_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
856 /* GRE Protocol Type*/
857 proto_tree_add_item(exts_tree
, hf_a11_ase_gre_proto_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
861 proto_tree_add_item(exts_tree
, hf_a11_ase_gre_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
865 proto_tree_add_item(exts_tree
, hf_a11_ase_pcf_addr_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
868 if ((entry_lenght
>14)&&(registration_request_msg
)) {
869 if (service_option
== 0x0043) {
871 proto_tree
*extv_tree
;
872 guint8 profile_count
= tvb_get_guint8(tvb
, offset
+6);
873 guint8 profile_index
= 0;
874 guint8 reverse_profile_count
;
876 proto_item
*tj
= proto_tree_add_text(exts_tree
, tvb
, offset
,6+(profile_count
*2)+1, "Forward ROHC Info");
878 proto_tree
*extt_tree
= proto_item_add_subtree(tj
, ett_a11_forward_rohc
);
880 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_rohc_info_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
883 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_maxcid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
885 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_mrru
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
887 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_large_cids
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
889 profile_count
=tvb_get_guint8(tvb
, offset
);
891 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_profile_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
895 for (profile_index
=0; profile_index
<profile_count
; profile_index
++) {
896 proto_item
*tk
= proto_tree_add_text (extt_tree
, tvb
, offset
, (2*profile_count
), "Forward Profile : %d", profile_index
);
897 proto_tree
*extu_tree
= proto_item_add_subtree(tk
, ett_a11_forward_profile
);
898 proto_tree_add_item(extu_tree
, hf_a11_ase_forward_profile
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
903 reverse_profile_count
=tvb_get_guint8(tvb
, offset
+6);
905 tl
= proto_tree_add_text(exts_tree
, tvb
, offset
,6+(reverse_profile_count
*2)+1, "Reverse ROHC Info");
907 extv_tree
= proto_item_add_subtree(tl
, ett_a11_reverse_rohc
);
909 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_rohc_info_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
913 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_maxcid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
915 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_mrru
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
917 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_large_cids
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
920 profile_count
=tvb_get_guint8(tvb
, offset
);
922 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_profile_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
926 for (profile_index
=0; profile_index
<reverse_profile_count
; profile_index
++) {
927 proto_item
*tm
= proto_tree_add_text(extv_tree
, tvb
, offset
, (2*profile_count
), "Reverse Profile : %d", profile_index
);
929 proto_tree
*extw_tree
= proto_item_add_subtree(tm
, ett_a11_reverse_profile
);
931 proto_tree_add_item(extw_tree
, hf_a11_ase_reverse_profile
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
934 }/* Service option */
937 clen
+= entry_lenght
+ 1;
938 /* Set offset = start of next entry in case of padding */
939 offset
= entry_start_offset
+ entry_lenght
+1;
943 registration_request_msg
=0;
947 #define A11_FQI_IPFLOW_DISC_ENABLED 0x80
948 #define A11_FQI_DSCP_INCLUDED 0x40
951 dissect_fwd_qosinfo_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
, guint8
*p_dscp_included
)
953 guint8 flags
= tvb_get_guint8(tvb
, offset
);
955 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_fqi_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
956 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_fqi_flags
);
958 proto_tree_add_item(flags_tree
, hf_a11_fqi_flags_ip_flow
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
959 proto_tree_add_item(flags_tree
, hf_a11_fqi_flags_dscp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
961 if (flags
& A11_FQI_DSCP_INCLUDED
) {
962 *p_dscp_included
= 1;
964 *p_dscp_included
= 0;
969 dissect_fqi_entry_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
, guint8 dscp_enabled
)
971 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_fqi_entry_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
972 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_fqi_entry_flags
);
975 proto_tree_add_item(flags_tree
, hf_a11_fqi_entry_flag_dscp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
978 proto_tree_add_item(flags_tree
, hf_a11_fqi_entry_flag_flow_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
982 dissect_rqi_entry_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
984 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_rqi_entry_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
985 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_rqi_entry_flags
);
987 proto_tree_add_item(flags_tree
, hf_a11_rqi_entry_flag_flow_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
990 /* Code to dissect Forward QoS Info */
992 dissect_fwd_qosinfo(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
994 int clen
= 0; /* consumed length */
997 guint8 dscp_enabled
= 0;
1000 proto_tree_add_item(ext_tree
, hf_a11_fqi_srid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1004 dissect_fwd_qosinfo_flags(tvb
, offset
+clen
, ext_tree
, &dscp_enabled
);
1008 flow_count
= tvb_get_guint8(tvb
, offset
+clen
);
1010 proto_tree_add_item(ext_tree
, hf_a11_fqi_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1013 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1014 guint8 requested_qos_len
= 0;
1015 guint8 granted_qos_len
= 0;
1017 guint8 entry_len
= tvb_get_guint8(tvb
, offset
+clen
);
1018 guint8 flow_id
= tvb_get_guint8(tvb
, offset
+clen
+1);
1020 proto_item
*ti
= proto_tree_add_text
1021 (ext_tree
, tvb
, offset
+clen
, entry_len
+1, "Forward Flow Entry (Flow Id: %d)", flow_id
);
1023 proto_tree
*flow_tree
= proto_item_add_subtree(ti
, ett_a11_fqi_flowentry
);
1026 proto_tree_add_item(flow_tree
, hf_a11_fqi_entrylen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1030 proto_tree_add_item(flow_tree
, hf_a11_fqi_flowid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1033 /* DSCP and Flow State*/
1034 dissect_fqi_entry_flags(tvb
, offset
+clen
, flow_tree
, dscp_enabled
);
1038 /* Requested QoS Length */
1039 requested_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1040 proto_tree_add_item(flow_tree
, hf_a11_fqi_requested_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1043 /* Requested QoS Blob */
1044 if (requested_qos_len
) {
1046 proto_tree
*exts_tree2
;
1048 proto_item
*ti1
= proto_tree_add_text(flow_tree
, tvb
, offset
+clen
,requested_qos_len
, "Forward Requested QoS ");
1049 proto_tree
*exts_tree1
= proto_item_add_subtree(ti1
, ett_a11_fqi_requestedqos
);
1051 proto_tree_add_text(exts_tree1
, tvb
, offset
+clen
, requested_qos_len
, "Forward Requested QoS Sub Blob");
1054 proto_tree_add_item(exts_tree1
, hf_a11_fqi_flow_priority
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1056 /* Num of QoS attribute sets */
1057 proto_tree_add_item(exts_tree1
, hf_a11_fqi_num_qos_attribute_set
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1059 /* QoS attribute set length */
1060 proto_tree_add_item(exts_tree1
, hf_a11_fqi_qos_attribute_setlen
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1063 /* QoS attribute set */
1064 ti2
= proto_tree_add_text(exts_tree1
, tvb
, offset
+clen
, 4, "QoS Attribute Set");
1065 exts_tree2
= proto_item_add_subtree(ti2
, ett_a11_fqi_qos_attribute_set
);
1067 /* QoS attribute setid */
1068 proto_tree_add_item(exts_tree2
, hf_a11_fqi_qos_attribute_setid
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1072 proto_tree_add_item(exts_tree2
, hf_a11_fqi_verbose
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1074 /* Flow profile id */
1075 proto_tree_add_item(exts_tree2
, hf_a11_fqi_flow_profileid
, tvb
, offset
+clen
, 3, ENC_BIG_ENDIAN
);
1080 /* Granted QoS Length */
1081 granted_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1082 proto_tree_add_item(flow_tree
, hf_a11_fqi_granted_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1085 /* Granted QoS Blob */
1086 if (granted_qos_len
) {
1088 proto_tree
*exts_tree3
;
1090 ti3
= proto_tree_add_text(flow_tree
, tvb
, offset
+clen
, granted_qos_len
, "Forward Granted QoS ");
1092 exts_tree3
= proto_item_add_subtree(ti3
, ett_a11_fqi_grantedqos
);
1094 proto_tree_add_text(exts_tree3
, tvb
, offset
+clen
, granted_qos_len
, "Forward Granted QoS Sub Blob");
1096 /* QoS attribute setid */
1097 proto_tree_add_item(exts_tree3
, hf_a11_fqi_qos_granted_attribute_setid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1100 } /* for (flow_index...) */
1103 /* Code to dissect Reverse QoS Info */
1105 dissect_rev_qosinfo(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1107 int clen
= 0; /* consumed length */
1112 proto_tree_add_item(ext_tree
, hf_a11_rqi_srid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1116 flow_count
= tvb_get_guint8(tvb
, offset
+clen
);
1118 proto_tree_add_item(ext_tree
, hf_a11_rqi_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1121 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1122 guint8 requested_qos_len
;
1123 guint8 granted_qos_len
;
1125 guint8 entry_len
= tvb_get_guint8(tvb
, offset
+clen
);
1126 guint8 flow_id
= tvb_get_guint8(tvb
, offset
+clen
+1);
1128 proto_item
*ti
= proto_tree_add_text
1129 (ext_tree
, tvb
, offset
+clen
, entry_len
+1, "Reverse Flow Entry (Flow Id: %d)", flow_id
);
1131 proto_tree
*flow_tree
= proto_item_add_subtree(ti
, ett_a11_rqi_flowentry
);
1134 proto_tree_add_item(flow_tree
, hf_a11_rqi_entrylen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1138 proto_tree_add_item(flow_tree
, hf_a11_rqi_flowid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1142 dissect_rqi_entry_flags(tvb
, offset
+clen
, flow_tree
);
1145 /* Requested QoS Length */
1146 requested_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1147 proto_tree_add_item(flow_tree
, hf_a11_rqi_requested_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1150 /* Requested QoS Blob */
1151 if (requested_qos_len
) {
1152 proto_item
*ti1
, *ti2
;
1153 proto_tree
*exts_tree1
, *exts_tree2
;
1155 ti1
= proto_tree_add_text(flow_tree
, tvb
, offset
+clen
,requested_qos_len
, "Reverse Requested QoS ");
1157 exts_tree1
= proto_item_add_subtree(ti1
, ett_a11_rqi_requestedqos
);
1159 proto_tree_add_text(exts_tree1
, tvb
, offset
+clen
, requested_qos_len
, "Reverse Requested QoS Sub Blob");
1162 proto_tree_add_item(exts_tree1
, hf_a11_rqi_flow_priority
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1164 /* Num of QoS attribute sets */
1165 proto_tree_add_item(exts_tree1
, hf_a11_rqi_num_qos_attribute_set
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1167 /* QoS attribute set length */
1168 proto_tree_add_item(exts_tree1
, hf_a11_rqi_qos_attribute_setlen
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1171 /* QoS attribute set */
1172 ti2
= proto_tree_add_text(exts_tree1
, tvb
, offset
+clen
, 4, "QoS Attribute Set");
1173 exts_tree2
= proto_item_add_subtree(ti2
, ett_a11_rqi_qos_attribute_set
);
1175 /* QoS attribute setid */
1176 proto_tree_add_item(exts_tree2
, hf_a11_rqi_qos_attribute_setid
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1180 proto_tree_add_item(exts_tree2
, hf_a11_rqi_verbose
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1182 /* Flow profile id */
1183 proto_tree_add_item(exts_tree2
, hf_a11_rqi_flow_profileid
, tvb
, offset
+clen
, 3, ENC_BIG_ENDIAN
);
1187 /* Granted QoS Length */
1188 granted_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1189 proto_tree_add_item(flow_tree
, hf_a11_rqi_granted_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1192 /* Granted QoS Blob */
1193 if (granted_qos_len
) {
1195 proto_tree
*exts_tree3
;
1197 ti3
= proto_tree_add_text(flow_tree
, tvb
, offset
+clen
,granted_qos_len
, "Reverse Granted QoS ");
1198 exts_tree3
= proto_item_add_subtree(ti3
, ett_a11_rqi_grantedqos
);
1200 proto_tree_add_text(exts_tree3
, tvb
, offset
+clen
, granted_qos_len
, "Reverse Granted QoS Sub Blob");
1202 /* QoS attribute setid */
1203 proto_tree_add_item(exts_tree3
, hf_a11_rqi_qos_granted_attribute_setid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1210 /* Code to dissect Subscriber QoS Profile */
1212 dissect_subscriber_qos_profile(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int ext_len
, proto_tree
*ext_tree
)
1214 proto_tree
*exts_tree
;
1216 int qos_profile_len
= ext_len
;
1219 proto_tree_add_text (ext_tree
, tvb
, offset
, 0,
1220 "Subscriber Qos Profile (%d bytes)",
1223 exts_tree
= proto_item_add_subtree(ti
, ett_a11_subscriber_profile
);
1225 /* Subscriber QoS profile */
1226 if (qos_profile_len
) {
1228 (exts_tree
, hf_a11_subsciber_profile
, tvb
, offset
,
1229 qos_profile_len
, ENC_NA
);
1231 dissect_attribute_value_pairs(exts_tree
, pinfo
, tvb
, offset
, qos_profile_len
);
1235 /* Code to dissect Forward QoS Update Info */
1237 dissect_fwd_qosupdate_info(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1239 int clen
= 0; /* consumed length */
1244 flow_count
= tvb_get_guint8(tvb
, offset
+clen
);
1245 proto_tree_add_item(ext_tree
, hf_a11_fqui_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1248 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1249 proto_tree
*exts_tree
;
1250 guint8 granted_qos_len
;
1252 guint8 flow_id
= tvb_get_guint8(tvb
, offset
+clen
);
1254 proto_item
*ti
= proto_tree_add_text
1255 (ext_tree
, tvb
, offset
+clen
, 1, "Forward Flow Entry (Flow Id: %d)", flow_id
);
1258 exts_tree
= proto_item_add_subtree(ti
, ett_a11_fqui_flowentry
);
1260 /* Forward QoS Sub Blob Length */
1261 granted_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1263 (exts_tree
, hf_a11_fqui_updated_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1266 /* Forward QoS Sub Blob */
1267 if (granted_qos_len
) {
1269 (exts_tree
, hf_a11_fqui_updated_qos
, tvb
, offset
+clen
,
1270 granted_qos_len
, ENC_NA
);
1271 clen
+= granted_qos_len
;
1277 /* Code to dissect Reverse QoS Update Info */
1279 dissect_rev_qosupdate_info(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1281 int clen
= 0; /* consumed length */
1286 flow_count
= tvb_get_guint8(tvb
, offset
+clen
);
1287 proto_tree_add_item(ext_tree
, hf_a11_rqui_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1290 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1291 proto_tree
*exts_tree
;
1292 guint8 granted_qos_len
;
1294 guint8 flow_id
= tvb_get_guint8(tvb
, offset
+clen
);
1296 proto_item
*ti
= proto_tree_add_text
1297 (ext_tree
, tvb
, offset
+clen
, 1, "Reverse Flow Entry (Flow Id: %d)", flow_id
);
1299 exts_tree
= proto_item_add_subtree(ti
, ett_a11_rqui_flowentry
);
1301 /* Reverse QoS Sub Blob Length */
1302 granted_qos_len
= tvb_get_guint8(tvb
, offset
+clen
);
1304 (exts_tree
, hf_a11_rqui_updated_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1307 /* Reverse QoS Sub Blob */
1308 if (granted_qos_len
) {
1310 (exts_tree
, hf_a11_rqui_updated_qos
, tvb
, offset
+clen
,
1311 granted_qos_len
, ENC_NA
);
1312 clen
+= granted_qos_len
;
1317 /* Code to dissect extensions */
1319 dissect_a11_extensions( tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
)
1322 proto_tree
*exts_tree
;
1323 proto_tree
*ext_tree
;
1326 guint8 ext_subtype
= 0;
1329 gint16 apptype
= -1;
1331 /* Add our tree, if we have extensions */
1332 ti
= proto_tree_add_text(tree
, tvb
, offset
, -1, "Extensions");
1333 exts_tree
= proto_item_add_subtree(ti
, ett_a11_exts
);
1335 /* And, handle each extension */
1336 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1338 /* Get our extension info */
1339 ext_type
= tvb_get_guint8(tvb
, offset
);
1340 if (ext_type
== GEN_AUTH_EXT
) {
1342 * Very nasty . . breaks normal extensions, since the length is
1343 * in the wrong place :(
1345 ext_subtype
= tvb_get_guint8(tvb
, offset
+ 1);
1346 ext_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1348 } else if ((ext_type
== CVSE_EXT
) || (ext_type
== OLD_CVSE_EXT
)) {
1349 ext_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1350 ext_subtype
= tvb_get_guint8(tvb
, offset
+ 8);
1353 ext_len
= tvb_get_guint8(tvb
, offset
+ 1);
1357 ti
= proto_tree_add_text(exts_tree
, tvb
, offset
, ext_len
+ hdrLen
,
1359 val_to_str(ext_type
, a11_ext_types
,
1360 "Unknown Extension %u"));
1361 ext_tree
= proto_item_add_subtree(ti
, ett_a11_ext
);
1363 proto_tree_add_uint(ext_tree
, hf_a11_ext_type
, tvb
, offset
, 1, ext_type
);
1366 if (ext_type
== SS_EXT
) {
1367 proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 1, ext_len
);
1370 else if ((ext_type
== CVSE_EXT
) || (ext_type
== OLD_CVSE_EXT
)) {
1372 proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 2, ext_len
);
1375 else if (ext_type
!= GEN_AUTH_EXT
) {
1376 /* Another nasty hack since GEN_AUTH_EXT broke everything */
1377 proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 1, ext_len
);
1383 decode_sse(ext_tree
, tvb
, offset
, ext_len
);
1392 /* All these extensions look the same. 4 byte SPI followed by a key */
1395 proto_tree_add_item(ext_tree
, hf_a11_aext_spi
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1400 proto_tree_add_item(ext_tree
, hf_a11_aext_auth
, tvb
, offset
, ext_len
,
1407 * RFC 2486 speaks only of ASCII; RFC 4282 expands that to
1410 proto_tree_add_item(ext_tree
, hf_a11_next_nai
, tvb
, offset
,
1411 ext_len
, ENC_UTF_8
|ENC_NA
);
1414 case GEN_AUTH_EXT
: /* RFC 3012 */
1416 * Very nasty . . breaks normal extensions, since the length is
1417 * in the wrong place :(
1419 proto_tree_add_uint(ext_tree
, hf_a11_ext_stype
, tvb
, offset
, 1, ext_subtype
);
1421 proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 2, ext_len
);
1426 proto_tree_add_item(ext_tree
, hf_a11_aext_spi
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1432 proto_tree_add_item(ext_tree
, hf_a11_aext_auth
, tvb
, offset
,
1436 case OLD_CVSE_EXT
: /* RFC 3115 */
1437 case CVSE_EXT
: /* RFC 3115 */
1440 proto_tree_add_item(ext_tree
, hf_a11_vse_vid
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1445 apptype
= tvb_get_ntohs(tvb
, offset
);
1446 proto_tree_add_uint(ext_tree
, hf_a11_vse_apptype
, tvb
, offset
, 2, apptype
);
1449 if (apptype
== 0x0101) {
1450 if (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1451 dissect_a11_radius(tvb
, pinfo
, offset
, ext_tree
, ext_len
+ 2);
1455 case OLD_NVSE_EXT
: /* RFC 3115 */
1456 case NVSE_EXT
: /* RFC 3115 */
1459 proto_tree_add_item(ext_tree
, hf_a11_vse_vid
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
1462 proto_tree_add_item(ext_tree
, hf_a11_vse_apptype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1466 apptype
= tvb_get_ntohs(tvb
, offset
);
1473 proto_tree_add_item(ext_tree
, hf_a11_vse_panid
, tvb
, offset
, 5, ENC_NA
);
1478 proto_tree_add_item(ext_tree
, hf_a11_vse_canid
, tvb
, offset
, 5, ENC_NA
);
1483 proto_tree_add_item(ext_tree
, hf_a11_vse_ppaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1488 proto_tree_add_item(ext_tree
, hf_a11_vse_dormant
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1494 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1497 /* eHRPD Indicators */
1500 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_pmk
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1501 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_handoff_info
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1502 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_tunnel_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1507 proto_tree_add_item(ext_tree
, hf_a11_vse_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1512 proto_tree_add_item(ext_tree
, hf_a11_vse_pdit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1515 proto_tree_add_text(ext_tree
, tvb
, offset
, -1, "Session Parameter - Always On");
1518 proto_tree_add_item(ext_tree
, hf_a11_vse_qosmode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1523 proto_tree_add_item(ext_tree
, hf_a11_vse_srvopt
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1526 dissect_ase(tvb
, offset
, ext_len
, ext_tree
);
1529 dissect_fwd_qosinfo(tvb
, offset
, ext_tree
);
1532 dissect_rev_qosinfo(tvb
, offset
, ext_tree
);
1535 dissect_subscriber_qos_profile(tvb
, pinfo
, offset
, ext_len
, ext_tree
);
1538 dissect_fwd_qosupdate_info(tvb
, offset
, ext_tree
);
1541 dissect_rev_qosupdate_info(tvb
, offset
, ext_tree
);
1547 decode_bcmcs(ext_tree
, tvb
, offset
, ext_len
);
1551 case MF_CHALLENGE_EXT
: /* RFC 3012 */
1552 /* The default dissector is good here. The challenge is all hex anyway. */
1554 proto_tree_add_item(ext_tree
, hf_a11_ext
, tvb
, offset
, ext_len
, ENC_NA
);
1559 } /* while data remaining */
1561 } /* dissect_a11_extensions */
1563 /* Code to actually dissect the packets */
1565 dissect_a11( tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1567 /* Set up structures we will need to add the protocol subtree and manage it */
1569 proto_tree
*a11_tree
= NULL
;
1571 proto_tree
*flags_tree
;
1576 if (!tvb_bytes_exist(tvb
, offset
, 1))
1577 return 0; /* not enough data to check message type */
1579 type
= tvb_get_guint8(tvb
, offset
);
1580 if (try_val_to_str(type
, a11_types
) == NULL
)
1581 return 0; /* not a known message type */
1583 /* Make entries in Protocol column and Info column on summary display */
1585 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "3GPP2 A11");
1586 col_clear(pinfo
->cinfo
, COL_INFO
);
1588 if (type
== REGISTRATION_REQUEST
)
1589 registration_request_msg
=1;
1591 registration_request_msg
=0;
1595 case REGISTRATION_REQUEST
:
1597 registration_request_msg
= 1;
1598 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Request: PDSN=%s PCF=%s",
1599 tvb_ip_to_str(tvb
, 8),
1600 tvb_ip_to_str(tvb
, 12));
1603 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1604 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1607 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1611 flags
= tvb_get_guint8(tvb
, offset
);
1612 tf
= proto_tree_add_uint(a11_tree
, hf_a11_flags
, tvb
,
1614 flags_tree
= proto_item_add_subtree(tf
, ett_a11_flags
);
1615 proto_tree_add_boolean(flags_tree
, hf_a11_s
, tvb
, offset
, 1, flags
);
1616 proto_tree_add_boolean(flags_tree
, hf_a11_b
, tvb
, offset
, 1, flags
);
1617 proto_tree_add_boolean(flags_tree
, hf_a11_d
, tvb
, offset
, 1, flags
);
1618 proto_tree_add_boolean(flags_tree
, hf_a11_m
, tvb
, offset
, 1, flags
);
1619 proto_tree_add_boolean(flags_tree
, hf_a11_g
, tvb
, offset
, 1, flags
);
1620 proto_tree_add_boolean(flags_tree
, hf_a11_v
, tvb
, offset
, 1, flags
);
1621 proto_tree_add_boolean(flags_tree
, hf_a11_t
, tvb
, offset
, 1, flags
);
1625 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1629 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1632 /* home agent address */
1633 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1636 /* Care of Address */
1637 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1640 /* Identifier - assumed to be an NTP time here */
1641 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1646 case REGISTRATION_REPLY
:
1647 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Reply: PDSN=%s, Code=%u",
1648 tvb_ip_to_str(tvb
, 8), tvb_get_guint8(tvb
,1));
1652 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1653 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1656 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1660 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1663 /* Registration Lifetime */
1664 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1668 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1671 /* Home Agent Address */
1672 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1675 /* Identifier - assumed to be an NTP time here */
1676 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1681 case REGISTRATION_UPDATE
:
1682 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"Reg Update: PDSN=%s",
1683 tvb_ip_to_str(tvb
, 8));
1686 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1687 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1690 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1697 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1700 /* Home Agent Address */
1701 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1704 /* Identifier - assumed to be an NTP time here */
1705 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1710 case REGISTRATION_ACK
:
1711 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Ack: PCF=%s Status=%u",
1712 tvb_ip_to_str(tvb
, 8),
1713 tvb_get_guint8(tvb
,3));
1716 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1717 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1720 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1727 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1731 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1734 /* Care of Address */
1735 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1738 /* Identifier - assumed to be an NTP time here */
1739 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1744 case SESSION_UPDATE
: /* IOS4.3 */
1745 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"Ses Update: PDSN=%s",
1746 tvb_ip_to_str(tvb
, 8));
1749 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1750 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1753 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1760 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1763 /* Home Agent Address */
1764 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1767 /* Identifier - assumed to be an NTP time here */
1768 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1773 case SESSION_ACK
: /* IOS4.3 */
1774 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Ses Upd Ack: PCF=%s, Status=%u",
1775 tvb_ip_to_str(tvb
, 8),
1776 tvb_get_guint8(tvb
,3));
1779 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1780 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1783 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1790 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1794 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1797 /* Care of Address */
1798 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1801 /* Identifier - assumed to be an NTP time here */
1802 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1807 case CAPABILITIES_INFO
: /* IOS5.1 */
1808 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Cap Info: PDSN=%s, PCF=%s",
1809 tvb_ip_to_str(tvb
, 8),
1810 tvb_ip_to_str(tvb
, 12));
1813 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1814 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1817 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1824 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1827 /* Home Agent Address */
1828 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1831 /* Care of Address */
1832 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1835 /* Identifier - assumed to be an NTP time here */
1836 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1841 case CAPABILITIES_INFO_ACK
: /* IOS5.1 */
1842 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Cap Info Ack: PCF=%s",
1843 tvb_ip_to_str(tvb
, 8));
1846 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1847 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1850 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1857 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1860 /* Care of Address */
1861 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1864 /* Identifier - assumed to be an NTP time here */
1865 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1870 case BC_SERVICE_REQUEST
:
1871 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Service Request: PCF=%s ",
1872 tvb_ip_to_str(tvb
, offset
+ 8));
1875 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
1876 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1879 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1883 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
1886 /* Care-of-Address */
1887 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, FALSE
);
1890 /* Identifier - assumed to be an NTP time here */
1891 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1897 case BC_SERVICE_REPLY
:
1898 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Service Response: BSN=%s ",
1899 tvb_ip_to_str(tvb
, offset
+ 8));
1902 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
1903 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1906 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1910 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, FALSE
);
1914 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
1918 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, FALSE
);
1921 /* Identifier - assumed to be an NTP time here */
1922 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1927 case BC_REGISTRATION_REQUEST
:
1928 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Request: BSN=%s ",
1929 tvb_ip_to_str(tvb
, offset
+ 8));
1932 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
1933 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1936 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1940 flags
= tvb_get_guint8(tvb
, offset
);
1941 tf
= proto_tree_add_uint(a11_tree
, hf_a11_flags
, tvb
,
1943 flags_tree
= proto_item_add_subtree(tf
, ett_a11_flags
);
1944 proto_tree_add_boolean(flags_tree
, hf_a11_s
, tvb
, offset
, 1, flags
);
1945 proto_tree_add_boolean(flags_tree
, hf_a11_b
, tvb
, offset
, 1, flags
);
1946 proto_tree_add_boolean(flags_tree
, hf_a11_d
, tvb
, offset
, 1, flags
);
1947 proto_tree_add_boolean(flags_tree
, hf_a11_m
, tvb
, offset
, 1, flags
);
1948 proto_tree_add_boolean(flags_tree
, hf_a11_g
, tvb
, offset
, 1, flags
);
1949 proto_tree_add_boolean(flags_tree
, hf_a11_v
, tvb
, offset
, 1, flags
);
1950 proto_tree_add_boolean(flags_tree
, hf_a11_t
, tvb
, offset
, 1, flags
);
1954 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, FALSE
);
1958 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
1962 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, FALSE
);
1965 /* Care-of-Address */
1966 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, FALSE
);
1969 /* Identifier - assumed to be an NTP time here */
1970 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1978 case BC_REGISTRATION_REPLY
:
1979 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Reply: BSN=%s, Code=%u",
1980 tvb_ip_to_str(tvb
, offset
+ 8),
1981 tvb_get_guint8(tvb
, offset
+ 1));
1985 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
1986 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1989 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1993 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, FALSE
);
1996 /* Registration Lifetime */
1997 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, FALSE
);
2001 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
2005 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, FALSE
);
2008 /* Identifier - assumed to be an NTP time here */
2009 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
2015 case BC_REGISTRATION_UPDATE
:
2016 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"BC Reg Update: BSN=%s",
2017 tvb_ip_to_str(tvb
, offset
+ 8));
2020 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
2021 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
2024 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
2031 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
2035 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, FALSE
);
2038 /* Identifier - assumed to be an NTP time here */
2039 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
2044 case BC_REGISTRATION_ACK
:
2045 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Acknowledge: PCF=%s Status=%u",
2046 tvb_ip_to_str(tvb
, offset
+ 8),
2047 tvb_get_guint8(tvb
, offset
+ 3));
2050 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, FALSE
);
2051 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
2054 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
2061 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, FALSE
);
2065 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, FALSE
);
2068 /* Care-of-Address */
2069 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, FALSE
);
2072 /* Identifier - assumed to be an NTP time here */
2073 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
2081 DISSECTOR_ASSERT_NOT_REACHED();
2085 if (tree
&& a11_tree
) {
2086 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
2087 dissect_a11_extensions(tvb
, pinfo
, offset
, a11_tree
);
2089 return tvb_length(tvb
);
2092 /* Register the protocol with Wireshark */
2094 proto_register_a11(void)
2097 /* Setup list of header fields */
2098 static hf_register_info hf
[] = {
2100 { "Message Type", "a11.type",
2101 FT_UINT8
, BASE_DEC
, VALS(a11_types
), 0,
2102 "A11 Message Type", HFILL
}
2105 { "Flags", "a11.flags",
2106 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2110 { "Simultaneous Bindings", "a11.s",
2111 FT_BOOLEAN
, 8, NULL
, 128,
2112 "Simultaneous Bindings Allowed", HFILL
}
2115 { "Broadcast Datagrams", "a11.b",
2116 FT_BOOLEAN
, 8, NULL
, 64,
2117 "Broadcast Datagrams requested", HFILL
}
2120 { "Co-located Care-of Address", "a11.d",
2121 FT_BOOLEAN
, 8, NULL
, 32,
2122 "MN using Co-located Care-of address", HFILL
}
2125 { "Minimal Encapsulation", "a11.m",
2126 FT_BOOLEAN
, 8, NULL
, 16,
2127 "MN wants Minimal encapsulation", HFILL
}
2131 FT_BOOLEAN
, 8, NULL
, 8,
2132 "MN wants GRE encapsulation", HFILL
}
2135 { "Van Jacobson", "a11.v",
2136 FT_BOOLEAN
, 8, NULL
, 4,
2140 { "Reverse Tunneling", "a11.t",
2141 FT_BOOLEAN
, 8, NULL
, 2,
2142 "Reverse tunneling requested", HFILL
}
2145 { "Reply Code", "a11.code",
2146 FT_UINT8
, BASE_DEC
, VALS(a11_reply_codes
), 0,
2147 "A11 Registration Reply code", HFILL
}
2150 { "Reply Status", "a11.ackstat",
2151 FT_UINT8
, BASE_DEC
, VALS(a11_ack_status
), 0,
2152 "A11 Registration Ack Status", HFILL
}
2155 { "Lifetime", "a11.life",
2156 FT_UINT16
, BASE_DEC
, NULL
, 0,
2157 "A11 Registration Lifetime", HFILL
}
2160 { "Home Address", "a11.homeaddr",
2161 FT_IPv4
, BASE_NONE
, NULL
, 0,
2162 "Mobile Node's home address", HFILL
}
2166 { "Home Agent", "a11.haaddr",
2167 FT_IPv4
, BASE_NONE
, NULL
, 0,
2168 "Home agent IP Address", HFILL
}
2171 { "Care of Address", "a11.coa",
2172 FT_IPv4
, BASE_NONE
, NULL
, 0,
2176 { "Identification", "a11.ident",
2177 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0,
2178 "MN Identification", HFILL
}
2181 { "Extension Type", "a11.ext.type",
2182 FT_UINT8
, BASE_DEC
, VALS(a11_ext_types
), 0,
2183 "Mobile IP Extension Type", HFILL
}
2185 { &hf_a11_ext_stype
,
2186 { "Gen Auth Ext SubType", "a11.ext.auth.subtype",
2187 FT_UINT8
, BASE_DEC
, VALS(a11_ext_stypes
), 0,
2188 "Mobile IP Auth Extension Sub Type", HFILL
}
2191 { "Extension Length", "a11.ext.len",
2192 FT_UINT16
, BASE_DEC
, NULL
, 0,
2193 "Mobile IP Extension Length", HFILL
}
2196 { "Extension", "a11.extension",
2197 FT_BYTES
, BASE_NONE
, NULL
, 0,
2201 { "SPI", "a11.auth.spi",
2202 FT_UINT32
, BASE_HEX
, NULL
, 0,
2203 "Authentication Header Security Parameter Index", HFILL
}
2205 { &hf_a11_aext_auth
,
2206 { "Authenticator", "a11.auth.auth",
2207 FT_BYTES
, BASE_NONE
, NULL
, 0,
2212 FT_STRING
, BASE_NONE
, NULL
, 0,
2216 { "Key", "a11.ext.key",
2217 FT_UINT32
, BASE_HEX
, NULL
, 0,
2218 "Session Key", HFILL
}
2220 { &hf_a11_ses_sidver
,
2221 { "Session ID Version", "a11.ext.sidver",
2222 FT_UINT8
, BASE_DEC
, NULL
, 3,
2225 { &hf_a11_ses_mnsrid
,
2226 { "MNSR-ID", "a11.ext.mnsrid",
2227 FT_UINT16
, BASE_HEX
, NULL
, 0,
2230 { &hf_a11_ses_msid_type
,
2231 { "MSID Type", "a11.ext.msid_type",
2232 FT_UINT16
, BASE_DEC
, VALS(a11_ses_msid_type_vals
), 0,
2235 { &hf_a11_ses_msid_len
,
2236 { "MSID Length", "a11.ext.msid_len",
2237 FT_UINT8
, BASE_DEC
, NULL
, 0,
2241 { "MSID(BCD)", "a11.ext.msid",
2242 FT_STRING
, BASE_NONE
, NULL
, 0,
2245 { &hf_a11_ses_ptype
,
2246 { "Protocol Type", "a11.ext.ptype",
2247 FT_UINT16
, BASE_HEX
, VALS(a11_ses_ptype_vals
), 0,
2251 { "Vendor ID", "a11.ext.vid",
2252 FT_UINT32
, BASE_HEX
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0,
2255 { &hf_a11_vse_apptype
,
2256 { "Application Type", "a11.ext.apptype",
2257 FT_UINT8
, BASE_HEX
, VALS(a11_ext_app
), 0,
2260 { &hf_a11_vse_ppaddr
,
2261 { "Anchor P-P Address", "a11.ext.ppaddr",
2262 FT_IPv4
, BASE_NONE
, NULL
, 0,
2265 { &hf_a11_vse_dormant
,
2266 { "All Dormant Indicator", "a11.ext.dormant",
2267 FT_UINT16
, BASE_HEX
, VALS(a11_ext_dormant
), 0,
2270 { &hf_a11_vse_ehrpd_mode
,
2271 { "eHRPD Mode", "a11.ext.ehrpd.mode",
2272 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_mode
), 0,
2275 { &hf_a11_vse_ehrpd_pmk
,
2276 { "PMK", "a11.ext.ehrpd.pmk",
2277 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_pmk
), 0x04,
2280 { &hf_a11_vse_ehrpd_handoff_info
,
2281 { "E-UTRAN Handoff Info", "a11.ext.ehrpd.handoff_info",
2282 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_handoff_info
), 0x02,
2285 { &hf_a11_vse_ehrpd_tunnel_mode
,
2286 { "Tunnel Mode", "a11.ext.ehrpd.tunnel_mode",
2287 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_tunnel_mode
), 0x01,
2291 { "Reply Code", "a11.ext.code",
2292 FT_UINT8
, BASE_DEC
, VALS(a11_reply_codes
), 0,
2295 /* XXX: Is this the correct filter name ?? */
2297 { "PDSN Code", "a11.ext.code",
2298 FT_UINT8
, BASE_HEX
, VALS(a11_ext_nvose_pdsn_code
), 0,
2301 { &hf_a11_vse_srvopt
,
2302 { "Service Option", "a11.ext.srvopt",
2303 FT_UINT16
, BASE_HEX
, VALS(a11_ext_nvose_srvopt
), 0,
2306 { &hf_a11_vse_panid
,
2307 { "PANID", "a11.ext.panid",
2308 FT_BYTES
, BASE_NONE
, NULL
, 0,
2311 { &hf_a11_vse_canid
,
2312 { "CANID", "a11.ext.canid",
2313 FT_BYTES
, BASE_NONE
, NULL
, 0,
2316 { &hf_a11_vse_qosmode
,
2317 { "QoS Mode", "a11.ext.qosmode",
2318 FT_UINT8
, BASE_HEX
, VALS(a11_ext_nvose_qosmode
), 0,
2321 { &hf_a11_ase_len_type
,
2322 { "Entry Length", "a11.ext.ase.len",
2323 FT_UINT8
, BASE_DEC
, NULL
, 0,
2326 { &hf_a11_ase_srid_type
,
2327 { "Service Reference ID (SRID)", "a11.ext.ase.srid",
2328 FT_UINT8
, BASE_DEC
, NULL
, 0,
2331 { &hf_a11_ase_servopt_type
,
2332 { "Service Option", "a11.ext.ase.srvopt",
2333 FT_UINT16
, BASE_HEX
, VALS(a11_ext_nvose_srvopt
), 0,
2336 { &hf_a11_ase_gre_proto_type
,
2337 { "GRE Protocol Type", "a11.ext.ase.ptype",
2338 FT_UINT16
, BASE_HEX
, VALS(a11_ses_ptype_vals
), 0,
2341 { &hf_a11_ase_gre_key
,
2342 { "GRE Key", "a11.ext.ase.key",
2343 FT_UINT32
, BASE_HEX
, NULL
, 0,
2346 { &hf_a11_ase_pcf_addr_key
,
2347 { "PCF IP Address", "a11.ext.ase.pcfip",
2348 FT_IPv4
, BASE_NONE
, NULL
, 0,
2352 { "SRID", "a11.ext.fqi.srid",
2353 FT_UINT8
, BASE_DEC
, NULL
, 0,
2354 "Forward Flow Entry SRID", HFILL
}
2356 { &hf_a11_fqi_flags
,
2357 { "Flags", "a11.ext.fqi.flags",
2358 FT_UINT8
, BASE_HEX
, NULL
, 0,
2359 "Forward Flow Entry Flags", HFILL
}
2361 { &hf_a11_fqi_flags_ip_flow
,
2362 { "IP Flow Discriminator", "a11.ext.fqi.flags.ip_flow",
2363 FT_BOOLEAN
, 8, TFS(&tfs_enabled_disabled
), A11_FQI_IPFLOW_DISC_ENABLED
,
2366 { &hf_a11_fqi_flags_dscp
,
2367 { "DSCP", "a11.ext.fqi.flags.dscp",
2368 FT_BOOLEAN
, 8, TFS(&tfs_included_not_included
), A11_FQI_DSCP_INCLUDED
,
2371 { &hf_a11_fqi_entry_flag
,
2372 { "DSCP and Flow State", "a11.ext.fqi.entry_flag",
2373 FT_UINT8
, BASE_HEX
, NULL
, 0,
2376 { &hf_a11_fqi_entry_flag_dscp
,
2377 { "DSCP", "a11.ext.fqi.entry_flag.dscp",
2378 FT_UINT8
, BASE_HEX
, NULL
, 0x7E,
2381 { &hf_a11_fqi_entry_flag_flow_state
,
2382 { "Flow State", "a11.ext.fqi.entry_flag.flow_state",
2383 FT_BOOLEAN
, 8, TFS(&tfs_active_inactive
), 0x01,
2386 { &hf_a11_fqi_flowcount
,
2387 { "Forward Flow Count", "a11.ext.fqi.flowcount",
2388 FT_UINT8
, BASE_DEC
, NULL
, 0,
2391 { &hf_a11_fqi_flowid
,
2392 { "Forward Flow Id", "a11.ext.fqi.flowid",
2393 FT_UINT8
, BASE_DEC
, NULL
, 0,
2396 { &hf_a11_fqi_entrylen
,
2397 { "Entry Length", "a11.ext.fqi.entrylen",
2398 FT_UINT8
, BASE_DEC
, NULL
, 0,
2399 "Forward Entry Length", HFILL
}
2402 { &hf_a11_fqi_flowstate
,
2403 { "Forward Flow State", "a11.ext.fqi.flowstate",
2404 FT_UINT8
, BASE_HEX
, NULL
, 0,
2408 { &hf_a11_fqi_requested_qoslen
,
2409 { "Requested QoS Length", "a11.ext.fqi.reqqoslen",
2410 FT_UINT8
, BASE_DEC
, NULL
, 0,
2411 "Forward Requested QoS Length", HFILL
}
2413 { &hf_a11_fqi_flow_priority
,
2414 { "Flow Priority", "a11.ext.fqi.flow_priority",
2415 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2418 { &hf_a11_fqi_num_qos_attribute_set
,
2419 { "Number of QoS Attribute Sets", "a11.ext.fqi.num_qos_attribute_set",
2420 FT_UINT8
, BASE_DEC
, NULL
, 0x0E,
2423 { &hf_a11_fqi_qos_attribute_setlen
,
2424 { "QoS Attribute Set Length", "a11.ext.fqi.qos_attribute_setlen",
2425 FT_UINT16
, BASE_DEC
, NULL
, 0x01E0,
2428 { &hf_a11_fqi_qos_attribute_setid
,
2429 { "QoS Attribute SetID", "a11.ext.fqi.qos_attribute_setid",
2430 FT_UINT16
, BASE_DEC
, NULL
, 0x1FC0,
2433 { &hf_a11_fqi_verbose
,
2434 { "Verbose", "a11.ext.fqi.verbose",
2435 FT_UINT8
, BASE_DEC
, NULL
, 0x20,
2438 { &hf_a11_fqi_flow_profileid
,
2439 { "Flow Profile Id", "a11.ext.fqi.flow_profileid",
2440 FT_UINT24
, BASE_DEC
, NULL
, 0x1FFFE0,
2443 { &hf_a11_fqi_qos_granted_attribute_setid
,
2444 { "QoS Attribute SetID", "a11.ext.fqi.qos_granted_attribute_setid",
2445 FT_UINT8
, BASE_DEC
, NULL
, 0xFE,
2448 { &hf_a11_fqi_granted_qoslen
,
2449 { "Granted QoS Length", "a11.ext.fqi.graqoslen",
2450 FT_UINT8
, BASE_DEC
, NULL
, 0,
2451 "Forward Granted QoS Length", HFILL
}
2453 { &hf_a11_rqi_flow_priority
,
2454 { "Flow Priority", "a11.ext.rqi.flow_priority",
2455 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2458 { &hf_a11_rqi_num_qos_attribute_set
,
2459 { "Number of QoS Attribute Sets", "a11.ext.rqi.num_qos_attribute_set",
2460 FT_UINT8
, BASE_DEC
, NULL
, 0x0E,
2463 { &hf_a11_rqi_qos_attribute_setlen
,
2464 { "QoS Attribute Set Length", "a11.ext.rqi.qos_attribute_setlen",
2465 FT_UINT16
, BASE_DEC
, NULL
, 0x01E0,
2468 { &hf_a11_rqi_qos_attribute_setid
,
2469 { "QoS Attribute SetID", "a11.ext.rqi.qos_attribute_setid",
2470 FT_UINT16
, BASE_DEC
, NULL
, 0x1FC0,
2473 { &hf_a11_rqi_verbose
,
2474 { "Verbose", "a11.ext.rqi.verbose",
2475 FT_UINT8
, BASE_DEC
, NULL
, 0x20,
2478 { &hf_a11_rqi_flow_profileid
,
2479 { "Flow Profile Id", "a11.ext.rqi.flow_profileid",
2480 FT_UINT24
, BASE_DEC
, NULL
, 0x1FFFE0,
2483 { &hf_a11_rqi_qos_granted_attribute_setid
,
2484 { "QoS Attribute SetID", "a11.ext.rqi.qos_granted_attribute_setid",
2485 FT_UINT8
, BASE_DEC
, NULL
, 0xFE,
2489 { "SRID", "a11.ext.rqi.srid",
2490 FT_UINT8
, BASE_DEC
, NULL
, 0,
2491 "Reverse Flow Entry SRID", HFILL
}
2493 { &hf_a11_rqi_flowcount
,
2494 { "Reverse Flow Count", "a11.ext.rqi.flowcount",
2495 FT_UINT8
, BASE_DEC
, NULL
, 0,
2498 { &hf_a11_rqi_flowid
,
2499 { "Reverse Flow Id", "a11.ext.rqi.flowid",
2500 FT_UINT8
, BASE_DEC
, NULL
, 0,
2503 { &hf_a11_rqi_entrylen
,
2504 { "Entry Length", "a11.ext.rqi.entrylen",
2505 FT_UINT8
, BASE_DEC
, NULL
, 0,
2506 "Reverse Flow Entry Length", HFILL
}
2508 { &hf_a11_rqi_entry_flag
,
2509 { "Flags", "a11.ext.rqi.entry_flag",
2510 FT_UINT8
, BASE_HEX
, NULL
, 0,
2513 { &hf_a11_rqi_entry_flag_flow_state
,
2514 { "Flow State", "a11.ext.rqi.entry_flag.flow_state",
2515 FT_BOOLEAN
, 8, TFS(&tfs_active_inactive
), 0x01,
2519 { &hf_a11_rqi_flowstate
,
2520 { "Flow State", "a11.ext.rqi.flowstate",
2521 FT_UINT8
, BASE_HEX
, NULL
, 0,
2522 "Reverse Flow State", HFILL
}
2525 { &hf_a11_rqi_requested_qoslen
,
2526 { "Requested QoS Length", "a11.ext.rqi.reqqoslen",
2527 FT_UINT8
, BASE_DEC
, NULL
, 0,
2528 "Reverse Requested QoS Length", HFILL
}
2531 { &hf_a11_rqi_requested_qos
,
2532 { "Requested QoS", "a11.ext.rqi.reqqos",
2533 FT_BYTES
, BASE_NONE
, NULL
, 0,
2534 "Reverse Requested QoS", HFILL
}
2537 { &hf_a11_rqi_granted_qoslen
,
2538 { "Granted QoS Length", "a11.ext.rqi.graqoslen",
2539 FT_UINT8
, BASE_DEC
, NULL
, 0,
2540 "Reverse Granted QoS Length", HFILL
}
2543 { &hf_a11_rqi_granted_qos
,
2544 { "Granted QoS", "a11.ext.rqi.graqos",
2545 FT_BYTES
, BASE_NONE
, NULL
, 0,
2546 "Reverse Granted QoS", HFILL
}
2549 { &hf_a11_fqui_flowcount
,
2550 { "Forward QoS Update Flow Count", "a11.ext.fqui.flowcount",
2551 FT_UINT8
, BASE_DEC
, NULL
, 0,
2554 { &hf_a11_rqui_flowcount
,
2555 { "Reverse QoS Update Flow Count", "a11.ext.rqui.flowcount",
2556 FT_UINT8
, BASE_DEC
, NULL
, 0,
2559 { &hf_a11_fqui_updated_qoslen
,
2560 { "Forward Updated QoS Sub-Blob Length", "a11.ext.fqui.updatedqoslen",
2561 FT_UINT8
, BASE_DEC
, NULL
, 0,
2564 { &hf_a11_fqui_updated_qos
,
2565 { "Forward Updated QoS Sub-Blob", "a11.ext.fqui.updatedqos",
2566 FT_BYTES
, BASE_NONE
, NULL
, 0,
2569 { &hf_a11_rqui_updated_qoslen
,
2570 { "Reverse Updated QoS Sub-Blob Length", "a11.ext.rqui.updatedqoslen",
2571 FT_UINT8
, BASE_DEC
, NULL
, 0,
2574 { &hf_a11_rqui_updated_qos
,
2575 { "Reverse Updated QoS Sub-Blob", "a11.ext.rqui.updatedqos",
2576 FT_BYTES
, BASE_NONE
, NULL
, 0,
2580 { &hf_a11_subsciber_profile_len
,
2581 { "Subscriber QoS Profile Length", "a11.ext.sqp.profilelen",
2582 FT_BYTES
, BASE_NONE
, NULL
, 0,
2586 { &hf_a11_subsciber_profile
,
2587 { "Subscriber QoS Profile", "a11.ext.sqp.profile",
2588 FT_BYTES
, BASE_NONE
, NULL
, 0,
2592 { &hf_a11_ase_forward_rohc_info_len
,
2593 { "Forward ROHC Info Length", "a11.ext.ase.forwardlen",
2594 FT_UINT8
, BASE_DEC
, NULL
, 0,
2598 { &hf_a11_ase_forward_maxcid
,
2599 { "Forward MAXCID", "a11.ext.ase.maxcid",
2600 FT_UINT16
, BASE_DEC
, NULL
, 0,
2604 { &hf_a11_ase_forward_mrru
,
2605 { "Forward MRRU", "a11.ext.ase.mrru",
2606 FT_UINT16
, BASE_DEC
, NULL
, 0,
2610 { &hf_a11_ase_forward_large_cids
,
2611 { "Forward Large CIDS", "a11.ext.ase.forwardlargecids",
2612 FT_BOOLEAN
, 8, NULL
, 0x80,
2616 { &hf_a11_ase_forward_profile_count
,
2617 { "Forward Profile Count", "a11.ext.ase.profilecount",
2618 FT_UINT8
, BASE_DEC
, NULL
, 0,
2623 { &hf_a11_ase_forward_profile
,
2624 { "Forward Profile", "a11.ext.ase.forwardprofile",
2625 FT_UINT16
, BASE_DEC
, VALS(a11_rohc_profile_vals
), 0,
2629 { &hf_a11_ase_reverse_rohc_info_len
,
2630 { "Reverse ROHC Info Length", "a11.ext.ase.reverselen",
2631 FT_UINT8
, BASE_DEC
, NULL
, 0,
2635 { &hf_a11_ase_reverse_maxcid
,
2636 { "Reverse MAXCID", "a11.ext.ase.revmaxcid",
2637 FT_UINT16
, BASE_DEC
, NULL
, 0,
2641 { &hf_a11_ase_reverse_mrru
,
2642 { "Reverse MRRU", "a11.ext.ase.revmrru",
2643 FT_UINT16
, BASE_DEC
, NULL
, 0,
2647 { &hf_a11_ase_reverse_large_cids
,
2648 { "Reverse Large CIDS", "a11.ext.ase.reverselargecids",
2649 FT_UINT8
, BASE_DEC
, NULL
, 128,
2653 { &hf_a11_ase_reverse_profile_count
,
2654 { "Reverse Profile Count", "a11.ext.ase.revprofilecount",
2655 FT_UINT8
, BASE_DEC
, NULL
, 0,
2660 { &hf_a11_ase_reverse_profile
,
2661 { "Reverse Profile", "a11.ext.ase.reverseprofile",
2662 FT_UINT16
, BASE_DEC
, VALS(a11_rohc_profile_vals
), 0,
2665 { &hf_a11_aut_flow_prof_sub_type
,
2666 { "Sub type", "a11.aut_flow_prof.sub_type",
2667 FT_UINT8
, BASE_DEC
, VALS(a11_aut_flow_prof_subtype_vals
), 0,
2670 { &hf_a11_aut_flow_prof_sub_type_len
,
2671 { "Length", "a11.aut_flow_prof.length",
2672 FT_UINT8
, BASE_DEC
, NULL
, 0,
2675 { &hf_a11_aut_flow_prof_sub_type_value
,
2676 { "Value", "a11.aut_flow_prof.value",
2677 FT_UINT16
, BASE_DEC
, NULL
, 0,
2680 { &hf_a11_serv_opt_prof_max_serv
,
2681 { "Service-Connections-Per-Link-flow", "a11.serv_opt_prof.scplf",
2682 FT_UINT32
, BASE_DEC
, NULL
, 0,
2686 { "Sub-Type", "a11.sub_type",
2687 FT_UINT8
, BASE_DEC
, NULL
, 0,
2690 { &hf_a11_sub_type_length
,
2691 { "Sub-Type Length", "a11.sub_type_length",
2692 FT_UINT8
, BASE_DEC
, NULL
, 0,
2696 { "Service Option", "a11.serviceoption",
2697 FT_UINT8
, BASE_DEC
, NULL
, 0,
2700 { &hf_a11_max_num_serv_opt
,
2701 { "Max number of service instances of Service Option", "a11.serviceoption",
2702 FT_UINT8
, BASE_DEC
, NULL
, 0,
2705 { &hf_a11_bcmcs_stype
,
2706 { "Protocol Type", "a11.ext.bcmcs.ptype",
2707 FT_UINT8
, BASE_HEX
, VALS(a11_bcmcs_stype_vals
), 0,
2710 { &hf_a11_bcmcs_entry_len
,
2711 { "Entry length", "a11.ext.bcmcs.entry_len",
2712 FT_UINT8
, BASE_DEC
, NULL
, 0,
2718 /* Setup protocol subtree array */
2719 static gint
*ett
[] = {
2727 &ett_a11_fqi_flowentry
,
2728 &ett_a11_fqi_requestedqos
,
2729 &ett_a11_fqi_qos_attribute_set
,
2730 &ett_a11_fqi_grantedqos
,
2731 &ett_a11_rqi_flowentry
,
2732 &ett_a11_rqi_requestedqos
,
2733 &ett_a11_rqi_qos_attribute_set
,
2734 &ett_a11_rqi_grantedqos
,
2736 &ett_a11_fqi_entry_flags
,
2737 &ett_a11_rqi_entry_flags
,
2738 &ett_a11_fqui_flowentry
,
2739 &ett_a11_rqui_flowentry
,
2740 &ett_a11_subscriber_profile
,
2741 &ett_a11_forward_rohc
,
2742 &ett_a11_reverse_rohc
,
2743 &ett_a11_forward_profile
,
2744 &ett_a11_reverse_profile
,
2745 &ett_a11_aut_flow_profile_ids
,
2746 &ett_a11_bcmcs_entry
,
2749 static ei_register_info ei
[] = {
2750 { &ei_a11_sub_type_length_not2
, { "a11.sub_type_length.bad", PI_PROTOCOL
, PI_WARN
, "Sub-Type Length should be at least 2", EXPFILL
}},
2753 expert_module_t
* expert_a11
;
2755 /* Register the protocol name and description */
2756 proto_a11
= proto_register_protocol("3GPP2 A11", "3GPP2 A11", "a11");
2758 /* Register the dissector by name */
2759 new_register_dissector("a11", dissect_a11
, proto_a11
);
2761 /* Required function calls to register the header fields and subtrees used */
2762 proto_register_field_array(proto_a11
, hf
, array_length(hf
));
2763 proto_register_subtree_array(ett
, array_length(ett
));
2765 expert_a11
= expert_register_protocol(proto_a11
);
2766 expert_register_field_array(expert_a11
, ei
, array_length(ei
));
2770 proto_reg_handoff_a11(void)
2772 dissector_handle_t a11_handle
;
2774 a11_handle
= find_dissector("a11");
2775 dissector_add_uint("udp.port", UDP_PORT_3GA11
, a11_handle
);
2777 /* 3GPP2-Service-Option-Profile(74) */
2778 radius_register_avp_dissector(VENDOR_THE3GPP2
, 74, dissect_3gpp2_service_option_profile
);
2779 /* 3GPP2-Authorized-Flow-Profile-IDs(131) */
2780 radius_register_avp_dissector(VENDOR_THE3GPP2
, 131, dissect_3gpp2_radius_aut_flow_profile_ids
);