I'm writing a decoder for a protocol that has another layer of
addressing on top if UDP/IP. I'd like to add an application layer source
and destination column. How would I go about this? In the mean time, as
a hack, I tried reusing the COL_SRCIDX and COL_DSTIDX columns with this
code:
guint32 srcid = tvb_get_ntohl( tvb, HEADER_SRCID_OFFSET);
if( check_col( pinfo->cinfo, COL_SRCIDX))
col_add_fstr( pinfo->cinfo, COL_SRCIDX, "%08x", srcid);
guint32 dstid = tvb_get_ntohl( tvb, HEADER_DSTID_OFFSET);
if( check_col( pinfo->cinfo, COL_DSTIDX))
col_add_fstr( pinfo->cinfo, COL_DSTIDX, "%08x", dstid);
Although, this doesn't work. The columns always display 0x0. What's the
best solution to my problem? I know I can stuff this information in the
Info column, but that really clutters it up.
Thanks,
Shaun