Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems something like the following works - not sure how bad a practice it is...

.......
Flds.FullSeq = ProtoField.uint32("myproto.FullSequence","Full Sequence Number",base.HEX,nil)
.......
local rtp_seq_field = Field.new("rtp.seq")
.......

function myproto.dissector(buffer, pinfo, tree)
    .......
    local rtp_seq = rtp_seq_field()
    local esn_val = buffer(0,2):uint()
    if rtp_seq ~= nil and esn_field ~= nil then
        local full_seq = esn_val.value * 65536 + rtp_seq.value
        subtree:add(Flds.FullSeq, full_seq):set_generated()
    end
    .......
end