summaryrefslogtreecommitdiff
path: root/agent/mibgroup/host/hr_other.c
blob: 9e4b16a267b802d416cac41645ee1301e197e84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 *  Host Resources MIB - other device implementation - hr_other.c
 *
 */

#include <net-snmp/net-snmp-config.h>

#include "host_res.h"
#include "hr_other.h"

#if HAVE_UNISTD_H
#include <unistd.h>
#endif


void            Init_HR_CoProc(void);
int             Get_Next_HR_CoProc(void);
const char     *describe_coproc(int);

void
init_hr_other(void)
{
    init_device[HRDEV_COPROC] = Init_HR_CoProc;
    next_device[HRDEV_COPROC] = Get_Next_HR_CoProc;
    device_descr[HRDEV_COPROC] = describe_coproc;
}



static int      done_coProc;

void
Init_HR_CoProc(void)
{
#ifdef solaris2
    /* 
     * Sun didn't sell many Windows Co-processor boards 
     * somebody who has one will have to figure out how to discover it
     * so assume there are none
     */
    done_coProc = 1;
#else
    done_coProc = 0;
#endif
}

int
Get_Next_HR_CoProc(void)
{
    /*
     * How to identify the presence of a co-processor ? 
     */

    if (done_coProc != 1) {
        done_coProc = 1;
        return (HRDEV_COPROC << HRDEV_TYPE_SHIFT);
    } else
        return -1;
}


const char     *
describe_coproc(int idx)
{
    return ("Guessing that there's a floating point co-processor");
}