blob: edc820b414ccf8461c56d6176e270779334e8257 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
|