geo location type 1 represents SAI, but for GTP v1 it is returned as e212, hence not aggregating with GTP v2
the patch also opens up a way to add e212.cgi (Cell Global Identity) which is shared between GTP vesions.
Change-Id: I853cd26037533aac2735b9d965793362c16f3f04
Reviewed-on: https://code.wireshark.org/review/18428
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
* Formats everything after the discriminator, shared function
*/
guint16
-be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
+be_cell_id_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc, e212_number_type_t number_type)
{
guint32 value;
guint32 curr_offset;
/* FALLTHRU */
case 0x0c: /* For identification of a UTRAN cell for cell load information: */
if (disc != 0x0b)
- curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, TRUE);
else
- curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, FALSE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, FALSE);
/* FALLTHRU */
case 0x01:
return(curr_offset - offset);
}
+guint16
+be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
+{
+ return be_cell_id_type(tvb, tree, pinfo, offset, len, add_string, string_len, disc, E212_NONE);
+}
+
static guint16
be_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
{
#include <epan/proto.h>
#include "packet-sccp.h"
+#include "packet-e212.h"
#include "ws_symbol_export.h"
/* PROTOTYPES/FORWARDS */
void dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
guint16 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc);
+guint16 be_cell_id_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc, e212_number_type_t number_type);
guint16 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
guint16 be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
guint16 be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
* SAI is defined in sub-clause 9.2.3.9 of 3GPP TS 25.413 [7].
*/
/* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
- be_cell_id_aux(tvb, tree, pinfo, offset, length - 1, NULL, 0, 4);
+ be_cell_id_type(tvb, tree, pinfo, offset, length - 1, NULL, 0, 4,E212_SAI);
offset = offset + 5;
proto_tree_add_item(tree, hf_gtp_ext_sac, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
* SAI is defined in sub-clause 9.2.3.9 of 3GPP TS 25.413 [7].
*/
/* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
- be_cell_id_aux(tvb, ext_tree, pinfo, offset, length - 1, NULL, 0, 4);
+ be_cell_id_type(tvb, ext_tree, pinfo, offset, length - 1, NULL, 0, 4,E212_SAI);
offset = offset + 5;
proto_tree_add_item(ext_tree, hf_gtp_ext_sac, tvb, offset, 2, ENC_BIG_ENDIAN);
break;