?? mibif.c
字號:
#include "VxWorks.h"
#include "sockLib.h"
#include "inetLib.h"
#include "taskLib.h"
#include "stdioLib.h"
#include "strLib.h"
#include "ioLib.h"
#include "fioLib.h"
#include "snmp.h"
#include "Mib2Func.h"
//0x2b,6,1,2,1,2,x
int InterfaceGetVar(VARLIST *pVar)
{
U32 u32Index;
U32 u32GetIndex;
MibFuncPara para;
switch(pVar->oid[6])
{
case 1://IFNUMBER:
u32GetIndex = g_MFIndex.IF.Get.Number_______ps32GetValue;
pVar->type = TAG_INTERGER;
break;
case 2://IFTABLE:
if(pVar->oid[7] == 1)
{
u32Index = pVar->oid[8];
if (22 < u32Index || u32Index == 0)
{
return ERROR;
}
if (u32Index == 2 || u32Index == 6)
{//ifDescr | ifPhyAddress
pVar->type = TAG_OCTET;
}
else
{//Other
pVar->type = TAG_INTERGER;
}
u32GetIndex = g_MFIndex.IF.Get.Index_________ps32GetValue +\
u32Index - 1;
}
break;
default:
return ERROR;
}
if (OK != Mib2GetOne(u32GetIndex, ¶))
{
return ERROR;
}
return Mib2Get(pVar, ¶);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -