Wireshark-dev: Re: [Wireshark-dev] ?????? ?????? how to display a packet in the packet_view?
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 24 Feb 2014 10:48:36 -0800
On Feb 24, 2014, at 1:56 AM, "??????????" <237825552@xxxxxx> wrote:

> thanks.i also wanna know where does the columns of the packet list get assigned?in which function?

It depends on the column.

For the Protocol and Info columns, dissectors call routines such as col_clear(), col_add_str(), col_set_str(), col_add_fstr(), and so on; those routines set strings that are used in the columns at display time.

For the Number column, the time stamp column, and some other columns, the strings are set at display time from values in an internal per-packet data structure.

For the source and destination address columns, the dissectors set address and port values in the "protocol info" structure, and the strings are generated from those values at display time.

For custom columns, and for some columns that are implemented as special custom columns, the column strings are set at display time from fields in the protocol tree.

> is it in the function dissect_data

No.  There is no guarantee that dissect_data() is ever *called* in a dissection.