---
name: "gensio_alloc_channel"
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_alloc_channel"
---

# gensio\_alloc\_channel(3)

Create a new channel on a channel-capable gensio

## NAME

gensio\_alloc\_channel - Create a new channel on a channel-capable gensio

## SYNOPSIS

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

- **int gensio\_alloc\_channel(struct gensio \*io, const char \* const args\[\],**

  **gensio\_event cb, void \*user\_data,**\
   **struct gensio \*\*new\_io);**

## DESCRIPTION

**gensio\_alloc\_channel** creates a new channel on a channel-capable gensio.  The exact meaning of channel, and the meaning of *args* depends on the particular gensio, see the the particular gensio class in [gensio(5)](/gensio/5.md). The new gensio created will be closed and you must call **gensio\_open** on it to start it up.

## 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\_os\_funcs(3)](/gensio_os_funcs/3.md), [gensio\_event(3)](/gensio_event/3.md), [gensio\_open(3)](/gensio_open/3.md)
