logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gensio_acc_control - Perform gensio accepter specific actions

Description

gensio_acc_control  performs  a  gensio  accepter  specific operation on the gensio accepter.  This works
       exactly like gensio_control(3), see that for details on get, depth, and how the data and datalen work.

       gensio control operations in option depend on the particular gensio.   Below  some  are  documented,  but
       there may be other controls available.  See the gensio documentation in gensio(5) for details.

   GENSIO_ACC_CONTROL_LADDR
       Return  the given local address for the given gensio.  Since a single gensio may have more than one local
       address, this control provides a means to tell which one.  The data string passed in should be the string
       representation of a the number (like created with snprintf()) for the particular index you want to fetch.
       If you specify a number larger than the number of open listen  sockets,  GE_NOTFOUND  is  returned.   The
       return data is a string holding the address.

       Note  that  a  single  fetched  string  may  contain  more  than one address.  These will be separated by
       semicolons.  In some cases addresses may change dynamically (like with SCTP), so you get a single set  of
       addresses.

   GENSIO_ACC_CONTROL_LPORT
       Return  the  port  for the given local address for the given gensio.  Since a single gensio may have more
       than one local address, this control provides a means to tell which  one.   The  data  string  passed  in
       should  be  the  string  representation of a the number (like created with snprintf()) for the particular
       index you want to fetch.  If you specify a  number  larger  than  the  number  of  open  listen  sockets,
       GE_NOTFOUND is returned.  The return data is a string holding the port number.

   GENSIO_ACC_CONTROL_TCPDNAME
       Get or set the TCPD name for the gensio, only for TCP gensios.

Name

       gensio_acc_control - Perform gensio accepter specific actions

Return Values

       Zero is returned on success, or a gensio error on failure.

See Also

gensio_err(3), gensio(5), gensio_control(3)

                                                   27 Feb 2019                             gensio_acc_control(3)

Synopsis

#include<gensio/gensio.h>intgensio_acc_control(structgensio_accepter*acc,intdepth,boolget,unsignedintoption,char*data,gensiods*datalen);

See Also