1gensio_acc_control(3) Library Functions Manual gensio_acc_control(3)
2
3
4
6 gensio_acc_control - Perform gensio accepter specific actions
7
9 #include <gensio/gensio.h>
10
11 int gensio_acc_control(struct gensio_accepter *acc, int depth,
12 bool get, unsigned int option,
13 char *data, gensiods *datalen);
14
16 gensio_acc_control performs a gensio accepter specific operation on the
17 gensio accepter. This works exactly like gensio_control(3), see that
18 for details on get, depth, and how the data and datalen work.
19
20 gensio control operations in option depend on the particular gensio.
21 Below some are documented, but there may be other controls available.
22 See the gensio documentation in gensio(5) for details.
23
24 GENSIO_ACC_CONTROL_LADDR
25 Return the given local address for the given gensio. Since a single
26 gensio may have more than one local address, this control provides a
27 means to tell which one. The data string passed in should be the
28 string representation of a the number (like created with snprintf())
29 for the particular index you want to fetch. If you specify a number
30 larger than the number of open listen sockets, GE_NOTFOUND is returned.
31 The return data is a string holding the address.
32
33 Note that a single fetched string may contain more than one address.
34 These will be separated by semicolons. In some cases addresses may
35 change dynamically (like with SCTP), so you get a single set of ad‐
36 dresses.
37
38 GENSIO_ACC_CONTROL_LPORT
39 Return the port for the given local address for the given gensio.
40 Since a single gensio may have more than one local address, this con‐
41 trol provides a means to tell which one. The data string passed in
42 should be the string representation of a the number (like created with
43 snprintf()) for the particular index you want to fetch. If you specify
44 a number larger than the number of open listen sockets, GE_NOTFOUND is
45 returned. The return data is a string holding the port number.
46
47 GENSIO_ACC_CONTROL_TCPDNAME
48 Get or set the TCPD name for the gensio, only for TCP gensios.
49
50
52 Zero is returned on success, or a gensio error on failure.
53
55 gensio_err(3), gensio(5), gensio_control(3)
56
57
58
59 27 Feb 2019 gensio_acc_control(3)