Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / epan / dissectors / asn1 / HI2Operations / HI2Operations.cnf
blob7f25e3fa273361673d5f469e015e19eef2d8ad42
1 # HI2Operations.cnf
2 # HI2Operations conformation file
4 #.MODULE
5 EpsHI2Operations EpsHI2
6 UmtsHI2Operations UmtsHI2
7 HI3CCLinkData   hi3cclinkdata
8 #.MODULE_IMPORT
10 #.EXPORTS
12 #.REGISTER
14 #.PDU
15 IRIsContent
16 UUS1-Content
18 #.NO_EMIT
20 #.OMIT_ASSIGNMENT
21 # Get rid of unused code warnings
22 CallContentLinkCharacteristics
23 CCLink-State
24 Intercepted-Call-State
25 GPRSCorrelationNumber
26 GPRSEvent
27 TetraLocation
29 #.FIELD_RENAME
30 GSMLocation/geoCoordinates/latitude geoCoordinates_latitude
31 GSMLocation/geoCoordinates/longitude geoCoordinates_longitude
33 #.FN_HDR UUS1-Content
35 /* Heuristic test to see if it's our content */
36     int8_t   tmp_class;
37     bool tmp_pc;
38     int32_t  tmp_tag;
39     int      tmp_offset;
40     unsigned length = tvb_captured_length(tvb);
41     uint32_t tmp_length;
42     bool tmp_ind;
44     /* Check for min length */
45     if (length < 6){
46       return 0;
47     }
48     /* We start with UUS1-Content ::= SEQUENCE */
49     tmp_offset = get_ber_identifier(tvb, offset, &tmp_class, &tmp_pc, &tmp_tag);
50     if(tmp_class != BER_CLASS_UNI){
51       return 0;
52     }
53     if(tmp_pc != 1){
54       return 0;
55     }
56     if(tmp_tag != BER_UNI_TAG_SEQUENCE){
57       return 0;
58     }
59     /* Get length just to move offset forward */
60     tmp_offset = get_ber_length(tvb, tmp_offset, &tmp_length, &tmp_ind);
62     /* Next 2 mandatorry elements
63      *  lawfullInterceptionIdentifier [1] LawfulInterceptionIdentifier,
64      *  communicationIdentifier       [2] CommunicationIdentifier,
65      */
66     get_ber_identifier(tvb, tmp_offset, &tmp_class, &tmp_pc, &tmp_tag);
67     if(tmp_class != BER_CLASS_CON){
68       return 0;
69     }
70     if(tmp_pc != 0){
71       return 0;
72     }
73     if(tmp_tag != 1){
74       return 0;
75     }
77 #.FN_BODY Network-Element-Identifier/e164-Format VAL_PTR = &parameter_tvb
78   tvbuff_t *parameter_tvb=NULL;
80 %(DEFAULT_BODY)s
81   if (!parameter_tvb)
82     return offset;
84   dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
86 #.FN_BODY UUS1-Content/bearer-capability VAL_PTR =&parameter_tvb
87   tvbuff_t *parameter_tvb;
89 %(DEFAULT_BODY)s
91   if (!parameter_tvb)
92     return offset;
94   dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), tree);
96 #.FN_BODY EPS-GTPV2-SpecificParameters/pDNAddressAllocation
97   proto_tree *eps_paa_tree;
98   unsigned tvb_len;
100   /*
101    * 8.14 PDN Address Allocation (PAA)
102    * 3GPP TS 29.274
103    */
105   tvb_len = tvb_reported_length(tvb);
106   eps_paa_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_paa, NULL, "pDNAddressAllocation");
108   dissect_gtpv2_paa(tvb, actx->pinfo, eps_paa_tree, NULL, tvb_len, 0, 0, NULL);
110   offset = tvb_len;
112 #.FN_BODY EPS-GTPV2-SpecificParameters/rATType VAL_PTR =&parameter_tvb
113   tvbuff_t *parameter_tvb=NULL;
114   unsigned tvb_len;
116 %(DEFAULT_BODY)s
118   if (!parameter_tvb)
119     return offset;
121   /*
122    * 8.17 RAT Type
123    * 3GPP TS 29.274
124    */
126   tvb_len = tvb_reported_length(parameter_tvb);
127         uint8_t *ascii = (uint8_t*)tvb_memdup(actx->pinfo->pool, parameter_tvb, 0, tvb_len);
128   proto_item_append_text(actx->created_item, " (%%s)", val_to_str_ext_const((uint32_t)g_ascii_strtoll(ascii, NULL, 10), &gtpv2_rat_type_vals_ext, "Unknown"));
130 #.FN_BODY EPS-GTPV2-SpecificParameters/ePSBearerQoS
131   proto_tree *eps_qos_tree;
132   unsigned tvb_len;
134   /*
135    * 8.15 Bearer Quality of Service (Bearer QoS)
136    * 3GPP TS 29.274
137    */
139   tvb_len = tvb_reported_length(tvb);
140   eps_qos_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_qos, NULL, "ePSBearerQoS");
142   dissect_gtpv2_bearer_qos(tvb, actx->pinfo, eps_qos_tree, NULL, tvb_len, 0, 0, NULL);
144   offset = tvb_len;
146 #.FN_BODY EPS-GTPV2-SpecificParameters/aPN-AMBR
147   proto_tree *eps_apn_ambr_tree;
148   unsigned tvb_len;
150   /*
151    * 8.7 Aggregate Maximum Bit Rate (AMBR)
152    * 3GPP TS 29.274
153    */
155   tvb_len = tvb_reported_length(tvb);
156   eps_apn_ambr_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_apn_ambr, NULL, "aPN-AMBR");
158   dissect_gtpv2_ambr(tvb, actx->pinfo, eps_apn_ambr_tree, NULL, tvb_len, 0, 0, NULL);
160   offset = tvb_len;
162 #.FN_BODY EPSLocation/userLocationInfo
163   proto_tree *eps_uli_tree;
164   unsigned tvb_len;
166   /*
167    * 8.22 User Location Info (ULI)
168    * 3GPP TS 29.274
169    */
171   tvb_len = tvb_reported_length(tvb);
172   eps_uli_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_uli, NULL, "userLocationInfo");
174   dissect_gtpv2_uli(tvb, actx->pinfo, eps_uli_tree, NULL, tvb_len, 0, 0, NULL);
176   offset = tvb_len;
178 #.FN_BODY EPS-GTPV2-SpecificParameters/pDNType VAL_PTR =&parameter_tvb
179   tvbuff_t *parameter_tvb=NULL;
180   unsigned tvb_len;
182 %(DEFAULT_BODY)s
184   if (!parameter_tvb)
185     return offset;
187   /*
188    * 8.34 PDN Type
189    * 3GPP TS 29.274
190    */
192   tvb_len = tvb_reported_length(parameter_tvb);
193         uint8_t *ascii = (uint8_t*)tvb_memdup(actx->pinfo->pool, parameter_tvb, 0, tvb_len);
194   proto_item_append_text(actx->created_item, " (%%s)", val_to_str_ext_const((uint32_t)g_ascii_strtoll(ascii, NULL, 10), &gtpv2_pdn_type_vals_ext, "Unknown"));
196 #.FN_BODY EPS-GTPV2-SpecificParameters/tFT
197   proto_tree *eps_tft_tree;
198   unsigned tvb_len;
200   /*
201   * 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT)
202    * 3GPP TS 29.274
203    */
205   tvb_len = tvb_reported_length(tvb);
206   eps_tft_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_tft, NULL, "tFT");
208   /* The detailed coding of Traffic Aggregate
209    * Description is specified in 3GPP TS 24.008 [5] ,
210    * clause 10.5.6.12, beginning with octet 3..
211    * Use the decoding in packet-gsm_a_gm.c
212    */
213   de_sm_tflow_temp(tvb, eps_tft_tree, actx->pinfo, 0, tvb_len, NULL, 0);
215   offset = tvb_len;
217 #.FN_BODY Network-Identifier/operator-Identifier
218   proto_tree *network_operator_id_tree;
219   unsigned tvb_len;
221   /*
222    * 8.18 Serving Network
223    * 3GPP TS 29.274
224    */
226   tvb_len = tvb_reported_length(tvb);
227   network_operator_id_tree = proto_tree_add_subtree(tree, tvb, 0, tvb_len, ett_HI2Operations_eps_network, NULL, "operator-Identifier");
229   dissect_e212_mcc_mnc_wmem_packet_str(tvb, actx->pinfo, network_operator_id_tree, 0, E212_NONE, true);
231   offset = tvb_len;
233   #.FN_BODY PartyInformation/partyIdentity/imei
234   unsigned tvb_len;
236   /*
237    * Mobile Equipment Identity (MEI)
238    */
240   tvb_len = tvb_reported_length(tvb);
241   /* IMEISV is 16 digits, but often transmitted BCD coded in 8 octets.
242     Some implementations use IMEI (15 digits) instead of IMEISV */
243   if (tvb_len == 8) {
244     proto_tree_add_item(tree, hf_HI2Operations_imei, tvb, offset, tvb_len, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN|ENC_NA);
245   } else {
246     proto_tree_add_item(tree, hf_HI2Operations_imei, tvb, offset, tvb_len, ENC_ASCII);
247   }
249   offset = tvb_len;
251 #.FN_BODY PartyInformation/partyIdentity/imsi
252   unsigned tvb_len;
254   /*
255    * See MAP format TS GSM 09.02 [32] International Mobile
256          * Station Identity E.212 number beginning with Mobile Country Code
257    */
259   tvb_len = tvb_reported_length(tvb);
261   dissect_e212_imsi(tvb, actx->pinfo, tree,  offset, tvb_len, false);
263   offset = tvb_len;
265 #.FIELD_ATTR
266 GSMLocation/geoCoordinates/latitude ABBREV=geoCoordinates.latitude
267 GSMLocation/geoCoordinates/longitude ABBREV=geoCoordinates.longitude
268 IRI-Parameters/lawfulInterceptionIdentifier TYPE = FT_STRING  DISPLAY = BASE_NONE
269 IRI-Parameters/ePSCorrelationNumber TYPE = FT_STRING  DISPLAY = BASE_NONE
270 EPS-GTPV2-SpecificParameters/aPN TYPE = FT_STRING  DISPLAY = BASE_NONE
271 EPS-GTPV2-SpecificParameters/ePSBearerIdentity TYPE = FT_STRING  DISPLAY = BASE_NONE
272 EPS-GTPV2-SpecificParameters/rATType TYPE = FT_STRING  DISPLAY = BASE_NONE
273 EPS-GTPV2-SpecificParameters/pDNType TYPE = FT_STRING  DISPLAY = BASE_NONE
274 EPS-GTPV2-SpecificParameters/linkedEPSBearerId TYPE = FT_STRING  DISPLAY = BASE_NONE
275 #.END