ipmi_sunoem.h 2.6 KB

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