1c18ec02fSPetter Reinholdtsen /*
2*a88db0d1SZdenek Styblik  * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
3c18ec02fSPetter Reinholdtsen  *
4c18ec02fSPetter Reinholdtsen  * Redistribution and use in source and binary forms, with or without
5c18ec02fSPetter Reinholdtsen  * modification, are permitted provided that the following conditions
6c18ec02fSPetter Reinholdtsen  * are met:
7c18ec02fSPetter Reinholdtsen  *
8c18ec02fSPetter Reinholdtsen  * Redistribution of source code must retain the above copyright
9c18ec02fSPetter Reinholdtsen  * notice, this list of conditions and the following disclaimer.
10c18ec02fSPetter Reinholdtsen  *
11c18ec02fSPetter Reinholdtsen  * Redistribution in binary form must reproduce the above copyright
12c18ec02fSPetter Reinholdtsen  * notice, this list of conditions and the following disclaimer in the
13c18ec02fSPetter Reinholdtsen  * documentation and/or other materials provided with the distribution.
14c18ec02fSPetter Reinholdtsen  *
15c18ec02fSPetter Reinholdtsen  * Neither the name of Sun Microsystems, Inc. or the names of
16c18ec02fSPetter Reinholdtsen  * contributors may be used to endorse or promote products derived
17c18ec02fSPetter Reinholdtsen  * from this software without specific prior written permission.
18c18ec02fSPetter Reinholdtsen  *
19c18ec02fSPetter Reinholdtsen  * This software is provided "AS IS," without a warranty of any kind.
20c18ec02fSPetter Reinholdtsen  * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
21c18ec02fSPetter Reinholdtsen  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
22c18ec02fSPetter Reinholdtsen  * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
23c18ec02fSPetter Reinholdtsen  * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
24c18ec02fSPetter Reinholdtsen  * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
25c18ec02fSPetter Reinholdtsen  * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.  IN NO EVENT WILL
26c18ec02fSPetter Reinholdtsen  * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
27c18ec02fSPetter Reinholdtsen  * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
28c18ec02fSPetter Reinholdtsen  * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
29c18ec02fSPetter Reinholdtsen  * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
30c18ec02fSPetter Reinholdtsen  * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
31c18ec02fSPetter Reinholdtsen  */
32c18ec02fSPetter Reinholdtsen 
33c18ec02fSPetter Reinholdtsen #ifndef IPMI_SUNOEM_H
34c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_H
35c18ec02fSPetter Reinholdtsen 
36c18ec02fSPetter Reinholdtsen #if HAVE_CONFIG_H
37c18ec02fSPetter Reinholdtsen # include <config.h>
38c18ec02fSPetter Reinholdtsen #endif
39c18ec02fSPetter Reinholdtsen #include <ipmitool/ipmi.h>
40c18ec02fSPetter Reinholdtsen #include <ipmitool/ipmi_sdr.h>
41c18ec02fSPetter Reinholdtsen 
42c18ec02fSPetter Reinholdtsen #define IPMI_NETFN_SUNOEM				0x2e
43c18ec02fSPetter Reinholdtsen 
44c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_SET_SSH_KEY				0x01
45c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_DEL_SSH_KEY				0x02
46c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_GET_HEALTH_STATUS			0x10
47*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_CLI					0x19
48c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_SET_FAN_SPEED			0x20
49c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_LED_GET				0x21
50c18ec02fSPetter Reinholdtsen #define IPMI_SUNOEM_LED_SET				0x22
51*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_ECHO				0x23
52*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_VERSION				0x24
53*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_NACNAME				0x29
54*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_GETVAL				0x2A
55*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_SETVAL				0x2C
56*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_SENSOR_SET				0x3A
57*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_SET_FAN_MODE			0x41
58*a88db0d1SZdenek Styblik #define IPMI_SUNOEM_CORE_TUNNEL                         0x44
59*a88db0d1SZdenek Styblik 
60*a88db0d1SZdenek Styblik /*
61*a88db0d1SZdenek Styblik  * Error codes of sunoem functions
62*a88db0d1SZdenek Styblik  */
63*a88db0d1SZdenek Styblik typedef enum {
64*a88db0d1SZdenek Styblik 	SUNOEM_EC_SUCCESS            = 0,
65*a88db0d1SZdenek Styblik 	SUNOEM_EC_INVALID_ARG        = 1,
66*a88db0d1SZdenek Styblik 	SUNOEM_EC_BMC_NOT_RESPONDING = 2,
67*a88db0d1SZdenek Styblik 	SUNOEM_EC_BMC_CCODE_NONZERO  = 3
68*a88db0d1SZdenek Styblik } sunoem_ec_t;
69c18ec02fSPetter Reinholdtsen 
70c18ec02fSPetter Reinholdtsen int ipmi_sunoem_main(struct ipmi_intf *, int, char **);
71c18ec02fSPetter Reinholdtsen 
72c18ec02fSPetter Reinholdtsen #endif /*IPMI_SUNOEM_H*/
73c18ec02fSPetter Reinholdtsen 
74