MSEN_FROM_TEXT(3C) MSEN_FROM_TEXT(3C) NAME msen_from_text, msen_to_text - convert a MSEN string from/to msen_t SYNOPSIS #include <sys/mac.h> msen_t msen_from_text(const char *argp); char * msen_to_text(msen_t msenp, size_t *len_p); DESCRIPTION These routines convert a textual name of a mandatory sensitvity (MSEN) label from/to a msen_t - a pointer to a structure representing the mandatory sensitivity component of a MAC label. msen_from_text translates a textual description of a MSEN label into a msen_t and returns the result. msen_to_text translates a msen_t into a character string describing the MSEN label. Both of these routines allocate storage for the information returned. The allocated storage for both can be released when no longer needed by calling msen_free(3c). The len_p argument to msen_to_text is a pointer to a size_t that can be used to hold the length of the returned string. If this argument is not NULL, then the length of the string is placed in this location on return from msen_to_text. RETURN VALUES If successful, msen_from_text returns a msen_t. Upon failure msen_from_text returns a NULL pointer - a value of ((msen_t)0). If successful, msen_to_text returns a pointer to an allocated null terminated character string containing a representation of the MSEN label. If an error occurs, msen_to_text returns a NULL pointer. ERRORS msen_from_text: EINVAL input text is invalid ENOMEM could not allocate space for new label msen_to_text: EINVAL input label is invalid ENOMEM could not allocate space for the return string SEE ALSO msen_dom(3C), msen_equal(3C), msen_free(3C), msen_from_mac(3C) Page 1