Profishark API 2.6.1.0
Loading...
Searching...
No Matches
ProfisharkAPI.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  ProfisharkAPIDeviceExtraInfo
 Profishark device extra information. More...
struct  ProfisharkAPIDeviceFeatures
 Profishark device features. More...
struct  ProfisharkAPIDevicePortSpeed
 Profishark port speed. More...
struct  ProfisharkAPIDevicePortsSpeed
 Profishark ports speed. More...
struct  ProfisharkApiSWVersion
 SW firmware or driver version. More...
struct  ProfisharkApiHWVersion
 HW firmware version. More...
struct  ProfisharkApiVersions
 firmwares and driver versions More...
struct  ProfisharkApiRJ45PortStatus
 RJ45 port link status. More...
struct  ProfisharkApiRJ45PortsStatus
 Describe all RJ45 ports. More...
struct  ProfisharkApiSFPPortStatus
 Description of a SFP module. More...
struct  ProfisharkApiSFPPortsStatus
 Describe all SFP ports. More...
struct  ProfisharkApiPHYRegisters
 A PHY registers. More...
struct  ProfisharkApiPHYsRegisters
 Describe all available PHYs registers. More...
struct  ProfisharkApiLinkStatus
 Device link status. More...
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...
struct  ProfisharkApiPacketsTypeFilter
 Packets type filter configuration. More...
struct  ProfisharkApiDpiFilter
 DPI filter configuration. More...
struct  ProfisharkApiPacketFilter
 Packet filter configuration. More...
struct  ProfisharkAPITimingTime
 Timing configuration. More...
struct  ProfisharkAPITimingDataTime
 Represents a date and time. More...
struct  ProfisharkAPITimingStatus
 Status of the device timing board. More...
struct  ProfisharkAPIDiskDumpConfig
 Direct capture configuration. More...
struct  ProfisharkAPIDiskDumpConfigEx
 Direct capture configuration. More...
struct  ProfisharkAPIDiskDumpStatus
 Direct capture status. More...
struct  ProfisharkAPIDeviceHWFirmwareDesc
 Descriptions of a HW firmwares. More...
struct  ProfisharkAPIDeviceHWFirmwaresDesc
 Descriptions of the supported HW firmwares. More...
struct  ProfisharkApiPoePairValues
 Power over Ethernet pair measures. More...
struct  ProfisharkApiPoeValues
 Power over Ethernet values and calibration parameters. More...
struct  ProfisharkApiPoeChannelCalibrationData
 Power over Ethernet calibration parameters. More...
struct  ProfisharkApiPoeCalibrationData
 Power over Ethernet calibration parameters. More...
struct  ProfisharkAPIMemoryCaptureConfig
 Memory capture configuration. More...
struct  ProfisharkApiDeviceNode
struct  ProfisharkApiDeviceList
struct  ProfisharkApiCallbackValue_DiskDump
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDump callback. More...
struct  ProfisharkApiCallbackValue_DiskDumpNewFile
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDumpNewFile callback. More...
struct  ProfisharkApiCallbackValue_LinkStatus
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_LinkStatus callback. More...

Macros

#define PROFISHARK_MAX_FILENAME_PATTERN_LENGTH   200
#define PROFISHARK_PATTERN_EXPANSION   5
#define PROFISHARK_MAX_FILENAME_LENGTH   4096
#define PROFISHARK_MAX_CAPTURE_DIRECTORY_LENGTH   (PROFISHARK_MAX_FILENAME_LENGTH - PROFISHARK_MAX_FILENAME_PATTERN_LENGTH - PROFISHARK_PATTERN_EXPANSION - 1)
#define PROFISHARKAPI_STATISTICSV2_COUNTERS   16
 The maximum number of counters available in a device supporting V2 statistics model.
#define PROFISHARKAPI_MEMORYCAPTURE_BUFFER_LENGTH   (16384*4*8)
 Minimum length of a buffer for memory capture.
#define PROFISHARK_MAX_HW_NAME_LENGTH   32
 Maximum length of a HW firmware name.
#define PROFISHARK_MAX_HW_COUNT   4
 Maximum number of HW firmwares.
#define IS_PROFISHARK_API_SUCCESS(a)
 Returns if the value means success.
#define PROFISHARK_API_INVALID_HANDLE   ((void*)-1)
 Invalid handle value.

Typedefs

typedef enum ProfisharkAPIRet ProfisharkAPIRet
 Error constants.
typedef enum ProfisharkAPIFlagState ProfisharkAPIFlagState
 State of a flag.
typedef enum ProfisharkAPIDeviceType ProfisharkAPIDeviceType
 Profishark devices models.
typedef enum ProfisharkApiDeviceOptions ProfisharkApiDeviceOptions
 Profishark device capabilities.
typedef struct ProfisharkAPIDeviceExtraInfo ProfisharkAPIDeviceExtraInfo
 Profishark device extra information.
typedef enum ProfisharkAPITimeSource ProfisharkAPITimeSource
 Time source for the timestamps.
typedef enum ProfisharkAPIState ProfisharkAPIState
 Enabled/Disabled states.
typedef enum ProfisharkAPIPort ProfisharkAPIPort
 Enabled/Disabled states.
