⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sim_resources.c

📁 HIP 硬件设备管理标准接口
💻 C
📖 第 1 页 / 共 5 页
字号:
/*      -*- linux-c -*- * * (C) Copyright IBM Corp. 2003, 2004 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  This * file and program are licensed under a BSD style license.  See * the Copying file included with the OpenHPI distribution for * full licensing terms. * * Author(s): *      Steve Sherman <stevees@us.ibm.com> *//************************************************************************** * This source file defines the resource arrays declared in sim_resources.h *************************************************************************/#include <glib.h>#include <snmp_utils.h>#include <sim_resources.h>struct snmp_bc_data sim_resource_array[] = {        {                /* TIMEOUT		 * This OID is used to force a SNMP Access timeout condition.		 * It is used to test Device Busy/Device Not Respond  		 */                .oid = ".1.3.6.1.4.1.2.3.51.2.4.4.1.7777",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = SNMP_FORCE_TIMEOUT,                        },                },        },        {                /* DATETIME */                .oid = ".1.3.6.1.4.1.2.3.51.2.4.4.1.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "12/25/2003,06:30:00",                        },                },        },        {                /* RSA DST                 *                 * This OID is used to determine if the system is a RSA or not                 * If integer == SA_ERR_SNMP_NOSUCHOBJECT, platform is not an RSA.                 * If SA_ERR_SNMP_NOSUCHOBJECT, platform determine by OID below.                 */                .oid = ".1.3.6.1.4.1.2.3.51.1.4.4.2.0",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = SA_ERR_SNMP_NOSUCHOBJECT,                        },                },        },        {                /* BCT System Health Status                 *                 * This OID is used to determine if the system is a BCT or not                 * If integer == SA_ERR_SNMP_NOSUCHOBJECT, system is BC; else its BCT                 */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.9.1.0",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = SA_ERR_SNMP_NOSUCHOBJECT, /* 255 = BCT */                        },                },        },        {                /* TimeZone - DayLight Savings Time */                .oid = ".1.3.6.1.4.1.2.3.51.2.4.4.2.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "+0:00,no",                        },                },        },        /* Add more example event log messages */        {                /* Event Log Index Number */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.2.1.1.1",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1,                        },                },        },        {                /* Event Log Index Number */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.2.1.1.2",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1,                        },                },        },        {                /*                 *  Special End of Log Entry - Simulator ONLY                 * Code always reads one SNMP OID past end of log. When                 * snmp_get returns a negative value, the code knows its read                 * the entire error log. This entry allows the simulator to                 * force the snmp_get to return a negative value                 */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.2.1.1.3",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = SNMP_FORCE_ERROR, /* Force negative return */                        },                },        },        {                /* Event Log Message */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.2.1.2.1",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "Severity:INFO  Source:SERVPROC  Name:WMN315702424  Date:12/25/03  Time:09:09:48  Text:Remote Login Successful.Login ID:'(SNMP Manager at IP@=192.168.64.5 authenticated).'",                        },                },        },        {                /* Event Log Message */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.2.1.2.2",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "Severity:INFO  Source:SERVPROC  Name:WMN315702424  Date:12/25/03  Time:09:10:00  Text:Bogus String",                        },                },        },        {                /* Clear Event Log */                .oid = ".1.3.6.1.4.1.2.3.51.2.3.4.3.0",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* write-only */                        },                },        },        {                /* SNMP_BC_BLADE_VECTOR */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.5.2.49.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "10101010101010",                        },                },        },        {                /* SNMP_BC_FAN_VECTOR */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.5.2.73.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "1111",                        },                },        },        {                /* SNMP_BC_MGMNT_VECTOR */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.4.30.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "11",                        },                },        },        {                /* SNMP_BC_MGMNT_ACTIVE */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.4.34.0",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* number of active MM; 0 if none ??? */                        },                },        },        {                /* SNMP_BC_MEDIATRAY_EXISTS */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.5.2.74.0",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 0=no; 1=yes */                        },                },        },        {                /* SNMP_BC_POWER_VECTOR */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.5.2.89.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "1111",                        },                },        },        {                /* SNMP_BC_SWITCH_VECTOR */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.5.2.113.0",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "1111",                        },                },        },        {                /*  Management module - Reset */                .oid = ".1.3.6.1.4.1.2.3.51.2.7.4.0", /* write-only */                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 1=execute */                        },                },        },        {                /* Management module 1 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.2.1.1.6.1",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "  0000 0000 0000 0000 0000 0000 0000 0000 "                        },                },        },        {                /* Management module 2 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.2.1.1.6.2",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "Not available"                        },                },        },        {                /* Switch Reset - Switch 1 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.8.1", /* write-only */                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 1=execute */                        },                },        },        {                /* Switch 1 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.6.1.1.8.1",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "EC4E 1D7C 704B 11D7 B69E 0005 5D89 A738 "                        },                },        },        {                /* Switch Reset - Switch 2 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.8.2", /* write-only */                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 1=execute */                        },                },        },        {                /* Switch 2 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.6.1.1.8.2",                .mib = {                        .type = ASN_OCTET_STR,                        .value = { // intentional error                                .string = "No value available"                        },                },        },        {                /* Switch Reset - Switch 3 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.8.3", /* write-only */                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 1=execute */                        },                },        },        {                /* Switch 3 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.6.1.1.8.3",                .mib = {                        .type = ASN_OCTET_STR,                        .value = {                                .string = "21DA E982 1B9E 95B8 7821 00C0 DD01 C65A "                        },                },        },        {                /* Switch Reset - Switch 4 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.8.4", /* write-only */                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* 1=execute */                        },                },        },        {                /* Switch 4 UUID */                .oid = ".1.3.6.1.4.1.2.3.51.2.2.21.6.1.1.8.4",                .mib = {                        .type = ASN_OCTET_STR,                        .value = { // intentional error                                .string = "                                        "                        },                },        },        {                /* Switch Power State - Switch 1 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.1.1.7.1",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* poweroff=0; poweron=1 */                        },                },        },        {                /* Switch Power State - Switch 2 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.1.1.7.2",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* poweroff=0; poweron=1 */                        },                },        },        {                /* Switch Power State - Switch 3 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.1.1.7.3",                .mib = {                        .type = ASN_INTEGER,                        .value = {                                .integer = 1, /* poweroff=0; poweron=1 */                        },                },        },        {                /* Switch Power State - Switch 4 */                .oid = ".1.3.6.1.4.1.2.3.51.2.22.3.1.1.1.7.4",                .mib = {                        .type = ASN_INTEGER,                        .value = {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -