btohex.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * These routines convert binary labels into canonical 2N/A * hexadecimal representations of the binary form. 2N/A * h_alloc - Allocate data storage for a Hexadecimal label string. 2N/A * Entry id = Type of label to allocate storage for. 2N/A * SUN_SL_ID - Sensitivity Label. 2N/A * SUN_CLR_ID - Clearance. 2N/A * Returns NULL, If unable to allocate storage. 2N/A * Address of buffer. 2N/A * h_free - Free a Hexadecimal label string. 2N/A * Entry hex = Hexadecimal label string. 2N/A * bsltoh_r - Convert a Sensitivity Label into a Hexadecimal label string. 2N/A * Entry label = Sensitivity Label to be translated. 2N/A * hex = Buffer to place converted label. 2N/A * len = Length of buffer. 2N/A * Returns NULL, If invalid label type. 2N/A * Address of buffer. 2N/A * Calls label_to_str, strncpy. 2N/A * bsltoh - Convert a Sensitivity Label into a Hexadecimal label string. 2N/A * Entry label = Sensitivity Label to be translated. 2N/A * Returns NULL, If invalid label type. 2N/A * Address of statically allocated hex label string. 2N/A * bcleartoh_r - Convert a Clearance into a Hexadecimal label string. 2N/A * Entry clearance = Clearance to be translated. 2N/A * hex = Buffer to place converted label. 2N/A * len = Length of buffer. 2N/A * Returns NULL, If invalid label type. 2N/A * Address of buffer. 2N/A * Calls label_to_str, strncpy. 2N/A * bcleartoh - Convert a Clearance into a Hexadecimal label string. 2N/A * Entry clearance = Clearance to be translated. 2N/A * Returns NULL, If invalid label type. 2N/A * Address of statically allocated hex label string. 2N/A * Calls bcleartoh_r.