---
name: "ixp_srv_writectl"
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_srv_writectl"
---

# ixp\_srv\_writectl(3)

## NAME

ixp\_srv\_writectl

## SYNOPSIS

```
#include <ixp_srvutil.h>
char *ixp_srv_writectl(Ixp9Req *req, char *(*fn)(void *, IxpMsg *));
```

## DESCRIPTION

This utility function is meant to simplify the writing of pseudo files to which single-lined commands are written. In order to use this function, the *aux* member of *req*-\>fid must be nul or an **[IxpFileId(3)](/IxpFileId/3.md)**.  Each line of the written data is stripped of its trailing newline, nul-terminated, and stored in an **[IxpMsg(3)](/IxpMsg/3.md)**. For each line thus prepared, *fn* is called with the IxpMsg pointer and the the *p* member of the IxpFileId.
