Files
m241Neelima/components/ip_net2-6.9/ipmipfa/src/ipmipfa_mip_mib.c
T
2026-07-30 11:19:44 +05:30

1878 lines
58 KiB
C

/*
******************************************************************************
* INTERPEAK SOURCE FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipfa_mip_mib.c,v $ $Revision: 1.2 $
* $Source: /home/interpeak/CVSRoot/ipmipfa/src/ipmipfa_mip_mib.c,v $
* $Author: joel $
* $State: Exp $ $Locker: $
*
* Copyright Interpeak AB 2000-2003 <www.interpeak.se>. All rights reserved.
* Design and implementation by Markus Carlstedt <markus@interpeak.se>
******************************************************************************
*/
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
*===========================================================================
* MIP-MIB
*===========================================================================
*
* Autogenerated by 'ipmibc' with 'smidump 0.4.5' on 2007-04-10 at 13:11:58
*
* This file includes initialization code and stubs for MIB variables defined
* in MIP-MIB. Without any changes it should compile and run with the
* behaviour that GetRequests succeed with the returned value being
* zero. SetRequests also succeed but without any actual variables
* being updated.
*
* Modifications to this file are necessary in order to enable read and
* write operations on actual variables presented in the MIB interface.
* Each segment in the code where a change is proposed is marked with a
* 'MIB_TODO' comment together with a pseudo code example describing the
* modification.
*
* This file shall normally be compiled together with the product to which
* SNMP support is to be added and then linked with the IPSNMP libraries.
* The MIB is initialized by calling the public initialization function defined
* at the end of this file. Since no header files are generated its function
* prototype should be copied into the the product that initializes the MIB.
*
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#define IPCOM_USE_CLIB_PROTO
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#include <ipcom_clib.h>
#include <ipcom_syslog.h>
#include <ipcom_err.h>
#ifdef IPSNMP
#include <ipsnmp_config.h>
#include <ipsnmp.h>
#include "ipmipfa_attr.h"
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
#ifdef IPCOM_SYSLOG_FACILITY
#undef IPCOM_SYSLOG_FACILITY
#endif
#define IPCOM_SYSLOG_FACILITY IPCOM_LOG_IPSNMP
#ifdef IPCOM_SYSLOG_PRIORITY
#undef IPCOM_SYSLOG_PRIORITY
#endif
#define IPCOM_SYSLOG_PRIORITY IPCOM_LOG_DEBUG
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
/*
****************************************************************************
* 6 EXTERNAL PROTOTYPES
****************************************************************************
*/
/*
****************************************************************************
* 7 LOCAL PROTOTYPES
****************************************************************************
*/
/* Initialization function */
IP_PUBLIC Ip_err ipmipfa_mip_mib_init(void);
/*
****************************************************************************
* 8 DATA
****************************************************************************
*/
/*
****************************************************************************
* 9 STATIC FUNCTIONS
****************************************************************************
*/
#define IPMIPFA_MIB_GET_TABLE_LEN(table, len) \
{ \
struct Ipmipfa_mib_##table **hdr = ipmipfa_attr_mib_##table(); \
int ii = 0; \
if (hdr) \
{ \
for (ii = 0; hdr[ii] != IP_NULL; ii++) \
; \
ipcom_free(hdr); \
} \
len = ii; \
}
#define IPMIPFA_MIB_GET_ENTRY2(table, var, i, dest) \
{ \
struct Ipmipfa_mib_##table **hdr = ipmipfa_attr_mib_##table(); \
if (hdr) \
{ \
dest = hdr[i]->var; \
ipcom_free(hdr); \
} \
}
#define IPMIPFA_MIB_GET_ENTRY(table, var, i) \
IPMIPFA_MIB_GET_ENTRY2(table, var, i, var)
#define IPMIPFA_MIB_GET_ADDR(table, var, i) \
IPMIPFA_MIB_GET_ENTRY2(table, var.s_addr, i, var)
/* { \
struct Ipmipfa_mib_##table **hdr = ipmipfa_attr_mib_##table(); \
if (hdr) \
{ \
var = hdr[i]->var.s_addr; \
ipcom_free(hdr); \
} \
}
*/
#define IPMIPFA_MIB_GET(var, strct) \
{ \
struct Ipmipfa_mib_##strct *entry = ipmipfa_attr_mib_##strct(); \
if (entry) \
{ \
var = entry->var; \
ipcom_free(entry); \
} \
}
#define IPMIPFA_MIB_GET2(var, strct, dst) \
{ \
struct Ipmipfa_mib_##strct *entry = ipmipfa_attr_mib_##strct(); \
dst = entry->var; \
ipcom_free(entry); \
}
#if 0
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faIsBusy
*===========================================================================
* Description: MIB handler for faIsBusy
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faIsBusy(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_s32 faIsBusy = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faIsBusy := Current_MIB_Variable_faIsBusy
*/
IPMIPFA_MIB_GET(faIsBusy,faAdvertisement)
ret = ipsnmp_util_put_integer(magic, iid, faIsBusy);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegistrationRequired
*===========================================================================
* Description: MIB handler for faRegistrationRequired
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegistrationRequired(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_s32 faRegistrationRequired = 0;
char *iid;
(void)id;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegistrationRequired := Current_MIB_Variable_faRegistrationRequired
*/
IPMIPFA_MIB_GET(faRegistrationRequired,faAdvertisement)
ret = ipsnmp_util_put_integer(magic, iid, faRegistrationRequired);
ipcom_free(iid);
}
if(cmd == IPSNMP_MIB_COMMAND_TEST || cmd == IPSNMP_MIB_COMMAND_SET)
{
ret = ipsnmp_util_get_integer(vb, &faRegistrationRequired);
if(ret == IPSNMP_ERROR_NOERROR)
{
/* todo
*
* if New_Value_Of_MIB_Variable_faRegistrationRequired_Is_Invalid = true then
* ret := IPSNMP_ERROR_WRONGVALUE
* endif
*/
ret = IPSNMP_ERROR_READONLY;
}
if(ret == IPSNMP_ERROR_NOERROR && cmd == IPSNMP_MIB_COMMAND_SET)
{
/* todo
*
* Current_MIB_Variable_faRegistrationRequired := faRegistrationRequired
*/
ret = IPSNMP_ERROR_READONLY;
}
}
return ret;
}
#endif
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegRequestsReceived
*===========================================================================
* Description: MIB handler for faRegRequestsReceived
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegRequestsReceived(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faRegRequestsReceived = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegRequestsReceived := Current_MIB_Variable_faRegRequestsReceived
*/
IPMIPFA_MIB_GET(faRegRequestsReceived, RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faRegRequestsReceived);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegRequestsRelayed
*===========================================================================
* Description: MIB handler for faRegRequestsRelayed
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegRequestsRelayed(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faRegRequestsRelayed = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegRequestsRelayed := Current_MIB_Variable_faRegRequestsRelayed
*/
IPMIPFA_MIB_GET(faRegRequestsRelayed, RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faRegRequestsRelayed);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faReasonUnspecified
*===========================================================================
* Description: MIB handler for faReasonUnspecified
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faReasonUnspecified(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faReasonUnspecified = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faReasonUnspecified := Current_MIB_Variable_faReasonUnspecified
*/
IPMIPFA_MIB_GET(faReasonUnspecified, RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faReasonUnspecified);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faAdmProhibited
*===========================================================================
* Description: MIB handler for faAdmProhibited
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faAdmProhibited(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faAdmProhibited = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faAdmProhibited := Current_MIB_Variable_faAdmProhibited
*/
IPMIPFA_MIB_GET(faAdmProhibited,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faAdmProhibited);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faInsufficientResource
*===========================================================================
* Description: MIB handler for faInsufficientResource
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faInsufficientResource(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faInsufficientResource = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faInsufficientResource := Current_MIB_Variable_faInsufficientResource
*/
IPMIPFA_MIB_GET(faInsufficientResource,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faInsufficientResource);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faMNAuthenticationFailure
*===========================================================================
* Description: MIB handler for faMNAuthenticationFailure
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faMNAuthenticationFailure(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faMNAuthenticationFailure = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faMNAuthenticationFailure := Current_MIB_Variable_faMNAuthenticationFailure
*/
IPMIPFA_MIB_GET(faMNAuthenticationFailure,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faMNAuthenticationFailure);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegLifetimeTooLong
*===========================================================================
* Description: MIB handler for faRegLifetimeTooLong
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegLifetimeTooLong(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faRegLifetimeTooLong = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegLifetimeTooLong := Current_MIB_Variable_faRegLifetimeTooLong
*/
IPMIPFA_MIB_GET(faRegLifetimeTooLong,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faRegLifetimeTooLong);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faPoorlyFormedRequests
*===========================================================================
* Description: MIB handler for faPoorlyFormedRequests
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faPoorlyFormedRequests(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faPoorlyFormedRequests = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faPoorlyFormedRequests := Current_MIB_Variable_faPoorlyFormedRequests
*/
IPMIPFA_MIB_GET(faPoorlyFormedRequests,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faPoorlyFormedRequests);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faEncapsulationUnavailable
*===========================================================================
* Description: MIB handler for faEncapsulationUnavailable
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faEncapsulationUnavailable(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faEncapsulationUnavailable = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faEncapsulationUnavailable := Current_MIB_Variable_faEncapsulationUnavailable
*/
IPMIPFA_MIB_GET(faEncapsulationUnavailable,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faEncapsulationUnavailable);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faVJCompressionUnavailable
*===========================================================================
* Description: MIB handler for faVJCompressionUnavailable
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faVJCompressionUnavailable(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faVJCompressionUnavailable = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faVJCompressionUnavailable := Current_MIB_Variable_faVJCompressionUnavailable
*/
IPMIPFA_MIB_GET(faVJCompressionUnavailable,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faVJCompressionUnavailable);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faHAUnreachable
*===========================================================================
* Description: MIB handler for faHAUnreachable
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faHAUnreachable(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faHAUnreachable = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
*
*/
IPMIPFA_MIB_GET(faHAUnreachable,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faHAUnreachable);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegRepliesRecieved
*===========================================================================
* Description: MIB handler for faRegRepliesRecieved
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegRepliesRecieved(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faRegRepliesRecieved = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegRepliesRecieved := Current_MIB_Variable_faRegRepliesRecieved
*/
IPMIPFA_MIB_GET(faRegRepliesRecieved,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faRegRepliesRecieved);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faRegRepliesRelayed
*===========================================================================
* Description: MIB handler for faRegRepliesRelayed
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faRegRepliesRelayed(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faRegRepliesRelayed = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faRegRepliesRelayed := Current_MIB_Variable_faRegRepliesRelayed
*/
IPMIPFA_MIB_GET(faRegRepliesRelayed,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faRegRepliesRelayed);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faHAAuthenticationFailure
*===========================================================================
* Description: MIB handler for faHAAuthenticationFailure
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faHAAuthenticationFailure(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faHAAuthenticationFailure = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faHAAuthenticationFailure := Current_MIB_Variable_faHAAuthenticationFailure
*/
IPMIPFA_MIB_GET(faHAAuthenticationFailure,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faHAAuthenticationFailure);
ipcom_free(iid);
}
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faPoorlyFormedReplies
*===========================================================================
* Description: MIB handler for faPoorlyFormedReplies
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faPoorlyFormedReplies(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 ret = -1;
Ip_u32 faPoorlyFormedReplies = 0;
char *iid;
(void)id;
(void)vb;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
iid = ipsnmp_create_iid_integer(nodeobj->id, 0);
if(iid == IP_NULL)
return IPSNMP_ERROR_GENERROR;
/*
*
* faPoorlyFormedReplies := Current_MIB_Variable_faPoorlyFormedReplies
*/
IPMIPFA_MIB_GET(faPoorlyFormedReplies,RegistrationCounters)
ret = ipsnmp_util_put_counter32(magic, iid, faPoorlyFormedReplies);
ipcom_free(iid);
}
return ret;
}
#if 0
/*
*===========================================================================
* ipmipfa_mip_mib_table_search_faCOATable
*===========================================================================
* Description: Searches faCOATable for a matching entry
* Parameters: id, buf, best, cmd
* Returns: Row index of the found entry OR -1 if not found OR -2 for error
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_table_search_faCOATable(char *id,
char *buf,
char *best,
Ip_s32 cmd)
{
Ip_u32 faSupportedCOA = 0;
Ip_s32 faCOATable_num_entries = 0;
Ip_s32 i, bestindex = -1;
/*
*
* faCOATable_num_entries := Number_Of_Entries_In_Current_faCOATable
*/
IPMIPFA_MIB_GET_TABLE_LEN(faCOAEntry, faCOATable_num_entries)
for(i=0; i<faCOATable_num_entries; i++)
{
Ip_s32 lex, len = 0;
buf[0] = '\0';
/*
*
* faSupportedCOA := Current_MIB_Variable_faSupportedCOA in row no. i
*/
IPMIPFA_MIB_GET_ENTRY(faCOAEntry, faSupportedCOA, i)
if(ipcom_inet_ntop(IP_AF_INET, &faSupportedCOA, &buf[len], IPSNMP_CONFIG_MAX_OBJECT_ID-len) == IP_NULL)
return -2;
len = ipcom_strlen(buf);
if(ipcom_snprintf(&buf[len], IPSNMP_CONFIG_MAX_OBJECT_ID-len, ".") < 0)
return -2;
len = ipcom_strlen(buf);
if(len)
buf[len-1] = '\0';
lex = ipsnmp_util_lexcmp_oid(buf, id);
if(cmd == IPSNMP_MIB_COMMAND_NEXT)
{
if(lex > 0)
{
if(bestindex == -1 || ipsnmp_util_lexcmp_oid(buf, best) < 0)
{
ipcom_strcpy(best, buf);
bestindex = i;
}
}
}
else
{
if(lex == 0)
{
ipcom_strcpy(best, buf);
bestindex = i;
break;
}
}
}
return bestindex;
}
/*
*===========================================================================
* ipmipfa_mip_mib_table_search_faVisitorTable
*===========================================================================
* Description: Searches faVisitorTable for a matching entry
* Parameters: id, buf, best, cmd
* Returns: Row index of the found entry OR -1 if not found OR -2 for error
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_table_search_faVisitorTable(char *id,
char *buf,
char *best,
Ip_s32 cmd)
{
Ip_u32 faVisitorIPAddress = 0;
Ip_s32 faVisitorTable_num_entries = 0;
Ip_s32 i, bestindex = -1;
/*
*
* faVisitorTable_num_entries := Number_Of_Entries_In_Current_faVisitorTable
*/
IPMIPFA_MIB_GET_TABLE_LEN(faVisitorEntry, faVisitorTable_num_entries)
for(i=0; i<faVisitorTable_num_entries; i++)
{
Ip_s32 lex, len = 0;
buf[0] = '\0';
/*
*
* faVisitorIPAddress := Current_MIB_Variable_faVisitorIPAddress in row no. i
*/
IPMIPFA_MIB_GET_FAVISITOR_addr(faVisitorIPAddress, i)
if(ipcom_inet_ntop(IP_AF_INET, &faVisitorIPAddress, &buf[len], IPSNMP_CONFIG_MAX_OBJECT_ID-len) == IP_NULL)
return -2;
len = ipcom_strlen(buf);
if(ipcom_snprintf(&buf[len], IPSNMP_CONFIG_MAX_OBJECT_ID-len, ".") < 0)
return -2;
len = ipcom_strlen(buf);
if(len)
buf[len-1] = '\0';
lex = ipsnmp_util_lexcmp_oid(buf, id);
if(cmd == IPSNMP_MIB_COMMAND_NEXT)
{
if(lex > 0)
{
if(bestindex == -1 || ipsnmp_util_lexcmp_oid(buf, best) < 0)
{
ipcom_strcpy(best, buf);
bestindex = i;
}
}
}
else
{
if(lex == 0)
{
ipcom_strcpy(best, buf);
bestindex = i;
break;
}
}
}
return bestindex;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faCOATable
*===========================================================================
* Description: MIB handler for faCOATable
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faCOATable(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 lid, bestindex, ret = -1;
char *iid = IP_NULL;
char *buf = ipcom_malloc(IPSNMP_CONFIG_MAX_OBJECT_ID);
char *best = ipcom_malloc(IPSNMP_CONFIG_MAX_OBJECT_ID);
if(buf == IP_NULL || best == IP_NULL)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
lid = ipsnmp_util_last_subid(nodeobj->id);
bestindex = ipmipfa_mip_mib_table_search_faCOATable(id, buf, best, cmd);
if(bestindex == -2)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
else if(bestindex == -1)
{
ret = IPSNMP_ERROR_NOSUCHNAME;
goto exit;
}
iid = ipsnmp_create_iid_direct(nodeobj->id, best);
if(iid == IP_NULL)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
switch(lid)
{
case 2: /* faCOAStatus */
{
Ip_s32 faCOAStatus = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faCOAStatus := Current_MIB_Variable_faCOAStatus in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faCOAEntry, faCOAStatus, bestindex)
ret = ipsnmp_util_put_integer(magic, iid, faCOAStatus);
}
if(cmd == IPSNMP_MIB_COMMAND_TEST || cmd == IPSNMP_MIB_COMMAND_SET)
{
ret = ipsnmp_util_get_integer(vb, &faCOAStatus);
if(ret == IPSNMP_ERROR_NOERROR)
{
/* todo
*
* if New_Value_Of_MIB_Variable_faCOAStatus_Is_Invalid = true then
* ret := IPSNMP_ERROR_WRONGVALUE
* endif
*/
ret = IPSNMP_ERROR_READONLY;
}
if(ret == IPSNMP_ERROR_NOERROR && cmd == IPSNMP_MIB_COMMAND_SET)
{
/* todo
*
* Current_MIB_Variable_faCOAStatus in row no. bestindex := faCOAStatus
*/
ret = IPSNMP_ERROR_READONLY;
}
}
break;
}
default:
IP_PANIC();
ret = IPSNMP_ERROR_GENERROR;
break;
}
exit:
if(iid != IP_NULL)
ipcom_free(iid);
if(buf != IP_NULL)
ipcom_free(buf);
if(best != IP_NULL)
ipcom_free(best);
return ret;
}
/*
*===========================================================================
* ipmipfa_mip_mib_handler_faVisitorTable
*===========================================================================
* Description: MIB handler for faVisitorTable
* Parameters: See file 'ipsnmp.h'
* Returns: IPSNMP_ERROR_XXX
*
*/
IP_STATIC Ip_s32
ipmipfa_mip_mib_handler_faVisitorTable(Ip_s32 cmd,
char *id,
Ipsnmp_varbind *vb,
Ip_s32 magic,
struct Ipsnmp_node_object *nodeobj)
{
Ip_s32 lid, bestindex, ret = -1;
char *iid = IP_NULL;
char *buf = ipcom_malloc(IPSNMP_CONFIG_MAX_OBJECT_ID);
char *best = ipcom_malloc(IPSNMP_CONFIG_MAX_OBJECT_ID);
if(buf == IP_NULL || best == IP_NULL)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
lid = ipsnmp_util_last_subid(nodeobj->id);
bestindex = ipmipfa_mip_mib_table_search_faVisitorTable(id, buf, best, cmd);
if(bestindex == -2)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
else if(bestindex == -1)
{
ret = IPSNMP_ERROR_NOSUCHNAME;
goto exit;
}
iid = ipsnmp_create_iid_direct(nodeobj->id, best);
if(iid == IP_NULL)
{
ret = IPSNMP_ERROR_GENERROR;
goto exit;
}
switch(lid)
{
case 1: /* faVisitorIPAddress */
{
Ip_u32 faVisitorIPAddress = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorIPAddress := Current_MIB_Variable_faVisitorIPAddress in row no. bestindex
*/
IPMIPFA_MIB_GET_FAVISITOR_addr(faVisitorIPAddress, bestindex)
ret = ipsnmp_util_put_ipaddress(magic, iid, faVisitorIPAddress);
}
break;
}
case 2: /* faVisitorHomeAddress */
{
Ip_u32 faVisitorHomeAddress = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorHomeAddress := Current_MIB_Variable_faVisitorHomeAddress in row no. bestindex
*/
IPMIPFA_MIB_GET_FAVISITOR_addr(faVisitorHomeAddress, bestindex)
ret = ipsnmp_util_put_ipaddress(magic, iid, faVisitorHomeAddress);
}
break;
}
case 3: /* faVisitorHomeAgentAddress */
{
Ip_u32 faVisitorHomeAgentAddress = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorHomeAgentAddress := Current_MIB_Variable_faVisitorHomeAgentAddress in row no. bestindex
*/
IPMIPFA_MIB_GET_FAVISITOR_addr(faVisitorHomeAgentAddress, bestindex)
ret = ipsnmp_util_put_ipaddress(magic, iid, faVisitorHomeAgentAddress);
}
break;
}
case 4: /* faVisitorTimeGranted */
{
Ip_s32 faVisitorTimeGranted = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorTimeGranted := Current_MIB_Variable_faVisitorTimeGranted in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faVisitorEntry, faVisitorTimeGranted, bestindex)
ret = ipsnmp_util_put_integer(magic, iid, faVisitorTimeGranted);
}
break;
}
case 5: /* faVisitorTimeRemaining */
{
Ip_u32 faVisitorTimeRemaining = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorTimeRemaining := Current_MIB_Variable_faVisitorTimeRemaining in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faVisitorEntry, faVisitorTimeRemaining, bestindex)
ret = ipsnmp_util_put_gauge32(magic, iid, faVisitorTimeRemaining);
}
break;
}
case 6: /* faVisitorRegFlags */
{
char *faVisitorRegFlags = "";
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorRegFlags := Current_MIB_Variable_faVisitorRegFlags in row no. bestindex
*/
{
Ip_u32 tmp;
chas f[2] = {0,0};
int i;
IPMIPFA_MIB_GET_ENTRY2(faVisitorEntry, faVisitorRegFlags, bestindex, tmp);
for (i=0; i<6; i++) /* reverse bits */
f[0] |= (tmp & (1<<i)) << (7-i);
faVisitorRegFlags = f;
}
ret = ipsnmp_util_put_bitstring(magic, iid, faVisitorRegFlags);
}
break;
}
case 7: /* faVisitorRegIDLow */
{
Ip_s32 faVisitorRegIDLow = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorRegIDLow := Current_MIB_Variable_faVisitorRegIDLow in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faVisitorEntry, faVisitorRegIDLow, bestindex)
ret = ipsnmp_util_put_integer(magic, iid, faVisitorRegIDLow);
}
break;
}
case 8: /* faVisitorRegIDHigh */
{
Ip_s32 faVisitorRegIDHigh = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorRegIDHigh := Current_MIB_Variable_faVisitorRegIDHigh in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faVisitorEntry, faVisitorRegIDHigh, bestindex)
ret = ipsnmp_util_put_integer(magic, iid, faVisitorRegIDHigh);
}
break;
}
case 9: /* faVisitorRegIsAccepted */
{
Ip_s32 faVisitorRegIsAccepted = 0;
if(cmd == IPSNMP_MIB_COMMAND_GET || cmd == IPSNMP_MIB_COMMAND_NEXT)
{
/*
*
* faVisitorRegIsAccepted := Current_MIB_Variable_faVisitorRegIsAccepted in row no. bestindex
*/
IPMIPFA_MIB_GET_ENTRY(faVisitorEntry, faVisitorRegIsAccepted, bestindex)
ret = ipsnmp_util_put_integer(magic, iid, faVisitorRegIsAccepted);
}
break;
}
default:
IP_PANIC();
ret = IPSNMP_ERROR_GENERROR;
break;
}
exit:
if(iid != IP_NULL)
ipcom_free(iid);
if(buf != IP_NULL)
ipcom_free(buf);
if(best != IP_NULL)
ipcom_free(best);
return ret;
}
#endif
/*
****************************************************************************
* 10 GLOBAL FUNCTIONS
****************************************************************************
*/
/*
****************************************************************************
* 11 PUBLIC FUNCTIONS
****************************************************************************
*/
/*
*===========================================================================
* ipmipfa_mip_mib_init
*===========================================================================
* Description: Initializes MIP-MIB
* Parameters: None
* Returns: IPCOM_SUCCESS or IPCOM_ERR_FAILED
*
*/
IP_PUBLIC Ip_err
ipmipfa_mip_mib_init(void)
{
/* Objects from MIP-MIB */
IP_STATIC IP_CONST struct Ipsnmp_node_object ipmipfa_mip_mib_objects[] =
{
{ /* "mipFA", */
"1.3.6.1.2.1.44.1.5",
"mipFA",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faSystem", */
"1.3.6.1.2.1.44.1.5.1",
"faSystem",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faAdvertisement", */
"1.3.6.1.2.1.44.1.5.2",
"faAdvertisement",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faRegistration", */
"1.3.6.1.2.1.44.1.5.3",
"faRegistration",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faCOATable", */
"1.3.6.1.2.1.44.1.5.1.1",
"faCOATable",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_AGGREGATE,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faCOAEntry", */
"1.3.6.1.2.1.44.1.5.1.1.1",
"faCOAEntry",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_AGGREGATE,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faSupportedCOA", */
"1.3.6.1.2.1.44.1.5.1.1.1.1",
"faSupportedCOA",
IPSNMP_DATA_TYPE_IPADDRESS,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
IP_NULL
},
#if 0
{ /* "faCOAStatus", */
"1.3.6.1.2.1.44.1.5.1.1.1.2",
"faCOAStatus",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READCREATE,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faCOATable
},
{ /* "faIsBusy", */
"1.3.6.1.2.1.44.1.5.2.1",
"faIsBusy",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faIsBusy
},
{ /* "faRegistrationRequired", */
"1.3.6.1.2.1.44.1.5.2.2",
"faRegistrationRequired",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READWRITE,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegistrationRequired
},
#endif
{ /* "faVisitorTable", */
"1.3.6.1.2.1.44.1.5.3.1",
"faVisitorTable",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_AGGREGATE,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faVisitorEntry", */
"1.3.6.1.2.1.44.1.5.3.1.1",
"faVisitorEntry",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_AGGREGATE,
IP_NULL,
IP_NULL,
IP_NULL
},
#if 0
{ /* "faVisitorIPAddress", */
"1.3.6.1.2.1.44.1.5.3.1.1.1",
"faVisitorIPAddress",
IPSNMP_DATA_TYPE_IPADDRESS,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorHomeAddress", */
"1.3.6.1.2.1.44.1.5.3.1.1.2",
"faVisitorHomeAddress",
IPSNMP_DATA_TYPE_IPADDRESS,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorHomeAgentAddress", */
"1.3.6.1.2.1.44.1.5.3.1.1.3",
"faVisitorHomeAgentAddress",
IPSNMP_DATA_TYPE_IPADDRESS,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorTimeGranted", */
"1.3.6.1.2.1.44.1.5.3.1.1.4",
"faVisitorTimeGranted",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorTimeRemaining", */
"1.3.6.1.2.1.44.1.5.3.1.1.5",
"faVisitorTimeRemaining",
IPSNMP_DATA_TYPE_GAUGE32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorRegFlags", */
"1.3.6.1.2.1.44.1.5.3.1.1.6",
"faVisitorRegFlags",
IPSNMP_DATA_TYPE_BITS,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorRegIDLow", */
"1.3.6.1.2.1.44.1.5.3.1.1.7",
"faVisitorRegIDLow",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorRegIDHigh", */
"1.3.6.1.2.1.44.1.5.3.1.1.8",
"faVisitorRegIDHigh",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
{ /* "faVisitorRegIsAccepted", */
"1.3.6.1.2.1.44.1.5.3.1.1.9",
"faVisitorRegIsAccepted",
IPSNMP_DATA_TYPE_INTEGER,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_COLUMNAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVisitorTable
},
#endif
{ /* "faRegRequestsReceived", */
"1.3.6.1.2.1.44.1.5.3.2",
"faRegRequestsReceived",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegRequestsReceived
},
{ /* "faRegRequestsRelayed", */
"1.3.6.1.2.1.44.1.5.3.3",
"faRegRequestsRelayed",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegRequestsRelayed
},
{ /* "faReasonUnspecified", */
"1.3.6.1.2.1.44.1.5.3.4",
"faReasonUnspecified",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faReasonUnspecified
},
{ /* "faAdmProhibited", */
"1.3.6.1.2.1.44.1.5.3.5",
"faAdmProhibited",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faAdmProhibited
},
{ /* "faInsufficientResource", */
"1.3.6.1.2.1.44.1.5.3.6",
"faInsufficientResource",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faInsufficientResource
},
{ /* "faMNAuthenticationFailure", */
"1.3.6.1.2.1.44.1.5.3.7",
"faMNAuthenticationFailure",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faMNAuthenticationFailure
},
{ /* "faRegLifetimeTooLong", */
"1.3.6.1.2.1.44.1.5.3.8",
"faRegLifetimeTooLong",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegLifetimeTooLong
},
{ /* "faPoorlyFormedRequests", */
"1.3.6.1.2.1.44.1.5.3.9",
"faPoorlyFormedRequests",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faPoorlyFormedRequests
},
{ /* "faEncapsulationUnavailable", */
"1.3.6.1.2.1.44.1.5.3.10",
"faEncapsulationUnavailable",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faEncapsulationUnavailable
},
{ /* "faVJCompressionUnavailable", */
"1.3.6.1.2.1.44.1.5.3.11",
"faVJCompressionUnavailable",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faVJCompressionUnavailable
},
{ /* "faHAUnreachable", */
"1.3.6.1.2.1.44.1.5.3.12",
"faHAUnreachable",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faHAUnreachable
},
{ /* "faRegRepliesRecieved", */
"1.3.6.1.2.1.44.1.5.3.13",
"faRegRepliesRecieved",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegRepliesRecieved
},
{ /* "faRegRepliesRelayed", */
"1.3.6.1.2.1.44.1.5.3.14",
"faRegRepliesRelayed",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faRegRepliesRelayed
},
{ /* "faHAAuthenticationFailure", */
"1.3.6.1.2.1.44.1.5.3.15",
"faHAAuthenticationFailure",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faHAAuthenticationFailure
},
{ /* "faPoorlyFormedReplies", */
"1.3.6.1.2.1.44.1.5.3.16",
"faPoorlyFormedReplies",
IPSNMP_DATA_TYPE_COUNTER32,
IPSNMP_NODE_ACCESS_READONLY,
IPSNMP_NODE_TYPE_SCALAR,
IP_NULL,
IP_NULL,
ipmipfa_mip_mib_handler_faPoorlyFormedReplies
},
{ /* "faSystemGroup", */
"1.3.6.1.2.1.44.3.1.8",
"faSystemGroup",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faAdvertisementGroup", */
"1.3.6.1.2.1.44.3.1.9",
"faAdvertisementGroup",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{ /* "faRegistrationGroup", */
"1.3.6.1.2.1.44.3.1.10",
"faRegistrationGroup",
IPSNMP_DATA_TYPE_UNSPECIFIED,
IPSNMP_NODE_ACCESS_NOACCESS,
IPSNMP_NODE_TYPE_OTHER,
IP_NULL,
IP_NULL,
IP_NULL
},
{IP_NULL, IP_NULL, 0, 0, 0, IP_NULL, IP_NULL, IP_NULL}
};
if(ipsnmp_add_node_list(ipmipfa_mip_mib_objects) != 0)
return IPCOM_ERR_FAILED;
return IPCOM_SUCCESS;
}
#endif /* #ifdef IPSNMP */
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/