1gensio_to_sergensio.3(3) Library Functions Manual gensio_to_sergensio.3(3)
2
3
4
6 gensio_to_sergensio, sergensio_to_gensio, sergensio_get_user_data, ser‐
7 gensio_is_client - General information and conversion routines for a
8 sergensio
9
11 #include <gensio/sergensio.h>
12
13 struct sergensio *gensio_to_sergensio(struct gensio *io);
14
15 struct gensio *sergensio_to_gensio(struct sergensio *serio);
16
17 void *sergensio_get_user_data(struct sergensio *serio);
18
19 bool sergensio_is_client(struct sergensio *serio);
20
22 gensio_to_sergensio return the sergensio object for a gensio. It re‐
23 turns NULL if there is no sergensio for the gensio. Note that this may
24 be a sergensio object for a child of the passed in gensio. If the
25 passed in gensio is not a sergensio, it will search through the chil‐
26 dren for a gensio that is also a sergensio. This way, say, if you have
27 an conacc gensio running over a serialdev, and you receive an serial
28 event, you can just call gensio_to_sergensio for the passed in object
29 and it will give you the sergensio you should be working with. The
30 first time this is called on a gensio it associates the sergensio with
31 the passed in gensio.
32
33 sergensio_to_gensio returns the gensio for a given sergensio. It can‐
34 not fail. Note that this returns the gensio passed in to gen‐
35 sio_to_sergensio not the gensio directly associated with the passed in
36 sergensio.
37
38 sergensio_get_user_data returns the gensio user data for the associated
39 gensio.
40
41 sergensio_is_client returns true if the sergensio a client or false if
42 it is a server.
43
45 sergensio(5)
46
48 Corey Minyard <minyard@acm.org>
49
50
51
52 20 Jul 2020 gensio_to_sergensio.3(3)