Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #441
Difficulty: Easy
"Hotel California" by the Eagles is a song about a super A.I. who goes rouge and parties all day and night.
True or False?
Linux & Unix Commands - Search Man Pages

libsysevent(3lib) [sunos man page]

libsysevent(3LIB)						Interface Libraries						 libsysevent(3LIB)

libsysevent - system event interface library SYNOPSIS
cc [ flag... ] file... -lsysevent [ library... ] #include <sysevent.h> DESCRIPTION
Functions in this library extract specific identifier, publisher, and attribute information from a system event (sysevent) handle, defined as sysevent_t, and allow priviledged user-level applications to queue system events for delivery to the system event daemon, syseventd(1M). INTERFACES
The shared object provides the public interfaces defined below. See intro(3) for additional information on shared object interfaces. sysevent_bind_handle sysevent_free sysevent_get_attr_list sysevent_get_class_name sysevent_get_pid sysevent_get_pub_name sysevent_get_seq sysevent_get_size sysevent_get_subclass_name sysevent_get_time sysevent_get_vendor_name sysevent_post_event sysevent_subscribe_event sysevent_unbind_handle sysevent_unsubscribe_event FILES
/usr/lib/ shared object /usr/lib/64/ 64-bit shared object ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsl (32-bit) | +-----------------------------+-----------------------------+ | |SUNWcslx (64-bit) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
syseventd(1M), intro(3), attributes(5) SunOS 5.10 24 Jun 2004 libsysevent(3LIB)

Check Out this Related Man Page

sysevent_get_class_name(3SYSEVENT)			  System Event Library Functions			sysevent_get_class_name(3SYSEVENT)

sysevent_get_class_name, sysevent_get_subclass_name, sysevent_get_size, sysevent_get_seq, sysevent_get_time - get class name, subclass name, ID or buffer size of event SYNOPSIS
cc [flag...] file ...-lsysevent [library...] #include <libsysevent.h> char *sysevent_get_class_name(sysevent_t *ev); char *sysevent_get_subclass_name(sysevent_t *ev); int sysevent_get_size(sysevent_t *ev); uint64_t sysevent_get_seq(sysevent_t *ev); void sysevent_get_time(sysevent_t *ev, hrtime_t *etimep); PARAMETERS
ev handle to event etimep pointer to high resolution event time variable DESCRIPTION
The sysevent_get_class_name() and sysevent_get_subclass_name() functions return, respectively, the class and subclass names for the pro- vided event ev. The sysevent_get_size() function returns the size of the event buffer, ev. The sysevent_get_seq() function returns a unique event sequence number of event ev. The sequence number is reset on every system boot. The sysevent_get_time() function writes the time the event was published into the variable pointed to by etimep. The event time is added to the event just before it is put into the kernel internal event queue. EXAMPLES
Example 1 Parse sysevent header information. The following example parses sysevent header information from an application's event handler. hrtime_t last_ev_time; unit64_t last_ev_seq; void event_handler(sysevent_t *ev) { sysevent_t *new_ev; int ev_sz; hrtime_t ev_time; uint64_t ev_seq; /* Filter on class and subclass */ if (strcmp(EC_PRIV, sysevent_get_class_name(ev)) != 0) { return; } else if (strcmp("ESC_MYSUBCLASS, sysevent_get_subclass_name(ev)) != 0) { return; } /* * Check for replayed sysevent, time must * be greater than previously recorded. */ sysevent_get_event_time(ev, &ev_time); ev_seq = sysevent_get_seq(ev); if (ev_time < last_ev_time || (ev_time == last_ev_time && ev_seq <= last_ev_seq)) { return; } last_ev_time = ev_time; last_ev_seq = ev_seq; /* Store event for later processing */ ev_sz = sysevent_get_size(ev): new_ev (sysevent_t *)malloc(ev_sz); bcopy(ev, new_ev, ev_sz); queue_event(new_ev); } ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.11 1 Apr 2003 sysevent_get_class_name(3SYSEVENT)

Featured Tech Videos