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. Fix: attached is a patch to put in ports/net/trafshow/files/patch-mask
> >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@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
This PR can be closed. I've just filed ports/53807, which contains an updated patch from the originator. Thanks, - Ryan -- Ryan Thompson <ryan@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
State Changed From-To: open->closed Superseded by ports/53807