typedef enum ProfisharkAPITimestampMoment ProfisharkAPITimestampMoment
 Defines when the timestamp information is added to the packet.
typedef struct ProfisharkAPIDeviceFeatures ProfisharkAPIDeviceFeatures
 Profishark device features.
typedef struct ProfisharkAPIDevicePortSpeed ProfisharkAPIDevicePortSpeed
 Profishark port speed.
typedef struct ProfisharkAPIDevicePortsSpeed ProfisharkAPIDevicePortsSpeed
 Profishark ports speed.
typedef struct ProfisharkApiSWVersion ProfisharkApiSWVersion
 SW firmware or driver version.
typedef struct ProfisharkApiHWVersion ProfisharkApiHWVersion
 HW firmware version.
typedef struct ProfisharkApiVersions ProfisharkApiVersions
 firmwares and driver versions
typedef enum ProfisharkApiPortMode ProfisharkApiPortMode
 Port Mode.
typedef enum ProfisharkApiPortSpeed ProfisharkApiPortSpeed
 Link speed.
typedef enum ProfisharkApiPortDuplex ProfisharkApiPortDuplex
 Link duplex.
typedef struct ProfisharkApiRJ45PortStatus ProfisharkApiRJ45PortStatus
 RJ45 port link status.
typedef struct ProfisharkApiRJ45PortsStatus ProfisharkApiRJ45PortsStatus
 Describe all RJ45 ports.
typedef enum ProfisharkApiSFPPortsStatusEncoding ProfisharkApiSFPPortsStatusEncoding
 SFP module encoding.
typedef enum ProfisharkApiSFPPortsRateID ProfisharkApiSFPPortsRateID
 SFP module rate ID.
typedef enum ProfisharkApiSFPPortsIdentifier ProfisharkApiSFPPortsIdentifier
 SFP module identifier.
typedef enum ProfisharkApiSFPPortsConnector ProfisharkApiSFPPortsConnector
 SFP module connector.
typedef enum ProfisharkApiSFPPortsDiagMonitoringType ProfisharkApiSFPPortsDiagMonitoringType
 Diagnostic monitoring type.
typedef enum ProfisharkApiSFPPortsSFF8472 ProfisharkApiSFPPortsSFF8472
 SFF8472 compliance.
typedef enum ProfisharkApiSFPPortsDiagFlags ProfisharkApiSFPPortsDiagFlags
 SFP module alarm, warning and gpios.
typedef enum ProfisharkApiSFPPortsOptionsLaserType ProfisharkApiSFPPortsOptionsLaserType
 SFP module Laser type.
typedef enum ProfisharkApiSFPPortsOptionsLaserPower ProfisharkApiSFPPortsOptionsLaserPower
 SFP module Laser power.
typedef enum ProfisharkApiSFPPortsOptionsReceiverOutput ProfisharkApiSFPPortsOptionsReceiverOutput
 SFP module receiver output type.
typedef enum ProfisharkApiSFPPortsImplementation ProfisharkApiSFPPortsImplementation
 implementation state for various SFP module features
typedef enum ProfisharkApiSFPPortsSONETReachSpecifier ProfisharkApiSFPPortsSONETReachSpecifier
 SFP module SONET reach specifier.
typedef struct ProfisharkApiSFPPortStatus ProfisharkApiSFPPortStatus
 Description of a SFP module.
typedef struct ProfisharkApiSFPPortsStatus ProfisharkApiSFPPortsStatus
 Describe all SFP ports.
typedef enum ProfisharkApiPHYRegistersMasterSlave ProfisharkApiPHYRegistersMasterSlave
 State of the master/slave resolution.
typedef struct ProfisharkApiPHYRegisters ProfisharkApiPHYRegisters
 A PHY registers.
typedef struct ProfisharkApiPHYsRegisters ProfisharkApiPHYsRegisters
 Describe all available PHYs registers.
typedef struct ProfisharkApiLinkStatus ProfisharkApiLinkStatus
 Device link status.
typedef enum ProfisharkApiStatisticsVersion ProfisharkApiStatisticsVersion
 Statistics model version.
typedef struct ProfisharkApiStatisticsV1Port ProfisharkApiStatisticsV1Port
 Statistics structure for a single port of a device supporting V1 model.
typedef struct ProfisharkApiStatisticsV1 ProfisharkApiStatisticsV1
 Statistics structure for devices supporting V1 model.
typedef struct ProfisharkApiStatisticsV2 ProfisharkApiStatisticsV2
 Statistics structure for devices supporting V2 model.
typedef struct ProfisharkApiStatistics ProfisharkApiStatistics
 Statistics structure for a Profishark device.
typedef enum ProfisharkApiCounterV2SizeMode ProfisharkApiCounterV2SizeMode
 Counter V2 size comparison mode.
typedef enum ProfisharkApiCounterV2Mode ProfisharkApiCounterV2Mode
 Counter V2 mode.
typedef struct ProfisharkApiCounterV2 ProfisharkApiCounterV2
 Counter V2 description.
typedef struct ProfisharkApiPacketsTypeFilter ProfisharkApiPacketsTypeFilter
 Packets type filter configuration.
typedef struct ProfisharkApiDpiFilter ProfisharkApiDpiFilter
 DPI filter configuration.
