mibicmp.c

来自「VxWorks操作系统下的SNMP协议以及MIB协议的实现源码,并且实现了HP标」· C语言 代码 · 共 36 行

C
36
字号

#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,5,x
int  IcmpGetVar(VARLIST *pVar)
{
	U32		u32Index	= pVar->oid[6];
	U32		u32GetIndex	= g_MFIndex.ICMP.Get.InMsgs___________pu32GetValue +\
						  u32Index - 1;
	MibFuncPara para;
	
	if (26 < u32Index || u32Index == 0)
	{
		return ERROR;
	}	

	pVar->type = TAG_INTERGER;

	if (OK != Mib2GetOne(u32GetIndex, &para))
	{
		return ERROR;
	}

	return Mib2Get(pVar, &para);
}

⌨️ 快捷键说明

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