labelinfo(3) ルーチンは、ラベルライブラリのさまざまな文字データフィールドの最大長の値をショート整数 (short integer) で返します。これらの長さは、ラベル情報を含むフィールドを表示するアプリケーションなどで使用します。長さの値は、label_encodings(4) ファイルの実際の内容によって異なります。
#include <tsol/label.h> main() { int retval; struct label_info info; retval = labelinfo(&info); printf("Max information label length = %d¥n", info.ilabel_len); printf("Max sensitivity label length = %d¥n", info.slabel_len); printf("Max CMW label length = %d¥n", info.clabel_len); printf("Max clearance length = %d¥n", info.clear_len); printf("Max version string length = %d¥n", info.vers_len); printf("Max banner and trailer string length = %d¥n", info.header_len); printf("Max protect as section string length = %d¥n", info.protect_as_len); printf("Max caveats section string length = %d¥n", info.caveats_len); printf("Max handling channels string length = %d¥n", info.channels_len); }
printf 文によって、次のように長さが出力されます。
Max information label length = 212
Max sensitivity label length = 45
Max CMW label length = 259
Max clearance length = 76
Max Version String length 56
Max Banner and trailer page string length = 13
Max Protect as section string length = 256
Max Caveats section string length = 62
Max Handling channels section string length = 81