---
name: "ixp_errstr"
section: "3"
platform: "linux"
package: "libixp-dev"
version: "0.6~20121202+hg148-5"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ixp_errstr"
---

# ixp\_errstr(3)

## NAME

ixp\_errbuf, ixp\_errstr, ixp\_rerrstr, ixp\_werrstr, ixp\_vsnprint

## SYNOPSIS

```
#include <ixp.h>
char *ixp_errbuf(void);
void ixp_errstr(char *buf, int nbuf);
void ixp_rerrstr(char *buf, int nbuf);
void ixp_werrstr(const char *fmt, ...);
int      (*ixp_vsnprint)(char *buf, int nbuf, const char *fmt, va_list);
```

## PARAMETERS

- buf

  The buffer to read and/or fill.

- nbuf

  The size of the buffer.

- fmt

  A format string with which to write the errstr.

- ...

  Arguments to *fmt*.

## DESCRIPTION

These functions simulate Plan 9's errstr functionality. They replace errno in libixp. Note that these functions are not internationalized.

**[ixp\_errbuf(3)](/ixp_errbuf/3.md)** returns the errstr buffer for the current thread. **[ixp\_rerrstr(3)](/ixp_rerrstr/3.md)** fills *buf* with the data from the current thread's error buffer, while **[ixp\_errstr(3)](/ixp_errstr/3.md)** exchanges *buf*'s contents with those of the current thread's error buffer. **[ixp\_werrstr(3)](/ixp_werrstr/3.md)** formats the given format string, *fmt*, via **[ixp\_vsnprint(3)](/ixp_vsnprint/3.md)** and writes it to the error buffer.

**[ixp\_vsnprint(3)](/ixp_vsnprint/3.md)** may be set to a function which will format its arguments write the result to the *nbuf* length buffer **buf(3)**. The default value is **[vsnprintf(3)](/vsnprintf/3.md)**. The function must format '%s' as a nul-terminated string and may not consume any arguments not indicated by a %-prefixed format specifier, but may otherwise behave in any manner chosen by the user.

## SEE ALSO

[ixp\_vsmprint(3)](/ixp_vsmprint/3.md)
