1picld_plugin_register(3PIPCILCTLREPEl)ug-In Library Fupnicctlido_npslugin_register(3PICLTREE)
2
3
4
6 picld_plugin_register - register plug-in with the daemon
7
9 cc [ flag... ] file... -lpicltree [ library... ]
10 #include <picltree.h>
11
12 int picld_plugin_register(picld_plugin_reg_t *regp);
13
14
16 The picld_plugin_register() function is the function used by a plug-in
17 module to register itself with the PICL daemon upon initialization. The
18 plug-in provides its name and the entry points of the initialization
19 and cleanup routines in the regp argument.
20
21 typedef struct {
22 int version; /* PICLD_PLUGIN_VERSION */
23 int critical; /* is plug-in critical? */
24 char *name; /* name of the plugin module */
25 void (*plugin_init)(void); /* init/reinit function */
26 void (*plugin_fini)(void); /* fini/cleanup function */
27 } picld_plugin_reg_t;
28
29
30
31 The plug-in module also specifies whether it is a critical module for
32 the proper system operation. The critical field in the registration
33 information is set to PICLD_PLUGIN_NON_CRITICAL by plug-in modules that
34 are not critical to system operation, and is set to PICLD_PLUGIN_CRITI‐
35 CAL by plug-in modules that are critical to the system operation. An
36 environment control plug-in module is an example for a PICLD_PLUG‐
37 IN_CRITICAL type of plug-in module.
38
39
40 The PICL daemon saves the information passed during registration in
41 regp in the order in which the plug-ins registered.
42
43
44 Upon initialization, the PICL daemon invokes the plugin_init() routine
45 of each of the registered plug-in modules in the order in which they
46 registered. In their plugin_init() routines, the plug-in modules col‐
47 lect the platform configuration data and add it to the PICL tree using
48 PICLTREE interfaces (3PICLTREE).
49
50
51 On reinitialization, the PICL daemon invokes the plugin_fini() routines
52 of the registered plug-in modules in the reverse order of registration.
53 Then, the plugin_init() entry points are invoked again in the order in
54 which the plug-ins registered.
55
57 Upon successful completion, 0 is returned. On failure, a negative value
58 is returned.
59
61 PICL_NOTSUPPORTED Version not supported
62
63
64 PICL_FAILURE General system failure
65
66
68 See attributes(5) for descriptions of the following attributes:
69
70
71
72
73 ┌─────────────────────────────┬─────────────────────────────┐
74 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │Interface Stability │Evolving │
77 ├─────────────────────────────┼─────────────────────────────┤
78 │MT-Level │MT-Safe │
79 └─────────────────────────────┴─────────────────────────────┘
80
82 libpicltree(3PICLTREE), attributes(5)
83
84
85
86SunOS 5.11 19 Sep 2001 picld_plugin_register(3PICLTREE)