---
name: "ipsec_strerror"
section: "3"
platform: "linux"
package: "racoon"
version: "1:0.8.2+20140711-8+deb9u1"
release: "Debian 9 (Stretch)"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/ipsec_strerror"
---

# ipsec\_strerror(3)

error messages for the IPsec policy manipulation library

## NAME

**ipsec\_strerror** – error messages for the IPsec policy manipulation library

## LIBRARY

library “libipsec”

## SYNOPSIS

**#include \<netinet6/ipsec.h\>**

*const char \**\

**ipsec\_strerror**(*void*);

## DESCRIPTION

*netinet6/ipsec.h* declares

```
extern int ipsec_errcode;
```

which is used to pass an error code from the IPsec policy manipulation library to a program. **ipsec\_strerror**() can be used to obtain the error message string for the error code.

The array pointed to is not to be modified by the calling program. Since **ipsec\_strerror**() uses [strerror(3)](/strerror/3.md) as underlying function, calling [strerror(3)](/strerror/3.md) after **ipsec\_strerror**() will make the return value from **ipsec\_strerror**() invalid or overwritten.

## RETURN VALUES

**ipsec\_strerror**() always returns a pointer to a C string. The C string must not be overwritten by the calling program.

## SEE ALSO

[ipsec\_set\_policy(3)](/ipsec_set_policy/3.md)

## HISTORY

**ipsec\_strerror**() first appeared in the WIDE/KAME IPv6 protocol stack kit.

## BUGS

**ipsec\_strerror**() will return its result which may be overwritten by subsequent calls.

*ipsec\_errcode* is not thread safe.
