gensio_to_sergensio.3(3)
β¨ gensio_to_sergensio β the sergensio conversion lore β¨
okay bestie, so this page lives in the Library Functions Manual (gensio_to_sergensio.3), and it's literally your one-stop shop for all the general info and conversion routines for a sergensio. iykyk π
πΈ SYNOPSIS πΈ
#include <gensio/sergensio.h>
struct sergensio *gensio_to_sergensio(struct gensio *io);
struct gensio *sergensio_to_gensio(struct sergensio *serio);
void *sergensio_get_user_data(struct sergensio *serio);
bool sergensio_is_client(struct sergensio *serio);
π¦ DESCRIPTION π¦
gensio_to_sergensio β the glow-up β¨
gensio_to_sergensio hands you back the sergensio object for a gensio. and likeβ¦ it returns NULL if there's genuinely no sergensio for that gensio, no cap. π«Ά
heads up bestie: the sergensio it gives you might be a sergensio object for a child of the gensio you passed in. plot twist, i know. π
so if the gensio you passed in isn't a sergensio itself, it goes searching through the children looking for a gensio that is also a sergensio. iconic detective behaviour honestly. π
the way this is useful: say you have a conacc gensio running over a serialdev, and you get a serial event β you can just call gensio_to_sergensio on the object that got passed in, and it'll hand you the sergensio you should actually be working with. so convenient. so slay. π
and the first time you call this on a gensio, it associates the sergensio with the gensio you passed in. first-call-makes-it-official energy. π
sergensio_to_gensio β the reverse β¨
sergensio_to_gensio gives you the gensio for a given sergensio. it cannot fail. periodt. π―
note though: this returns the gensio that was passed in to gensio_to_sergensio β not the gensio directly associated with the sergensio you passed in. sneaky but true, fr fr.
sergensio_get_user_data β the data retrieval β¨
sergensio_get_user_data returns the gensio user data for the associated gensio. that's it, that's the whole vibe. π
sergensio_is_client β the vibe check β¨
sergensio_is_client returns true if the sergensio is a client, or false if it's a server. two moods only. π
π SEE ALSO π
π AUTHOR π
Corey Minyard <minyard@acm.org> β the actual main character who wrote all this. we stan. π
and that's the whole page bestie, no notes. this was gensio_to_sergensio.3(3) from the Library Functions Manual, dated 20 Jul 2020, and it ATE. go forth and convert your sergensios responsibly. π¦β¨π
π¦ where this page comes from
- alpine 3.22: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.23: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.24: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- debian bookworm: libgensio-dev 2.6.2-4 Β· GPL-2.0-only
- debian trixie: libgensio-dev 2.8.13-7 Β· GPL-2.0-only
- epel 9: libgensio-devel 2.8.15-1.el9 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- ubuntu jammy: libgensio-dev 2.3.5-1build2 Β· GPL-2.0-only
- ubuntu noble: libgensio-dev 2.8.2-6.1build1 Β· GPL-2.0-only
- ubuntu questing: libgensio-dev 2.8.13-7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms