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>
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * SPDX-License-Identifier: GPL-2.0-or-later
21 * https://www.3gpp2.org/Public_html/Specs/A.S0009-C_v3.0_100621.pdf
22 * https://www.3gpp2.org/Public_html/Specs/A.S0017-D_v1.0_070624.pdf (IOS 5.1)
23 * https://www.3gpp2.org/Public_html/Specs/A.S0017-D_v2.0_090825.pdf
24 * https://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
25 * https://www.3gpp2.org/Public_html/Specs/A00-20110419-002Er0%20A.S0008-C%20v4.0%20HRPD%20IOS-Pub_20110513.pdf
26 * https://www.3gpp2.org/Public_html/Specs/A.S0022-0_v2.0_100426.pdf
28 * https://web.archive.org/web/20070812071100/http://3gpp2.org:80/Public_html/specs/A.S0017-0_v2.0.pdf
33 #include <epan/packet.h>
34 #include <epan/expert.h>
35 /* Include vendor id translation */
36 #include <epan/sminmpec.h>
37 #include <epan/addr_resolv.h>
40 #include "packet-radius.h"
42 /* Forward declarations */
43 void proto_register_a11(void);
44 void proto_reg_handoff_a11(void);
46 static int registration_request_msg
;
48 /* Initialize the protocol and registered fields */
50 static int hf_a11_type
;
51 static int hf_a11_flags
;
59 static int hf_a11_code
;
60 static int hf_a11_status
;
61 static int hf_a11_life
;
62 static int hf_a11_homeaddr
;
63 static int hf_a11_haaddr
;
64 static int hf_a11_coa
;
65 static int hf_a11_ident
;
66 static int hf_a11_ext_type
;
67 static int hf_a11_ext_stype
;
68 static int hf_a11_ext_len
;
69 static int hf_a11_ext
;
70 static int hf_a11_aext_spi
;
71 static int hf_a11_aext_auth
;
72 static int hf_a11_next_nai
;
74 static int hf_a11_ses_key
;
75 static int hf_a11_ses_mnsrid
;
76 static int hf_a11_ses_sidver
;
77 static int hf_a11_ses_msid_type
;
78 static int hf_a11_ses_msid_len
;
79 static int hf_a11_ses_msid
;
80 static int hf_a11_ses_ptype
;
82 static int hf_a11_vse_vid
;
83 static int hf_a11_vse_apptype
;
84 static int hf_a11_vse_canid
;
85 static int hf_a11_vse_panid
;
86 static int hf_a11_vse_srvopt
;
87 static int hf_a11_vse_qosmode
;
88 static int hf_a11_vse_pdit
;
89 static int hf_a11_vse_session_parameter
;
90 static int hf_a11_vse_code
;
91 static int hf_a11_vse_dormant
;
92 static int hf_a11_vse_ehrpd_mode
;
93 static int hf_a11_vse_ehrpd_pmk
;
94 static int hf_a11_vse_ehrpd_handoff_info
;
95 static int hf_a11_vse_ehrpd_tunnel_mode
;
96 static int hf_a11_vse_ppaddr
;
98 /* Additional Session Information */
99 static int hf_a11_ase_len_type
;
100 static int hf_a11_ase_srid_type
;
101 static int hf_a11_ase_servopt_type
;
102 static int hf_a11_ase_gre_proto_type
;
103 static int hf_a11_ase_gre_key
;
104 static int hf_a11_ase_pcf_addr_key
;
106 static int hf_a11_ase_forward_rohc_info_len
;
107 static int hf_a11_ase_forward_maxcid
;
108 static int hf_a11_ase_forward_mrru
;
109 static int hf_a11_ase_forward_large_cids
;
110 static int hf_a11_ase_forward_profile_count
;
111 static int hf_a11_ase_forward_profile
;
113 static int hf_a11_ase_reverse_rohc_info_len
;
114 static int hf_a11_ase_reverse_maxcid
;
115 static int hf_a11_ase_reverse_mrru
;
116 static int hf_a11_ase_reverse_large_cids
;
117 static int hf_a11_ase_reverse_profile_count
;
118 static int hf_a11_ase_reverse_profile
;
119 static int hf_a11_aut_flow_prof_sub_type
;
120 static int hf_a11_aut_flow_prof_sub_type_len
;
121 static int hf_a11_aut_flow_prof_sub_type_value
;
122 static int hf_a11_serv_opt_prof_max_serv
;
123 static int hf_a11_sub_type
;
124 static int hf_a11_sub_type_length
;
125 static int hf_a11_serv_opt
;
126 static int hf_a11_max_num_serv_opt
;
127 static int hf_a11_bcmcs_stype
;
128 static int hf_a11_bcmcs_entry_len
;
130 /* Forward QoS Information */
131 static int hf_a11_fqi_srid
;
132 static int hf_a11_fqi_flags
;
133 static int hf_a11_fqi_flags_ip_flow
;
134 static int hf_a11_fqi_flags_dscp
;
135 static int hf_a11_fqi_entry_flag
;
136 static int hf_a11_fqi_entry_flag_dscp
;
137 static int hf_a11_fqi_entry_flag_flow_state
;
138 static int hf_a11_fqi_flowcount
;
139 static int hf_a11_fqi_flowid
;
140 static int hf_a11_fqi_entrylen
;
141 /* static int hf_a11_fqi_flowstate; */
142 static int hf_a11_fqi_requested_qoslen
;
143 static int hf_a11_fqi_flow_priority
;
144 static int hf_a11_fqi_num_qos_attribute_set
;
145 static int hf_a11_fqi_qos_attribute_setlen
;
146 static int hf_a11_fqi_qos_attribute_setid
;
147 static int hf_a11_fqi_qos_granted_attribute_setid
;
148 static int hf_a11_fqi_verbose
;
149 static int hf_a11_fqi_flow_profileid
;
150 static int hf_a11_fqi_granted_qoslen
;
152 /* Reverse QoS Information */
153 static int hf_a11_rqi_srid
;
154 static int hf_a11_rqi_flowcount
;
155 static int hf_a11_rqi_flowid
;
156 static int hf_a11_rqi_entrylen
;
157 static int hf_a11_rqi_entry_flag
;
158 static int hf_a11_rqi_entry_flag_flow_state
;
159 /* static int hf_a11_rqi_flowstate; */
160 static int hf_a11_rqi_requested_qoslen
;
161 static int hf_a11_rqi_flow_priority
;
162 static int hf_a11_rqi_num_qos_attribute_set
;
163 static int hf_a11_rqi_qos_attribute_setlen
;
164 static int hf_a11_rqi_qos_attribute_setid
;
165 static int hf_a11_rqi_qos_granted_attribute_setid
;
166 static int hf_a11_rqi_verbose
;
167 static int hf_a11_rqi_flow_profileid
;
168 /* static int hf_a11_rqi_requested_qos; */
169 static int hf_a11_rqi_granted_qoslen
;
170 /* static int hf_a11_rqi_granted_qos; */
172 /* QoS Update Information */
173 static int hf_a11_fqui_flowcount
;
174 static int hf_a11_rqui_flowcount
;
175 static int hf_a11_fqui_updated_qoslen
;
176 static int hf_a11_fqui_updated_qos
;
177 static int hf_a11_rqui_updated_qoslen
;
178 static int hf_a11_rqui_updated_qos
;
179 static int hf_a11_subscriber_profile
;
180 /* static int hf_a11_subscriber_profile_len; */
182 /* Initialize the subtree pointers */
184 static int ett_a11_flags
;
185 static int ett_a11_ext
;
186 static int ett_a11_exts
;
187 static int ett_a11_radius
;
188 static int ett_a11_radiuses
;
189 static int ett_a11_ase
;
190 static int ett_a11_fqi_flowentry
;
191 static int ett_a11_fqi_requestedqos
;
192 static int ett_a11_fqi_qos_attribute_set
;
193 static int ett_a11_fqi_grantedqos
;
194 static int ett_a11_rqi_flowentry
;
195 static int ett_a11_rqi_requestedqos
;
196 static int ett_a11_rqi_qos_attribute_set
;
197 static int ett_a11_rqi_grantedqos
;
198 static int ett_a11_fqi_flags
;
199 static int ett_a11_fqi_entry_flags
;
200 static int ett_a11_rqi_entry_flags
;
201 static int ett_a11_fqui_flowentry
;
202 static int ett_a11_rqui_flowentry
;
203 static int ett_a11_subscriber_profile
;
204 static int ett_a11_forward_rohc
;
205 static int ett_a11_reverse_rohc
;
206 static int ett_a11_forward_profile
;
207 static int ett_a11_reverse_profile
;
208 static int ett_a11_aut_flow_profile_ids
;
209 static int ett_a11_bcmcs_entry
;
211 static expert_field ei_a11_sub_type_length_not2
;
212 static expert_field ei_a11_sse_too_short
;
213 static expert_field ei_a11_bcmcs_too_short
;
214 static expert_field ei_a11_entry_data_not_dissected
;
215 static expert_field ei_a11_session_data_not_dissected
;
217 static dissector_handle_t a11_handle
;
219 /* Port used for Mobile IP based Tunneling Protocol (A11) */
220 #define UDP_PORT_3GA11 699 /* Not IANA registered */
223 REGISTRATION_REQUEST
= 1,
224 REGISTRATION_REPLY
= 3,
225 REGISTRATION_UPDATE
= 20,
226 REGISTRATION_ACK
= 21,
229 CAPABILITIES_INFO
= 24,
230 CAPABILITIES_INFO_ACK
= 25,
231 BC_SERVICE_REQUEST
= 0xb0, /* 3GPP2 A.S0019-A v2.0 */
232 BC_SERVICE_REPLY
= 0xb1,
233 BC_REGISTRATION_REQUEST
= 0xb2,
234 BC_REGISTRATION_REPLY
= 0xb3,
235 BC_REGISTRATION_UPDATE
= 0xb4,
236 BC_REGISTRATION_ACK
= 0xb5
240 static const value_string a11_types
[] = {
241 {REGISTRATION_REQUEST
, "Registration Request"},
242 {REGISTRATION_REPLY
, "Registration Reply"},
243 {REGISTRATION_UPDATE
, "Registration Update"},
244 {REGISTRATION_ACK
, "Registration Ack"},
245 {SESSION_UPDATE
, "Session Update"},
246 {SESSION_ACK
, "Session Update Ack"},
247 {CAPABILITIES_INFO
, "Capabilities Info"},
248 {CAPABILITIES_INFO_ACK
, "Capabilities Info Ack"},
249 {BC_SERVICE_REQUEST
, "BC Service Request"},
250 {BC_SERVICE_REPLY
, "BC Service Response"},
251 {BC_REGISTRATION_REQUEST
, "BC Registration RequestT"},
252 {BC_REGISTRATION_REPLY
, "BC Registration Reply"},
253 {BC_REGISTRATION_UPDATE
, "BC Registration Update"},
254 {BC_REGISTRATION_ACK
, "BC Registration Acknowledge"},
258 static value_string_ext a11_types_ext
= VALUE_STRING_EXT_INIT(a11_types
);
260 static const value_string a11_ses_ptype_vals
[] = {
261 {0x8881, "Unstructured Byte Stream"},
262 {0x88D2, "3GPP2 Packet"},
266 static const value_string a11_reply_codes
[]= {
268 {9, "Connection Update"},
270 {1, "Reg Accepted, but Simultaneous Bindings Unsupported."},
271 {64, "Reg Deny (FA)- Unspecified Reason"},
272 {65, "Reg Deny (FA)- Administratively Prohibited"},
273 {66, "Reg Deny (FA)- Insufficient Resources"},
274 {67, "Reg Deny (FA)- MN failed Authentication"},
275 {68, "Reg Deny (FA)- HA failed Authentication"},
276 {69, "Reg Deny (FA)- Requested Lifetime too Long"},
277 {70, "Reg Deny (FA)- Poorly Formed Request"},
278 {71, "Reg Deny (FA)- Poorly Formed Reply"},
279 {72, "Reg Deny (FA)- Requested Encapsulation Unavailable"},
280 {73, "Reg Deny (FA)- VJ Compression Unavailable"},
281 {74, "Reg Deny (FA)- Requested Reverse Tunnel Unavailable"},
282 {75, "Reg Deny (FA)- Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
283 {76, "Reg Deny (FA)- Mobile Node Too Distant"},
284 {79, "Reg Deny (FA)- Delivery Style Not Supported"},
285 {80, "Reg Deny (FA)- Home Network Unreachable"},
286 {81, "Reg Deny (FA)- HA Host Unreachable"},
287 {82, "Reg Deny (FA)- HA Port Unreachable"},
288 {88, "Reg Deny (FA)- HA Unreachable"},
289 {96, "Reg Deny (FA)(NAI) - Non Zero Home Address Required"},
290 {97, "Reg Deny (FA)(NAI) - Missing NAI"},
291 {98, "Reg Deny (FA)(NAI) - Missing Home Agent"},
292 {99, "Reg Deny (FA)(NAI) - Missing Home Address"},
294 {128, "Registration Denied - Unspecified"}, /* 3GPP2 A.S0017-D v4.0 */
295 {129, "Registration Denied - Administratively Prohibited"},
296 {130, "Registration Denied - Insufficient Resources"},
297 {131, "Registration Denied - PCF Failed Authentication"},
298 /* {132, "Reg Deny (HA)- FA Failed Authentication"}, */
299 {133, "Registration Denied - Identification Mismatch"},
300 {134, "Registration Denied - Poorly Formed Request"},
301 /* {135, "Reg Deny (HA)- Too Many Simultaneous Bindings"}, */
302 {136, "Registration Denied - Unknown PDSN Address"},
303 {137, "Registration Denied - Requested Reverse Tunnel Unavailable"},
304 {138, "Registration Denied - Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
305 {139, "Registration Denied - service option not supported"},
306 {140, "Registration Denied - no CID available"},
307 {141, "Registration Denied - unsupported Vendor ID / Application Type in CVSE"},
308 {142, "Registration Denied - nonexistent A10 or IP flow"},
311 static value_string_ext a11_reply_codes_ext
= VALUE_STRING_EXT_INIT(a11_reply_codes
);
313 static const value_string a11_ack_status
[]= {
314 {0x00, "Update Accepted"},
315 {0x01, "Partial QoS updated"},
316 {0x80, "Update Denied - reason unspecified"},
317 {0x83, "Update Denied - sending node failed authentication"},
318 {0x85, "Update Denied - identification mismatch)"},
319 {0x86, "Update Denied - poorly formed registration update"},
320 {0xc9, "Update Denied - Session Parameter Not Updated"},
321 {0xca, "Update Denied - PMK not requested"},
322 {0xfd, "Update Denied - QoS profileID not supported"},
323 {0xfe, "Update Denied - insufficient resources"},
324 {0xff, "Update Denied - handoff in progress"},
327 static value_string_ext a11_ack_status_ext
= VALUE_STRING_EXT_INIT(a11_ack_status
);
333 GEN_AUTH_EXT
= 36, /* RFC 3012 */
334 OLD_CVSE_EXT
= 37, /* RFC 3115 */
335 CVSE_EXT
= 38, /* RFC 3115 */
336 SS_EXT
= 39, /* 3GPP2 IOS4.2 */
337 RU_AUTH_EXT
= 40, /* 3GPP2 IOS4.2 */
339 MF_CHALLENGE_EXT
= 132, /* RFC 3012 */
340 OLD_NVSE_EXT
= 133, /* RFC 3115 */
341 NVSE_EXT
= 134, /* RFC 3115 */
342 BCMCS_EXT
= 0xb0 /* 3GPP2 A.S0019-A v2.0 */
346 static const value_string a11_ext_types
[]= {
347 {MH_AUTH_EXT
, "Mobile-Home Authentication Extension"},
348 {MF_AUTH_EXT
, "Mobile-Foreign Authentication Extension"},
349 {FH_AUTH_EXT
, "Foreign-Home Authentication Extension"},
350 {GEN_AUTH_EXT
, "Generalized Mobile-IP Authentication Extension"},
351 {OLD_CVSE_EXT
, "Critical Vendor/Organization Specific Extension (OLD)"},
352 {CVSE_EXT
, "Critical Vendor/Organization Specific Extension"},
353 {SS_EXT
, "Session Specific Extension"},
354 {RU_AUTH_EXT
, "Registration Update Authentication Extension"},
355 {MN_NAI_EXT
, "Mobile Node NAI Extension"},
356 {MF_CHALLENGE_EXT
, "MN-FA Challenge Extension"},
357 {OLD_NVSE_EXT
, "Normal Vendor/Organization Specific Extension (OLD)"},
358 {NVSE_EXT
, "Normal Vendor/Organization Specific Extension"},
359 {BCMCS_EXT
, "BCMCS Session Extension"},
362 static value_string_ext a11_ext_types_ext
= VALUE_STRING_EXT_INIT(a11_ext_types
);
364 static const value_string a11_ext_stypes
[]= {
365 {1, "MN AAA Extension"},
369 static const value_string a11_ext_nvose_qosmode
[]= {
370 {0x00, "QoS Disabled"},
371 {0x01, "QoS Enabled"},
375 static const value_string a11_ext_nvose_srvopt
[]= {
376 {0x0021, "3G High Speed Packet Data"},
377 {0x003B, "HRPD Main Service Connection"},
378 {0x003C, "Link Layer Assisted Header Removal"},
379 {0x003D, "Link Layer Assisted Robust Header Compression"},
380 {0x0040, "HRPD Accounting Records Identifier"}, /* 3GPP2 A.S0009-C v4.0 */
381 {0x0043, "HRPD Packet Data IP Service where Higher Layer Protocol is IP or ROHC"}, /* 3GPP2 A.S0009-C v4.0 */
382 {0x0047, "HRPD AltPPP operation"}, /* 3GPP2 A.S0009-C v4.0 */
386 static const value_string a11_ext_nvose_pdsn_code
[]= {
387 {0xc1, "Connection Release - reason unspecified"},
388 {0xc2, "Connection Release - PPP time-out"},
389 {0xc3, "Connection Release - registration time-out"},
390 {0xc4, "Connection Release - PDSN error"},
391 {0xc5, "Connection Release - inter-PCF handoff"},
392 {0xc6, "Connection Release - inter-PDSN handoff"},
393 {0xc7, "Connection Release - PDSN OAM&P intervention"},
394 {0xc8, "Connection Release - accounting error"},
395 {0xca, "Connection Release - user (NAI) failed authentication"},
399 static const value_string a11_ext_dormant
[]= {
400 {0x0000, "all MS packet data service instances are dormant"},
405 static const true_false_string a11_tfs_ehrpd_mode
= {
406 "eAT is operating in evolved mode",
407 "eAT is operating in legacy mode"
410 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
411 static const true_false_string a11_tfs_ehrpd_pmk
= {
412 "eAT is requesting PMK information",
413 "eAT is not requesting PMK information",
416 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
417 static const true_false_string a11_tfs_ehrpd_handoff_info
= {
418 "eAT is requesting information for E-UTRAN handoff",
419 "eAT is not requesting information for E-UTRAN handoff",
422 /* 3GPP2 A.S0022-0 v2.0, section 4.2.14 */
423 static const true_false_string a11_tfs_ehrpd_tunnel_mode
= {
424 "eAT is communicating via tunnel from non-eHRPD",
425 "eAT is communicating directly via eHRPD",
428 static const value_string a11_ext_app
[]= {
429 {0x0101, "Accounting (RADIUS)"},
430 {0x0102, "Accounting (DIAMETER)"},
431 {0x0201, "Mobility Event Indicator (Mobility)"},
432 {0x0301, "Data Available Indicator (Data Ready to Send)"},
433 {0x0401, "Access Network Identifiers (ANID)"},
434 {0x0501, "PDSN Identifiers (Anchor P-P Address)"},
435 {0x0601, "Indicators (All Dormant Indicator)"},
436 {0x0602, "Indicators (eHRPD Mode)"}, /* 3GPP2 A.S0022-B v1.0 */
437 {0x0603, "Indicators (eHRPD Indicators)"}, /* 3GPP2 A.S0009-C v4.0 */
438 {0x0701, "PDSN Code (PDSN Code)"},
439 {0x0801, "Session Parameter (RN-PDIT:Radio Network Packet Data Inactivity Timer)"},
440 {0x0802, "Session Parameter (Always On)"},
441 {0x0803, "Session Parameter (QoS Mode)"},
442 {0x0901, "Service Option (Service Option Value)"},
443 {0x0A01, "PDSN Enabled Features (Flow Control Enabled)"},
444 {0x0A02, "PDSN Enabled Features (Packet Boundary Enabled)"},
445 {0x0A03, "PDSN Enabled Features (GRE Segmentation Enabled)"},
446 {0x0B01, "PCF Enabled Features (Short Data Indication Supported)"},
447 {0x0B02, "PCF Enabled Features (GRE Segmentation Enabled)"},
448 {0x0C01, "Additional Session Info"},
449 {0x0D01, "QoS Information (Forward QoS Information)"},
450 {0x0D02, "QoS Information (Reverse QoS Information)"},
451 {0x0D03, "QoS Information (Subscriber QoS Profile)"},
452 {0x0D04, "QoS Information (Forward Flow Priority Update Information)"},
453 {0x0D05, "QoS Information (Reverse Flow Priority Update Information)"},
454 {0x0DFE, "QoS Information (Forward QoS Update Information)"},
455 {0x0DFF, "QoS Information (Reverse QoS Update Information)"},
456 {0x0E01, "Header Compression (ROHC Configuration Parameters)"},
457 {0x0F01, "Information (Cause Code)"},
458 {0x0F04, "Information (Additional HSGW Information)"},
459 {0x1001, "HRPD Indicators (Emergency Services)"},
460 {0xB001, "System Identifiers (BSID / HRPD Subnet)"},
463 static value_string_ext a11_ext_app_ext
= VALUE_STRING_EXT_INIT(a11_ext_app
);
466 static const value_string a11_airlink_types
[]= {
467 {1, "Session Setup (Y=1)"},
468 {2, "Active Start (Y=2)"},
469 {3, "Active Stop (Y=3)"},
470 {4, "Short Data Burst (Y=4)"},
475 static const value_string a11_bcmcs_stype_vals
[] = {
476 {1, "BCMCS Flow and Registration Information"},
477 {2, "Session Information"},
478 {3, "BCMCS Registration Result"},
479 {4, "Enhanced Session Information"},
483 #define A11_MSG_MSID_ELEM_LEN_MAX 8
484 #define A11_MSG_MSID_LEN_MAX 15
488 /* XXXX ToDo This should be imported from packet-rohc.h */
489 static const value_string a11_rohc_profile_vals
[] =
491 { 0x0000, "ROHC uncompressed" }, /*RFC 5795*/
492 { 0x0001, "ROHC RTP" }, /*RFC 3095*/
493 { 0x0002, "ROHC UDP" }, /*RFC 3095*/
494 { 0x0003, "ROHC ESP" }, /*RFC 3095*/
495 { 0x0004, "ROHC IP" }, /*RFC 3843*/
496 { 0x0005, "ROHC LLA" }, /*RFC 3242*/
497 { 0x0006, "ROHC TCP" }, /*RFC 4996*/
498 { 0x0007, "ROHC RTP/UDP-Lite" }, /*RFC 4019*/
499 { 0x0008, "ROHC UDP-Lite" }, /*RFC 4019*/
500 { 0x0101, "ROHCv2 RTP" }, /*RFC 5225*/
501 { 0x0102, "ROHCv2 UDP" }, /*RFC 5225*/
502 { 0x0103, "ROHCv2 ESP" }, /*RFC 5225*/
503 { 0x0104, "ROHCv2 IP" }, /*RFC 5225*/
504 { 0x0105, "ROHC LLA with R-mode" }, /*RFC 3408*/
505 { 0x0107, "ROHCv2 RTP/UDP-Lite" }, /*RFC 5225*/
506 { 0x0108, "ROHCv2 UDP-Lite" }, /*RFC 5225*/
509 static value_string_ext a11_rohc_profile_vals_ext
= VALUE_STRING_EXT_INIT(a11_rohc_profile_vals
);
511 /* decode MSID from SSE */
513 /* MSID is encoded in Binary Coded Decimal format
514 First Byte: [odd-indicator] [Digit 1]
515 Second Byte: [Digit 3] [Digit 2]
518 Last Byte: [Digit N] [Digit N-1]
520 Last Byte: [F] [Digit N]
524 /* 3GPP2 A.S0008-C v4.0, 3GPP2 A.S0019-A v2.0 */
525 static const value_string a11_ses_msid_type_vals
[] =
527 { 0x0000, "No Identity Code" },
531 { 0x0008, "BCMCS Flow ID" },
535 static int * const a11_flags
[] = {
547 decode_sse(proto_tree
*ext_tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, int offset
, unsigned ext_len
, proto_item
*ext_len_item
)
550 uint8_t msid_start_offset
;
551 uint8_t msid_num_digits
;
557 /* Decode Protocol Type */
559 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
560 "Cannot decode Protocol Type - SSE too short");
563 proto_tree_add_item(ext_tree
, hf_a11_ses_ptype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
567 /* Decode Session Key */
569 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
570 "Cannot decode Session Key - SSE too short");
573 proto_tree_add_item(ext_tree
, hf_a11_ses_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
578 /* Decode Session Id Version */
580 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
581 "Cannot decode Session Id Version - SSE too short");
584 proto_tree_add_item(ext_tree
, hf_a11_ses_sidver
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
591 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
592 "Cannot decode SRID - SSE too short");
595 proto_tree_add_item(ext_tree
, hf_a11_ses_mnsrid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
601 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
602 "Cannot decode MSID Type - SSE too short");
605 proto_tree_add_item(ext_tree
, hf_a11_ses_msid_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
612 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
613 "Cannot decode MSID Length - SSE too short");
616 msid_len
= tvb_get_uint8(tvb
, offset
);
617 proto_tree_add_item(ext_tree
, hf_a11_ses_msid_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
622 if (ext_len
< msid_len
) {
623 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_sse_too_short
,
624 "Cannot decode MSID - SSE too short");
628 msid_digits
= (char *)wmem_alloc(pinfo
->pool
, A11_MSG_MSID_LEN_MAX
+2);
629 msid_start_offset
= offset
;
631 if (msid_len
> A11_MSG_MSID_ELEM_LEN_MAX
) {
632 p_msid
= "MSID is too long";
633 } else if (msid_len
== 0) {
634 p_msid
= "MSID is too short";
636 /* Decode the BCD digits */
637 for (msid_index
=0; msid_index
<msid_len
; msid_index
++) {
638 uint8_t msid_digit
= tvb_get_uint8(tvb
, offset
);
642 msid_digits
[msid_index
*2] = (msid_digit
& 0x0F) + '0';
643 msid_digits
[(msid_index
*2) + 1] = ((msid_digit
& 0xF0) >> 4) + '0';
646 odd_even_ind
= (msid_digits
[0] == '1');
649 msid_num_digits
= ((msid_len
-1) * 2) + 1;
651 msid_num_digits
= (msid_len
-1) * 2;
654 msid_digits
[msid_num_digits
+ 1] = '\0';
655 p_msid
= msid_digits
+ 1;
658 proto_tree_add_string(ext_tree
, hf_a11_ses_msid
, tvb
, msid_start_offset
, msid_len
, p_msid
);
662 decode_bcmcs(proto_tree
* ext_tree
, packet_info
*pinfo
, tvbuff_t
* tvb
, int offset
, unsigned ext_len
, proto_item
*ext_len_item
)
665 uint8_t bc_stype
, entry_len
;
667 /* Decode Protocol Type */
669 expert_add_info_format(pinfo
, ext_len_item
, &ei_a11_bcmcs_too_short
,
670 "Cannot decode Protocol Type - BCMCS too short");
674 bc_stype
=tvb_get_uint8(tvb
, offset
);
675 proto_tree_add_item(ext_tree
, hf_a11_bcmcs_stype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
683 proto_tree
*entry_tree
;
684 while (ext_len
> 0) {
686 entry_len
= tvb_get_uint8(tvb
, offset
);
687 if (entry_len
== 0) {
691 ext_len
= ext_len
- entry_len
;
693 entry_tree
= proto_tree_add_subtree_format(ext_tree
, tvb
, offset
, entry_len
,
694 ett_a11_bcmcs_entry
, NULL
, "BCMCS Information Entry %u", i
);
695 proto_tree_add_item(entry_tree
, hf_a11_bcmcs_entry_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
697 proto_tree_add_expert(ext_tree
, pinfo
, &ei_a11_entry_data_not_dissected
, tvb
, offset
, entry_len
-1);
698 offset
= offset
+entry_len
;
703 proto_tree_add_expert_format(ext_tree
, pinfo
, &ei_a11_session_data_not_dissected
, tvb
, offset
, -1, "Session Data Type %u Not dissected yet", bc_stype
);
710 /* RADIUS attributed */
712 dissect_a11_radius( tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
, int app_len
)
714 proto_tree
*radius_tree
;
716 /* None of this really matters if we don't have a tree */
720 /* return if length of extension is not valid */
721 if (tvb_reported_length_remaining(tvb
, offset
) < 12) {
725 radius_tree
= proto_tree_add_subtree(tree
, tvb
, offset
- 2, app_len
, ett_a11_radiuses
, NULL
, "Airlink Record");
727 dissect_attribute_value_pairs(radius_tree
, pinfo
, tvb
, offset
, app_len
-2, NULL
);
732 /* X.S0011-005-D v2.0 Service Option Profile */
734 dissect_3gpp2_service_option_profile(proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
)
737 uint8_t sub_type
, sub_type_length
;
740 /* Maximum service connections/Link Flows total 32 bit*/
741 proto_tree_add_item(tree
, hf_a11_serv_opt_prof_max_serv
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
744 while (tvb_reported_length_remaining(tvb
,offset
) > 0) {
745 sub_type_length
= tvb_get_uint8(tvb
,offset
+1);
747 sub_type
= tvb_get_uint8(tvb
,offset
);
748 proto_tree_add_item(tree
, hf_a11_sub_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
750 pi
= proto_tree_add_item(tree
, hf_a11_sub_type_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
752 if (sub_type_length
< 2) {
753 expert_add_info(pinfo
, pi
, &ei_a11_sub_type_length_not2
);
757 proto_tree_add_item(tree
, hf_a11_serv_opt
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
759 /* Max number of service instances of Service Option n */
760 proto_tree_add_item(tree
, hf_a11_max_num_serv_opt
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
764 offset
= offset
+ sub_type_length
-2;
771 static const value_string a11_aut_flow_prof_subtype_vals
[] = {
772 {0x1, "ProfileID-Forward"},
773 {0x2, "ProfileID-Reverse"},
774 {0x3, "ProfileID-Bi-direction"},
778 /* X.S0011-005-D v2.0 Authorized Flow Profile IDs for the User */
780 dissect_3gpp2_radius_aut_flow_profile_ids(proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
)
782 proto_tree
*sub_tree
;
785 uint8_t sub_type
, sub_type_length
;
788 while (tvb_reported_length_remaining(tvb
,offset
) > 0) {
789 sub_type
= tvb_get_uint8(tvb
,offset
);
790 sub_type_length
= tvb_get_uint8(tvb
,offset
+1);
791 /* value is 2 octets */
792 value
= tvb_get_ntohs(tvb
,offset
+2);
793 sub_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, sub_type_length
, ett_a11_aut_flow_profile_ids
, &item
,
794 "%s = %u", val_to_str_const(sub_type
, a11_aut_flow_prof_subtype_vals
, "Unknown"), value
);
796 proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
798 item
= proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
799 if (sub_type_length
< 2) {
800 expert_add_info(pinfo
, item
, &ei_a11_sub_type_length_not2
);
804 proto_tree_add_item(sub_tree
, hf_a11_aut_flow_prof_sub_type_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
806 offset
= offset
+sub_type_length
- 2;
812 /* Code to dissect Additional Session Info */
814 dissect_ase(tvbuff_t
*tvb
, int offset
, unsigned ase_len
, proto_tree
*ext_tree
)
816 unsigned clen
= 0; /* consumed length */
818 while (clen
< ase_len
) {
819 proto_tree
*exts_tree
;
820 uint8_t srid
= tvb_get_uint8(tvb
, offset
+1);
821 uint16_t service_option
= tvb_get_ntohs(tvb
, offset
+2);
822 uint8_t entry_length
;
823 int entry_start_offset
;
826 entry_start_offset
= offset
;
827 entry_length
= tvb_get_uint8(tvb
, offset
);
829 if (registration_request_msg
&& ((service_option
== 64) || (service_option
== 67)))
830 exts_tree
= proto_tree_add_subtree_format(ext_tree
, tvb
, offset
, entry_length
+1,
831 ett_a11_ase
, NULL
, "GRE Key Entry (SRID: %d)", srid
);
833 exts_tree
= proto_tree_add_subtree_format(ext_tree
, tvb
, offset
, entry_length
,
834 ett_a11_ase
, NULL
, "GRE Key Entry (SRID: %d)", srid
);
836 proto_tree_add_item(exts_tree
, hf_a11_ase_len_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
840 proto_tree_add_item(exts_tree
, hf_a11_ase_srid_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
844 proto_tree_add_item(exts_tree
, hf_a11_ase_servopt_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
847 /* GRE Protocol Type*/
848 proto_tree_add_item(exts_tree
, hf_a11_ase_gre_proto_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
852 proto_tree_add_item(exts_tree
, hf_a11_ase_gre_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
856 proto_tree_add_item(exts_tree
, hf_a11_ase_pcf_addr_key
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
859 if ((entry_length
>14)&&(registration_request_msg
)) {
860 if (service_option
== 0x0043) {
861 proto_tree
*extv_tree
;
862 uint8_t profile_count
= tvb_get_uint8(tvb
, offset
+6);
863 uint8_t profile_index
= 0;
864 uint8_t reverse_profile_count
;
866 proto_tree
*extt_tree
= proto_tree_add_subtree(exts_tree
, tvb
, offset
,6+(profile_count
*2)+1,
867 ett_a11_forward_rohc
, NULL
, "Forward ROHC Info");
869 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_rohc_info_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
872 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_maxcid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
874 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_mrru
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
876 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_large_cids
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
878 profile_count
=tvb_get_uint8(tvb
, offset
);
880 proto_tree_add_item(extt_tree
, hf_a11_ase_forward_profile_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
884 for (profile_index
=0; profile_index
<profile_count
; profile_index
++) {
885 proto_tree
*extu_tree
= proto_tree_add_subtree_format(extt_tree
, tvb
, offset
, (2*profile_count
),
886 ett_a11_forward_profile
, NULL
, "Forward Profile : %d", profile_index
);
887 proto_tree_add_item(extu_tree
, hf_a11_ase_forward_profile
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
892 reverse_profile_count
=tvb_get_uint8(tvb
, offset
+6);
894 extv_tree
= proto_tree_add_subtree(exts_tree
, tvb
, offset
,6+(reverse_profile_count
*2)+1,
895 ett_a11_reverse_rohc
, NULL
, "Reverse ROHC Info");
897 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_rohc_info_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
901 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_maxcid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
903 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_mrru
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
905 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_large_cids
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
908 profile_count
=tvb_get_uint8(tvb
, offset
);
910 proto_tree_add_item(extv_tree
, hf_a11_ase_reverse_profile_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
914 for (profile_index
=0; profile_index
<reverse_profile_count
; profile_index
++) {
915 proto_tree
*extw_tree
= proto_tree_add_subtree_format(extv_tree
, tvb
, offset
, (2*profile_count
),
916 ett_a11_reverse_profile
, NULL
, "Reverse Profile : %d", profile_index
);
918 proto_tree_add_item(extw_tree
, hf_a11_ase_reverse_profile
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
921 }/* Service option */
924 clen
+= entry_length
+ 1;
925 /* Set offset = start of next entry in case of padding */
926 offset
= entry_start_offset
+ entry_length
+1;
930 registration_request_msg
=0;
934 #define A11_FQI_IPFLOW_DISC_ENABLED 0x80
935 #define A11_FQI_DSCP_INCLUDED 0x40
938 dissect_fwd_qosinfo_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
, uint8_t *p_dscp_included
)
940 uint8_t flags
= tvb_get_uint8(tvb
, offset
);
942 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_fqi_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
943 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_fqi_flags
);
945 proto_tree_add_item(flags_tree
, hf_a11_fqi_flags_ip_flow
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
946 proto_tree_add_item(flags_tree
, hf_a11_fqi_flags_dscp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
948 if (flags
& A11_FQI_DSCP_INCLUDED
) {
949 *p_dscp_included
= 1;
951 *p_dscp_included
= 0;
956 dissect_fqi_entry_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
, uint8_t dscp_enabled
)
958 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_fqi_entry_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
959 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_fqi_entry_flags
);
962 proto_tree_add_item(flags_tree
, hf_a11_fqi_entry_flag_dscp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
965 proto_tree_add_item(flags_tree
, hf_a11_fqi_entry_flag_flow_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
969 dissect_rqi_entry_flags(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
971 proto_item
*ti
= proto_tree_add_item(ext_tree
, hf_a11_rqi_entry_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
972 proto_tree
*flags_tree
= proto_item_add_subtree(ti
, ett_a11_rqi_entry_flags
);
974 proto_tree_add_item(flags_tree
, hf_a11_rqi_entry_flag_flow_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
977 /* Code to dissect Forward QoS Info */
979 dissect_fwd_qosinfo(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
981 int clen
= 0; /* consumed length */
984 uint8_t dscp_enabled
= 0;
987 proto_tree_add_item(ext_tree
, hf_a11_fqi_srid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
991 dissect_fwd_qosinfo_flags(tvb
, offset
+clen
, ext_tree
, &dscp_enabled
);
995 flow_count
= tvb_get_uint8(tvb
, offset
+clen
);
997 proto_tree_add_item(ext_tree
, hf_a11_fqi_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1000 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1001 uint8_t requested_qos_len
= 0;
1002 uint8_t granted_qos_len
= 0;
1004 uint8_t entry_len
= tvb_get_uint8(tvb
, offset
+clen
);
1005 uint8_t flow_id
= tvb_get_uint8(tvb
, offset
+clen
+1);
1007 proto_tree
*flow_tree
= proto_tree_add_subtree_format(ext_tree
, tvb
, offset
+clen
,
1008 entry_len
+1, ett_a11_fqi_flowentry
, NULL
, "Forward Flow Entry (Flow Id: %d)", flow_id
);
1011 proto_tree_add_item(flow_tree
, hf_a11_fqi_entrylen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1015 proto_tree_add_item(flow_tree
, hf_a11_fqi_flowid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1018 /* DSCP and Flow State*/
1019 dissect_fqi_entry_flags(tvb
, offset
+clen
, flow_tree
, dscp_enabled
);
1023 /* Requested QoS Length */
1024 requested_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1025 proto_tree_add_item(flow_tree
, hf_a11_fqi_requested_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1028 /* Requested QoS Blob */
1029 if (requested_qos_len
) {
1030 proto_tree
*exts_tree2
;
1032 proto_tree
*exts_tree1
= proto_tree_add_subtree(flow_tree
, tvb
, offset
+clen
,requested_qos_len
,
1033 ett_a11_fqi_requestedqos
, NULL
, "Forward Requested QoS ");
1036 proto_tree_add_item(exts_tree1
, hf_a11_fqi_flow_priority
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1038 /* Num of QoS attribute sets */
1039 proto_tree_add_item(exts_tree1
, hf_a11_fqi_num_qos_attribute_set
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1041 /* QoS attribute set length */
1042 proto_tree_add_item(exts_tree1
, hf_a11_fqi_qos_attribute_setlen
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1045 /* QoS attribute set */
1046 exts_tree2
= proto_tree_add_subtree(exts_tree1
, tvb
, offset
+clen
, 4, ett_a11_fqi_qos_attribute_set
,
1047 NULL
, "QoS Attribute Set");
1049 /* QoS attribute setid */
1050 proto_tree_add_item(exts_tree2
, hf_a11_fqi_qos_attribute_setid
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1054 proto_tree_add_item(exts_tree2
, hf_a11_fqi_verbose
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1056 /* Flow profile id */
1057 proto_tree_add_item(exts_tree2
, hf_a11_fqi_flow_profileid
, tvb
, offset
+clen
, 3, ENC_BIG_ENDIAN
);
1062 /* Granted QoS Length */
1063 granted_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1064 proto_tree_add_item(flow_tree
, hf_a11_fqi_granted_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1067 /* Granted QoS Blob */
1068 if (granted_qos_len
) {
1069 proto_tree
*exts_tree3
;
1071 exts_tree3
= proto_tree_add_subtree(flow_tree
, tvb
, offset
+clen
, granted_qos_len
,
1072 ett_a11_fqi_grantedqos
, NULL
, "Forward Granted QoS ");
1074 /* QoS attribute setid */
1075 proto_tree_add_item(exts_tree3
, hf_a11_fqi_qos_granted_attribute_setid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1078 } /* for (flow_index...) */
1081 /* Code to dissect Reverse QoS Info */
1083 dissect_rev_qosinfo(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1085 int clen
= 0; /* consumed length */
1090 proto_tree_add_item(ext_tree
, hf_a11_rqi_srid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1094 flow_count
= tvb_get_uint8(tvb
, offset
+clen
);
1096 proto_tree_add_item(ext_tree
, hf_a11_rqi_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1099 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1100 uint8_t requested_qos_len
;
1101 uint8_t granted_qos_len
;
1103 uint8_t entry_len
= tvb_get_uint8(tvb
, offset
+clen
);
1104 uint8_t flow_id
= tvb_get_uint8(tvb
, offset
+clen
+1);
1106 proto_tree
*flow_tree
= proto_tree_add_subtree_format
1107 (ext_tree
, tvb
, offset
+clen
, entry_len
+1, ett_a11_rqi_flowentry
, NULL
,
1108 "Reverse Flow Entry (Flow Id: %d)", flow_id
);
1111 proto_tree_add_item(flow_tree
, hf_a11_rqi_entrylen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1115 proto_tree_add_item(flow_tree
, hf_a11_rqi_flowid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1119 dissect_rqi_entry_flags(tvb
, offset
+clen
, flow_tree
);
1122 /* Requested QoS Length */
1123 requested_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1124 proto_tree_add_item(flow_tree
, hf_a11_rqi_requested_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1127 /* Requested QoS Blob */
1128 if (requested_qos_len
) {
1129 proto_tree
*exts_tree1
, *exts_tree2
;
1131 exts_tree1
= proto_tree_add_subtree(flow_tree
, tvb
, offset
+clen
,requested_qos_len
,
1132 ett_a11_rqi_requestedqos
, NULL
, "Reverse Requested QoS ");
1135 proto_tree_add_item(exts_tree1
, hf_a11_rqi_flow_priority
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1137 /* Num of QoS attribute sets */
1138 proto_tree_add_item(exts_tree1
, hf_a11_rqi_num_qos_attribute_set
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1140 /* QoS attribute set length */
1141 proto_tree_add_item(exts_tree1
, hf_a11_rqi_qos_attribute_setlen
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1144 /* QoS attribute set */
1145 exts_tree2
= proto_tree_add_subtree(exts_tree1
, tvb
, offset
+clen
, 4,
1146 ett_a11_rqi_qos_attribute_set
, NULL
, "QoS Attribute Set");
1148 /* QoS attribute setid */
1149 proto_tree_add_item(exts_tree2
, hf_a11_rqi_qos_attribute_setid
, tvb
, offset
+clen
, 2, ENC_BIG_ENDIAN
);
1153 proto_tree_add_item(exts_tree2
, hf_a11_rqi_verbose
, tvb
,offset
+clen
, 1, ENC_BIG_ENDIAN
);
1155 /* Flow profile id */
1156 proto_tree_add_item(exts_tree2
, hf_a11_rqi_flow_profileid
, tvb
, offset
+clen
, 3, ENC_BIG_ENDIAN
);
1160 /* Granted QoS Length */
1161 granted_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1162 proto_tree_add_item(flow_tree
, hf_a11_rqi_granted_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1165 /* Granted QoS Blob */
1166 if (granted_qos_len
) {
1167 proto_tree
*exts_tree3
;
1169 exts_tree3
= proto_tree_add_subtree(flow_tree
, tvb
, offset
+clen
,granted_qos_len
,
1170 ett_a11_rqi_grantedqos
, NULL
, "Reverse Granted QoS ");
1172 /* QoS attribute setid */
1173 proto_tree_add_item(exts_tree3
, hf_a11_rqi_qos_granted_attribute_setid
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1180 /* Code to dissect Subscriber QoS Profile */
1182 dissect_subscriber_qos_profile(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int ext_len
, proto_tree
*ext_tree
)
1184 proto_tree
*exts_tree
;
1186 int qos_profile_len
= ext_len
;
1189 proto_tree_add_subtree_format(ext_tree
, tvb
, offset
, 0, ett_a11_subscriber_profile
, NULL
,
1190 "Subscriber Qos Profile (%d bytes)",
1193 /* Subscriber QoS profile */
1194 if (qos_profile_len
) {
1196 (exts_tree
, hf_a11_subscriber_profile
, tvb
, offset
,
1197 qos_profile_len
, ENC_NA
);
1199 dissect_attribute_value_pairs(exts_tree
, pinfo
, tvb
, offset
, qos_profile_len
, NULL
);
1203 /* Code to dissect Forward QoS Update Info */
1205 dissect_fwd_qosupdate_info(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1207 int clen
= 0; /* consumed length */
1212 flow_count
= tvb_get_uint8(tvb
, offset
+clen
);
1213 proto_tree_add_item(ext_tree
, hf_a11_fqui_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1216 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1217 proto_tree
*exts_tree
;
1218 uint8_t granted_qos_len
;
1220 uint8_t flow_id
= tvb_get_uint8(tvb
, offset
+clen
);
1222 exts_tree
= proto_tree_add_subtree_format
1223 (ext_tree
, tvb
, offset
+clen
, 1, ett_a11_fqui_flowentry
, NULL
,
1224 "Forward Flow Entry (Flow Id: %d)", flow_id
);
1228 /* Forward QoS Sub Blob Length */
1229 granted_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1231 (exts_tree
, hf_a11_fqui_updated_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1234 /* Forward QoS Sub Blob */
1235 if (granted_qos_len
) {
1237 (exts_tree
, hf_a11_fqui_updated_qos
, tvb
, offset
+clen
,
1238 granted_qos_len
, ENC_NA
);
1239 clen
+= granted_qos_len
;
1245 /* Code to dissect Reverse QoS Update Info */
1247 dissect_rev_qosupdate_info(tvbuff_t
*tvb
, int offset
, proto_tree
*ext_tree
)
1249 int clen
= 0; /* consumed length */
1254 flow_count
= tvb_get_uint8(tvb
, offset
+clen
);
1255 proto_tree_add_item(ext_tree
, hf_a11_rqui_flowcount
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1258 for (flow_index
=0; flow_index
<flow_count
; flow_index
++) {
1259 proto_tree
*exts_tree
;
1260 uint8_t granted_qos_len
;
1262 uint8_t flow_id
= tvb_get_uint8(tvb
, offset
+clen
);
1264 exts_tree
= proto_tree_add_subtree_format
1265 (ext_tree
, tvb
, offset
+clen
, 1, ett_a11_rqui_flowentry
, NULL
,
1266 "Reverse Flow Entry (Flow Id: %d)", flow_id
);
1269 /* Reverse QoS Sub Blob Length */
1270 granted_qos_len
= tvb_get_uint8(tvb
, offset
+clen
);
1272 (exts_tree
, hf_a11_rqui_updated_qoslen
, tvb
, offset
+clen
, 1, ENC_BIG_ENDIAN
);
1275 /* Reverse QoS Sub Blob */
1276 if (granted_qos_len
) {
1278 (exts_tree
, hf_a11_rqui_updated_qos
, tvb
, offset
+clen
,
1279 granted_qos_len
, ENC_NA
);
1280 clen
+= granted_qos_len
;
1285 /* Code to dissect extensions */
1287 dissect_a11_extensions( tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
)
1289 proto_tree
*exts_tree
;
1290 proto_tree
*ext_tree
;
1291 proto_item
*ext_len_item
= NULL
;
1294 uint8_t ext_subtype
= 0;
1297 int16_t apptype
= -1;
1299 /* Add our tree, if we have extensions */
1300 exts_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_a11_exts
, NULL
, "Extensions");
1302 /* And, handle each extension */
1303 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1305 /* Get our extension info */
1306 ext_type
= tvb_get_uint8(tvb
, offset
);
1307 if (ext_type
== GEN_AUTH_EXT
) {
1309 * Very nasty . . breaks normal extensions, since the length is
1310 * in the wrong place :(
1312 ext_subtype
= tvb_get_uint8(tvb
, offset
+ 1);
1313 ext_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1315 } else if ((ext_type
== CVSE_EXT
) || (ext_type
== OLD_CVSE_EXT
)) {
1316 ext_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1317 ext_subtype
= tvb_get_uint8(tvb
, offset
+ 8);
1320 ext_len
= tvb_get_uint8(tvb
, offset
+ 1);
1324 ext_tree
= proto_tree_add_subtree_format(exts_tree
, tvb
, offset
, ext_len
+ hdrLen
,
1325 ett_a11_ext
, NULL
, "Extension: %s",
1326 val_to_str_ext(ext_type
, &a11_ext_types_ext
,
1327 "Unknown Extension %u"));
1329 proto_tree_add_uint(ext_tree
, hf_a11_ext_type
, tvb
, offset
, 1, ext_type
);
1332 if (ext_type
== SS_EXT
) {
1333 ext_len_item
= proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 1, ext_len
);
1336 else if ((ext_type
== CVSE_EXT
) || (ext_type
== OLD_CVSE_EXT
)) {
1338 ext_len_item
= proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 2, ext_len
);
1341 else if (ext_type
!= GEN_AUTH_EXT
) {
1342 /* Another nasty hack since GEN_AUTH_EXT broke everything */
1343 ext_len_item
= proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 1, ext_len
);
1349 decode_sse(ext_tree
, pinfo
, tvb
, offset
, ext_len
, ext_len_item
);
1358 /* All these extensions look the same. 4 byte SPI followed by a key */
1361 proto_tree_add_item(ext_tree
, hf_a11_aext_spi
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1366 proto_tree_add_item(ext_tree
, hf_a11_aext_auth
, tvb
, offset
, ext_len
,
1373 * RFC 2486 speaks only of ASCII; RFC 4282 expands that to
1376 proto_tree_add_item(ext_tree
, hf_a11_next_nai
, tvb
, offset
,
1377 ext_len
, ENC_UTF_8
);
1380 case GEN_AUTH_EXT
: /* RFC 3012 */
1382 * Very nasty . . breaks normal extensions, since the length is
1383 * in the wrong place :(
1385 proto_tree_add_uint(ext_tree
, hf_a11_ext_stype
, tvb
, offset
, 1, ext_subtype
);
1387 proto_tree_add_uint(ext_tree
, hf_a11_ext_len
, tvb
, offset
, 2, ext_len
);
1392 proto_tree_add_item(ext_tree
, hf_a11_aext_spi
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1398 proto_tree_add_item(ext_tree
, hf_a11_aext_auth
, tvb
, offset
,
1402 case OLD_CVSE_EXT
: /* RFC 3115 */
1403 case CVSE_EXT
: /* RFC 3115 */
1406 proto_tree_add_item(ext_tree
, hf_a11_vse_vid
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1411 apptype
= tvb_get_ntohs(tvb
, offset
);
1412 proto_tree_add_uint(ext_tree
, hf_a11_vse_apptype
, tvb
, offset
, 2, apptype
);
1415 if (apptype
== 0x0101) {
1416 if (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1417 dissect_a11_radius(tvb
, pinfo
, offset
, ext_tree
, ext_len
+ 2);
1421 case OLD_NVSE_EXT
: /* RFC 3115 */
1422 case NVSE_EXT
: /* RFC 3115 */
1425 proto_tree_add_item(ext_tree
, hf_a11_vse_vid
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
1428 proto_tree_add_item(ext_tree
, hf_a11_vse_apptype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1432 apptype
= tvb_get_ntohs(tvb
, offset
);
1439 proto_tree_add_item(ext_tree
, hf_a11_vse_panid
, tvb
, offset
, 5, ENC_NA
);
1444 proto_tree_add_item(ext_tree
, hf_a11_vse_canid
, tvb
, offset
, 5, ENC_NA
);
1449 proto_tree_add_item(ext_tree
, hf_a11_vse_ppaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1454 proto_tree_add_item(ext_tree
, hf_a11_vse_dormant
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1460 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1463 /* eHRPD Indicators */
1466 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_pmk
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1467 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_handoff_info
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1468 proto_tree_add_item(ext_tree
, hf_a11_vse_ehrpd_tunnel_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1473 proto_tree_add_item(ext_tree
, hf_a11_vse_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1478 proto_tree_add_item(ext_tree
, hf_a11_vse_pdit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1481 proto_tree_add_item(ext_tree
, hf_a11_vse_session_parameter
, tvb
, offset
, -1, ENC_NA
);
1484 proto_tree_add_item(ext_tree
, hf_a11_vse_qosmode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1489 proto_tree_add_item(ext_tree
, hf_a11_vse_srvopt
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1492 dissect_ase(tvb
, offset
, ext_len
, ext_tree
);
1495 dissect_fwd_qosinfo(tvb
, offset
, ext_tree
);
1498 dissect_rev_qosinfo(tvb
, offset
, ext_tree
);
1501 dissect_subscriber_qos_profile(tvb
, pinfo
, offset
, ext_len
, ext_tree
);
1504 dissect_fwd_qosupdate_info(tvb
, offset
, ext_tree
);
1507 dissect_rev_qosupdate_info(tvb
, offset
, ext_tree
);
1513 decode_bcmcs(ext_tree
, pinfo
, tvb
, offset
, ext_len
, ext_len_item
);
1517 case MF_CHALLENGE_EXT
: /* RFC 3012 */
1518 /* The default dissector is good here. The challenge is all hex anyway. */
1520 proto_tree_add_item(ext_tree
, hf_a11_ext
, tvb
, offset
, ext_len
, ENC_NA
);
1525 } /* while data remaining */
1527 } /* dissect_a11_extensions */
1529 /* Code to actually dissect the packets */
1531 dissect_a11( tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1533 /* Set up structures we will need to add the protocol subtree and manage it */
1535 proto_tree
*a11_tree
= NULL
;
1537 unsigned offset
= 0;
1539 if (!tvb_bytes_exist(tvb
, offset
, 1))
1540 return 0; /* not enough data to check message type */
1542 type
= tvb_get_uint8(tvb
, offset
);
1543 if (try_val_to_str_ext(type
, &a11_types_ext
) == NULL
)
1544 return 0; /* not a known message type */
1546 /* Make entries in Protocol column and Info column on summary display */
1548 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "3GPP2 A11");
1549 col_clear(pinfo
->cinfo
, COL_INFO
);
1551 if (type
== REGISTRATION_REQUEST
)
1552 registration_request_msg
=1;
1554 registration_request_msg
=0;
1558 case REGISTRATION_REQUEST
:
1560 registration_request_msg
= 1;
1561 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Request: PDSN=%s PCF=%s",
1562 tvb_ip_to_str(pinfo
->pool
, tvb
, 8),
1563 tvb_ip_to_str(pinfo
->pool
, tvb
, 12));
1566 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1567 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1570 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1574 proto_tree_add_bitmask(a11_tree
, tvb
, offset
, hf_a11_flags
,
1575 ett_a11_flags
, a11_flags
, ENC_NA
);
1579 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1583 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1586 /* home agent address */
1587 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1590 /* Care of Address */
1591 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1594 /* Identifier - assumed to be an NTP time here */
1595 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1600 case REGISTRATION_REPLY
:
1601 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Reply: PDSN=%s, Code=%u",
1602 tvb_ip_to_str(pinfo
->pool
, tvb
, 8), tvb_get_uint8(tvb
,1));
1606 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1607 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1610 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1614 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1617 /* Registration Lifetime */
1618 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1622 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1625 /* Home Agent Address */
1626 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1629 /* Identifier - assumed to be an NTP time here */
1630 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1635 case REGISTRATION_UPDATE
:
1636 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"Reg Update: PDSN=%s",
1637 tvb_ip_to_str(pinfo
->pool
, tvb
, 8));
1640 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1641 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1644 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1651 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1654 /* Home Agent Address */
1655 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1658 /* Identifier - assumed to be an NTP time here */
1659 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1664 case REGISTRATION_ACK
:
1665 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Reg Ack: PCF=%s Status=%u",
1666 tvb_ip_to_str(pinfo
->pool
, tvb
, 8),
1667 tvb_get_uint8(tvb
,3));
1670 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1671 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1674 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1681 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1685 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1688 /* Care of Address */
1689 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1692 /* Identifier - assumed to be an NTP time here */
1693 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1698 case SESSION_UPDATE
: /* IOS4.3 */
1699 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"Ses Update: PDSN=%s",
1700 tvb_ip_to_str(pinfo
->pool
, tvb
, 8));
1703 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1704 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1707 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1714 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1717 /* Home Agent Address */
1718 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1721 /* Identifier - assumed to be an NTP time here */
1722 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1727 case SESSION_ACK
: /* IOS4.3 */
1728 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Ses Upd Ack: PCF=%s, Status=%u",
1729 tvb_ip_to_str(pinfo
->pool
, tvb
, 8),
1730 tvb_get_uint8(tvb
,3));
1733 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1734 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1737 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1744 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1748 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1751 /* Care of Address */
1752 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1755 /* Identifier - assumed to be an NTP time here */
1756 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1761 case CAPABILITIES_INFO
: /* IOS5.1 */
1762 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Cap Info: PDSN=%s, PCF=%s",
1763 tvb_ip_to_str(pinfo
->pool
, tvb
, 8),
1764 tvb_ip_to_str(pinfo
->pool
, tvb
, 12));
1767 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1768 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1771 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1778 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1781 /* Home Agent Address */
1782 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1785 /* Care of Address */
1786 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1789 /* Identifier - assumed to be an NTP time here */
1790 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1795 case CAPABILITIES_INFO_ACK
: /* IOS5.1 */
1796 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Cap Info Ack: PCF=%s",
1797 tvb_ip_to_str(pinfo
->pool
, tvb
, 8));
1800 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1801 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1804 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1811 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1814 /* Care of Address */
1815 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1818 /* Identifier - assumed to be an NTP time here */
1819 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1824 case BC_SERVICE_REQUEST
:
1825 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Service Request: PCF=%s ",
1826 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8));
1829 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1830 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1833 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1837 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1840 /* Care-of-Address */
1841 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1844 /* Identifier - assumed to be an NTP time here */
1845 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1851 case BC_SERVICE_REPLY
:
1852 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Service Response: BSN=%s ",
1853 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8));
1856 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1857 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1860 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1864 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1868 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1872 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1875 /* Identifier - assumed to be an NTP time here */
1876 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1881 case BC_REGISTRATION_REQUEST
:
1882 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Request: BSN=%s ",
1883 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8));
1886 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1887 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1890 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1894 proto_tree_add_bitmask(a11_tree
, tvb
, offset
, hf_a11_flags
,
1895 ett_a11_flags
, a11_flags
, ENC_NA
);
1899 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1903 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1907 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1910 /* Care-of-Address */
1911 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1914 /* Identifier - assumed to be an NTP time here */
1915 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1923 case BC_REGISTRATION_REPLY
:
1924 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Reply: BSN=%s, Code=%u",
1925 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8),
1926 tvb_get_uint8(tvb
, offset
+ 1));
1930 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1931 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1934 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1938 proto_tree_add_item(a11_tree
, hf_a11_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1941 /* Registration Lifetime */
1942 proto_tree_add_item(a11_tree
, hf_a11_life
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1946 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1950 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1953 /* Identifier - assumed to be an NTP time here */
1954 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1960 case BC_REGISTRATION_UPDATE
:
1961 col_add_fstr(pinfo
->cinfo
, COL_INFO
,"BC Reg Update: BSN=%s",
1962 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8));
1965 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1966 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1969 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
1976 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1980 proto_tree_add_item(a11_tree
, hf_a11_haaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1983 /* Identifier - assumed to be an NTP time here */
1984 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
1989 case BC_REGISTRATION_ACK
:
1990 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "BC Reg Acknowledge: PCF=%s Status=%u",
1991 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
+ 8),
1992 tvb_get_uint8(tvb
, offset
+ 3));
1995 ti
= proto_tree_add_item(tree
, proto_a11
, tvb
, offset
, -1, ENC_NA
);
1996 a11_tree
= proto_item_add_subtree(ti
, ett_a11
);
1999 proto_tree_add_uint(a11_tree
, hf_a11_type
, tvb
, offset
, 1, type
);
2006 proto_tree_add_item(a11_tree
, hf_a11_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2010 proto_tree_add_item(a11_tree
, hf_a11_homeaddr
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2013 /* Care-of-Address */
2014 proto_tree_add_item(a11_tree
, hf_a11_coa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2017 /* Identifier - assumed to be an NTP time here */
2018 proto_tree_add_item(a11_tree
, hf_a11_ident
, tvb
, offset
, 8, ENC_TIME_NTP
|ENC_BIG_ENDIAN
);
2026 DISSECTOR_ASSERT_NOT_REACHED();
2030 if (tree
&& a11_tree
) {
2031 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
2032 dissect_a11_extensions(tvb
, pinfo
, offset
, a11_tree
);
2034 return tvb_reported_length(tvb
);
2037 /* Register the protocol with Wireshark */
2039 proto_register_a11(void)
2042 /* Setup list of header fields */
2043 static hf_register_info hf
[] = {
2045 { "Message Type", "a11.type",
2046 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &a11_types_ext
, 0,
2047 "A11 Message Type", HFILL
}
2050 { "Flags", "a11.flags",
2051 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2055 { "Simultaneous Bindings", "a11.s",
2056 FT_BOOLEAN
, 8, NULL
, 128,
2057 "Simultaneous Bindings Allowed", HFILL
}
2060 { "Broadcast Datagrams", "a11.b",
2061 FT_BOOLEAN
, 8, NULL
, 64,
2062 "Broadcast Datagrams requested", HFILL
}
2065 { "Co-located Care-of Address", "a11.d",
2066 FT_BOOLEAN
, 8, NULL
, 32,
2067 "MN using Co-located Care-of address", HFILL
}
2070 { "Minimal Encapsulation", "a11.m",
2071 FT_BOOLEAN
, 8, NULL
, 16,
2072 "MN wants Minimal encapsulation", HFILL
}
2076 FT_BOOLEAN
, 8, NULL
, 8,
2077 "MN wants GRE encapsulation", HFILL
}
2080 { "Van Jacobson", "a11.v",
2081 FT_BOOLEAN
, 8, NULL
, 4,
2085 { "Reverse Tunneling", "a11.t",
2086 FT_BOOLEAN
, 8, NULL
, 2,
2087 "Reverse tunneling requested", HFILL
}
2090 { "Reply Code", "a11.code",
2091 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &a11_reply_codes_ext
, 0,
2092 "A11 Registration Reply code", HFILL
}
2095 { "Reply Status", "a11.ackstat",
2096 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &a11_ack_status_ext
, 0,
2097 "A11 Registration Ack Status", HFILL
}
2100 { "Lifetime", "a11.life",
2101 FT_UINT16
, BASE_DEC
, NULL
, 0,
2102 "A11 Registration Lifetime", HFILL
}
2105 { "Home Address", "a11.homeaddr",
2106 FT_IPv4
, BASE_NONE
, NULL
, 0,
2107 "Mobile Node's home address", HFILL
}
2111 { "Home Agent", "a11.haaddr",
2112 FT_IPv4
, BASE_NONE
, NULL
, 0,
2113 "Home agent IP Address", HFILL
}
2116 { "Care of Address", "a11.coa",
2117 FT_IPv4
, BASE_NONE
, NULL
, 0,
2121 { "Identification", "a11.ident",
2122 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_UTC
, NULL
, 0,
2123 "MN Identification", HFILL
}
2126 { "Extension Type", "a11.ext.type",
2127 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &a11_ext_types_ext
, 0,
2128 "Mobile IP Extension Type", HFILL
}
2130 { &hf_a11_ext_stype
,
2131 { "Gen Auth Ext SubType", "a11.ext.auth.subtype",
2132 FT_UINT8
, BASE_DEC
, VALS(a11_ext_stypes
), 0,
2133 "Mobile IP Auth Extension Sub Type", HFILL
}
2136 { "Extension Length", "a11.ext.len",
2137 FT_UINT16
, BASE_DEC
, NULL
, 0,
2138 "Mobile IP Extension Length", HFILL
}
2141 { "Extension", "a11.extension",
2142 FT_BYTES
, BASE_NONE
, NULL
, 0,
2146 { "SPI", "a11.auth.spi",
2147 FT_UINT32
, BASE_HEX
, NULL
, 0,
2148 "Authentication Header Security Parameter Index", HFILL
}
2150 { &hf_a11_aext_auth
,
2151 { "Authenticator", "a11.auth.auth",
2152 FT_BYTES
, BASE_NONE
, NULL
, 0,
2157 FT_STRING
, BASE_NONE
, NULL
, 0,
2161 { "Key", "a11.ext.key",
2162 FT_UINT32
, BASE_HEX
, NULL
, 0,
2163 "Session Key", HFILL
}
2165 { &hf_a11_ses_sidver
,
2166 { "Session ID Version", "a11.ext.sidver",
2167 FT_UINT8
, BASE_DEC
, NULL
, 3,
2170 { &hf_a11_ses_mnsrid
,
2171 { "MNSR-ID", "a11.ext.mnsrid",
2172 FT_UINT16
, BASE_HEX
, NULL
, 0,
2175 { &hf_a11_ses_msid_type
,
2176 { "MSID Type", "a11.ext.msid_type",
2177 FT_UINT16
, BASE_DEC
, VALS(a11_ses_msid_type_vals
), 0,
2180 { &hf_a11_ses_msid_len
,
2181 { "MSID Length", "a11.ext.msid_len",
2182 FT_UINT8
, BASE_DEC
, NULL
, 0,
2186 { "MSID(BCD)", "a11.ext.msid",
2187 FT_STRING
, BASE_NONE
, NULL
, 0,
2190 { &hf_a11_ses_ptype
,
2191 { "Protocol Type", "a11.ext.ptype",
2192 FT_UINT16
, BASE_HEX
, VALS(a11_ses_ptype_vals
), 0,
2196 { "Vendor ID", "a11.ext.vid",
2197 FT_UINT32
, BASE_ENTERPRISES
, STRINGS_ENTERPRISES
, 0,
2200 { &hf_a11_vse_apptype
,
2201 { "Application Type", "a11.ext.apptype",
2202 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &a11_ext_app_ext
, 0,
2205 { &hf_a11_vse_ppaddr
,
2206 { "Anchor P-P Address", "a11.ext.ppaddr",
2207 FT_IPv4
, BASE_NONE
, NULL
, 0,
2210 { &hf_a11_vse_dormant
,
2211 { "All Dormant Indicator", "a11.ext.dormant",
2212 FT_UINT16
, BASE_HEX
, VALS(a11_ext_dormant
), 0,
2215 { &hf_a11_vse_ehrpd_mode
,
2216 { "eHRPD Mode", "a11.ext.ehrpd.mode",
2217 FT_BOOLEAN
, BASE_NONE
, TFS(&a11_tfs_ehrpd_mode
), 0,
2220 { &hf_a11_vse_ehrpd_pmk
,
2221 { "PMK", "a11.ext.ehrpd.pmk",
2222 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_pmk
), 0x04,
2225 { &hf_a11_vse_ehrpd_handoff_info
,
2226 { "E-UTRAN Handoff Info", "a11.ext.ehrpd.handoff_info",
2227 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_handoff_info
), 0x02,
2230 { &hf_a11_vse_ehrpd_tunnel_mode
,
2231 { "Tunnel Mode", "a11.ext.ehrpd.tunnel_mode",
2232 FT_BOOLEAN
, 8, TFS(&a11_tfs_ehrpd_tunnel_mode
), 0x01,
2236 { "Reply Code", "a11.ext.code",
2237 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &a11_reply_codes_ext
, 0,
2240 /* XXX: Is this the correct filter name ?? */
2242 { "PDSN Code", "a11.ext.code",
2243 FT_UINT8
, BASE_HEX
, VALS(a11_ext_nvose_pdsn_code
), 0,
2246 { &hf_a11_vse_session_parameter
,
2247 { "Session Parameter - Always On", "a11.ext.session_parameter",
2248 FT_NONE
, BASE_NONE
, NULL
, 0,
2251 { &hf_a11_vse_srvopt
,
2252 { "Service Option", "a11.ext.srvopt",
2253 FT_UINT16
, BASE_HEX
, VALS(a11_ext_nvose_srvopt
), 0,
2256 { &hf_a11_vse_panid
,
2257 { "PANID", "a11.ext.panid",
2258 FT_BYTES
, BASE_NONE
, NULL
, 0,
2261 { &hf_a11_vse_canid
,
2262 { "CANID", "a11.ext.canid",
2263 FT_BYTES
, BASE_NONE
, NULL
, 0,
2266 { &hf_a11_vse_qosmode
,
2267 { "QoS Mode", "a11.ext.qosmode",
2268 FT_UINT8
, BASE_HEX
, VALS(a11_ext_nvose_qosmode
), 0,
2271 { &hf_a11_ase_len_type
,
2272 { "Entry Length", "a11.ext.ase.len",
2273 FT_UINT8
, BASE_DEC
, NULL
, 0,
2276 { &hf_a11_ase_srid_type
,
2277 { "Service Reference ID (SRID)", "a11.ext.ase.srid",
2278 FT_UINT8
, BASE_DEC
, NULL
, 0,
2281 { &hf_a11_ase_servopt_type
,
2282 { "Service Option", "a11.ext.ase.srvopt",
2283 FT_UINT16
, BASE_HEX
, VALS(a11_ext_nvose_srvopt
), 0,
2286 { &hf_a11_ase_gre_proto_type
,
2287 { "GRE Protocol Type", "a11.ext.ase.ptype",
2288 FT_UINT16
, BASE_HEX
, VALS(a11_ses_ptype_vals
), 0,
2291 { &hf_a11_ase_gre_key
,
2292 { "GRE Key", "a11.ext.ase.key",
2293 FT_UINT32
, BASE_HEX
, NULL
, 0,
2296 { &hf_a11_ase_pcf_addr_key
,
2297 { "PCF IP Address", "a11.ext.ase.pcfip",
2298 FT_IPv4
, BASE_NONE
, NULL
, 0,
2302 { "SRID", "a11.ext.fqi.srid",
2303 FT_UINT8
, BASE_DEC
, NULL
, 0,
2304 "Forward Flow Entry SRID", HFILL
}
2306 { &hf_a11_fqi_flags
,
2307 { "Flags", "a11.ext.fqi.flags",
2308 FT_UINT8
, BASE_HEX
, NULL
, 0,
2309 "Forward Flow Entry Flags", HFILL
}
2311 { &hf_a11_fqi_flags_ip_flow
,
2312 { "IP Flow Discriminator", "a11.ext.fqi.flags.ip_flow",
2313 FT_BOOLEAN
, 8, TFS(&tfs_enabled_disabled
), A11_FQI_IPFLOW_DISC_ENABLED
,
2316 { &hf_a11_fqi_flags_dscp
,
2317 { "DSCP", "a11.ext.fqi.flags.dscp",
2318 FT_BOOLEAN
, 8, TFS(&tfs_included_not_included
), A11_FQI_DSCP_INCLUDED
,
2321 { &hf_a11_fqi_entry_flag
,
2322 { "DSCP and Flow State", "a11.ext.fqi.entry_flag",
2323 FT_UINT8
, BASE_HEX
, NULL
, 0,
2326 { &hf_a11_fqi_entry_flag_dscp
,
2327 { "DSCP", "a11.ext.fqi.entry_flag.dscp",
2328 FT_UINT8
, BASE_HEX
, NULL
, 0x7E,
2331 { &hf_a11_fqi_entry_flag_flow_state
,
2332 { "Flow State", "a11.ext.fqi.entry_flag.flow_state",
2333 FT_BOOLEAN
, 8, TFS(&tfs_active_inactive
), 0x01,
2336 { &hf_a11_fqi_flowcount
,
2337 { "Forward Flow Count", "a11.ext.fqi.flowcount",
2338 FT_UINT8
, BASE_DEC
, NULL
, 0,
2341 { &hf_a11_fqi_flowid
,
2342 { "Forward Flow Id", "a11.ext.fqi.flowid",
2343 FT_UINT8
, BASE_DEC
, NULL
, 0,
2346 { &hf_a11_fqi_entrylen
,
2347 { "Entry Length", "a11.ext.fqi.entrylen",
2348 FT_UINT8
, BASE_DEC
, NULL
, 0,
2349 "Forward Entry Length", HFILL
}
2352 { &hf_a11_fqi_flowstate
,
2353 { "Forward Flow State", "a11.ext.fqi.flowstate",
2354 FT_UINT8
, BASE_HEX
, NULL
, 0,
2358 { &hf_a11_fqi_requested_qoslen
,
2359 { "Requested QoS Length", "a11.ext.fqi.reqqoslen",
2360 FT_UINT8
, BASE_DEC
, NULL
, 0,
2361 "Forward Requested QoS Length", HFILL
}
2363 { &hf_a11_fqi_flow_priority
,
2364 { "Flow Priority", "a11.ext.fqi.flow_priority",
2365 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2368 { &hf_a11_fqi_num_qos_attribute_set
,
2369 { "Number of QoS Attribute Sets", "a11.ext.fqi.num_qos_attribute_set",
2370 FT_UINT8
, BASE_DEC
, NULL
, 0x0E,
2373 { &hf_a11_fqi_qos_attribute_setlen
,
2374 { "QoS Attribute Set Length", "a11.ext.fqi.qos_attribute_setlen",
2375 FT_UINT16
, BASE_DEC
, NULL
, 0x01E0,
2378 { &hf_a11_fqi_qos_attribute_setid
,
2379 { "QoS Attribute SetID", "a11.ext.fqi.qos_attribute_setid",
2380 FT_UINT16
, BASE_DEC
, NULL
, 0x1FC0,
2383 { &hf_a11_fqi_verbose
,
2384 { "Verbose", "a11.ext.fqi.verbose",
2385 FT_UINT8
, BASE_DEC
, NULL
, 0x20,
2388 { &hf_a11_fqi_flow_profileid
,
2389 { "Flow Profile Id", "a11.ext.fqi.flow_profileid",
2390 FT_UINT24
, BASE_DEC
, NULL
, 0x1FFFE0,
2393 { &hf_a11_fqi_qos_granted_attribute_setid
,
2394 { "QoS Attribute SetID", "a11.ext.fqi.qos_granted_attribute_setid",
2395 FT_UINT8
, BASE_DEC
, NULL
, 0xFE,
2398 { &hf_a11_fqi_granted_qoslen
,
2399 { "Granted QoS Length", "a11.ext.fqi.graqoslen",
2400 FT_UINT8
, BASE_DEC
, NULL
, 0,
2401 "Forward Granted QoS Length", HFILL
}
2403 { &hf_a11_rqi_flow_priority
,
2404 { "Flow Priority", "a11.ext.rqi.flow_priority",
2405 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2408 { &hf_a11_rqi_num_qos_attribute_set
,
2409 { "Number of QoS Attribute Sets", "a11.ext.rqi.num_qos_attribute_set",
2410 FT_UINT8
, BASE_DEC
, NULL
, 0x0E,
2413 { &hf_a11_rqi_qos_attribute_setlen
,
2414 { "QoS Attribute Set Length", "a11.ext.rqi.qos_attribute_setlen",
2415 FT_UINT16
, BASE_DEC
, NULL
, 0x01E0,
2418 { &hf_a11_rqi_qos_attribute_setid
,
2419 { "QoS Attribute SetID", "a11.ext.rqi.qos_attribute_setid",
2420 FT_UINT16
, BASE_DEC
, NULL
, 0x1FC0,
2423 { &hf_a11_rqi_verbose
,
2424 { "Verbose", "a11.ext.rqi.verbose",
2425 FT_UINT8
, BASE_DEC
, NULL
, 0x20,
2428 { &hf_a11_rqi_flow_profileid
,
2429 { "Flow Profile Id", "a11.ext.rqi.flow_profileid",
2430 FT_UINT24
, BASE_DEC
, NULL
, 0x1FFFE0,
2433 { &hf_a11_rqi_qos_granted_attribute_setid
,
2434 { "QoS Attribute SetID", "a11.ext.rqi.qos_granted_attribute_setid",
2435 FT_UINT8
, BASE_DEC
, NULL
, 0xFE,
2439 { "SRID", "a11.ext.rqi.srid",
2440 FT_UINT8
, BASE_DEC
, NULL
, 0,
2441 "Reverse Flow Entry SRID", HFILL
}
2443 { &hf_a11_rqi_flowcount
,
2444 { "Reverse Flow Count", "a11.ext.rqi.flowcount",
2445 FT_UINT8
, BASE_DEC
, NULL
, 0,
2448 { &hf_a11_rqi_flowid
,
2449 { "Reverse Flow Id", "a11.ext.rqi.flowid",
2450 FT_UINT8
, BASE_DEC
, NULL
, 0,
2453 { &hf_a11_rqi_entrylen
,
2454 { "Entry Length", "a11.ext.rqi.entrylen",
2455 FT_UINT8
, BASE_DEC
, NULL
, 0,
2456 "Reverse Flow Entry Length", HFILL
}
2458 { &hf_a11_rqi_entry_flag
,
2459 { "Flags", "a11.ext.rqi.entry_flag",
2460 FT_UINT8
, BASE_HEX
, NULL
, 0,
2463 { &hf_a11_rqi_entry_flag_flow_state
,
2464 { "Flow State", "a11.ext.rqi.entry_flag.flow_state",
2465 FT_BOOLEAN
, 8, TFS(&tfs_active_inactive
), 0x01,
2469 { &hf_a11_rqi_flowstate
,
2470 { "Flow State", "a11.ext.rqi.flowstate",
2471 FT_UINT8
, BASE_HEX
, NULL
, 0,
2472 "Reverse Flow State", HFILL
}
2475 { &hf_a11_rqi_requested_qoslen
,
2476 { "Requested QoS Length", "a11.ext.rqi.reqqoslen",
2477 FT_UINT8
, BASE_DEC
, NULL
, 0,
2478 "Reverse Requested QoS Length", HFILL
}
2481 { &hf_a11_rqi_requested_qos
,
2482 { "Requested QoS", "a11.ext.rqi.reqqos",
2483 FT_BYTES
, BASE_NONE
, NULL
, 0,
2484 "Reverse Requested QoS", HFILL
}
2487 { &hf_a11_rqi_granted_qoslen
,
2488 { "Granted QoS Length", "a11.ext.rqi.graqoslen",
2489 FT_UINT8
, BASE_DEC
, NULL
, 0,
2490 "Reverse Granted QoS Length", HFILL
}
2493 { &hf_a11_rqi_granted_qos
,
2494 { "Granted QoS", "a11.ext.rqi.graqos",
2495 FT_BYTES
, BASE_NONE
, NULL
, 0,
2496 "Reverse Granted QoS", HFILL
}
2499 { &hf_a11_fqui_flowcount
,
2500 { "Forward QoS Update Flow Count", "a11.ext.fqui.flowcount",
2501 FT_UINT8
, BASE_DEC
, NULL
, 0,
2504 { &hf_a11_rqui_flowcount
,
2505 { "Reverse QoS Update Flow Count", "a11.ext.rqui.flowcount",
2506 FT_UINT8
, BASE_DEC
, NULL
, 0,
2509 { &hf_a11_fqui_updated_qoslen
,
2510 { "Forward Updated QoS Sub-Blob Length", "a11.ext.fqui.updatedqoslen",
2511 FT_UINT8
, BASE_DEC
, NULL
, 0,
2514 { &hf_a11_fqui_updated_qos
,
2515 { "Forward Updated QoS Sub-Blob", "a11.ext.fqui.updatedqos",
2516 FT_BYTES
, BASE_NONE
, NULL
, 0,
2519 { &hf_a11_rqui_updated_qoslen
,
2520 { "Reverse Updated QoS Sub-Blob Length", "a11.ext.rqui.updatedqoslen",
2521 FT_UINT8
, BASE_DEC
, NULL
, 0,
2524 { &hf_a11_rqui_updated_qos
,
2525 { "Reverse Updated QoS Sub-Blob", "a11.ext.rqui.updatedqos",
2526 FT_BYTES
, BASE_NONE
, NULL
, 0,
2530 { &hf_a11_subscriber_profile_len
,
2531 { "Subscriber QoS Profile Length", "a11.ext.sqp.profilelen",
2532 FT_BYTES
, BASE_NONE
, NULL
, 0,
2536 { &hf_a11_subscriber_profile
,
2537 { "Subscriber QoS Profile", "a11.ext.sqp.profile",
2538 FT_BYTES
, BASE_NONE
, NULL
, 0,
2542 { &hf_a11_ase_forward_rohc_info_len
,
2543 { "Forward ROHC Info Length", "a11.ext.ase.forwardlen",
2544 FT_UINT8
, BASE_DEC
, NULL
, 0,
2548 { &hf_a11_ase_forward_maxcid
,
2549 { "Forward MAXCID", "a11.ext.ase.maxcid",
2550 FT_UINT16
, BASE_DEC
, NULL
, 0,
2554 { &hf_a11_ase_forward_mrru
,
2555 { "Forward MRRU", "a11.ext.ase.mrru",
2556 FT_UINT16
, BASE_DEC
, NULL
, 0,
2560 { &hf_a11_ase_forward_large_cids
,
2561 { "Forward Large CIDS", "a11.ext.ase.forwardlargecids",
2562 FT_BOOLEAN
, 8, NULL
, 0x80,
2566 { &hf_a11_ase_forward_profile_count
,
2567 { "Forward Profile Count", "a11.ext.ase.profilecount",
2568 FT_UINT8
, BASE_DEC
, NULL
, 0,
2573 { &hf_a11_ase_forward_profile
,
2574 { "Forward Profile", "a11.ext.ase.forwardprofile",
2575 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &a11_rohc_profile_vals_ext
, 0,
2579 { &hf_a11_ase_reverse_rohc_info_len
,
2580 { "Reverse ROHC Info Length", "a11.ext.ase.reverselen",
2581 FT_UINT8
, BASE_DEC
, NULL
, 0,
2585 { &hf_a11_ase_reverse_maxcid
,
2586 { "Reverse MAXCID", "a11.ext.ase.revmaxcid",
2587 FT_UINT16
, BASE_DEC
, NULL
, 0,
2591 { &hf_a11_ase_reverse_mrru
,
2592 { "Reverse MRRU", "a11.ext.ase.revmrru",
2593 FT_UINT16
, BASE_DEC
, NULL
, 0,
2597 { &hf_a11_ase_reverse_large_cids
,
2598 { "Reverse Large CIDS", "a11.ext.ase.reverselargecids",
2599 FT_UINT8
, BASE_DEC
, NULL
, 128,
2603 { &hf_a11_ase_reverse_profile_count
,
2604 { "Reverse Profile Count", "a11.ext.ase.revprofilecount",
2605 FT_UINT8
, BASE_DEC
, NULL
, 0,
2610 { &hf_a11_ase_reverse_profile
,
2611 { "Reverse Profile", "a11.ext.ase.reverseprofile",
2612 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &a11_rohc_profile_vals_ext
, 0,
2615 { &hf_a11_aut_flow_prof_sub_type
,
2616 { "Sub type", "a11.aut_flow_prof.sub_type",
2617 FT_UINT8
, BASE_DEC
, VALS(a11_aut_flow_prof_subtype_vals
), 0,
2620 { &hf_a11_aut_flow_prof_sub_type_len
,
2621 { "Length", "a11.aut_flow_prof.length",
2622 FT_UINT8
, BASE_DEC
, NULL
, 0,
2625 { &hf_a11_aut_flow_prof_sub_type_value
,
2626 { "Value", "a11.aut_flow_prof.value",
2627 FT_UINT16
, BASE_DEC
, NULL
, 0,
2630 { &hf_a11_serv_opt_prof_max_serv
,
2631 { "Service-Connections-Per-Link-flow", "a11.serv_opt_prof.scplf",
2632 FT_UINT32
, BASE_DEC
, NULL
, 0,
2636 { "Sub-Type", "a11.sub_type",
2637 FT_UINT8
, BASE_DEC
, NULL
, 0,
2640 { &hf_a11_sub_type_length
,
2641 { "Sub-Type Length", "a11.sub_type_length",
2642 FT_UINT8
, BASE_DEC
, NULL
, 0,
2646 { "Service Option", "a11.serviceoption",
2647 FT_UINT8
, BASE_DEC
, NULL
, 0,
2650 { &hf_a11_max_num_serv_opt
,
2651 { "Max number of service instances of Service Option", "a11.max_serviceoptions",
2652 FT_UINT8
, BASE_DEC
, NULL
, 0,
2655 { &hf_a11_bcmcs_stype
,
2656 { "Protocol Type", "a11.ext.bcmcs.ptype",
2657 FT_UINT8
, BASE_HEX
, VALS(a11_bcmcs_stype_vals
), 0,
2660 { &hf_a11_bcmcs_entry_len
,
2661 { "Entry length", "a11.ext.bcmcs.entry_len",
2662 FT_UINT8
, BASE_DEC
, NULL
, 0,
2668 /* Setup protocol subtree array */
2669 static int *ett
[] = {
2677 &ett_a11_fqi_flowentry
,
2678 &ett_a11_fqi_requestedqos
,
2679 &ett_a11_fqi_qos_attribute_set
,
2680 &ett_a11_fqi_grantedqos
,
2681 &ett_a11_rqi_flowentry
,
2682 &ett_a11_rqi_requestedqos
,
2683 &ett_a11_rqi_qos_attribute_set
,
2684 &ett_a11_rqi_grantedqos
,
2686 &ett_a11_fqi_entry_flags
,
2687 &ett_a11_rqi_entry_flags
,
2688 &ett_a11_fqui_flowentry
,
2689 &ett_a11_rqui_flowentry
,
2690 &ett_a11_subscriber_profile
,
2691 &ett_a11_forward_rohc
,
2692 &ett_a11_reverse_rohc
,
2693 &ett_a11_forward_profile
,
2694 &ett_a11_reverse_profile
,
2695 &ett_a11_aut_flow_profile_ids
,
2696 &ett_a11_bcmcs_entry
,
2699 static ei_register_info ei
[] = {
2700 { &ei_a11_sub_type_length_not2
, { "a11.sub_type_length.bad", PI_PROTOCOL
, PI_WARN
, "Sub-Type Length should be at least 2", EXPFILL
}},
2701 { &ei_a11_sse_too_short
, { "a11.sse_too_short", PI_MALFORMED
, PI_ERROR
, "SSE too short", EXPFILL
}},
2702 { &ei_a11_bcmcs_too_short
, { "a11.bcmcs_too_short", PI_MALFORMED
, PI_ERROR
, "BCMCS too short", EXPFILL
}},
2703 { &ei_a11_entry_data_not_dissected
, { "a11.entry_data_not_dissected", PI_UNDECODED
, PI_WARN
, "Entry Data, Not dissected yet", EXPFILL
}},
2704 { &ei_a11_session_data_not_dissected
, { "a11.session_data_not_dissected", PI_UNDECODED
, PI_WARN
, "Session Data Type Not dissected yet", EXPFILL
}},
2707 expert_module_t
* expert_a11
;
2709 /* Register the protocol name and description */
2710 proto_a11
= proto_register_protocol("3GPP2 A11", "3GPP2 A11", "a11");
2712 /* Register the dissector by name */
2713 a11_handle
= register_dissector("a11", dissect_a11
, proto_a11
);
2715 /* Required function calls to register the header fields and subtrees used */
2716 proto_register_field_array(proto_a11
, hf
, array_length(hf
));
2717 proto_register_subtree_array(ett
, array_length(ett
));
2719 expert_a11
= expert_register_protocol(proto_a11
);
2720 expert_register_field_array(expert_a11
, ei
, array_length(ei
));
2724 proto_reg_handoff_a11(void)
2726 dissector_add_uint_with_preference("udp.port", UDP_PORT_3GA11
, a11_handle
);
2728 /* 3GPP2-Service-Option-Profile(74) */
2729 radius_register_avp_dissector(VENDOR_THE3GPP2
, 74, dissect_3gpp2_service_option_profile
);
2730 /* 3GPP2-Authorized-Flow-Profile-IDs(131) */
2731 radius_register_avp_dissector(VENDOR_THE3GPP2
, 131, dissect_3gpp2_radius_aut_flow_profile_ids
);
2735 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2740 * indent-tabs-mode: nil
2743 * vi: set shiftwidth=4 tabstop=8 expandtab:
2744 * :indentSize=4:tabSize=8:noTabs=true: