---
name: "cl_hp_parse_field"
section: "3"
platform: "linux"
package: "libcanlock-dev"
version: "3.3.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cl_hp_parse_field"
---

# cl\_hp\_parse\_field(3)

Execute field parser

## NAME

cl\_hp\_parse\_field - Execute field parser

## SYNOPSIS

```
#include <libcanlock-3/canlock-hp.h>

char *cl_hp_parse_field(const char *data, size_t data_len);
```

## DESCRIPTION

The **cl\_hp\_parse\_field**() function executes the header field parser.\
 This implementation executes the **canlock-hfp** utility in a separate process.

The parameter *data* should point to the beginning of the input data.\
 Specify the length of the input data with the *data\_len* parameter.

The input data must be an unfolded "Cancel-Lock" or "Cancel-Key" header field without line break at the end.\
 The function **cl\_hp\_get\_field**() can be used to extract a field from the message header.\
 The function **cl\_hp\_unfold\_field**() can be used to remove potential folding from an already extracted header field.

## RETURN VALUE

If the parser reports success, a pointer to the NUL-terminated output data is returned. Otherwise, **NULL** is returned.

On success, the caller is responsible to **free**() the memory block allocated for the output data.

## AUTHORS

Michael Baeuerle

## REPORTING BUGS

Report bugs to \<mailto:michael.baeuerle@gmx.net\>.

## STANDARDS

**cl\_hp\_parse\_field**() tries to comply with the following standards:

RFC 8315

## SEE ALSO

[**free**(3)](/free/3.md), [**cl\_hp\_get\_field**(3)](/cl_hp_get_field/3.md), [**cl\_hp\_unfold\_field**(3)](/cl_hp_unfold_field/3.md), [**canlock-hfp**(1)](/canlock-hfp/1.md), [**canlock-mhp**(1)](/canlock-mhp/1.md), [**canlock**(1)](/canlock/1.md)
