ports/51002: new feature for net/trafshow
Ryan Thompson
ryan at sasknow.com
Fri Apr 18 06:00:29 UTC 2003
The following reply was made to PR ports/51002; it has been noted by GNATS.
From: Ryan Thompson <ryan at sasknow.com>
To: Luigi Rizzo <rizzo at icir.org>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: ports/51002: new feature for net/trafshow
Date: Thu, 17 Apr 2003 23:59:24 -0600 (CST)
> >Description:
> the attached patch implements a new option for net/trafsnow. From the
> manpage:
> -m [src-ip M] [dst-ip M] [src-port M] [dst-port M] [proto M]
> Mask the specified field with mask M (which should be specified
> as an hex number e.g. 0xffff0000) before further processing of
> the packet. This allows to aggregate traffic in the display to
> ease analysis.
Luigi,
This seems like an interesting feature. The patch appears to have at
least a few issues. (I only had a few minutes to look into this):
o The masks are reset to zero when -m is specified (so all fields are
completely masked, which isn't very helpful ;-)
o Using strtol() on an unsigned value will return LONG_MAX =
0x7fffffff for any fully specified masks.
o Masks are applied in reverse order, so a mask of 0xffffff00 will
mask the most significant byte (/8) instead of the least significant
byte (/24) as expected.
o Unnecessary (debug?) output seems to have been left behind
Has this patch been tested?
- Ryan
--
Ryan Thompson <ryan at sasknow.com>
SaskNow Technologies - http://www.sasknow.com
901-1st Avenue North - Saskatoon, SK - S7K 1Y4
Tel: 306-664-3600 Fax: 306-244-7037 Saskatoon
Toll-Free: 877-727-5669 (877-SASKNOW) North America
More information about the freebsd-ports-bugs
mailing list