Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
sergensio_event(3)	   Library Functions Manual	    sergensio_event(3)

NAME
       sergensio_event - Event handler for events from a sergensio

SYNOPSIS
       #include	<gensio/sergensio.h>

DESCRIPTION
       When  an	event happens on a sergensio that is reported to the user, the
       gensio library calls the	gensio_event type handler that was  registered
       with  the  gensio,  just	 like  any  other event	on a gensio.  See gen-
       sio_event(3) for	details	on how this happens.

       This document the sergensio-specific events.  These report an  unsigned
       integer	value  unless  otherwise specified in the description, the buf
       parameter to the	gensio_event handler is	a pointer to the unsigned  in-
       teger value.

   SERIAL PORT CONTROLS
       These are controls for serial port settings.  These are received	on the
       server  side only.  It should respond by	setting	the value (if possible
       and the value isn't zero) and responding	with the  current  value  with
       sergensio_xxx().

       GENSIO_EVENT_SER_BAUD
       GENSIO_EVENT_SER_DATASIZE
       GENSIO_EVENT_SER_PARITY
       GENSIO_EVENT_SER_STOPBITS
       GENSIO_EVENT_SER_FLOWCONTROL
       GENSIO_EVENT_SER_IFLOWCONTROL
       GENSIO_EVENT_SER_SBREAK
       GENSIO_EVENT_SER_DTR
       GENSIO_EVENT_SER_RTS

   SIGNATURE
       GENSIO_EVENT_SER_SIGNATURE is received on the server side only and is a
       request	for the	signature.  The	server should respond by send the sig-
       nature with sergensio_signature().  No value is passed in this case.

   STATE FUNCTIONS
       GENSIO_EVENT_SER_MODEMSTATE_MASK
       GENSIO_EVENT_SER_LINESTATE_MASK
       These are received on the server	side to	request	updating the  mask  of
       reported	 values.   The	server should respond by returning the current
       mask with the sergensio_modemstate  or  sergensio_linestate  functions.
       The server need not handle all the bits requested by the	user.

       GENSIO_EVENT_SER_MODEMSTATE
       GENSIO_EVENT_SER_LINESTATE

       On  the	client side, these are reporting current modemstate and	lines-
       tate changes as an unsigned integer.  See  sergensio_modemstate(3)  and
       sergensio_linestate(3) for a meaning of the bits	in the integer.

   OTHER SERIAL	PORT CONTROLS
       These are server-only, these are	received requesting the	various	opera-
       tions.	The  server  should do them, but no response is	required.  You
       may notice that break is	not here, break	is handled  through  the  GEN-
       SIO_EVENT_SEND_BREAK event.

       GENSIO_EVENT_SER_FLOW_STATE
       GENSIO_EVENT_SER_FLUSH

   SYNC
       GENSIO_EVENT_SER_SYNC  is  a special operation that comes in when a TCP
       sync event is received.	It may be received on both  sides.   A	server
       should  send a break.  The client can do	whatever it wants with the in-
       formation, that is not defined by the RFC2217 specification.

RETURN VALUES
       Return value are	currently ignored for all these	events,	but you	should
       return 0	on success, GE_NOTSUP if  the  function	 isn't	supported,  or
       other gensio errors as necessary.

SEE ALSO
       sergensio(5), gensio_event(3), gensio_err(3)

				 2o July 2020		    sergensio_event(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=sergensio_event&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help