---
name: "gensio_acc_control"
section: "3"
platform: "linux"
package: "gensio"
version: "3.0.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gensio_acc_control"
---

# gensio\_acc\_control(3)

Perform gensio accepter specific actions

## NAME

gensio\_acc\_control - Perform gensio accepter specific actions

## SYNOPSIS

**#include \<gensio/gensio.h\>**

- **int gensio\_acc\_control(struct gensio\_accepter \*acc, int depth,**

  **bool get, unsigned int option,**\
   **char \*data, gensiods \*datalen);**

## DESCRIPTION

**gensio\_acc\_control** performs a gensio accepter specific operation on the gensio accepter. This works exactly like [gensio\_control(3)](/gensio_control/3.md), see that for details on get, depth, and how the data and datalen work.

gensio control operations in *option* depend on the particular gensio.  Below some are documented, but there may be other controls available.  See the gensio documentation in [gensio(5)](/gensio/5.md) for details.

### GENSIO\_ACC\_CONTROL\_LADDR

Return the given local address for the given gensio.  Since a single gensio may have more than one local address, this control provides a means to tell which one.  The *data* string passed in should be the string representation of a the number (like created with snprintf()) for the particular index you want to fetch.  If you specify a number larger than the number of open listen sockets, *GE\_NOTFOUND* is returned.  The return data is a string holding the address.

Note that a single fetched string may contain more than one address. These will be separated by semicolons.  In some cases addresses may change dynamically (like with SCTP), so you get a single set of addresses.

### GENSIO\_ACC\_CONTROL\_LPORT

Return the port for the given local address for the given gensio. Since a single gensio may have more than one local address, this control provides a means to tell which one.  The *data* string passed in should be the string representation of a the number (like created with snprintf()) for the particular index you want to fetch.  If you specify a number larger than the number of open listen sockets, *GE\_NOTFOUND* is returned.  The return data is a string holding the port number.

### GENSIO\_ACC\_CONTROL\_TCPDNAME

Get or set the TCPD name for the gensio, only for TCP gensios.

## RETURN VALUES

Zero is returned on success, or a gensio error on failure.

## SEE ALSO

[gensio\_err(3)](/gensio_err/3.md), [gensio(5)](/gensio/5.md), [gensio\_control(3)](/gensio_control/3.md)
