---
name: "tlsrpt_open"
section: "3"
platform: "linux"
package: "libtlsrpt"
version: "0.5.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tlsrpt_open"
---

# tlsrpt\_open(3)

\`tlsrpt\_open\` allocates and initializes the \`struct tlsrpt\_connection\_t\` object

## NAME

tlsrpt\_open - \`tlsrpt\_open\` allocates and initializes the \`struct tlsrpt\_connection\_t\` object

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_open(struct tlsrpt\_connection\_t\*\* pcon, const char\* socketname)

## DESCRIPTION

The function `tlsrpt_open` allocates and initializes the `struct tlsrpt_connection_t` object. This function creates the socket and initializes the destination socket address of the TLSRPT collectd. There is no actual connection internally, the socket is a connection-less datagram socket.

## RETURN VALUE

The tlsrpt\_open function returns 0 on success and a combined error code on failure. The combined error code can be analyzed with the *tlsrpt\_strerror* function.

## SEE ALSO

man:tlsrpt\_close\[3\], man:tlsrpt\_strerror\[3\], man:tlsrpt\_error\_code\_is\_internal\[3\]

## AUTHOR

Boris Lohner
