'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .TH btohex 3TSOL "20 Jul 2007" "SunOS 5.11" "Trusted Extensions Library Functions" .SH NAME btohex, bsltoh, bcleartoh, bsltoh_r, bcleartoh_r, h_alloc, h_free \- convert binary label to hexadecimal .SH SYNOPSIS .LP .nf \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR [\fIlibrary\fR...] .fi .LP .nf #include \fBchar *\fR\fBbsltoh\fR(\fBconst m_label_t *\fR\fIlabel\fR); .fi .LP .nf \fBchar *\fR\fBbcleartoh\fR(\fBconst m_label_t *\fR\fIclearance\fR); .fi .LP .nf \fBchar *\fR\fBbsltoh_r\fR(\fBconst m_label_t *\fR\fIlabel\fR, char *\fIhex\fR); .fi .LP .nf \fBchar *\fR\fBbcleartoh_r\fR(\fBconst m_label_t *\fR\fIclearance\fR, char *\fIhex\fR); .fi .LP .nf \fBchar *\fR\fBh_alloc\fR(\fBconst unsigned char\fR \fItype\fR); .fi .LP .nf \fBvoid\fR \fBh_free\fR(\fBchar *\fR\fIhex\fR); .fi .SH DESCRIPTION .sp .LP These functions convert binary labels into hexadecimal strings that represent the internal value. .sp .LP The \fBbsltoh()\fR and \fBbsltoh_r()\fR functions convert a binary sensitivity label into a string of the form: .sp .in +2 .nf [0x\fIsensitivity_label_hexadecimal_value\fR] .fi .in -2 .sp .sp .LP The \fBbcleartoh()\fR and \fBbcleartoh_r()\fR functions convert a binary clearance into a string of the form: .sp .in +2 .nf 0x\fIclearance_hexadecimal_value\fR .fi .in -2 .sp .sp .LP The \fBh_alloc()\fR function allocates memory for the hexadecimal value \fItype\fR for use by \fBbsltoh_r()\fR and \fBbcleartoh_r()\fR. .sp .LP Valid values for \fItype\fR are: .sp .ne 2 .mk .na \fB\fBSUN_SL_ID\fR\fR .ad .RS 14n .rt \fIlabel\fR is a binary sensitivity label. .RE .sp .ne 2 .mk .na \fB\fBSUN_CLR_ID\fR\fR .ad .RS 14n .rt \fIlabel\fR is a binary clearance. .RE .sp .LP The \fBh_free()\fR function frees memory allocated by \fBh_alloc()\fR. .SH RETURN VALUES .sp .LP These functions return a pointer to a string that contains the result of the translation, or \fB(char *)0\fR if the parameter is not of the required type. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityObsolete _ MT-LevelMT-Safe with exceptions .TE .sp .LP The \fBbsltoh()\fR, \fBbcleartoh()\fR, \fBbsltoh_r()\fR, \fBbcleartoh_r()\fR, \fBh_alloc()\fR, and \fBh_free()\fR functions are Obsolete. Use the \fBlabel_to_str\fR(3TSOL) function instead. .sp .LP The \fBbsltoh()\fR and \fBbcleartoh()\fR functions share the same statically allocated string storage. They are not MT-Safe. Subsequent calls to any of these functions will overwrite that string with the newly translated string. The \fBbsltoh_r()\fR and \fBbcleartoh_r()\fR functions should be used in multithreaded applications. .SH SEE ALSO .sp .LP \fBatohexlabel\fR(1M), \fBhextoalabel\fR(1M),\fBlabel_to_str\fR(3TSOL), \fBlibtsol\fR(3LIB), \fBattributes\fR(5), \fBlabels\fR(5) .SH NOTES .sp .LP The functionality described on this manual page is available only if the system is configured with Trusted Extensions.