gensio_get_type(3) Library Functions Manual gensio_get_type(3)

gensio_get_type, gensio_get_child, gensio_is_client, gensio_is_reliable, gensio_is_packet, gensio_is_authenticated, gensio_is_encrypted, gensio_is_message, gensio_is_mux - Return general information about a gensio

#include <gensio/gensio.h>


unsigned int depth);

unsigned int depth);

gensio_get_type return the type string for the gensio (if depth is 0) or one of its children (depth > 0). Returns NULL if the depth is greater than the number of children.

gensio_get_child returns the given child of the gensio, returns NULL if the depth is greater than the number of children.

gensio_is_client returns true if the gensio a client or false if it is a server.

gensio_is_reliable return true if the genio is reliable (won't loose data). Serial devices are not considered reliable, nor is UDP. Pretty much everything else is, because they won't drop data and are flow-controlled.

gensio_is_packet returns if the genio is packet-oriented. In a packet-oriented genio, if one side writes a chunk of data, when the other side does a read it will get the same chunk of data as a single unit assuming it's buffer sizes are set properly.

gensio_is_authenticated return true if the remote end authenticated, false if not. In the SSL case, this means that the remote certificate was received and verified (client and server, see gensio(5) SSL section for details). For certauth server, this means that the authentication successfully authenticated the certauth client by either certificate or password.

gensio_is_encrypted returns true if the connection is encrypted, false if not.

gensio_is_message returns if the genio is message-oriented. In a message-oriented genio, a write can explicitly mark message boundaries, these are delivered to the reader with those boundaries set. See gensio(5) for details on how this works.

gensio_is_mux return true if the genio is capable of multiplexing, meaning that it accepts an gensio_alloc_channel() call.

Note that for the "gensio_is_xxx" type of requests, the properly is usually inherited from the child. So if you run a telnet gensio on top of an SSL gensio, the telnet gensio will return true for gensio_is_encrypted because SSL is encrypted.

gensio_err(3), gensio(5), gensio_os_funcs(3)

27 Feb 2019