e212: added 3 new filters (CGI, ECGI, TAI)
Added these new filters to enhance mcc/mnc filtering in GTP protocol. Change-Id: I595b5fde4fa358886fbe5c58f6ecab496d9ef08c Reviewed-on: https://code.wireshark.org/review/18444 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
c63f895159
commit
346bda4238
|
@ -2724,10 +2724,16 @@ static int hf_E212_mcc = -1;
|
|||
static int hf_E212_mcc_lai = -1;
|
||||
static int hf_E212_mcc_sai = -1;
|
||||
static int hf_E212_mcc_rai = -1;
|
||||
static int hf_E212_mcc_cgi = -1;
|
||||
static int hf_E212_mcc_ecgi = -1;
|
||||
static int hf_E212_mcc_tai = -1;
|
||||
static int hf_E212_mnc = -1;
|
||||
static int hf_E212_mnc_lai = -1;
|
||||
static int hf_E212_mnc_sai = -1;
|
||||
static int hf_E212_mnc_rai = -1;
|
||||
static int hf_E212_mnc_cgi = -1;
|
||||
static int hf_E212_mnc_ecgi = -1;
|
||||
static int hf_E212_mnc_tai = -1;
|
||||
|
||||
static int ett_e212_imsi = -1;
|
||||
|
||||
|
@ -2817,6 +2823,18 @@ dissect_e212_mcc_mnc_wmem_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
hf_E212_mcc_id = hf_E212_mcc_sai;
|
||||
hf_E212_mnc_id = hf_E212_mnc_sai;
|
||||
break;
|
||||
case E212_CGI:
|
||||
hf_E212_mcc_id = hf_E212_mcc_cgi;
|
||||
hf_E212_mnc_id = hf_E212_mnc_cgi;
|
||||
break;
|
||||
case E212_ECGI:
|
||||
hf_E212_mcc_id = hf_E212_mcc_ecgi;
|
||||
hf_E212_mnc_id = hf_E212_mnc_ecgi;
|
||||
break;
|
||||
case E212_TAI:
|
||||
hf_E212_mcc_id = hf_E212_mcc_tai;
|
||||
hf_E212_mnc_id = hf_E212_mnc_tai;
|
||||
break;
|
||||
default:
|
||||
hf_E212_mcc_id = hf_E212_mcc;
|
||||
hf_E212_mnc_id = hf_E212_mnc;
|
||||
|
@ -3200,6 +3218,21 @@ proto_register_e212(void)
|
|||
FT_UINT16, BASE_DEC|BASE_EXT_STRING, &E212_codes_ext, 0x0,
|
||||
"Mobile Country Code MCC", HFILL }
|
||||
},
|
||||
{ &hf_E212_mcc_cgi,
|
||||
{ "Mobile Country Code (MCC)","e212.cgi.mcc",
|
||||
FT_UINT16, BASE_DEC|BASE_EXT_STRING, &E212_codes_ext, 0x0,
|
||||
"Mobile Country Code MCC", HFILL }
|
||||
},
|
||||
{ &hf_E212_mcc_ecgi,
|
||||
{ "Mobile Country Code (MCC)","e212.ecgi.mcc",
|
||||
FT_UINT16, BASE_DEC|BASE_EXT_STRING, &E212_codes_ext, 0x0,
|
||||
"Mobile Country Code MCC", HFILL }
|
||||
},
|
||||
{ &hf_E212_mcc_tai,
|
||||
{ "Mobile Country Code (MCC)","e212.tai.mcc",
|
||||
FT_UINT16, BASE_DEC|BASE_EXT_STRING, &E212_codes_ext, 0x0,
|
||||
"Mobile Country Code MCC", HFILL }
|
||||
},
|
||||
{ &hf_E212_mnc,
|
||||
{ "Mobile Network Code (MNC)","e212.mnc",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
|
@ -3220,6 +3253,21 @@ proto_register_e212(void)
|
|||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Mobile network code", HFILL }
|
||||
},
|
||||
{ &hf_E212_mnc_cgi,
|
||||
{ "Mobile Network Code (MNC)","e212.cgi.mnc",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Mobile network code", HFILL }
|
||||
},
|
||||
{ &hf_E212_mnc_ecgi,
|
||||
{ "Mobile Network Code (MNC)","e212.ecgi.mnc",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Mobile network code", HFILL }
|
||||
},
|
||||
{ &hf_E212_mnc_tai,
|
||||
{ "Mobile Network Code (MNC)","e212.tai.mnc",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Mobile network code", HFILL }
|
||||
},
|
||||
#if 0
|
||||
{ &hf_E212_msin,
|
||||
{ "Mobile Subscriber Identification Number (MSIN)", "e212.msin",
|
||||
|
|
|
@ -35,7 +35,10 @@ typedef enum {
|
|||
E212_NONE,
|
||||
E212_LAI,
|
||||
E212_RAI,
|
||||
E212_SAI
|
||||
E212_SAI,
|
||||
E212_CGI,
|
||||
E212_ECGI,
|
||||
E212_TAI
|
||||
} e212_number_type_t;
|
||||
|
||||
gchar* dissect_e212_mcc_mnc_wmem_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, e212_number_type_t number_type, gboolean little_endian);
|
||||
|
|
|
@ -5995,7 +5995,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* CGI is defined in sub-clause 4.3.1 of 3GPP TS 23.003 [2].
|
||||
*/
|
||||
/* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
|
||||
be_cell_id_aux(tvb, tree, pinfo, offset, length - 1, NULL, 0, 0);
|
||||
be_cell_id_type(tvb, tree, pinfo, offset, length - 1, NULL, 0, 0, E212_CGI);
|
||||
break;
|
||||
case 1:
|
||||
/* Geographic Location field included and it holds the Service
|
||||
|
@ -6024,7 +6024,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* Area Identity (TAI) of where the user currently is registered.
|
||||
* TAI is defined in sub-clause 8.21.4 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_TAI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_tac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -6033,7 +6033,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* Global Identifier (ECGI) of where the user currently is registered.
|
||||
* ECGI is defined in sub-clause 8.21.5 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_ECGI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_eci, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -6044,11 +6044,11 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* TAI is defined in sub-clause 8.21.4 of 3GPP TS 29.274.
|
||||
* ECGI is defined in sub-clause 8.21.5 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_TAI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_tac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_ECGI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_eci, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -6093,7 +6093,7 @@ decode_gtp_usr_loc_inf(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tr
|
|||
* CGI is defined in sub-clause 4.3.1 of 3GPP TS 23.003 [2].
|
||||
*/
|
||||
/* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
|
||||
be_cell_id_aux(tvb, ext_tree, pinfo, offset, length - 1, NULL, 0, 0);
|
||||
be_cell_id_type(tvb, ext_tree, pinfo, offset, length - 1, NULL, 0, 0, E212_CGI);
|
||||
break;
|
||||
case 1:
|
||||
/* Geographic Location field included and it holds the Service
|
||||
|
|
|
@ -2270,7 +2270,7 @@ dissect_gtpv2_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offs
|
|||
gchar *mcc_mnc_str;
|
||||
guint16 tac;
|
||||
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_NONE, TRUE);
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_TAI, TRUE);
|
||||
*offset += 3;
|
||||
tac = tvb_get_ntohs(tvb, *offset);
|
||||
proto_tree_add_item(tree, hf_gtpv2_tai_tac, tvb, *offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -2297,7 +2297,7 @@ dissect_gtpv2_ecgi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *off
|
|||
NULL
|
||||
};
|
||||
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_NONE, TRUE);
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_ECGI, TRUE);
|
||||
*offset += 3;
|
||||
/* The bits 8 through 5, of octet e+3 (Fig 8.21.5-1 in TS 29.274 V8.2.0) are spare
|
||||
* and hence they would not make any difference to the hex string following it,
|
||||
|
@ -2375,7 +2375,7 @@ dissect_gtpv2_cgi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offs
|
|||
gchar *mcc_mnc_str;
|
||||
guint16 lac, ci;
|
||||
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_NONE, TRUE);
|
||||
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_CGI, TRUE);
|
||||
*offset += 3;
|
||||
lac = tvb_get_ntohs(tvb, *offset);
|
||||
proto_tree_add_item(tree, hf_gtpv2_uli_cgi_lac, tvb, *offset, 2, ENC_BIG_ENDIAN);
|
||||
|
|
Loading…
Reference in New Issue