topn_c.h

来自「嵌入式RMON,RMON为Remote monitor的缩写,基于SNMP为网络」· C头文件 代码 · 共 71 行

H
71
字号
/* Beholder RMON ethernet network monitor,Copyright (C) 1993 DNPAP group *//* See file COPYING 'GNU General Public Licence' for copyright details   */#ifndef _TOPN_C_H#define _TOPN_C_H#include <dnpap.h>#include <boolset.h>#include <hash.h>#include <mibsup.h>#include <timer.h>#include "topn_d.h"#define TOPN_BOOLEAN_DATASOURCE		1#define TOPN_BOOLEAN_OWNER			2typedef struct _TOPN_ENTRY{	BYTE  Address[HOST_SIZE_ADDR];    ULONG PrevValue;        /*  statistics in host structure are ULONG's too  */	ULONG Rate;    struct _TOPN_ENTRY  *Prev;    struct _TOPN_ENTRY  *Next;	} TOPN_ENTRY;typedef struct _TOPN_CONTROL{    LONG  HostIndex;    WORD  AddressLen;    LONG  RateBase;    LONG  TimeRemaining;    LONG  Duration;    LONG  RequestedSize;    ULONG StartTime;    BYTE  Owner[SNMP_SIZE_BUFCHR];    WORD  OwnerLen;    WORD  Status;    LONG  TableSize;    HashTable *Table;        TOPN_ENTRY  *TopNEntries;    TOPN_ENTRY  *TopNLast;    TOPN_ENTRY **TopNArray;        TIMER_DESCR *Timer;	BooleanSet   ObjectSet;    } TOPN_CONTROL;BOOLEAN TopNCInit(TOPN_CONTROL *topncontrol);BOOLEAN TopNCStart(TOPN_CONTROL *topncontrol);BOOLEAN TopNCStop(TOPN_CONTROL *topncontrol);BOOLEAN EntryAddList(TOPN_CONTROL *topncontrol, TOPN_ENTRY *entry);BOOLEAN EntryUpdateList(TOPN_CONTROL *topncontrol, TOPN_ENTRY *entry);TOPN_ENTRY* TopNEntrySearch(TOPN_CONTROL *topncontrol, SNMP_OBJECT *obj, WORD idlen);      BOOLEAN FillEntryTable(TOPN_CONTROL *topncontrol, LONG reqsize);#endif

⌨️ 快捷键说明

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