Content-type: text/html
#include "tcb/tcb.h"
int openTCBConnection(descriptor_t *tcb_desc);
#include "tcb/ttcb.h"
int openTTCBConnection(descriptor_t *tcb_desc);
openTCBConnection must be called by applications before starting to interact with the TCB/TTCB. If the invocation of this function succeeds, a connection is established and services may start to be required through this connection. For the TTCB this call executes the Local Authentication Service.
openTTCBConnection is simply an alias to openTCBConnection.
tcb_desc is a pointer to a descriptor which will reference the connection. For the TCB this parameter cannot be setup. For the TTCB, some parameters in tcb_desc can be defined:
PROTECTION_HMD5 The authenticity and integrity of the communication is protected using MD5 MACs.
If these three parameters are not defined, random numbers are used for secret and challenge, and protection is PROTECTION_NONE.
OK if the connection was established.
TCB_ACESS_ERROR if an error occurred on the access to the TCB.
NO_AVAIL_CONN if it isn't an available connection.
NO_ROOM_FOR_ENTITY if there are no resources for a new entity in the TTCB (only for the TTCB).
INVALID_PROTECTION if the protection selected is invalid (only for the TTCB).
FAILED_LOCAL_AUTHENTICATION if Local Authentication failed for some other reason (only for the TTCB).