---
name: "tlsrpt_init_policy"
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_init_policy"
---

# tlsrpt\_init\_policy(3)

initializes a new policy within an existing delivery request

## NAME

tlsrpt\_init\_policy - initializes a new policy within an existing delivery request

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_init\_policy(struct tlsrpt\_dr\_t\* dr, tlsrpt\_policy\_type\_t policy\_type, \* const char\* policydomainname)

## DESCRIPTION

The `tlsrpt_init_policy` function initializes a new policy within an existing delivery request. A delivery request must contain at least one policy.

The policy must be properly completed by calls to some of the following functions and a final call to `tlsrpt_finish_policy`.

**Note**\

An unfinished policy after some properly finished policies will result in the whole delivery request datagram to fail and not being sent out at all, so the other already completed policies won´t be reported either!

## RETURN VALUE

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

## AUTHOR

Boris Lohner
