GSM A-bis/OML: show Manufacturer ID in vendor-specific messages
This commit is contained in:
parent
7291d7f951
commit
ca86d0ab38
|
@ -647,6 +647,8 @@ static int hf_oml_msg_disc = -1;
|
|||
static int hf_oml_placement = -1;
|
||||
static int hf_oml_sequence = -1;
|
||||
static int hf_oml_length = -1;
|
||||
static int hf_oml_manuf_id_len = -1;
|
||||
static int hf_oml_manuf_id_val = -1;
|
||||
/* FOM header */
|
||||
static int hf_oml_fom_msgtype = -1;
|
||||
static int hf_oml_fom_objclass = -1;
|
||||
|
@ -744,6 +746,7 @@ static int ett_oml_fom = -1;
|
|||
static int ett_oml_fom_att = -1;
|
||||
|
||||
static expert_field ei_unknown_type = EI_INIT;
|
||||
static expert_field ei_unknown_manuf = EI_INIT;
|
||||
static expert_field ei_length_mismatch = EI_INIT;
|
||||
|
||||
enum {
|
||||
|
@ -1944,13 +1947,21 @@ static int
|
|||
dissect_oml_manuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
int offset, proto_item *top_ti)
|
||||
{
|
||||
if (tvb_get_guint8(tvb, offset) != 0x0d ||
|
||||
tvb_memeql(tvb, offset+1, ipaccess_magic, sizeof(ipaccess_magic)))
|
||||
return offset;
|
||||
guint32 len;
|
||||
|
||||
proto_tree_add_item_ret_uint(tree, hf_oml_manuf_id_len, tvb,
|
||||
offset, 1, ENC_NA, &len);
|
||||
proto_tree_add_item(tree, hf_oml_manuf_id_val, tvb,
|
||||
offset + 1, len, ENC_ASCII|ENC_NA);
|
||||
|
||||
if (len == sizeof(ipaccess_magic) &&
|
||||
tvb_memeql(tvb, offset+1, ipaccess_magic, sizeof(ipaccess_magic))) {
|
||||
offset += (int)sizeof(ipaccess_magic) + 1;
|
||||
|
||||
return dissect_oml_fom(tvb, pinfo, tree, offset, top_ti);
|
||||
} else {
|
||||
expert_add_info(pinfo, top_ti, &ei_unknown_manuf);
|
||||
return offset;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2043,6 +2054,16 @@ proto_register_abis_oml(void)
|
|||
FT_UINT8, BASE_DEC, NULL, 0,
|
||||
"Total length of payload", HFILL }
|
||||
},
|
||||
{ &hf_oml_manuf_id_len,
|
||||
{ "Manufacturer ID Length", "gsm_abis_oml.manuf_id_len",
|
||||
FT_UINT8, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_oml_manuf_id_val,
|
||||
{ "Manufacturer ID Value", "gsm_abis_oml.manuf_id_val",
|
||||
FT_STRING, BASE_NONE, NULL, 0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_oml_fom_msgtype,
|
||||
{ "FOM Message Type", "gsm_abis_oml.fom.msg_type",
|
||||
FT_UINT8, BASE_CUSTOM, CF_FUNC(format_custom_msgtype), 0,
|
||||
|
@ -2539,6 +2560,8 @@ proto_register_abis_oml(void)
|
|||
static ei_register_info ei[] = {
|
||||
{ &ei_unknown_type, { "gsm_abis_oml.expert.unknown_type", PI_PROTOCOL, PI_NOTE,
|
||||
"Unknown TLV type", EXPFILL }},
|
||||
{ &ei_unknown_manuf, { "gsm_abis_oml.expert.unknown_manuf", PI_PROTOCOL, PI_WARN,
|
||||
"Unknown manufacturer ID", EXPFILL }},
|
||||
{ &ei_length_mismatch, { "gsm_abis_oml.expert.length_mismatch", PI_PROTOCOL, PI_WARN,
|
||||
"Indicated length does not match the actual", EXPFILL }},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue