summaryrefslogtreecommitdiff
path: root/addr_hash.h
diff options
context:
space:
mode:
authorpdw <>2010-11-27 11:06:12 +0000
committerpdw <>2010-11-27 11:06:12 +0000
commit6197223f5265dcd983a5bb9b17c86d691462e06c (patch)
tree7628725678e49a59a895df543ef8a0c7054dbb06 /addr_hash.h
parent6d594acbd60ce301085ceb59d0981eba2cdaaf14 (diff)
downloadiftop-6197223f5265dcd983a5bb9b17c86d691462e06c.zip
Applied patch from Mats Erik Andersson <mats.andersson@gisladisker.se>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427852#30 Adds support for IPv6 Also fixes: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477928 (minor typo) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595169 (performance problem with address hashing) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598367 (failing link address detection for GNU/kfreebsd)
Diffstat (limited to 'addr_hash.h')
-rw-r--r--addr_hash.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/addr_hash.h b/addr_hash.h
index cd7a9cf..f49323a 100644
--- a/addr_hash.h
+++ b/addr_hash.h
@@ -12,11 +12,18 @@
#include "hash.h"
typedef struct {
+ int af;
unsigned short int protocol;
unsigned short int src_port;
- struct in_addr src;
+ union {
+ struct in_addr src;
+ struct in6_addr src6;
+ };
unsigned short int dst_port;
- struct in_addr dst;
+ union {
+ struct in_addr dst;
+ struct in6_addr dst6;
+ };
} addr_pair;
typedef addr_pair key_type; /* index into hash table */