summaryrefslogtreecommitdiff
path: root/src/include/hosttable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/hosttable.h')
-rw-r--r--src/include/hosttable.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/include/hosttable.h b/src/include/hosttable.h
new file mode 100644
index 0000000..edc820b
--- /dev/null
+++ b/src/include/hosttable.h
@@ -0,0 +1,43 @@
+
+/*
+ * Licensed Materials - Property of IBM
+ *
+ * trousers - An open source TCG Software Stack
+ *
+ * (C) Copyright International Business Machines Corp. 2004-2006
+ *
+ */
+
+#ifndef _HOSTTABLE_H_
+#define _HOSTTABLE_H_
+
+#include "rpc_tcstp.h"
+#include "threads.h"
+
+
+#define CONNECTION_TYPE_TCP_PERSISTANT 1
+
+struct host_table_entry {
+ struct host_table_entry *next;
+ TSS_HCONTEXT tspContext;
+ TCS_CONTEXT_HANDLE tcsContext;
+ BYTE *hostname;
+ int type;
+ int socket;
+ struct tcsd_comm_data comm;
+ MUTEX_DECLARE(lock);
+};
+
+struct host_table {
+ struct host_table_entry *entries;
+ MUTEX_DECLARE(lock);
+};
+
+extern struct host_table *ht;
+struct host_table_entry *get_table_entry(TCS_CONTEXT_HANDLE);
+void put_table_entry(struct host_table_entry *);
+TSS_RESULT __tspi_add_table_entry(TSS_HCONTEXT, BYTE *, int, struct host_table_entry **);
+void remove_table_entry(TCS_CONTEXT_HANDLE);
+
+
+#endif