1 2 /* 3 * Licensed Materials - Property of IBM 4 * 5 * trousers - An open source TCG Software Stack 6 * 7 * (C) Copyright International Business Machines Corp. 2004-2006 8 * 9 */ 10 11 #ifndef _HOSTTABLE_H_ 12 #define _HOSTTABLE_H_ 13 14 #include "rpc_tcstp.h" 15 #include "threads.h" 16 17 18 #define CONNECTION_TYPE_TCP_PERSISTANT 1 19 20 struct host_table_entry { 21 struct host_table_entry *next; 22 TSS_HCONTEXT tspContext; 23 TCS_CONTEXT_HANDLE tcsContext; 24 BYTE *hostname; 25 int type; 26 int socket; 27 struct tcsd_comm_data comm; 28 MUTEX_DECLARE(lock); 29 }; 30 31 struct host_table { 32 struct host_table_entry *entries; 33 MUTEX_DECLARE(lock); 34 }; 35 36 struct host_table_entry *get_table_entry(TCS_CONTEXT_HANDLE); 37 void put_table_entry(struct host_table_entry *); 38 TSS_RESULT __tspi_add_table_entry(TSS_HCONTEXT, BYTE *, int, struct host_table_entry **); 39 void remove_table_entry(TCS_CONTEXT_HANDLE); 40 41 42 #endif 43