typedef enum ProfisharkApiPacketFilterFlags ProfisharkApiPacketFilterFlags
 Flags that enable of disable filters fields.
typedef enum ProfisharkApiPacketFilterMode ProfisharkApiPacketFilterMode
 Modes defining the comportement of packet filter fields.
typedef struct ProfisharkApiPacketFilter ProfisharkApiPacketFilter
 Packet filter configuration.
typedef struct ProfisharkAPITimingTime ProfisharkAPITimingTime
 Timing configuration.
typedef enum ProfisharkAPITimingBoardState ProfisharkAPITimingBoardState
 State of device timing board.
typedef enum ProfisharkAPITimingFixState ProfisharkAPITimingFixState
 State of the gps chip.
typedef struct ProfisharkAPITimingDataTime ProfisharkAPITimingDataTime
 Represents a date and time.
typedef struct ProfisharkAPITimingStatus ProfisharkAPITimingStatus
 Status of the device timing board.
typedef enum ProfisharkAPINetworkDataFormat ProfisharkAPINetworkDataFormat
 Output file format.
typedef struct ProfisharkAPIDiskDumpConfig ProfisharkAPIDiskDumpConfig
 Direct capture configuration.
typedef struct ProfisharkAPIDiskDumpConfigEx ProfisharkAPIDiskDumpConfigEx
 Direct capture configuration.
typedef struct ProfisharkAPIDiskDumpStatus ProfisharkAPIDiskDumpStatus
 Direct capture status.
typedef struct ProfisharkAPIDeviceHWFirmwareDesc ProfisharkAPIDeviceHWFirmwareDesc
 Descriptions of a HW firmwares.
typedef struct ProfisharkAPIDeviceHWFirmwaresDesc ProfisharkAPIDeviceHWFirmwaresDesc
 Descriptions of the supported HW firmwares.
typedef enum ProfisharkApiGlobalCallbackType ProfisharkApiGlobalCallbackType
 Global callback types.
typedef enum ProfisharkApiDeviceCallbackType ProfisharkApiDeviceCallbackType
 Device specific callback types.
typedef struct ProfisharkApiPoePairValues ProfisharkApiPoePairValues
 Power over Ethernet pair measures.
typedef struct ProfisharkApiPoeValues ProfisharkApiPoeValues
 Power over Ethernet values and calibration parameters.
typedef struct ProfisharkApiPoeChannelCalibrationData ProfisharkApiPoeChannelCalibrationData
 Power over Ethernet calibration parameters.
typedef struct ProfisharkApiPoeCalibrationData ProfisharkApiPoeCalibrationData
 Power over Ethernet calibration parameters.
typedef struct ProfisharkAPIMemoryCaptureConfig ProfisharkAPIMemoryCaptureConfig
 Memory capture configuration.
typedef void * ProfisharkApiDeviceHandle
 Profishark device handle.
typedef void * ProfisharkApiCallbackValue
 Profishark callback value.
typedef void(* ProfisharkApiCallback) (ProfisharkApiDeviceHandle, void *)
 Callback function.
typedef void(* ProfisharkApiCallbackExt) (ProfisharkApiDeviceHandle, ProfisharkApiCallbackValue *, void *)
 Callback function.
typedef struct ProfisharkApiDeviceNode ProfisharkApiDeviceNode
typedef struct ProfisharkApiDeviceList ProfisharkApiDeviceList
typedef struct ProfisharkApiCallbackValue_DiskDump ProfisharkApiCallbackValue_DiskDump
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDump callback.
typedef struct ProfisharkApiCallbackValue_DiskDumpNewFile ProfisharkApiCallbackValue_DiskDumpNewFile
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDumpNewFile callback.
typedef struct ProfisharkApiCallbackValue_LinkStatus ProfisharkApiCallbackValue_LinkStatus
 A structure describing the event passed to a ProfisharkApiDeviceCallbackType_LinkStatus callback.

Enumerations

enum  ProfisharkAPIRet {
  ProfisharkAPIRet_Success = 0 , ProfisharkAPIRet_Failed = -1 , ProfisharkAPIRet_Exist = -2 , ProfisharkAPIRet_NotExist = -3 ,
  ProfisharkAPIRet_NoDev = -4 , ProfisharkAPIRet_Unsupported = -5 , ProfisharkAPIRet_CannotCreateFile = -6 , ProfisharkAPIRet_CannotAllocateCache = -7 ,
  ProfisharkAPIRet_CaptureNotReady = -8 , ProfisharkAPIRet_CacheTooSmall = -9 , ProfisharkAPIRet_TooSmall = -10 , ProfisharkAPIRet_NotImplemented = -11 ,
  ProfisharkAPIRet_NotReady = -12 , ProfisharkAPIRet_Again = -13 , ProfisharkAPIRet_CannotOpenFile = -14 , ProfisharkAPIRet_InvalidFirmware = -15 ,
  ProfisharkAPIRet_NotStarted = -16 , ProfisharkAPIRet_NoMem = -17 , ProfisharkAPIRet_BadPattern = -18
}
 Error constants. More...
enum  ProfisharkAPIFlagState { ProfisharkAPIFlagState_No , ProfisharkAPIFlagState_Yes , ProfisharkAPIFlagState_Unknown }
 State of a flag. More...
