Wireshark-dev: [Wireshark-dev] ?????? ?????? ?????? how to display a packet in the packet_view

From: "??????????" <237825552@xxxxxx>
Date: Tue, 25 Feb 2014 11:10:07 +0800
thanks.
up is a snapshot of packet view.
I want know where does the value of each column stored,such as Time,Source?
do they stored in the edt->pi(epan_dissect->packet_info) or edt->pi->cinfo(column_info)?
if i want to add a column in the packet view,what should i do?


------------------ ???????? ------------------
??????: "Guy Harris";<guy@xxxxxxxxxxxx>;
????????: 2014??2??25??(??????) ????2:48
??????: "Developer support list for Wireshark"<wireshark-dev@xxxxxxxxxxxxx>;
????: Re: [Wireshark-dev]?????? ?????? how to display a packet in the packet_view?


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.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe