Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

perf.h File Reference

#include "perf-base.h"
#include "perf-flow.h"
#include "perf-event.h"

Go to the source code of this file.

Defines

#define SFPERF_BASE   1
#define SFPERF_FLOW   2
#define SFPERF_EVENT   4
#define SFPERF_BASE_MAX   8
#define SFPERF_CONSOLE   16
#define SFPERF_FILE   32
#define SFPERF_PKTCNT   64
#define SFPERF_SUMMARY   128
#define UINT64   unsigned long long

Typedefs

typedef _SFPERF SFPERF

Functions

int sfInitPerformanceStatistics (SFPERF *sfPerf)
int sfSetPerformanceSampleTime (SFPERF *sfPerf, int iSeconds)
int sfSetPerformanceAccounting (SFPERF *sfPerf, int iReset)
int sfSetPerformanceStatistics (SFPERF *sfPerf, int iFlag)
int sfSetPerformanceStatisticsEx (SFPERF *sfPerf, int iFlag, void *param)
int sfRotatePerformanceStatisticsFile (SFPERF *sfPerf)
int sfPerformanceStats (SFPERF *sfPerf, unsigned char *pucPacket, int len, int iRebuiltPkt)
int sfProcessPerfStats (SFPERF *sfPerf)
int CheckSampleInterval (time_t curr_time, SFPERF *sfPerf)


Define Documentation

#define SFPERF_BASE   1
 

Definition at line 52 of file perf.h.

Referenced by InitPerfStats(), ParsePerfMonitorArgs(), ProcessPerfStats(), sfSetPerformanceStatistics(), and UpdatePerfStats().

#define SFPERF_BASE_MAX   8
 

Definition at line 55 of file perf.h.

Referenced by ParsePerfMonitorArgs(), and sfSetPerformanceStatistics().

#define SFPERF_CONSOLE   16
 

Definition at line 56 of file perf.h.

Referenced by ParsePerfMonitorArgs(), ProcessPerfStats(), and sfSetPerformanceStatistics().

#define SFPERF_EVENT   4
 

Definition at line 54 of file perf.h.

Referenced by InitPerfStats(), ParsePerfMonitorArgs(), ProcessPerfStats(), sfSetPerformanceStatistics(), UpdateNQEvents(), and UpdateQEvents().

#define SFPERF_FILE   32
 

Definition at line 57 of file perf.h.

Referenced by ParsePerfMonitorArgs(), ProcessPerfStats(), sfRotatePerformanceStatisticsFile(), and sfSetPerformanceStatisticsEx().

#define SFPERF_FLOW   2
 

Definition at line 53 of file perf.h.

Referenced by InitPerfStats(), ParsePerfMonitorArgs(), ProcessPerfMonitor(), ProcessPerfStats(), sfSetPerformanceStatistics(), UpdateICMPFlowStatsEx(), UpdatePerfStats(), UpdateTCPFlowStatsEx(), and UpdateUDPFlowStatsEx().

#define SFPERF_PKTCNT   64
 

Definition at line 58 of file perf.h.

Referenced by ParsePerfMonitorArgs(), and sfSetPerformanceStatisticsEx().

#define SFPERF_SUMMARY   128
 

Definition at line 59 of file perf.h.

Referenced by ParsePerfMonitorArgs(), sfPerformanceStats(), and sfSetPerformanceStatisticsEx().

#define UINT64   unsigned long long
 

Definition at line 62 of file perf.h.


Typedef Documentation

typedef struct _SFPERF SFPERF
 


Function Documentation

int CheckSampleInterval time_t  curr_time,
SFPERF sfPerf
 

Definition at line 235 of file perf.c.

References InitPerfStats(), ProcessPerfStats(), _SFPERF::sample_interval, and _SFPERF::sample_time.

Referenced by ParsePerfMonitorArgs(), and sfPerformanceStats().

int sfInitPerformanceStatistics SFPERF sfPerf  ) 
 

Definition at line 49 of file perf.c.

References memset, sfSetPerformanceSampleTime(), and sfSetPerformanceStatistics().

Referenced by ParsePerfMonitorArgs().

int sfPerformanceStats SFPERF sfPerf,
unsigned char *  pucPacket,
int  len,
int  iRebuiltPkt
 

Definition at line 216 of file perf.c.

References CheckSampleInterval(), _SFPERF::iPerfFlags, _SFPERF::iPktCnt, NULL, SFPERF_SUMMARY, and UpdatePerfStats().

Referenced by ProcessPerfMonitor().

int sfProcessPerfStats SFPERF sfPerf  ) 
 

Definition at line 297 of file perf.c.

References ProcessPerfStats().

Referenced by PerfMonitorCleanExit().

int sfRotatePerformanceStatisticsFile SFPERF sfPerf  ) 
 

Definition at line 159 of file perf.c.

References errno, FatalError(), FILE_MAX, LogMessage(), NULL, PATH_MAX, SFPERF_FILE, sfSetPerformanceStatisticsEx(), and snprintf.

Referenced by ProcessPerfMonitor().

int sfSetPerformanceAccounting SFPERF sfPerf,
int  iReset
 

Definition at line 73 of file perf.c.

References _SFBASE::iReset, and _SFPERF::sfBase.

Referenced by ParsePerfMonitorArgs().

int sfSetPerformanceSampleTime SFPERF sfPerf,
int  iSeconds
 

Definition at line 58 of file perf.c.

References _SFPERF::sample_interval, and _SFPERF::sample_time.

Referenced by ParsePerfMonitorArgs(), and sfInitPerformanceStatistics().

int sfSetPerformanceStatistics SFPERF sfPerf,
int  iFlag
 

Definition at line 81 of file perf.c.

References _SFBASE::iFlags, _SFPERF::iPerfFlags, MAX_PERF_STATS, _SFPERF::sfBase, SFPERF_BASE, SFPERF_BASE_MAX, SFPERF_CONSOLE, SFPERF_EVENT, and SFPERF_FLOW.

Referenced by ParsePerfMonitorArgs(), and sfInitPerformanceStatistics().

int sfSetPerformanceStatisticsEx SFPERF sfPerf,
int  iFlag,
void *  param
 

Definition at line 112 of file perf.c.

References _SFPERF::fh, _SFPERF::file, _SFPERF::iPerfFlags, _SFPERF::iPktCnt, SFPERF_FILE, SFPERF_PKTCNT, and SFPERF_SUMMARY.

Referenced by ParsePerfMonitorArgs(), and sfRotatePerformanceStatisticsFile().


Generated on Sun May 14 14:51:25 2006 by  doxygen 1.4.2