enum  ProfisharkAPIDeviceType {
  ProfisharkAPIDeviceType_None , ProfisharkAPIDeviceType_BadDevice , ProfisharkAPIDeviceType_UnknownDevice , ProfisharkAPIDeviceType_Profishark1G ,
  ProfisharkAPIDeviceType_C1GIGE_USB , ProfisharkAPIDeviceType_Profishark1GPlus , ProfisharkAPIDeviceType_Profishark1G_v5 , ProfisharkAPIDeviceType_Profishark1G_v5_POE ,
  ProfisharkAPIDeviceType_Profishark1GPlus_POE , ProfisharkAPIDeviceType_Profishark1GPlus_GPS , ProfisharkAPIDeviceType_Profishark1GPlus_GPS_POE , ProfisharkAPIDeviceType_Profishark10G ,
  ProfisharkAPIDeviceType_Profishark10G_GPS , ProfisharkAPIDeviceType_Profishark100 , ProfisharkAPIDeviceType_Profishark1G_v6 , ProfisharkAPIDeviceType_Profishark1G_v7 ,
  ProfisharkAPIDeviceType_Profishark1GPlus_GPS_v2 , ProfisharkAPIDeviceType_IOTA_1G , ProfisharkAPIDeviceType_IOTA_1GPlus , ProfisharkAPIDeviceType_IOTA_10G ,
  ProfisharkAPIDeviceType_IOTA_10GPlus
}
 Profishark devices models. More...
enum  ProfisharkApiDeviceOptions {
  ProfisharkApiDeviceOptions_Basic = 0x1 , ProfisharkApiDeviceOptions_DualPorts = 0x2 , ProfisharkApiDeviceOptions_SpanMode = 0x4 , ProfisharkApiDeviceOptions_Gps = 0x8 ,
  ProfisharkApiDeviceOptions_Update = 0x10 , ProfisharkApiDeviceOptions_Poe = 0x20 , ProfisharkApiDeviceOptions_Sfp = 0x40 , ProfisharkApiDeviceOptions_Filter = 0x80 ,
  ProfisharkApiDeviceOptions_StatisticsV1 = 0x100 , ProfisharkApiDeviceOptions_StatisticsV2 = 0x200 , ProfisharkApiDeviceOptions_SpeedControl = 0x400 , ProfisharkApiDeviceOptions_Loopback = 0x800 ,
  ProfisharkApiDeviceOptions_Phy88E3015 = 0x2000 , ProfisharkApiDeviceOptions_PhyVSC8641 = 0x4000 , ProfisharkApiDeviceOptions_PcapNG = 0x8000 , ProfisharkApiDeviceOptions_SlicingLength = 0x10000 ,
  ProfisharkApiDeviceOptions_PhyVSC8502 = 0x20000 , ProfisharkApiDeviceOptions_MultipleHW = 0x40000 , ProfisharkApiDeviceOptions_CaptureFullFrames = 0x80000 , ProfisharkApiDeviceOptions_CaptureNTPDisciplinedTimestamp = 0x100000 ,
  ProfisharkApiDeviceOptions_PacketTypeFilter = 0x200000 , ProfisharkApiDeviceOptions_PPS_Resolution_5ns = 0x400000 , ProfisharkApiDeviceOptions_PPS_Resolution_8ns = 0x800000 , ProfisharkApiDeviceOptions_10G_1G_Autoneg = 0x1000000 ,
  ProfisharkApiDeviceOptions_VLAN_Filter = 0x2000000
}
 Profishark device capabilities. More...
enum  ProfisharkAPITimeSource {
  ProfisharkAPITimeSource_System , ProfisharkAPITimeSource_RTC , ProfisharkAPITimeSource_GPS , ProfisharkAPITimeSource_None ,
  ProfisharkAPITimeSource_Manual , ProfisharkAPITimeSource_SNTP
}
 Time source for the timestamps. More...
enum  ProfisharkAPIState { ProfisharkAPIState_Disabled = 0 , ProfisharkAPIState_Enabled = 1 , ProfisharkAPIState_DontCare = -1 }
 Enabled/Disabled states. More...
enum  ProfisharkAPIPort { ProfisharkAPIPort_A = 0 , ProfisharkAPIPort_B = 1 , ProfisharkAPIPort_Invalid = -1 }
 Enabled/Disabled states. More...
enum  ProfisharkAPITimestampMoment { ProfisharkAPITimestampMoment_Capture , ProfisharkAPITimestampMoment_Ingress , ProfisharkAPITimestampMoment_Egress }
 Defines when the timestamp information is added to the packet. More...
enum  ProfisharkApiPortMode { ProfisharkApiPortMode_Inline , ProfisharkApiPortMode_Span }
 Port Mode. More...
enum  ProfisharkApiPortSpeed {
  ProfisharkApiPortSpeed_10Mbps , ProfisharkApiPortSpeed_100Mbps , ProfisharkApiPortSpeed_1Gbps , ProfisharkApiPortSpeed_10Gbps ,
  ProfisharkApiPortSpeed_Unknown , ProfisharkApiPortSpeed_Down
}
 Link speed. More...
enum  ProfisharkApiPortDuplex { ProfisharkApiPortDuplex_Full , ProfisharkApiPortDuplex_Half }
 Link duplex. More...
enum  ProfisharkApiSFPPortsStatusEncoding {
  ProfisharkApiSFPPortsStatusEncoding_Unspecified = 0x00 , ProfisharkApiSFPPortsStatusEncoding_8B10B = 0x01 , ProfisharkApiSFPPortsStatusEncoding_4B5B = 0x02 , ProfisharkApiSFPPortsStatusEncoding_NRZ = 0x03 ,
  ProfisharkApiSFPPortsStatusEncoding_Manchester = 0x04 , ProfisharkApiSFPPortsStatusEncoding_SONET_Scrambled = 0x05 , ProfisharkApiSFPPortsStatusEncoding_64B66B = 0x06
}
 SFP module encoding. More...
enum  ProfisharkApiSFPPortsRateID {
  ProfisharkApiSFPPortsRateID_Unspecified = 0x00 , ProfisharkApiSFPPortsRateID_SFF_8079 = 0x01 , ProfisharkApiSFPPortsRateID_SFF_8431_RXOnly = 0x02 , ProfisharkApiSFPPortsRateID_SFF_8431_TXOnly = 0x04 ,
  ProfisharkApiSFPPortsRateID_SFF_8431 = 0x06 , ProfisharkApiSFPPortsRateID_FC_PI_5_RXOnly = 0x08 , ProfisharkApiSFPPortsRateID_FC_PI_5 = 0x0a
}
 SFP module rate ID. More...
enum  ProfisharkApiSFPPortsIdentifier {
  ProfisharkApiSFPPortsIdentifier_Unknown , ProfisharkApiSFPPortsIdentifier_GBIC , ProfisharkApiSFPPortsIdentifier_SolderedToMB , ProfisharkApiSFPPortsIdentifier_SFP_SFPPlus ,
  ProfisharkApiSFPPortsIdentifier_300pinXBI , ProfisharkApiSFPPortsIdentifier_XENPAK , ProfisharkApiSFPPortsIdentifier_XFP , ProfisharkApiSFPPortsIdentifier_XFF ,
  ProfisharkApiSFPPortsIdentifier_XFP_E , ProfisharkApiSFPPortsIdentifier_XPAK , ProfisharkApiSFPPortsIdentifier_X2 , ProfisharkApiSFPPortsIdentifier_DWDM_SFP ,
  ProfisharkApiSFPPortsIdentifier_QSFP , ProfisharkApiSFPPortsIdentifier_QSFPPlus , ProfisharkApiSFPPortsIdentifier_CXP
}
 SFP module identifier. More...
enum  ProfisharkApiSFPPortsConnector {
  ProfisharkApiSFPPortsConnector_Unknown , ProfisharkApiSFPPortsConnector_SC , ProfisharkApiSFPPortsConnector_FCStyle1Copper , ProfisharkApiSFPPortsConnector_FCStyle2Copper ,
  ProfisharkApiSFPPortsConnector_BNC_TNC , ProfisharkApiSFPPortsConnector_FCCoax , ProfisharkApiSFPPortsConnector_FiberJack , ProfisharkApiSFPPortsConnector_LC ,
  ProfisharkApiSFPPortsConnector_MT_RJ , ProfisharkApiSFPPortsConnector_MU , ProfisharkApiSFPPortsConnector_SG , ProfisharkApiSFPPortsConnector_OpticalPigtail ,
  ProfisharkApiSFPPortsConnector_MPOParallelOptic , ProfisharkApiSFPPortsConnector_HSSDC_II , ProfisharkApiSFPPortsConnector_CopperPigtail , ProfisharkApiSFPPortsConnector_RJ45
}
 SFP module connector. More...
enum  ProfisharkApiSFPPortsDiagMonitoringType {
  ProfisharkApiSFPPortsDiagMonitoringType_IntCalibrated_AVPower , ProfisharkApiSFPPortsDiagMonitoringType_IntCalibrated_OMA , ProfisharkApiSFPPortsDiagMonitoringType_ExtCalibrated_AVPower , ProfisharkApiSFPPortsDiagMonitoringType_ExtCalibrated_OMA ,
  ProfisharkApiSFPPortsDiagMonitoringType_None
}
 Diagnostic monitoring type. More...
enum  ProfisharkApiSFPPortsSFF8472 {
  ProfisharkApiSFPPortsSFF8472_Undefined , ProfisharkApiSFPPortsSFF8472_Rev9_3 , ProfisharkApiSFPPortsSFF8472_Rev9_5 , ProfisharkApiSFPPortsSFF8472_Rev10_2 ,
  ProfisharkApiSFPPortsSFF8472_Rev10_4 , ProfisharkApiSFPPortsSFF8472_Rev_11_0
}
 SFF8472 compliance. More...
