2 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PICLD_PLUGIN_REGISTER 3PICLTREE "Sep 19, 2001"
8 picld_plugin_register \- register plug-in with the daemon
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lpicltree\fR [ \fIlibrary\fR... ]
15 \fBint\fR \fBpicld_plugin_register\fR(\fBpicld_plugin_reg_t *\fR\fIregp\fR);
21 The \fBpicld_plugin_register()\fR function is the function used by a plug-in
22 module to register itself with the PICL daemon upon initialization. The plug-in
23 provides its name and the entry points of the initialization and cleanup
24 routines in the \fIregp\fR argument.
29 int version; /* PICLD_PLUGIN_VERSION */
30 int critical; /* is plug-in critical? */
31 char *name; /* name of the plugin module */
32 void (*plugin_init)(void); /* init/reinit function */
33 void (*plugin_fini)(void); /* fini/cleanup function */
40 The plug-in module also specifies whether it is a critical module for the
41 proper system operation. The critical field in the registration information is
42 set to \fBPICLD_PLUGIN_NON_CRITICAL\fR by plug-in modules that are not critical
43 to system operation, and is set to \fBPICLD_PLUGIN_CRITICAL\fR by plug-in
44 modules that are critical to the system operation. An environment control
45 plug-in module is an example for a \fBPICLD_PLUGIN_CRITICAL\fR type of plug-in
49 The PICL daemon saves the information passed during registration in \fIregp\fR
50 in the order in which the plug-ins registered.
53 Upon initialization, the PICL daemon invokes the \fBplugin_init()\fR routine of
54 each of the registered plug-in modules in the order in which they registered.
55 In their \fBplugin_init()\fR routines, the plug-in modules collect the platform
56 configuration data and add it to the PICL tree using PICLTREE interfaces
60 On reinitialization, the PICL daemon invokes the \fBplugin_fini()\fR routines
61 of the registered plug-in modules in the reverse order of registration. Then,
62 the \fBplugin_init()\fR entry points are invoked again in the order in which
63 the plug-ins registered.
67 Upon successful completion, \fB0\fR is returned. On failure, a negative value
73 \fB\fBPICL_NOTSUPPORTED\fR\fR
82 \fB\fBPICL_FAILURE\fR\fR
85 General system failure
91 See \fBattributes\fR(5) for descriptions of the following attributes:
99 ATTRIBUTE TYPE ATTRIBUTE VALUE
101 Interface Stability Evolving
109 \fBlibpicltree\fR(3PICLTREE), \fBattributes\fR(5)