I checked in some changes to make the columns in the packet list
configurable.
Column data is no longer accessed via the fd->win_info character arrays.
Instead, you can use check_col() to see if the type of data you're writing
is needed in the packet list, and you can write strings and argument
lists via add_col_str() and add_col_fstr(). All of the dissect_*()
code has been modified to use these routines. The column types are
defined in ethereal.h.
Column formats are specified in the preferences file using formatted
strings similar to snprintf() and strftime(). The parser is still a
bit primitive; the only thing actually printed in each column is the
last format specified.
The format flags are as follows:
m - Packet number
t - Time
s - Source address
d - Destination address
p - Protocol
S - Source port
D - Destination port
i - Descriptive information
The address and protocol flags can be preceded by 'r' or 'u' to specify
resolved and unresolved addresses, respectively. Additionally, the
address flags can be used to only display data link or network addresses
with the 'h' and 'n' modifiers.
The time flag can optionally be preceded by 'R', 'A', or 'D' to
specify relative, absolute, or delta time. (Actually, the relative time
is printed no matter what right now. This will be fixed soon.)
If you change your column preferences, you must restart the program
for the changes to take effect. Hopefully this won't be too hard to fix.
The code for reading column preferences isn't very robust.
An improperly formatted prefs file line can cause a segmentation fault.
---------------------------------------------------------------------------
***** ***** Gerald Combs gerald@xxxxxxxxxx
*** *** Long-haired freak http://www.unicom.net
* * Unicom Communications, Inc. (913)327-5309
***** 7223 W. 95th St., Ste 325 (913)327-5376 Fax
*** Overland Park, KS 66212 (913)327-5375 Client Support
*
---------------------------------------------------------------------------