Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sysevent_get_pub_name(3syseven) [opensolaris man page]

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

NAME
sysevent_get_vendor_name, sysevent_get_pub_name, sysevent_get_pid - get vendor name, publisher name or processor ID of event SYNOPSIS
cc [flag ...] file ...-lsysevent [library ...] #include <libsysevent.h> char *sysevent_get_vendor_name(sysevent_t *ev); char *sysevent_get_pub_name(sysevent_t *ev); pid_t sysevent_get_pid(sysevent_t *ev); PARAMETERS
ev handle to a system event object DESCRIPTION
The sysevent_get_pub_name() function returns the publisher name for the sysevent handle, ev. The publisher name identifies the name of the publishing application or kernel subsystem of the sysevent. The sysevent_get_pid() function returns the process ID for the publishing application or SE_KERN_PID for sysevents originating in the ker- nel. The publisher name and PID are useful for implementing event acknowledgement. The sysevent_get_vendor_name() function returns the vendor string for the publishing application or kernel subsystem. A vendor string is the company's stock symbol that provided the application or kernel subsystem that generated the system event. This information is useful for filtering sysevents for one or more vendors. The interface manages the allocation of the vendor and publisher name strings, but it is the caller's responsibility to free the strings when they are no longer needed by calling free(3MALLOC). If the new vendor and publisher name strings cannot be created, sysevent_get_ven- dor_name() and sysevent_get_pub_name() return a null pointer and may set errno to ENOMEM to indicate that the storage space available is insufficient. EXAMPLES
Example 1 Parse sysevent header information. The following example parses sysevent header information from an application's event handler. char *vendor; char *pub; void event_handler(sysevent_t *ev) { if (strcmp(EC_PRIV, sysevent_get_class_name(ev)) != 0) { return; } vendor = sysevent_get_vendor_name(ev); if (strcmp("SUNW", vendor) != 0) { free(vendor); return; } pub = sysevent_get_pub_name(ev); if (strcmp("test_daemon", pub) != 0) { free(vendor); free(pub); return; } (void) kill(sysevent_get_pid(ev), SIGUSR1); free(vendor); free(pub); } ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
malloc(3MALLOC), attributes(5) SunOS 5.11 17 Mar 2004 sysevent_get_vendor_name(3SYSEVENT)

Check Out this Related Man Page

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

NAME
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 libsysevent.so.1 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/libsysevent.so.1 shared object /usr/lib/64/libsysevent.so.1 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)
Man Page