Ethereal-dev: [Ethereal-dev] (no subject)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <rsharpe@xxxxxxxxxxxxxxxxx>
Date: Sat, 21 Feb 2004 10:15:13 -0800 (PST)
Hi,

In get_text_from_packet_list we see the following

        if (strlen(cfile.cinfo.col_expr[column]) != 0 &&
            strlen(cfile.cinfo.col_expr_val[column]) != 0) {
            len = strlen(cfile.cinfo.col_expr[column]) +
                  strlen(cfile.cinfo.col_expr_val[column]) + 5;
            buf = g_malloc0(len);
            snprintf(buf, len, "%s == %s", cfile.cinfo.col_expr[column],
                     cfile.cinfo.col_expr_val[column]);
        }

get_text_from_packet_list is called from match_selected_cb_and_plist to 
build a match item and execute it.

Now, I notice that if you right-click when you are over the proto column 
and select match-->selected, it does not build a display filter 
expression, while if you right-click when over Destination or etc, it 
does.

Now, this would seem to be because the if expression above is false, so 
perhaps cfile.cinfo.col_expr has not been set up for the proto field.

Hmmm, but perhaps what I could do is check if it is the proto field, and 
if so, simply return the value from that column ... that might work.

We would not want to use the info field, however.
 
Regards
-----
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com