---
name: "tlsrpt_errno_from_error_code"
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_errno_from_error_code"
---

# tlsrpt\_errno\_from\_error\_code(3)

returns the \`errno\` part of an errorcode

## NAME

tlsrpt\_errno\_from\_error\_code - returns the \`errno\` part of an errorcode

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_errno\_from\_error\_code(int errorcode)

## DESCRIPTION

The `tlsrpt_errno_from_error_code` function returns the `errno` part of an errorcode. In case of internal library errors from the TLSRPT\_ERR\_TLSRPT block the returned value will be a high number to avoid clashes with existing errno values. I.e. `TLSRPT_ERR_TLSRPT_NESTEDPOLICY` is 10731 instead of 10031 to avoid the errno part being decoded as `EMLINK`.

## RETURN VALUE

The tlsrpt\_errno\_from\_error\_code 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\_error\_code\_is\_internal\[3\], man:tlsrpt\_strerror\[3\]

## AUTHOR

Boris Lohner
