Parameter
Description
Locking
'>
struct label *label
char *element_name
struct sbuf *sb
int *claimed
'>
label
Label to be externalized
element_name
Name of the policy whose label should be externalized
sb
String buffer to be filled with a text representation of
label
claimed
Should be incremented when element_data
can be filled in.
'>
Produce an externalized label based on the label structure passed.
An externalized label consists of a text representation of the label
contents that can be used with userland applications and read by the
user. Currently, all policies' externalize entry
points will be called, so the implementation should check the contents
of element_name before attempting to fill in
sb. If
element_name does not match the name of your
policy, simply return 0. Only return nonzero
if an error occurs while externalizing the label data. Once the policy
fills in element_data, *claimed
should be incremented.
'>
struct label *label
char *element_name
char *element_data
int *claimed
'>
label
Label to be filled in
element_name
Name of the policy whose label should be internalized
element_data
Text data to be internalized
claimed
Should be incremented when data can be successfully
internalized.
'>
Produce an internal label structure based on externalized label data
in text format. Currently, all policies' internalize
entry points are called when internalization is requested, so the
implementation should compare the contents of
element_name to its own name in order to be sure
it should be internalizing the data in element_data.
Just as in the externalize entry points, the entry
point should return 0 if
element_name does not match its own name, or when
data can successfully be internalized, in which case
*claimed should be incremented.
'>