aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hdcp2.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-26 03:29:07 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-26 03:29:07 +0000
commit5bc22a25df02c19a2414bcf3c5ea3446cf96c7ef (patch)
treecd264649621f031a8edcfa7cbd34ba4b0a8d5450 /epan/dissectors/packet-hdcp2.c
parenta9c35aa4b65dc566ffe845e9bc205e81ecc7979c (diff)
Batch of filterable expert infos.
svn path=/trunk/; revision=49584
Diffstat (limited to 'epan/dissectors/packet-hdcp2.c')
-rw-r--r--epan/dissectors/packet-hdcp2.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/epan/dissectors/packet-hdcp2.c b/epan/dissectors/packet-hdcp2.c
index 11960cf9bb..54dc7b17dd 100644
--- a/epan/dissectors/packet-hdcp2.c
+++ b/epan/dissectors/packet-hdcp2.c
@@ -66,6 +66,9 @@ static int hf_hdcp2_l_prime = -1;
static int hf_hdcp2_e_dkey_ks = -1;
static int hf_hdcp2_r_iv = -1;
+static expert_field ei_hdcp2_reserved_0 = EI_INIT;
+
+
#define ID_AKE_INIT 2
#define ID_AKE_SEND_CERT 3
#define ID_AKE_NO_STORED_KM 4
@@ -174,13 +177,10 @@ dissect_hdcp2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
ptvcursor_add(cursor, hf_hdcp2_cert_n, N_LEN, ENC_NA);
ptvcursor_add(cursor, hf_hdcp2_cert_e, E_LEN, ENC_BIG_ENDIAN);
reserved = tvb_get_ntohs(tvb, ptvcursor_current_offset(cursor));
- proto_tree_add_text(cert_tree, tvb,
+ pi = proto_tree_add_text(cert_tree, tvb,
ptvcursor_current_offset(cursor), 2, "reserved bytes");
if (reserved != 0) {
- pi = proto_tree_add_text(cert_tree, tvb,
- ptvcursor_current_offset(cursor), 2, "invalid value");
- expert_add_info_format(pinfo, pi, PI_PROTOCOL, PI_WARN,
- "reserved bytes must be set to 0x0");
+ expert_add_info(pinfo, pi, &ei_hdcp2_reserved_0);
}
ptvcursor_advance(cursor, 2);
ptvcursor_add(cursor, hf_hdcp2_cert_rcv_sig, RCV_SIG_LEN, ENC_NA);
@@ -284,7 +284,12 @@ proto_register_hdcp2(void)
&ett_hdcp2_cert
};
+ static ei_register_info ei[] = {
+ { &ei_hdcp2_reserved_0, { "hdcp2.reserved.not0", PI_PROTOCOL, PI_WARN, "reserved bytes must be set to 0x0", EXPFILL }},
+ };
+
module_t *hdcp2_module;
+ expert_module_t* expert_hdcp2;
msg_table = g_hash_table_new(g_direct_hash, g_direct_equal);
for(i=0; i<array_length(msg_info); i++) {
@@ -304,6 +309,8 @@ proto_register_hdcp2(void)
proto_register_field_array(proto_hdcp2, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_hdcp2 = expert_register_protocol(proto_hdcp2);
+ expert_register_field_array(expert_hdcp2, ei, array_length(ei));
new_register_dissector("hdcp2", dissect_hdcp2, proto_hdcp2);
}