To reduce number of compares of interface name (to throw away
packets we don't want) lock the socket to the given interface
using bind().
After binding the socket to the interface, we don't need to check
if the incoming packet belongs to the wanted interface, so remove
the check and the parameter.
Vitezslav Samel (2):
use bind() to lock the socket on given interface
remove ifptr parameter from processpacket()
src/hostmon.c | 18 +++++++++++++++---
src/ifstats.c | 29 ++++++++++++++++++++++++-----
src/iptraf-ng-compat.h | 2 ++
src/itrafmon.c | 22 +++++++++++++++++-----
src/packet.c | 9 +--------
src/packet.h | 2 +-
src/pktsize.c | 21 ++++++++++++++++-----
src/serv.c | 19 ++++++++++++++++---
src/wrapper.c | 24 ++++++++++++++++++++++++
9 files changed, 116 insertions(+), 30 deletions(-)
--
1.7.8.4
Show replies by date