Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] packet-dns.c - how to get field value

From: chuck c <bubbasnmp@xxxxxxxxx>
Date: Thu, 15 Apr 2021 17:52:44 -0500
add_rr_to_tree()
add_opt_rr_to_tree()
proto_tree_add_item(rr_tree, hf_dns_rr_len, tvb, offset, 2, ENC_BIG_ENDIAN);

dissect_dns_answer()
    case T_PTR: /* Domain Name Pointer (12) */
    {
      const gchar  *pname;
      int           pname_len;

      used_bytes = get_dns_name(tvb, cur_offset, 0, dns_data_offset, &pname, &pname_len);



I understand from Graham's response above that as much as I'd like to find proto_tree_get_item, it doesn't exist.

How can I get the value of hf_dns_rr_len that is set in one of the add_xxx_rr_to_tree() functions when the code is running in dissect_dns_answer()?


thanks
chuckc