标准c语言编译问题
linux操作系统,根据MIB库生成一段C语言,raid.c、raid.h两个文件,进行编译,报错,raid.c内容:
/*
* Note: this file originally auto-generated by mib2c using
* $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "lsi.h"
extern const oid snmptrap_oid;
extern const size_t snmptrap_oid_len;
int
send_adapterTraps
#_trap( void )
{
netsnmp_variable_list *var_list = NULL;
const oid adapterTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,6,0 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable(&var_list,
snmptrap_oid, snmptrap_oid_len,
ASN_OBJECT_ID, adapterTraps
#_oid, sizeof(adapterTraps#_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap (var_list);
snmp_free_varbind(var_list);
return SNMP_ERR_NOERROR;} int
send_vdTraps
#_trap( void )
{
netsnmp_variable_list * var_list = NULL;
const oid vdTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,7,0 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable(&var_list,
snmptrap_oid,
snmptrap_oid_len,
ASN_OBJECT_ID,
vdTraps
#_oid, sizeof(vdTraps#_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap
(var_list);
snmp_free_varbind
(var_list);
return
SNMP_ERR_NOERROR;}
int
send_pdTraps
#_trap( void )
{
netsnmp_variable_list
* var_list =
NULL;
const oid
pdTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,8,0 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable
(&var_list,
snmptrap_oid,
snmptrap_oid_len,
ASN_OBJECT_ID,
pdTraps
#_oid, sizeof(pdTraps#_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap
(var_list);
snmp_free_varbind
(var_list);
return
SNMP_ERR_NOERROR;}
int
send_enclTraps
#_trap( void )
{
netsnmp_variable_list
* var_list =
NULL;
const oid
enclTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,9,0 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable
(&var_list,
snmptrap_oid,
snmptrap_oid_len,
ASN_OBJECT_ID,
enclTraps
#_oid, sizeof(enclTraps#_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap
(var_list);
snmp_free_varbind
(var_list);
return
SNMP_ERR_NOERROR;}
int
send_pciTraps
#_trap( void )
{
netsnmp_variable_list
* var_list =
NULL;
const oid
pciTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,10,0 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable
(&var_list,
snmptrap_oid,
snmptrap_oid_len,
ASN_OBJECT_ID,
pciTraps
#_oid, sizeof(pciTraps#_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap
(var_list);
snmp_free_varbind
(var_list);
return
SNMP_ERR_NOERROR;}
raid.h内容:
/*
* Note: this file originally auto-generated by mib2c using
* $
*/
#ifndef LSI_H
#define LSI_H
/*
* function declarations
*/
int send_adapterTraps
#_trap(void);
int send_vdTraps
#_trap(void);
int send_pdTraps
#_trap(void);
int send_enclTraps
#_trap(void);
int send_pciTraps
#_trap(void);
#endif /* LSI_H */
程序格式比较乱,请高手帮忙看一下,这个问题已经一个星期了,一直编译报错,谢谢!