---
name: "ixp_recvmsg"
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_recvmsg"
---

# ixp\_recvmsg(3)

## NAME

ixp\_sendmsg, ixp\_recvmsg

## SYNOPSIS

```
#include <ixp.h>
uint ixp_sendmsg(int fd, IxpMsg *msg);
uint ixp_recvmsg(int fd, IxpMsg *msg);
```

## DESCRIPTION

These functions read and write messages to and from the given file descriptors.

ixp\_sendmsg writes the data at *msg*-\>pos upto *msg*-\>end. If the call returns non-zero, all data is assured to have been written.

ixp\_recvmsg first reads a 32 bit, little-endian length from *fd* and then reads a message of that length (including the 4 byte size specifier) into the buffer at *msg*-\>data, so long as the size is less than *msg*-\>size.

## RETURN VALUE

These functions return the number of bytes read or written, or 0 on error. Errors are stored in **[ixp\_errbuf(3)](/ixp_errbuf/3.md)**.