enum  ProfisharkApiSFPPortsDiagFlags {
  ProfisharkApiSFPPortsDiagFlags_Alarm_Temperature = 0x1 , ProfisharkApiSFPPortsDiagFlags_Alarm_VCC = 0x2 , ProfisharkApiSFPPortsDiagFlags_Alarm_TXBias = 0x4 , ProfisharkApiSFPPortsDiagFlags_Alarm_TXPower = 0x8 ,
  ProfisharkApiSFPPortsDiagFlags_Alarm_RXPower = 0x10 , ProfisharkApiSFPPortsDiagFlags_Warning_Temperature = 0x20 , ProfisharkApiSFPPortsDiagFlags_Warning_VCC = 0x40 , ProfisharkApiSFPPortsDiagFlags_Warning_TXBias = 0x80 ,
  ProfisharkApiSFPPortsDiagFlags_Warning_TXPower = 0x100 , ProfisharkApiSFPPortsDiagFlags_Warning_RXPower = 0x200 , ProfisharkApiSFPPortsDiagFlags_Gpio_TXDisable = 0x400 , ProfisharkApiSFPPortsDiagFlags_Gpio_TXFault = 0x800 ,
  ProfisharkApiSFPPortsDiagFlags_Gpio_RXLOS = 0x1000
}
 SFP module alarm, warning and gpios.
enum  ProfisharkApiSFPPortsOptionsLaserType { ProfisharkApiSFPPortsOptionsLaser_Cooled , ProfisharkApiSFPPortsOptionsLaser_Uncooled_Unspecified }
 SFP module Laser type. More...
enum  ProfisharkApiSFPPortsOptionsLaserPower { ProfisharkApiSFPPortsOptionsLaserPower_Level2 , ProfisharkApiSFPPortsOptionsLaserPower_Level1_Unspecified }
 SFP module Laser power. More...
enum  ProfisharkApiSFPPortsOptionsReceiverOutput { ProfisharkApiSFPPortsOptionsLinearReceiverOutput_Linear , ProfisharkApiSFPPortsOptionsLinearReceiverOutput_Limiting }
 SFP module receiver output type. More...
enum  ProfisharkApiSFPPortsImplementation { ProfisharkApiSFPPortsImplementation_Implemented , ProfisharkApiSFPPortsImplementation_NotImplemented , ProfisharkApiSFPPortsImplementation_Implemented_Inverted }
 implementation state for various SFP module features More...
enum  ProfisharkApiSFPPortsSONETReachSpecifier {
  ProfisharkApiSFPPortsSONETReachSpecifier_SR , ProfisharkApiSFPPortsSONETReachSpecifier_SR_1 , ProfisharkApiSFPPortsSONETReachSpecifier_IR_1 , ProfisharkApiSFPPortsSONETReachSpecifier_IR_2 ,
  ProfisharkApiSFPPortsSONETReachSpecifier_LR_1 , ProfisharkApiSFPPortsSONETReachSpecifier_LR_2 , ProfisharkApiSFPPortsSONETReachSpecifier_LR_3 , ProfisharkApiSFPPortsSONETReachSpecifier_Unknown
}
 SFP module SONET reach specifier.
enum  ProfisharkApiPHYRegistersMasterSlave { ProfisharkApiPHYRegistersMasterSlave_Master , ProfisharkApiPHYRegistersMasterSlave_Slave , ProfisharkApiPHYRegistersMasterSlave_NA }
 State of the master/slave resolution.
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...
enum  ProfisharkApiPacketFilterFlags {
  ProfisharkApiPacketFilterFlags_isIPV6 = 0x1 , ProfisharkApiPacketFilterFlags_dstMacEnabled = 0x2 , ProfisharkApiPacketFilterFlags_srcMacEnabled = 0x4 , ProfisharkApiPacketFilterFlags_dstIpEnabled = 0x8 ,
  ProfisharkApiPacketFilterFlags_srcIpEnabled = 0x10 , ProfisharkApiPacketFilterFlags_dstPortEnabled = 0x20 , ProfisharkApiPacketFilterFlags_srcPortEnabled = 0x40 , ProfisharkApiPacketFilterFlags_VLANidEnabled = 0x80
}
 Flags that enable of disable filters fields. More...
enum  ProfisharkApiPacketFilterMode { ProfisharkApiPacketFilterMode_macIsOr = 0x1 , ProfisharkApiPacketFilterMode_ipIsOr = 0x2 , ProfisharkApiPacketFilterMode_portIsOr = 0x4 }
 Modes defining the comportement of packet filter fields. More...
enum  ProfisharkAPITimingBoardState { ProfisharkAPITimingBoardState_Available , ProfisharkAPITimingBoardState_Absent , ProfisharkAPITimingBoardState_Locked }
 State of device timing board. More...
enum  ProfisharkAPITimingFixState { ProfisharkAPITimingFixState_NoFix , ProfisharkAPITimingFixState_2DFix , ProfisharkAPITimingFixState_3DFix }
 State of the gps chip. More...
enum  ProfisharkAPINetworkDataFormat { ProfisharkAPINetworkDataFormat_PcapNG }
 Output file format. More...
enum  ProfisharkApiGlobalCallbackType { ProfisharkApiGlobalCallbackType_NewDevice , ProfisharkApiGlobalCallbackType_DeviceRemoved }
 Global callback types. More...
enum  ProfisharkApiDeviceCallbackType { ProfisharkApiDeviceCallbackType_DiskDump , ProfisharkApiDeviceCallbackType_DiskDumpNewFile , ProfisharkApiDeviceCallbackType_LinkStatus }
 Device specific callback types. More...

Functions

PROFISHARKAPI_API void ProfisharkApiSleepMs (int ms)
 Sleeps for ms milliseconds.
PROFISHARKAPI_API uint64_t ProfisharkApiGetEpoch ()
 Get current Unix epoch (seconds since 01/01/1970).
