ct_event_get_type man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]


       ct_event_read,  ct_event_read_critical,	ct_event_reset, ct_event_reli‐
       able,	 ct_event_free,	    ct_event_get_flags,	    ct_event_get_ctid,
       ct_event_get_evid,	 ct_event_get_type,	   ct_event_get_nevid,
       ct_event_get_newct - common contract event functions

       cc [ flag... ] file... -D_LARGEFILE64_SOURCE  -lcontract	 [ library... ]
       #include <libcontract.h>

       int ct_event_read(int fd, ct_evthdl_t *evthndlp);

       int ct_event_read_critical(int fd, ct_evthdl_t *evthndlp);

       int ct_event_reset(int fd);

       int ct_event_reliable(int fd);

       void ct_event_free(ct_evthdl_t evthndl);

       ctid_t ct_event_get_ctid(ct_evthdl_t evthndl);

       ctevid_t ct_event_get_evid(ct_evthdl_t evthndl);

       uint_t ct_event_get_flags(ct_evthdl_t evthndl);

       uint_t ct_event_get_type(ct_evthdl_t evthndl);

       int ct_event_get_nevid(ct_evthdl_t evthndl, ctevid_t *evidp);

       int ct_event_get_newct(ct_evthdl_t evthndl, ctid_t *ctidp);

       These functions operate on contract  event  endpoint  file  descriptors
       obtained	 from  the  contract(4)	 file  system and event object handles
       returned by ct_event_read() and ct_event_read_critical().

       The ct_event_read() function reads the next event from the queue refer‐
       enced by the file descriptor fd and initializes the event object handle
       pointed to by evthndlp. After a successful call to ct_event_read(), the
       caller  is responsible for calling ct_event_free() on this event object
       handle when it has finished using it.

       The  ct_event_read_critical()  function	behaves	 like  ct_event_read()
       except  that  it reads the next critical event from the queue, skipping
       any intermediate events.

       The ct_event_reset() function resets the location of  the  listener  to
       the  beginning  of  the	queue.	This  function	can be used to re-read
       events, or read events that were sent before  the  event	 endpoint  was
       opened.	Informative  and  acknowledged critical events, however, might
       have been removed from the queue.

       The ct_event_reliable() function indicates that no event	 published  to
       the  specified  event  queue  should be dropped by the system until the
       specified listener has read the event. This function requires that  the
       caller have the {PRIV_CONTRACT_EVENT} privilege in its effective set.

       The  ct_event_free()  function  frees  any  storage associated with the
       event object handle specified by evthndl.

       The ct_event_get_ctid() function returns the ID of  the	contract  that
       sent the specified event.

       The ct_event_get_evid() function returns the ID of the specified event.

       The ct_event_get_flags() function returns the event flags for the spec‐
       ified event. Valid event flags are:

		   The event is an informative event.

		   The event has been acknowledged (for critical and  negotia‐
		   tion messages).

		   The message represents an exit negotiation.

       The ct_event_get_type() function reads the event type. The value is one
       of the event types described in contract(4) or the contract type's man‐
       ual page.

	The  ct_event_get_nevid()  function  reads  the negotiation ID from an
       CT_EV_NEGEND event.

       The ct_event_get_newct() function obtains the ID of the	contract  cre‐
       ated  when  the	negotiation  referenced by the CT_EV_NEGEND event suc‐
       ceeded. If no contract was created, ctidp will be 0.  If the  operation
       was cancelled, *ctidp will equal the ID of the existing contract.

       Upon  successful completion, ct_event_read(), ct_event_read_critical(),
       ct_event_reset(),   ct_event_reliable(),	  ct_event_get_nevid(),	   and
       ct_event_get_newct()  return 0. Otherwise, they return a non-zero error

       The ct_event_get_flags(), ct_event_get_ctid(), ct_event_get_evid(), and
       ct_event_get_type()  functions return data as described in the DESCRIP‐

       The ct_event_reliable() function will fail if:

		The caller does not have {PRIV_CONTRACT_EVENT} in  its	effec‐
		tive set.

       The  ct_event_read()  and  ct_event_read_critical() functions will fail

		 The event endpoint was opened O_NONBLOCK  and	no  applicable
		 events were available to be read.

       The  The	 ct_event_get_nevid()  and ct_event_get_newct() functions will
       fail if:

		 The evthndl argument is not a CT_EV_NEGEND event object.

       See attributes(5) for descriptions of the following attributes:

       │Interface Stability │ Evolving	      │
       │MT-Level	    │ Safe	      │

       libcontract(3LIB), contract(4), attributes(5), lfcompile(5)

				  Apr 1, 2004	      CT_EVENT_READ(3CONTRACT)

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net