cl_hp_parse_field3
Execute field parser
Usage
#include <libcanlock-3/canlock-hp.h> char *cl_hp_parse_field(const char *data, size_t data_len);
Overview
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.
Releases
2 releases since Debian 12 (Bookworm); the text changed 1 time.