---
name: "Tss2_Tcti_Tabrmd_Init"
section: "3"
platform: "linux"
package: "tpm2-abrmd"
version: "3.0.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Tss2_Tcti_Tabrmd_Init"
---

# Tss2\_Tcti\_Tabrmd\_Init(3)

Initialization function for the tpm2-abrmd TCTI library.

## NAME

Tss2\_Tcti\_Tabrmd\_Init - Initialization function for the tpm2-abrmd TCTI library.

## SYNOPSIS

The **Tss2\_Tcti\_Tabrmd\_Init**() function is used to initialize a TCTI context for communication with the [**tpm2-abrmd**(8)](/tpm2-abrmd/8.md).

**#include \<tcti/tcti-tabrmd.h\>**

**TSS2\_RC Tss2\_Tcti\_Tabrmd\_Init (TSS2\_TCTI\_CONTEXT** *\*tcti\_context***, size\_t** *\*size***, const char** *\*conf***);**

## DESCRIPTION

**Tss2\_Tcti\_Tabrmd\_Init**() attempts to initialize a caller allocated *tcti\_context* of size *size* with configuration specified in the configuration string *conf.* . Since the *tcti\_context* must be a caller allocated buffer, the caller needs to know the size required by the TCTI library. The minimum size of this context can be discovered by providing **NULL** for the *tcti\_context* and a non- **NULL** *size* parameter. The initialization function will then populate the *size* parameter with the minimum size of the *tcti\_context* buffer. The caller my then allocate a buffer of this size (or larger) and call **tss2\_Tcti\_Tabrmd\_Init ()** again providing the newly allocated *tcti\_context* and the size of this context in the *size* parameter. This pattern is common to all TCTI initialization functions. We provide an example of this pattern using the **Tss2\_Tcti\_Tabrmd\_Init**() function in the section titled **EXAMPLE.**

The *conf* parameter is a string of key / value pairs describing the desired connection properties for the TCTI. If the caller provides a NULL *conf* string then defaults that correspond to the defaults for the tpm2-abrmd (8) will be used. This is the same as providing the *conf* string: "bus\_name=com.intel.tss2.Tabrmd,bus\_type=system". Keys and values are separated by the '=' character while each key / value pair is separated by the ',' character. The supported keys and values are:

- •

  **bus\_name** - the dbus name owned by the daemon. See the tpm2-abrmd (8) *--dbus-name* option.

- •

  **bus\_type** - the bus type used for the connection with the daemon. The value associated with this key may be either "system" or "session".

  Once initialized, the TCTI context returned exposes the Trusted Computing Group (TCG) defined API for the lowest level communication with the TPM. Using this API the caller can exchange (send / receive) TPM2 command and response buffers with the **tpm2-abrmd (8).** In nearly all cases however, the caller will initialize a context using this function before passing the context to a higher level API like the System API (SAPI), and then never touch it again.

  For a more thorough discussion of the TCTI API see the “TSS System Level API and TPM Command Transmission Interface Specification” specification as published by the TCG: https://trustedcomputinggroup.org/tss-system-level-api-tpm-command-transmission-interface-specification/

## RETURN VALUE

A successful call to **Tss2\_Tcti\_Tabrmd\_Init**() will return **TSS2\_RC\_SUCCESS.** An unsuccessful call will produce a response code described in section **ERRORS.**

## ERRORS

**TSS2\_TCTI\_RC\_BAD\_VALUE** is returned if the *size* parameter is NULL.

**TSS2\_TCTI\_RC\_NO\_CONNECTION** is returned when communication with the tpm2-abrmd (8) fails.

**TSS2\_TCTI\_RC\_GENERAL\_FAILURE** is returned for all other errors.

## EXAMPLE

```
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <tcti/tcti-tabrmd.h>
TSS2_RC rc;
TSS2_TCTI_CONTEXT *tcti_context;
size_t size;
rc = tss2_tcti_tabrmd_init (NULL, &size, NULL,
if (rc != TSS2_RC_SUCCESS) {
    fprintf (stderr, "Failed to get allocation size for tabrmd TCTI "
             " context: 0x%" PRIx32 "0, rc);
    exit (EXIT_FAILURE);
}
tcti_context = calloc (1, size);
if (tcti_context == NULL) {
    fprintf (stderr, "Allocation for TCTI context failed: %s0,
             strerror (errno));
    exit (EXIT_FAILURE);
}
rc = tss2_tcti_tabrmd_init (tcti_context, &size, NULL);
if (rc != TSS2_RC_SUCCESS) {
    fprintf (stderr, "Failed to initialize tabrmd TCTI context: "
             "0x%" PRIx32 "0, rc);
    free (tcti_context);
    exit (EXIT_FAILURE);
}
exit (EXIT_SUCCESS);
```

## AUTHOR

Philip Tricca \<philip.b.tricca@intel.com\>

## SEE ALSO

**tcti-tabrmd**(7), [**tpm2-abrmd**(8)](/tpm2-abrmd/8.md)

## COLOPHON

This page is part of the 3.0.0 release of Intel's TPM2 Access Broker & Resource Management Daemon. A description of the project, information about reporting bugs, and the latest version of this page can be found at https://github.com/01org/tpm2-abrmd/.
