📄 ipsec_stats.h
字号:
/* ipsec_stats.h - WindNet IPsec: Utilities for Statistics Operations API's *//* * Copyright (c) 2004-2006 Wind River Systems, Inc. * * The right to copy, distribute, modify or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. *//* modification history-------------------------------------01b,16jan06,djp Added appropriate public includes01a,12jan06,djp removed rwos dependencies01d,12oct05,djp Added Macros to clean up code where being used.01c,07mar05,djp Fixed include paths01b,01jun04,swc added protectionSuite and networkInterface prototypes01a,01jun04,jfb created*//*DESCRIPTION*/#if !defined (__IPSEC_STATS_PRIVATE_H__)#define __IPSEC_STATS_PRIVATE_H__#ifdef __cplusplusextern "C" {#endif/* public headers */#include <vxWorks.h>#include <mbufLib.h>#include <netinet/ip.h>#include <wrn/ipsec/ipsecStats.h>/* private headers */#include "../sadb/sadb_if.h"#include "../spd/spdP.h"#define NOT_USED 0typedef enum network_counters { BYTE_COUNT = 1, PACKET_COUNT = 2, NO_PS_DISCARD_COUNT = 3, NO_POLICY_DISCARD_COUNT = 4, EXPLICIT_DISCARD_COUNT = 5, EXPLICIT_BYPASS_COUNT = 6, POLICY_ERROR_COUNT = 7 }NETWORK_COUNTERS;#ifdef INCLUDE_COUNTERS_POLICIES#define spdIncrementPolicyCounters(p,s){if(p){p->counts.packetCount++;p->counts.preProcessedByteCount += s;}}#else#define spdIncrementPolicyCounters(p,s)#endifvoid spdPolicyCountUpdate (SECURITY_POLICY *pPolicy, PROTECTION_SUITE_COUNTS *pPsCounts);void updateProtectionSuiteCounters (UINT suite_handle,TRAFFIC_DIRECTION direction,SA_SPEC_RET_TYPES type,UINT preSize,UINT postSize);void updateNetworkInterfaceCounters (TRAFFIC_DIRECTION direction,struct mbuf ** pp_memory_buffer,struct ip ** pp_ip_header,int counterType,int size);#ifdef __cplusplus}#endif#ifdef INCLUDE_COUNTERS_NETWORK_INTERFACE#define UPDATE_NET_IF_COUNTERS(dir, m, hdr, type, size) \ updateNetworkInterfaceCounters(dir, m, hdr, type, size)#else#define UPDATE_NET_IF_COUNTERS(dir, m, hdr, type, size) #endif#ifdef INCLUDE_COUNTERS_POLICIES#define SPD_INCREMENT_COUNTERS(trafInfo, dir, size) \ spdIncrementPolicyCounters (trafInfo, dir, size)#else#define SPD_INCREMENT_COUNTERS(trafInfo, dir, size) #endif#endif /* __IPSEC_STATS_PRIVATE_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -