MGCP: added NCS ResourceID

Change-Id: I561df5159243910356abb57624b20e630a2460d7
Reviewed-on: https://code.wireshark.org/review/29992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Bruno Verstuyft 2018-10-03 11:14:04 +02:00 committed by Anders Broman
parent 0398e70b2c
commit 4eae3683cc
1 changed files with 16 additions and 0 deletions

View File

@ -148,6 +148,7 @@ static int hf_mgcp_param_maxmgcpdatagram = -1;
static int hf_mgcp_param_packagelist = -1;
static int hf_mgcp_param_extension = -1;
static int hf_mgcp_param_extension_critical = -1;
static int hf_mgcp_param_resourceid = -1;
static int hf_mgcp_param_invalid = -1;
static int hf_mgcp_messagecount = -1;
static int hf_mgcp_dup = -1;
@ -974,6 +975,18 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp
case 'D':
if (tvb_get_guint8(tvb, tvb_current_offset+1) != ':')
{
if (len > (tvb_current_offset + 5 - offset) &&
(g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset + 1) == 'Q')) &&
( tvb_get_guint8(tvb, tvb_current_offset + 2) == '-' ) &&
(g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset + 3) == 'R')) &&
(g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset + 4) == 'I')) &&
( tvb_get_guint8(tvb, tvb_current_offset + 5) == ':' )
) {
tvb_current_offset+=4;
*hf = &hf_mgcp_param_resourceid;
break;
}
*hf = &hf_mgcp_param_invalid;
break;
}
@ -2645,6 +2658,9 @@ void proto_register_mgcp(void)
{ &hf_mgcp_param_extension_critical,
{ "Extension Parameter (critical)", "mgcp.param.extensioncritical", FT_STRING, BASE_NONE, NULL, 0x0,
"Critical Extension Parameter", HFILL }},
{ &hf_mgcp_param_resourceid,
{ "ResourceIdentifier (DQ-RI)", "mgcp.param.resourceid", FT_STRING, BASE_NONE, NULL, 0x0,
"Resource Identifier", HFILL }},
{ &hf_mgcp_param_invalid,
{ "Invalid Parameter", "mgcp.param.invalid", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},