xref: /titanic_50/usr/src/uts/common/sys/systeminfo.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #ifndef _SYS_SYSTEMINFO_H
32*7c478bd9Sstevel@tonic-gate #define	_SYS_SYSTEMINFO_H
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.4 */
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #ifdef	_KERNEL
41*7c478bd9Sstevel@tonic-gate extern char architecture[];
42*7c478bd9Sstevel@tonic-gate extern char architecture_32[];
43*7c478bd9Sstevel@tonic-gate extern char hw_serial[];
44*7c478bd9Sstevel@tonic-gate extern char hw_provider[];
45*7c478bd9Sstevel@tonic-gate extern char srpc_domain[];
46*7c478bd9Sstevel@tonic-gate extern char platform[];
47*7c478bd9Sstevel@tonic-gate #endif	/* _KERNEL */
48*7c478bd9Sstevel@tonic-gate 
49*7c478bd9Sstevel@tonic-gate /*
50*7c478bd9Sstevel@tonic-gate  * Commands to sysinfo(2)
51*7c478bd9Sstevel@tonic-gate  *
52*7c478bd9Sstevel@tonic-gate  * Values for sysinfo(2) commands are to be assigned by the following
53*7c478bd9Sstevel@tonic-gate  * algorithm:
54*7c478bd9Sstevel@tonic-gate  *
55*7c478bd9Sstevel@tonic-gate  *    1 -  256	Unix International assigned numbers for `get' style commands.
56*7c478bd9Sstevel@tonic-gate  *  257 -  512	Unix International assigned numbers for `set' style commands
57*7c478bd9Sstevel@tonic-gate  *		where the value is selected to be the value for the
58*7c478bd9Sstevel@tonic-gate  *		corresponding `get' command plus 256.
59*7c478bd9Sstevel@tonic-gate  *  513 -  768	Solaris specific `get' style commands.
60*7c478bd9Sstevel@tonic-gate  *  769 - 1024	Solaris specific `set' style commands where the value is
61*7c478bd9Sstevel@tonic-gate  *		selected to be the value for the corresponding `get' command
62*7c478bd9Sstevel@tonic-gate  *		plus 256.
63*7c478bd9Sstevel@tonic-gate  *
64*7c478bd9Sstevel@tonic-gate  * These values have be registered
65*7c478bd9Sstevel@tonic-gate  * with Unix International can't be corrected now.  The status of a command
66*7c478bd9Sstevel@tonic-gate  * as published or unpublished does not alter the algorithm.
67*7c478bd9Sstevel@tonic-gate  */
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate /* UI defined `get' commands (1-256) */
70*7c478bd9Sstevel@tonic-gate #define	SI_SYSNAME		1	/* return name of operating system */
71*7c478bd9Sstevel@tonic-gate #define	SI_HOSTNAME		2	/* return name of node */
72*7c478bd9Sstevel@tonic-gate #define	SI_RELEASE 		3	/* return release of operating system */
73*7c478bd9Sstevel@tonic-gate #define	SI_VERSION		4	/* return version field of utsname */
74*7c478bd9Sstevel@tonic-gate #define	SI_MACHINE		5	/* return kind of machine */
75*7c478bd9Sstevel@tonic-gate #define	SI_ARCHITECTURE		6	/* return instruction set arch */
76*7c478bd9Sstevel@tonic-gate #define	SI_HW_SERIAL		7	/* return hardware serial number */
77*7c478bd9Sstevel@tonic-gate #define	SI_HW_PROVIDER		8	/* return hardware manufacturer */
78*7c478bd9Sstevel@tonic-gate #define	SI_SRPC_DOMAIN		9	/* return secure RPC domain */
79*7c478bd9Sstevel@tonic-gate 
80*7c478bd9Sstevel@tonic-gate /* UI defined `set' commands (257-512) */
81*7c478bd9Sstevel@tonic-gate #define	SI_SET_HOSTNAME		258	/* set name of node */
82*7c478bd9Sstevel@tonic-gate #define	SI_SET_SRPC_DOMAIN	265	/* set secure RPC domain */
83*7c478bd9Sstevel@tonic-gate 
84*7c478bd9Sstevel@tonic-gate /* Solaris defined `get' commands (513-768) */
85*7c478bd9Sstevel@tonic-gate #define	SI_PLATFORM		513	/* return platform identifier */
86*7c478bd9Sstevel@tonic-gate #define	SI_ISALIST		514	/* return supported isa list */
87*7c478bd9Sstevel@tonic-gate #define	SI_DHCP_CACHE		515	/* return kernel-cached DHCPACK */
88*7c478bd9Sstevel@tonic-gate #define	SI_ARCHITECTURE_32	516	/* basic 32-bit SI_ARCHITECTURE */
89*7c478bd9Sstevel@tonic-gate #define	SI_ARCHITECTURE_64	517	/* basic 64-bit SI_ARCHITECTURE */
90*7c478bd9Sstevel@tonic-gate #define	SI_ARCHITECTURE_K	518	/* kernel SI_ARCHITECTURE equivalent */
91*7c478bd9Sstevel@tonic-gate #define	SI_ARCHITECTURE_NATIVE	519	/* SI_ARCHITECTURE of the caller */
92*7c478bd9Sstevel@tonic-gate 
93*7c478bd9Sstevel@tonic-gate /* Solaris defined `set' commands (769-1024) (none currently assigned) */
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate 
96*7c478bd9Sstevel@tonic-gate #define	DOM_NM_LN		64	/* maximum length of domain name */
97*7c478bd9Sstevel@tonic-gate 
98*7c478bd9Sstevel@tonic-gate #if !defined(_KERNEL)
99*7c478bd9Sstevel@tonic-gate #if defined(__STDC__)
100*7c478bd9Sstevel@tonic-gate int sysinfo(int, char *, long);
101*7c478bd9Sstevel@tonic-gate #else
102*7c478bd9Sstevel@tonic-gate int sysinfo();
103*7c478bd9Sstevel@tonic-gate #endif
104*7c478bd9Sstevel@tonic-gate #endif
105*7c478bd9Sstevel@tonic-gate 
106*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
107*7c478bd9Sstevel@tonic-gate }
108*7c478bd9Sstevel@tonic-gate #endif
109*7c478bd9Sstevel@tonic-gate 
110*7c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSTEMINFO_H */
111