1gensio_get_type(3)         Library Functions Manual         gensio_get_type(3)
2
3
4

NAME

6       gensio_get_type,  gensio_get_child,  gensio_is_client,  gensio_is_reli‐
7       able, gensio_is_packet,  gensio_is_authenticated,  gensio_is_encrypted,
8       gensio_is_message,  gensio_is_mux  - Return general information about a
9       gensio
10

SYNOPSIS

12       #include <gensio/gensio.h>
13
14       const char *gensio_get_type(struct gensio *io,
15                           unsigned int depth);
16
17       struct gensio *gensio_get_child(struct gensio *io,
18                           unsigned int depth);
19
20       bool gensio_is_client(struct gensio *io);
21
22       bool gensio_is_reliable(struct gensio *io);
23
24       bool gensio_is_packet(struct gensio *io);
25
26       bool gensio_is_authenticated(struct gensio *io);
27
28       bool gensio_is_encrypted(struct gensio *io);
29
30       bool gensio_is_message(struct gensio *io);
31
32       bool gensio_is_mux(struct gensio *io);
33

DESCRIPTION

35       gensio_get_type return the type string for the gensio (if depth  is  0)
36       or  one  of  its  children  (depth  > 0).  Returns NULL if the depth is
37       greater than the number of children.
38
39       gensio_get_child returns the given child of the gensio, returns NULL if
40       the depth is greater than the number of children.
41
42       gensio_is_client  returns true if the gensio a client or false if it is
43       a server.
44
45       gensio_is_reliable return true if the genio is  reliable  (won't  loose
46       data).  Serial devices are not considered reliable, nor is UDP.  Pretty
47       much everything else is, because they won't drop data and are flow-con‐
48       trolled.
49
50       gensio_is_packet returns if the genio is packet-oriented.  In a packet-
51       oriented genio, if one side writes a chunk of data, when the other side
52       does  a read it will get the same chunk of data as a single unit assum‐
53       ing it's buffer sizes are set properly.
54
55       gensio_is_authenticated return true if the  remote  end  authenticated,
56       false  if not.  In the SSL case, this means that the remote certificate
57       was received and verified (client and server, see gensio(5) SSL section
58       for  details).  For certauth server, this means that the authentication
59       successfully authenticated the certauth client by either certificate or
60       password.
61
62       gensio_is_encrypted  returns true if the connection is encrypted, false
63       if not.
64
65       gensio_is_message returns if the genio is message-oriented.  In a  mes‐
66       sage-oriented  genio,  a  write can explicitly mark message boundaries,
67       these are delivered to the reader with those boundaries set.  See  gen‐
68       sio(5) for details on how this works.
69
70       gensio_is_mux  return  true  if  the  genio is capable of multiplexing,
71       meaning that it accepts an gensio_alloc_channel() call.
72
73       Note that for the "gensio_is_xxx" type of  requests,  the  properly  is
74       usually inherited from the child.  So if you run a telnet gensio on top
75       of an SSL gensio, the telnet gensio will return true for  gensio_is_en‐
76       crypted because SSL is encrypted.
77

SEE ALSO

79       gensio_err(3), gensio(5), gensio_os_funcs(3)
80
81
82
83                                  27 Feb 2019               gensio_get_type(3)
Impressum