tcpdump mailing list archives

Re: [PATCH] replacement print-sflow.c to include


From: Rick Jones <rick.jones2 () hp com>
Date: Thu, 14 Apr 2011 11:45:30 -0700

On Thu, 2011-04-14 at 11:35 -0700, Guy Harris wrote:
On Apr 13, 2011, at 1:02 PM, Rick Jones wrote:

To enable printing of non-expanded samples I've shuffled a bunch of code
around and created a bunch of smaller routines to more easily support
printing of both expanded and non-expanded counter and flow samples.
I've done simple testing of non-expanded counter and flow, and expanded
counter, but I don't have expanded flow at present with which to test.
So, that part of the change is only compile/eyeball tested.

Checked in, with some tweaks (making variables unsigned, adding _U_ on
 unused parameters to stub routines, and adding some additional checks)
 and pushed on the trunk and 4.2 branch.-

This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Cool.  BTW, I just found a bug in the print_counters routines - i was
manipulating based on the size of the pointer rather than the struct to
which it pointed.  in 64-bit (where I'm running) the two were the same,
but in 32 bit they were not.

So, it should be:

        tptr += sizeof(struct sflow_counter_record_t);
        tlen -= sizeof(struct sflow_counter_record_t);

and a similar change for the flow_counter printing routine.

rick

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: