Generate a readable string from an IPsec policy specification
#include <netinet6/ipsec.h> char* ipsec_dump_policy(char *buf, char *delim);
Use the -l ipsec option to qcc to link against this library.
The ipsec_dump_policy() function generates a readable string from an IPSEC policy specification. Refer to ipsec_set_policy() for details about the policies.
The ipsec_dump_policy() function converts IPsec policy structure into a readable form. Therefore, ipsec_dump_policy() is the inverse of ipsec_set_policy(). If you set delim to NULL, a single whitespace is assumed. The function ipsec_dump_policy() returns a pointer to a dynamically allocated string. It is the caller's responsibility to reclaim the region, by using free().
A pointer to dynamically allocated string, or NULL if an error occurs.
IPsec, ipsec_get_policylen(), ipsec_set_policy(), ipsec_strerror()
setkey in the Utilities Reference