THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.

Revision history  [back]

There are at least 2 ways to achieve this.

  1. Use treeitem.text. For example:

    local ti = tlv_tree:add (f.tlvvalue_ipv4, buffer(offset, tlvlen))
    tlv_tree:append_text (", myip: " .. ti.text)

  2. Format the data from the buffer. For example:

    tlv_tree:append_text (string.format(", myip: %u.%u.%u.%u",
    buffer(offset, 1):uint(), buffer(offset + 1, 1):uint(),
    buffer(offset + 2, 1):uint(), buffer(offset + 3, 1):uint()))

Solution #1 has the advantage of displaying the resolved IP address for you as well, assuming resolution is enabled. If you don't want the resolved IP address displayed, then you can use Solution #2.