Profishark API 2.6.1.0
Loading...
Searching...
No Matches
Memory capture

Memory capture functions. More...

Data Structures

struct  ProfisharkAPIMemoryCaptureConfig
 Memory capture configuration. More...
 

Macros

#define PROFISHARKAPI_MEMORYCAPTURE_BUFFER_LENGTH   (16384*4*8)
 Minimum length of a buffer for memory capture.
 

Typedefs

typedef enum ProfisharkAPINetworkDataFormat ProfisharkAPINetworkDataFormat
 Output file format.
 
typedef struct ProfisharkAPIMemoryCaptureConfig ProfisharkAPIMemoryCaptureConfig
 Memory capture configuration.
 

Enumerations

enum  ProfisharkAPINetworkDataFormat { ProfisharkAPINetworkDataFormat_PcapNG }
 Output file format. More...
 

Functions

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.
 

Detailed Description

Memory capture functions.

Enumeration Type Documentation

◆ ProfisharkAPINetworkDataFormat

Output file format.

Enumerator
ProfisharkAPINetworkDataFormat_PcapNG 

Pcap-ng

Function Documentation

◆ ProfisharkAPIMemoryCaptureGet()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureGet ( ProfisharkApiDeviceHandle  handle,
uint8_t *  buffer,
int *  length 
)

Get network data.

Parameters
handlea handle to the device
[out]buffera buffer to store the data in the requested format. It must be at least PROFISHARKAPI_MEMORYCAPTURE_BUFFER_LENGTH long.
[in,out]lengththe length of the buffer. It will be filled with the length of the returned data.
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist
ProfisharkAPIRet_TooSmallif the buffer is too small

◆ ProfisharkAPIMemoryCaptureGetHeader()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureGetHeader ( ProfisharkApiDeviceHandle  handle,
uint8_t *  buffer,
int *  length 
)

Get the file header corresponding to the requested format.

Parameters
handlea handle to the device
[out]buffera buffer to store the header. It must be at least PROFISHARKAPI_MEMORYCAPTURE_BUFFER_LENGTH long.
[in,out]lengththe length of the buffer. It will be filled with the length of the returned data.
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist
ProfisharkAPIRet_TooSmallif the buffer is too small

◆ ProfisharkAPIMemoryCaptureStart()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureStart ( ProfisharkApiDeviceHandle  handle,
ProfisharkAPIMemoryCaptureConfig  config 
)

Start memory capture.

Parameters
handlea handle to the device
configa ProfisharkAPIMemoryCaptureConfig that contains the memory capture configuration
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist

◆ ProfisharkAPIMemoryCaptureStop()

PROFISHARKAPI_API ProfisharkAPIRet ProfisharkAPIMemoryCaptureStop ( ProfisharkApiDeviceHandle  handle)

Stop memory capture.

Parameters
handlea handle to the device
Return values
ProfisharkAPIRet_Successon success
ProfisharkAPIRet_NoDevif the device does not exist