2 * Host Resources MIB - other device implementation - hr_other.c
6 #include <net-snmp/net-snmp-config.h>
16 void Init_HR_CPU(void);
17 int Get_Next_HR_CPU(void);
18 const char *describe_cpu(int);
20 void Init_HR_CoProc(void);
21 int Get_Next_HR_CoProc(void);
22 const char *describe_coproc(int);
27 init_device[HRDEV_PROC] = Init_HR_CPU;
28 next_device[HRDEV_PROC] = Get_Next_HR_CPU;
29 device_descr[HRDEV_PROC] = describe_cpu;
31 init_device[HRDEV_COPROC] = Init_HR_CoProc;
32 next_device[HRDEV_COPROC] = Get_Next_HR_CoProc;
33 device_descr[HRDEV_COPROC] = describe_coproc;
49 * Assumes a single CPU system
50 * I think it's safe to assume at least one!
54 return (HRDEV_PROC << HRDEV_TYPE_SHIFT);
62 #ifdef _SC_CPU_VERSION
65 result = sysconf(_SC_CPU_VERSION);
68 return (" Motorola MC68020 ");
70 return (" Motorola MC68030 ");
72 return (" Motorola MC68040 ");
74 return (" HP PA-RISC 1.0 ");
76 return (" HP PA-RISC 1.1 ");
78 return (" HP PA-RISC 1.2 ");
80 return (" HP PA-RISC 2.0 ");
82 return ("An electronic chip with an HP label");
86 return ("An electronic chip that makes the computer work.");
92 static int done_coProc;
101 Get_Next_HR_CoProc(void)
104 * How to identify the presence of a co-processor ?
107 if (done_coProc != 1) {
109 return (HRDEV_COPROC << HRDEV_TYPE_SHIFT);
116 describe_coproc(int idx)
118 return ("Guessing that there's a floating point co-processor");