ipsec_strerror()

Updated: April 19, 2023

Error messages for IPsec policy manipulation library

Synopsis:

#include <netinet6/ipsec.h>

const char *ipsec_strerror( void );

Library:

libipsec

Use the -l ipsec option to qcc to link against this library.

Description:

The ipsec_strerror() function obtains the error message for the last IPsec call that failed. If your program includes the declaration:

extern int ipsec_errcode;

you can access the error code from the IPsec policy manipulation library. You can use ipsec_strerror() to obtain the error message corresponding to the error code.

Returns:

A pointer to a C string.

CAUTION:
Don't modify the string that this function returns. Since ipsec_strerror() uses strerror() as its underlying function, calling strerror() after calling ipsec_strerror() overwites or invalidates the return value from ipsec_strerror().

Examples:

See the example of ipsec_set_policy().

Classification:

Unix

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread No