1btohex(3TSOL) Trusted Extensions Library Functions btohex(3TSOL)
2
3
4
6 btohex, bsltoh, bcleartoh, bsltoh_r, bcleartoh_r, h_alloc, h_free -
7 convert binary label to hexadecimal
8
10 cc [flag...] file... -ltsol [library...]
11
12
13 #include <tsol/label.h>
14
15 char *bsltoh(const m_label_t *label);
16
17
18 char *bcleartoh(const m_label_t *clearance);
19
20
21 char *bsltoh_r(const m_label_t *label, char *hex);
22
23
24 char *bcleartoh_r(const m_label_t *clearance, char *hex);
25
26
27 char *h_alloc(const unsigned char type);
28
29
30 void h_free(char *hex);
31
32
34 These functions convert binary labels into hexadecimal strings that
35 represent the internal value.
36
37
38 The bsltoh() and bsltoh_r() functions convert a binary sensitivity
39 label into a string of the form:
40
41 [0xsensitivity_label_hexadecimal_value]
42
43
44
45
46 The bcleartoh() and bcleartoh_r() functions convert a binary clearance
47 into a string of the form:
48
49 0xclearance_hexadecimal_value
50
51
52
53
54 The h_alloc() function allocates memory for the hexadecimal value type
55 for use by bsltoh_r() and bcleartoh_r().
56
57
58 Valid values for type are:
59
60 SUN_SL_ID label is a binary sensitivity label.
61
62
63 SUN_CLR_ID label is a binary clearance.
64
65
66
67 The h_free() function frees memory allocated by h_alloc().
68
70 These functions return a pointer to a string that contains the result
71 of the translation, or (char *)0 if the parameter is not of the
72 required type.
73
75 See attributes(5) for descriptions of the following attributes:
76
77
78
79
80 ┌─────────────────────────────┬─────────────────────────────┐
81 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
82 ├─────────────────────────────┼─────────────────────────────┤
83 │Interface Stability │Obsolete │
84 ├─────────────────────────────┼─────────────────────────────┤
85 │MT-Level │MT-Safe with exceptions │
86 └─────────────────────────────┴─────────────────────────────┘
87
88
89 The bsltoh(), bcleartoh(), bsltoh_r(), bcleartoh_r(), h_alloc(), and
90 h_free() functions are Obsolete. Use the label_to_str(3TSOL) function
91 instead.
92
93
94 The bsltoh() and bcleartoh() functions share the same statically allo‐
95 cated string storage. They are not MT-Safe. Subsequent calls to any of
96 these functions will overwrite that string with the newly translated
97 string. The bsltoh_r() and bcleartoh_r() functions should be used in
98 multithreaded applications.
99
101 atohexlabel(1M), hextoalabel(1M),label_to_str(3TSOL), libtsol(3LIB),
102 attributes(5), labels(5)
103
105 The functionality described on this manual page is available only if
106 the system is configured with Trusted Extensions.
107
108
109
110SunOS 5.11 20 Jul 2007 btohex(3TSOL)