systeminfo.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
  8.  */
  9. #ifndef _ASM_IA64_SN_SYSTEMINFO_H
  10. #define _ASM_IA64_SN_SYSTEMINFO_H
  11. #include <linux/types.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define MAX_SERIAL_SIZE 16
  16. typedef struct module_info_s {
  17. uint64_t serial_num;
  18. int mod_num;
  19. char serial_str[MAX_SERIAL_SIZE];
  20. } module_info_t;
  21. /*
  22.  * Commands to sysinfo()
  23.  */
  24. #define SI_SYSNAME 1 /* return name of operating system */
  25. #define SI_HOSTNAME 2 /* return name of node */
  26. #define SI_RELEASE  3 /* return release of operating system */
  27. #define SI_VERSION 4 /* return version field of utsname */
  28. #define SI_MACHINE 5 /* return kind of machine */
  29. #define SI_ARCHITECTURE 6 /* return instruction set arch */
  30. #define SI_HW_SERIAL 7 /* return hardware serial number */
  31. #define SI_HW_PROVIDER 8 /* return hardware manufacturer */
  32. #define SI_SRPC_DOMAIN 9 /* return secure RPC domain */
  33. #define SI_INITTAB_NAME        10 /* return name of inittab file used */
  34. #define _MIPS_SI_VENDOR 100 /* return system provider */
  35. #define _MIPS_SI_OS_PROVIDER 101 /* return OS manufacturer */
  36. #define _MIPS_SI_OS_NAME 102 /* return OS name */
  37. #define _MIPS_SI_HW_NAME 103 /* return system name */
  38. #define _MIPS_SI_NUM_PROCESSORS 104 /* return number of processors */
  39. #define _MIPS_SI_HOSTID 105 /* return hostid */
  40. #define _MIPS_SI_OSREL_MAJ 106 /* return OS major release number */
  41. #define _MIPS_SI_OSREL_MIN 107 /* return OS minor release number */
  42. #define _MIPS_SI_OSREL_PATCH 108 /* return OS release number */
  43. #define _MIPS_SI_PROCESSORS 109 /* return CPU revison id */
  44. #define _MIPS_SI_AVAIL_PROCESSORS 110 /* return number of available processors */
  45. #define _MIPS_SI_SERIAL 111
  46. /*
  47.  * These commands are unpublished interfaces to sysinfo().
  48.  */
  49. #define SI_SET_HOSTNAME 258 /* set name of node */
  50. /*  -unpublished option */
  51. #define SI_SET_SRPC_DOMAIN 265 /* set secure RPC domain */
  52. /* -unpublished option */
  53. #if !defined(__KERNEL__)
  54. int sysinfo(int, char *, long);
  55. int get_num_modules(void);
  56. int get_module_info(int, module_info_t *, size_t);
  57. #endif
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* _ASM_IA64_SN_SYSTEMINFO_H */