PROFISHARKAPI_API ProfisharkApiSWVersion ProfisharkAPIGetVersion (void)
 Get API version.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIInitialize (void)
 Initialize the Profishark library.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIUninitialize (void)
 Cleanup internal library structures.
PROFISHARKAPI_API void ProfisharkApiDeviceListFree (ProfisharkApiDeviceList *list)
PROFISHARKAPI_API ProfisharkApiDeviceListProfisharkAPIGetDevicesList (void)
 Get a list containing the currently connected Profishark devices.
PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet ProfisharkAPIAddNewDeviceCallback (ProfisharkApiCallback callback, void *context)
 Add a new function to be called when a new Profishark device is detected.
PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet ProfisharkAPIRemoveNewDeviceCallback (ProfisharkApiCallback callback)
 Remove a function from the list of functions called when a new Profishark device is detected.
PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet ProfisharkAPIAddDeviceGoneCallback (ProfisharkApiCallback callback, void *context)
 Add a new function to be called when a Profishark device is disconnected.
PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet ProfisharkAPIRemoveDeviceGoneCallback (ProfisharkApiCallback callback)
 Remove a function from the list of functions called when a new Profishark device is disconnected.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDeviceType (ProfisharkApiDeviceHandle handle, ProfisharkAPIDeviceType *type)
 Get device type.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDeviceMAC (ProfisharkApiDeviceHandle handle, uint8_t *mac)
 Get device MAC address.
PROFISHARKAPI_API_DEPRECATED ProfisharkApiDeviceOptions ProfisharkAPIGetDeviceCapabilities (ProfisharkAPIDeviceType devType)
 Get device capabilities.
PROFISHARKAPI_API ProfisharkApiDeviceOptions ProfisharkAPIGetDeviceCapabilitiesEx (ProfisharkApiDeviceHandle handle)
 Get device capabilities.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDeviceExtraInfo (ProfisharkApiDeviceHandle handle, ProfisharkAPIDeviceExtraInfo *info)
 Get device extra information.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDeviceFeatures (ProfisharkApiDeviceHandle handle, ProfisharkAPIDeviceFeatures *features)
 Get device features.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetDeviceFeatures (ProfisharkApiDeviceHandle handle, ProfisharkAPIDeviceFeatures features)
 Set device features.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetHwFirmwaresDesc (ProfisharkApiDeviceHandle handle, ProfisharkAPIDeviceHWFirmwaresDesc *desc)
 Get the name corresponding to a HW firmware id.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetDevicePortsSpeed (ProfisharkApiDeviceHandle handle, ProfisharkAPIDevicePortsSpeed speed)
 Set network ports supported speeds.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDevicePortsSpeed (ProfisharkApiDeviceHandle handle, ProfisharkAPIDevicePortsSpeed *speed)
 Get network ports supported speeds.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISaveDeviceFeatures (ProfisharkApiDeviceHandle handle)
 Save device features and ports speed to EEPROM.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIRestartDevice (ProfisharkApiDeviceHandle handle)
 Restart the device.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetVersions (ProfisharkApiDeviceHandle handle, ProfisharkApiVersions *versions)
 Get device firmwares and driver versions.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetLinkStatus (ProfisharkApiDeviceHandle handle, ProfisharkApiLinkStatus *status)
 Get device link status.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetStatistics (ProfisharkApiDeviceHandle handle, ProfisharkApiStatistics *statistics)
 Get device statistics.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetCounterV2 (ProfisharkApiDeviceHandle handle, ProfisharkApiCounterV2 counter)
 Set device counter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetCounterV2 (ProfisharkApiDeviceHandle handle, int n, ProfisharkApiCounterV2 *counter)
 Get device counter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetPacketsTypeFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiPacketsTypeFilter filter)
 Set packets type filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetPacketsTypeFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiPacketsTypeFilter *filter)
 Get packets type filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISavePacketsTypeFilter (ProfisharkApiDeviceHandle handle)
 Save packets type filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetDpiFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiDpiFilter filter)
 Set DPI filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetDpiFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiDpiFilter *filter)
 Get DPI filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISaveDpiFilter (ProfisharkApiDeviceHandle handle)
 Save DPI filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetPacketFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiPacketFilter filter)
 Set packet filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetPacketFilter (ProfisharkApiDeviceHandle handle, ProfisharkApiPacketFilter *filter)
 Get packet filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISavePacketFilter (ProfisharkApiDeviceHandle handle)
 Save packet filter configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetTimingTime (ProfisharkApiDeviceHandle handle, ProfisharkAPITimingTime time)
 Set timestamp time information.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGetTimingStatus (ProfisharkApiDeviceHandle handle, ProfisharkAPITimingStatus *status)
 Get timing board status.
PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet ProfisharkAPIDiskDumpSetConfig (ProfisharkApiDeviceHandle handle, ProfisharkAPIDiskDumpConfig config)
 Set direct capture configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIDiskDumpSetConfigEx (ProfisharkApiDeviceHandle handle, ProfisharkAPIDiskDumpConfigEx config)
 Set direct capture configuration.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIDiskDumpStart (ProfisharkApiDeviceHandle handle)
 Start direct capture.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIDiskDumpStop (ProfisharkApiDeviceHandle handle)
 Stop direct capture.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIDiskDumpGetStatus (ProfisharkApiDeviceHandle handle, ProfisharkAPIDiskDumpStatus *status)
 Get direct capture status.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureStart (ProfisharkApiDeviceHandle handle, ProfisharkAPIMemoryCaptureConfig config)
 Start memory capture.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureStop (ProfisharkApiDeviceHandle handle)
 Stop memory capture.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureGet (ProfisharkApiDeviceHandle handle, uint8_t *buffer, int *length)
 Get network data.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureGetHeader (ProfisharkApiDeviceHandle handle, uint8_t *buffer, int *length)
 Get the file header corresponding to the requested format.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGPSOutputFlush (ProfisharkApiDeviceHandle handle)
 Flush GPS UART output interface.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIGPSOutputRead (ProfisharkApiDeviceHandle handle, char *data, int len, int *transferred)
 Fetch data from the GPS UART output interface.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIAddGlobalCallback (ProfisharkApiGlobalCallbackType type, ProfisharkApiCallbackExt callback, void *context)
 Add a global callback function.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIAddDeviceCallback (ProfisharkApiDeviceHandle handle, ProfisharkApiDeviceCallbackType type, ProfisharkApiCallbackExt callback, void *context)
 Add a device callback function.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIRemoveGlobalCallback (ProfisharkApiGlobalCallbackType type, ProfisharkApiCallbackExt callback)
 Remove a global callback function.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIRemoveDeviceCallback (ProfisharkApiDeviceHandle handle, ProfisharkApiDeviceCallbackType type, ProfisharkApiCallbackExt callback)
 Remove a device callback function.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIPoeGetMeasures (ProfisharkApiDeviceHandle handle, ProfisharkApiPoeValues *result)
 Read Power over Ethernet values and calibration data.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIPoeGetRawMeasures (ProfisharkApiDeviceHandle handle, ProfisharkApiPoeValues *result)
 Read Power over Ethernet uncalibrated values.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIPoeGetCalibrationData (ProfisharkApiDeviceHandle handle, ProfisharkApiPoeCalibrationData *result)
 Read Power over Ethernet calibration data.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIPoeSetCalibrationData (ProfisharkApiDeviceHandle handle, ProfisharkApiPoeCalibrationData *result)
 Write Power over Ethernet calibration data.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIPoeResetCalibrationData (ProfisharkApiDeviceHandle handle)
 Reset Power over Ethernet calibration data.
PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPISetMarker (ProfisharkApiDeviceHandle handle, uint32_t seq)
 Insert a marker packet in the network packets stream.

Detailed Description

Main API header file

Macro Definition Documentation

◆ IS_PROFISHARK_API_SUCCESS

#define IS_PROFISHARK_API_SUCCESS ( a)
Value:
@ ProfisharkAPIRet_Success
Definition ProfisharkAPI.h:53

Returns if the value means success.

Parameters
aProfisharkAPIRet value
Returns
whether the ProfisharkAPIRet corresponds to a success

Enumeration Type Documentation

◆ ProfisharkAPIFlagState

State of a flag.

Enumerator
ProfisharkAPIFlagState_No 

Feature is OFF/not OK/not detected

ProfisharkAPIFlagState_Yes 

Feature is ON/OK/detected

ProfisharkAPIFlagState_Unknown 

State is not available/unknown

◆ ProfisharkAPIPort

Enabled/Disabled states.

Enumerator
ProfisharkAPIPort_A 

Port A

ProfisharkAPIPort_B 

Port B

ProfisharkAPIPort_Invalid 

Invalid port

◆ ProfisharkAPIRet

Error constants.

Enumerator
ProfisharkAPIRet_Success 

No error

ProfisharkAPIRet_Failed 

Generic failure

ProfisharkAPIRet_Exist 

Already exists

ProfisharkAPIRet_NotExist 

Does not exist

ProfisharkAPIRet_NoDev 

Device does not exist

ProfisharkAPIRet_Unsupported 

Device does not support this operation

ProfisharkAPIRet_CannotCreateFile 

Failed to create file

ProfisharkAPIRet_CannotAllocateCache 

Failed to allocate cache, out of memory

ProfisharkAPIRet_CaptureNotReady 

Capture is not ready to start

ProfisharkAPIRet_CacheTooSmall 

Cache is too small (<512kb)

ProfisharkAPIRet_TooSmall 

Not enough space

ProfisharkAPIRet_NotImplemented 

Not implemented in API

ProfisharkAPIRet_NotReady 

Buffer not ready

ProfisharkAPIRet_Again 

Try again

ProfisharkAPIRet_CannotOpenFile 

Failed to open file

ProfisharkAPIRet_InvalidFirmware 

Invalid firmware file

ProfisharkAPIRet_NotStarted 

Invalid firmware file

ProfisharkAPIRet_NoMem 

Memory allocation failed

ProfisharkAPIRet_BadPattern 

Bad file pattern

◆ ProfisharkAPIState

Enabled/Disabled states.

Enumerator
ProfisharkAPIState_Disabled 

Disabled

ProfisharkAPIState_Enabled 

Enabled

ProfisharkAPIState_DontCare 

Don't Care