aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nat-pmp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-05-20 13:25:55 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-20 16:17:41 +0000
commit9c08654314c53a566f7f9bd66d933a306137b339 (patch)
tree7f31f2f9a1953a0f386503145598b66d6b208501 /epan/dissectors/packet-nat-pmp.c
parent12d297ed7599834716491e8f24cb226d943e62ba (diff)
PCP: Add Description Option for the Port Control Protocol (RFC 7220)
Change-Id: I2931b14855981e71d1135a8ff7cc3b494a2a7572 Reviewed-on: https://code.wireshark.org/review/1699 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-nat-pmp.c')
-rw-r--r--epan/dissectors/packet-nat-pmp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nat-pmp.c b/epan/dissectors/packet-nat-pmp.c
index 755bf91be0..e211ea2c2d 100644
--- a/epan/dissectors/packet-nat-pmp.c
+++ b/epan/dissectors/packet-nat-pmp.c
@@ -63,6 +63,7 @@ void proto_reg_handoff_nat_pmp(void);
#define OPT_THIRD_PARTY 1
#define OPT_PREFER_FAILURE 2
#define OPT_FILTER 3
+#define OPT_DESCRIPTION 128
static int proto_nat_pmp = -1;
static int proto_pcp = -1;
@@ -123,6 +124,7 @@ static int hf_option_filter_reserved = -1;
static int hf_option_filter_prefix_length = -1;
static int hf_option_filter_remote_peer_port = -1;
static int hf_option_filter_remote_peer_ip = -1;
+static int hf_option_description = -1;
static gint ett_pcp = -1;
static gint ett_opcode = -1;
@@ -198,6 +200,7 @@ static const value_string pcp_option_vals[] = {
{ OPT_THIRD_PARTY, "Third Party" },
{ OPT_PREFER_FAILURE, "Prefer Failure" },
{ OPT_FILTER, "Filter" },
+ { OPT_DESCRIPTION, "Description" },
{ 0, NULL }
};
@@ -483,6 +486,11 @@ dissect_portcontrol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
proto_tree_add_item (option_sub_tree, hf_option_filter_remote_peer_ip, tvb, offset+4, 16, ENC_NA);
break;
+ case OPT_DESCRIPTION:
+ proto_tree_add_item (option_sub_tree, hf_option_description, tvb, offset, option_length, ENC_UTF_8|ENC_NA);
+ break;
+
+
default:
/* Unknown option */
expert_add_info_format(pinfo, option_ti, &ei_pcp_option_unknown, "Unknown option: %d", option);
@@ -681,6 +689,9 @@ void proto_register_nat_pmp (void)
{ &hf_option_filter_remote_peer_ip,
{ "Remote Peer IP Address", "portcontrol.option.filter.remote_peer_ip", FT_IPv6, BASE_NONE,
NULL, 0x0, NULL, HFILL } },
+ { &hf_option_description,
+ { "Description", "portcontrol.option.description", FT_STRING, BASE_NONE,
+ NULL, 0x0, NULL, HFILL } },
};
static gint *pcp_ett[] = {