Generate a readable string from an IPsec policy specification
#include <netinet6/ipsec.h> char* ipsec_dump_policy(char *buf, char *delim);
libipsec
Use the -l ipsec option to qcc to link against this library.
The function ipsec_dump_policy() generates a readable string from an IPSEC policy specification. Please 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.
See ipsec_set_policy().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
IPsec, ipsec_get_policylen(), ipsec_set_policy(), ipsec_strerror()
setkey in the Utilities Reference