host_res.h
资源名称:snmp.src.rar [点击查看]
上传用户:cxs890
上传日期:2021-05-22
资源大小:347k
文件大小:2k
源码类别:
SNMP编程
开发平台:
C/C++
- /*
- * Host Resources
- * Device index manipulation data
- */
- #ifndef MIBGROUP_HOST_RES_H
- #define MIBGROUP_HOST_RES_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- #include <sys/types.h>
- #if HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #include "asn1.h"
- #include "snmp.h"
- #include "snmp_api.h"
- #include "snmp_impl.h"
- #include "mib.h"
- #include "snmp_vars.h"
- #include "var_struct.h"
- #include "../../snmplib/system.h"
- #include "snmp_debug.h"
- #if defined(IFNET_NEEDS_KERNEL) && !defined(_KERNEL)
- #define _KERNEL 1
- #define _I_DEFINED_KERNEL
- #endif
- #include <sys/socket.h>
- #include <net/if.h>
- #ifdef _I_DEFINED_KERNEL
- #undef _KERNEL
- #endif
- #if HAVE_NET_IF_VAR_H
- #include <net/if_var.h>
- #endif
- #if HAVE_NETINET_IN_VAR_H
- #ifdef HAVE_SYS_QUEUE_H
- #include <sys/queue.h>
- #endif
- #include <netinet/in_var.h>
- #endif
- /* #include "snmp_vars.linux.h" */
- /* Deliberately set to the same values as hrDeviceTypes */
- #define HRDEV_OTHER 1
- #define HRDEV_UNKNOWN 2
- #define HRDEV_PROC 3
- #define HRDEV_NETWORK 4
- #define HRDEV_PRINTER 5
- #define HRDEV_DISK 6
- #define HRDEV_VIDEO 10
- #define HRDEV_AUDIO 11
- #define HRDEV_COPROC 12
- #define HRDEV_KEYBOARD 13
- #define HRDEV_MODEM 14
- #define HRDEV_PARALLEL 15
- #define HRDEV_POINTER 16
- #define HRDEV_SERIAL 17
- #define HRDEV_TAPE 18
- #define HRDEV_CLOCK 19
- #define HRDEV_VMEM 20
- #define HRDEV_NVMEM 21
- #define HRDEV_TYPE_MAX 22 /* one greater than largest device type */
- #define HRDEV_TYPE_SHIFT 8
- #define HRDEV_TYPE_MASK 0xff
- typedef void (*PFV) (void);
- typedef int (*PFI) (int);
- typedef int (*PFIV) (void);
- typedef const char* (*PFS) (int);
- typedef oid* (*PFO) (int, size_t *);
- extern PFV init_device[]; /* Routines for stepping through devices */
- extern PFIV next_device[];
- extern PFV save_device[];
- extern int dev_idx_inc[]; /* Flag - are indices returned in strictly
- increasing order */
- extern PFS device_descr[]; /* Return data for a particular device */
- extern PFO device_prodid[];
- extern PFI device_status[];
- extern PFI device_errors[];
- #ifdef __cplusplus
- }
- #endif
- #endif