summaryrefslogtreecommitdiff
path: root/serv_hash.h
diff options
context:
space:
mode:
authorpdw <>2002-10-10 14:11:12 +0000
committerpdw <>2002-10-10 14:11:12 +0000
commitc1f017231c5a6b5314804ea390512e336a53c2ea (patch)
treee34dbaf994f62530d19e88a1aa6fdeddc914f385 /serv_hash.h
parentacad1ac4b5df2808981e38a9436070693982a1ed (diff)
downloadiftop-c1f017231c5a6b5314804ea390512e336a53c2ea.zip
Added service hash for resolving port/protocol numbers to names.
Minor fix to handling of netmasks end /32.
Diffstat (limited to 'serv_hash.h')
-rw-r--r--serv_hash.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/serv_hash.h b/serv_hash.h
new file mode 100644
index 0000000..6241134
--- /dev/null
+++ b/serv_hash.h
@@ -0,0 +1,22 @@
+/*
+ * addr_hash.h:
+ *
+ */
+
+#ifndef __SERV_HASH_H_ /* include guard */
+#define __SERV_HASH_H_
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include "hash.h"
+
+typedef struct {
+ int port;
+ int protocol;
+} ip_service;
+
+hash_type* serv_hash_create();
+void serv_hash_initialise(hash_type* sh);
+
+#endif /* __SERV_HASH_H_ */