Ethereal-dev: [ethereal-dev] Yet another linux patch

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 2 Jul 1999 12:05:16 -0500
Okay, i'm really sorry. I didn't test the code on a little-endian
machine. Please add one line to the following function in
dfilter-grammar.y if you're using a little-endian machine:


GNode*
dfilter_mknode_ipv4_value(char *host)
{
        dfilter_node    *node;
        GNode           *gnode;

        printf("entered dfilter_mknode_ipv4_value host=%s\n", host);
        node = g_mem_chunk_alloc(gmc_dfilter_nodes);
        node->ntype = numeric;
        node->elem_size = sizeof(guint32);
        node->fill_array_func = fill_array_numeric_value; /* cheating !  */
        node->check_relation_func = check_relation_numeric; /* cheating ! */
        node->value.numeric = get_host_ipaddr(host);
        htonl(node->value.numeric);	/* <------- add this line */
        gnode = g_node_new(node);

        return gnode;
}


--gilbert