/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MDESC_IMPL_H_
#define _MDESC_IMPL_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ASM
/*
* Internal definitions
*/
/*
* Each MD has the following header to
* provide information about each section of the MD.
*
* There are 3 sections:
* The description list, the name table and the data block.
*
* All values are stored in network byte order.
*
* Elements in the first (description list) section are defined by their
* index location within the node block. An index is simply the byte offset
* within the block / element size (16bytes). All elements are refered to
* by their index, to avoid bugs related to alignment etc.
*
* The name_len field holds the storage length of an ASCII name, NOT the strlen.
* The header fields are written in network
* byte order.
*/
struct md_header_s {
};
#if defined(_BIG_ENDIAN)
#define htomd8(x) (x)
#define htomd16(x) (x)
#define htomd32(x) (x)
#define htomd64(x) (x)
#else
#endif
struct MD_ELEMENT {
union {
struct {
} d;
};
struct MACHINE_DESCRIPTION {
char *namep;
int node_blk_size;
int name_blk_size;
int data_blk_size;
int element_count;
int node_count;
int size;
};
extern mde_str_cookie_t md_ident_name_str(char *);
int);
#endif /* _ASM */
#ifdef __cplusplus
}
#endif
#endif /* _MDESC_IMPL_H_ */