Profishark API  2.3.12.0
Statistics

Retrieve statistics from a Profishark device. More...

Data Structures

struct  ProfisharkApiStatisticsV1Port
 Statistics structure for a single port of a device supporting V1 model. More...
 
struct  ProfisharkApiStatisticsV1
 Statistics structure for devices supporting V1 model. More...
 
struct  ProfisharkApiStatisticsV2
 Statistics structure for devices supporting V2 model. More...
 
struct  ProfisharkApiStatistics
 Statistics structure for a Profishark device. More...
 
struct  ProfisharkApiCounterV2
 Counter V2 description. More...
 

Macros

#define PROFISHARKAPI_STATISTICSV2_COUNTERS   16
 The maximum number of counters available in a device supporting V2 statistics model.
 

Enumerations

enum  ProfisharkApiStatisticsVersion { ProfisharkApiStatisticsVersion_1 =1, ProfisharkApiStatisticsVersion_2 =2 }
 Statistics model version.
 
enum  ProfisharkApiCounterV2SizeMode { ProfisharkApiCounterV2SizeMode_SizeModeDontCare =-1, ProfisharkApiCounterV2SizeMode_SizeModeGreaterThan, ProfisharkApiCounterV2SizeMode_SizeModeLessThan, ProfisharkApiCounterV2SizeMode_SizeModeEqual }
 Counter V2 size comparison mode. More...
 
enum  ProfisharkApiCounterV2Mode { ProfisharkApiCounterV2Mode_CounterModePackets, ProfisharkApiCounterV2Mode_CounterModeBytes }
 Counter V2 mode. More...
 

Functions

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetStatistics (ProfisharkApiDeviceHandle handle, ProfisharkApiStatistics &statistics)
 Get device statistics. More...
 
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetCounterV2 (ProfisharkApiDeviceHandle handle, ProfisharkApiCounterV2 counter)
 Set device counter configuration. More...
 
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetCounterV2 (ProfisharkApiDeviceHandle handle, int n, ProfisharkApiCounterV2 &counter)
 Get device counter configuration. More...
 

Detailed Description

Retrieve statistics from a Profishark device.

Enumeration Type Documentation

◆ ProfisharkApiCounterV2Mode

Counter V2 mode.

Enumerator
ProfisharkApiCounterV2Mode_CounterModePackets 

Counter is counting packets

ProfisharkApiCounterV2Mode_CounterModeBytes 

Counter is counting bytes

◆ ProfisharkApiCounterV2SizeMode

Counter V2 size comparison mode.

Enumerator
ProfisharkApiCounterV2SizeMode_SizeModeDontCare 

Counter does not care about packet size

ProfisharkApiCounterV2SizeMode_SizeModeGreaterThan 

Counter counts packet if packet size > 'size'

ProfisharkApiCounterV2SizeMode_SizeModeLessThan 

Counter counts packet if packet size < 'size'

ProfisharkApiCounterV2SizeMode_SizeModeEqual 

Counter counts packet if packet size = 'size'

Function Documentation

◆ ProfisharkAPIGetCounterV2()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetCounterV2 ( ProfisharkApiDeviceHandle  handle,
int  n,
ProfisharkApiCounterV2 counter 
)

Get device counter configuration.

Parameters
handlea handle to the device
nthe id of the counter to retrieve
[out]counterthe ProfisharkApiCounterV2 structure that will contain the counter configuration
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist

◆ ProfisharkAPIGetStatistics()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetStatistics ( ProfisharkApiDeviceHandle  handle,
ProfisharkApiStatistics statistics 
)

Get device statistics.

Parameters
handlea handle to the device
[out]statisticsa ProfisharkApiStatistics that will hold statistics
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist

◆ ProfisharkAPISetCounterV2()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetCounterV2 ( ProfisharkApiDeviceHandle  handle,
ProfisharkApiCounterV2  counter 
)

Set device counter configuration.

Parameters
handlea handle to the device
counterthe ProfisharkApiCounterV2 structure containing the counter configuration
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist