bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
|
Types and functions for bRAWcap receiving. More...
Modules | |
Receive Filter | |
Types and functions for operating with bRAWcap receive filters. | |
Macros | |
#define | BRAWCAP_RX_COPY_PACKETS_DEFAULT 0 |
Default minimum packets to copy value which has to be received before any receive function return even if configured timeout exceeds. | |
#define | BRAWCAP_RX_TIMEOUT_MS_DEFAULT 10 |
Default timeout in milliseconds after which a bRAWcap receive returns, even if buffer is not yet full but the configured receive min packets to copy must be reached. | |
#define | BRAWCAP_RX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC |
Default receive timestamp mode which will be used. | |
#define | BRAWCAP_RX_VLAN_TAGGING_DEFAULT FALSE |
Default VLAN tagging mode which will be used. | |
#define | BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT 4096 |
Default size for driver receive queues in number of packets. | |
#define | BRAWCAP_RX_TIMEOUT_MS_MAX 5000 |
Maximum supported receive timeout in number of milliseconds. | |
#define | BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX 40000 |
Maximum size (in number of packets) supported for driver receive queues. | |
#define | BRAWCAP_RX_DIRECTION_DEFAULT BRAWCAP_RX_DIRECTION_BOTH |
Default receive direction which will be used. | |
#define | BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX 2 |
Max number of supported packet (receive) buffers per bRAWcap handle. | |
Typedefs | |
typedef UINT16 | brawcap_rx_timeout_t |
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum blocking time in milliseconds for pending bRAWcap receives. If a packet is received or the receive buffer is full before the timeout is reached, receive will return earlier. | |
typedef UINT32 | brawcap_rx_min_packets_t |
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return. It specifies how many packets should be received before a pending receive returns. Reading more packets in a single call can improve the performance but leads to higher latency. | |
typedef void(* | brawcap_rx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser) |
Receive callback which is called each time a receive has finished. Receiving can be started with brawcap_rx_start and has to be stopped with brawcap_rx_stop. Before anything can be received it is necessary to attach packet buffers to the bRAWcap handle. This can be done by creating new bRAWcap buffers (brawcap_buffer_create) and attach it with brawcap_rx_buffer_attach. | |
Enumerations | |
enum | brawcap_rx_mode_t { BRAWCAP_RX_MODE_LIVE = 1 , BRAWCAP_RX_MODE_DUMP = 2 } |
List of receive modes. More... | |
enum | brawcap_rx_direction_t { BRAWCAP_RX_DIRECTION_UNKNOWN = 0x00 , BRAWCAP_RX_DIRECTION_IN = 0x01 , BRAWCAP_RX_DIRECTION_OUT = 0x02 , BRAWCAP_RX_DIRECTION_BOTH = 0x03 } |
List of supported receive directions. More... | |
Functions | |
brawcap_status_t | brawcap_rx_packet (brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket) |
Receives a single packet from the specified handle. | |
brawcap_status_t | brawcap_rx_start (brawcap_handle_t *const pHandle, brawcap_rx_callback_t const callback, void *const pUser, const BOOLEAN indicateNoPackets) |
Starts the internal receive loop. | |
brawcap_status_t | brawcap_rx_stop (brawcap_handle_t *const pHandle) |
Stops the internal receive loop. | |
brawcap_status_t | brawcap_rx_buffer_attach (brawcap_handle_t *const pHandle, brawcap_buffer_t *const pBuffer) |
Attaches the specified bRAWcap packet buffer to the specified handle. | |
brawcap_status_t | brawcap_rx_buffer_detach (brawcap_handle_t *const pHandle, brawcap_buffer_t *const pBuffer) |
Detaches the specified bRAWcap packet buffer from the specified handle. | |
brawcap_status_t | brawcap_rx_direction_set (brawcap_handle_t *const pHandle, const brawcap_rx_direction_t direction) |
Sets the receive direction for the specified handle. | |
brawcap_status_t | brawcap_rx_direction_get (brawcap_handle_t *const pHandle, brawcap_rx_direction_t *const pDirection) |
Reads out the currently configured receive direction of the specified handle. | |
brawcap_status_t | brawcap_rx_min_packets_set (brawcap_handle_t *const pHandle, const brawcap_rx_min_packets_t minPackets) |
Sets the minimum amount of packets to receive for the specified handle. | |
brawcap_status_t | brawcap_rx_min_packets_get (brawcap_handle_t *const pHandle, brawcap_rx_min_packets_t *const pMinPackets) |
Reads out the currently configured number of packets to receive for the specified handle. | |
brawcap_status_t | brawcap_rx_timeout_set (brawcap_handle_t *const pHandle, const brawcap_rx_timeout_t timeout_ms) |
Configures the receive timeout for the specified handle. | |
brawcap_status_t | brawcap_rx_timeout_get (brawcap_handle_t *const pHandle, brawcap_rx_timeout_t *const pTimeout_ms) |
Reads out the currently configured receive timeout for the specified handle. | |
brawcap_status_t | brawcap_rx_filter_set (brawcap_handle_t *const pHandle, const brawcap_filter_t *const pFilter) |
Sets the specified filter to the specified handle. | |
brawcap_status_t | brawcap_rx_filter_get (brawcap_handle_t *const pHandle, brawcap_filter_t *const pFilter) |
Reads out the currently configured filter for the specified handle. | |
brawcap_status_t | brawcap_rx_promiscuous_mode_set (brawcap_handle_t *const pHandle, const BOOLEAN enable) |
Sets the current promiscuous mode flag for the specified handle. | |
brawcap_status_t | brawcap_rx_promiscuous_mode_get (brawcap_handle_t *const pHandle, BOOLEAN *const pEnabled, BOOLEAN *const pEnabledAdapter) |
Reads out the current promiscuous mode state for the specified handle. | |
brawcap_status_t | brawcap_rx_timestamp_capabilities (brawcap_handle_t *const pHandle, brawcap_timestamp_capabilities_t *const pCapabilities) |
Reads out the available receive timestamp modes for the specified handle. | |
brawcap_status_t | brawcap_rx_timestamp_mode_get (brawcap_handle_t *const pHandle, brawcap_timestamp_mode_t *const pMode) |
Reads out the currently configured receive time stamping mode for the specified handle. | |
brawcap_status_t | brawcap_rx_timestamp_mode_set (brawcap_handle_t *const pHandle, const brawcap_timestamp_mode_t mode) |
Configures the used receive time stamping mode for the specified handle. | |
brawcap_status_t | brawcap_rx_vlan_tagging_set (brawcap_handle_t *const pHandle, const BOOLEAN enable) |
Sets the current VLAN tagging flag for the specified handle. | |
brawcap_status_t | brawcap_rx_vlan_tagging_get (brawcap_handle_t *const pHandle, BOOLEAN *const pEnabled) |
Reads out the configured VLAN tagging state for the specified handle. | |
brawcap_status_t | brawcap_rx_driver_queue_size_set (brawcap_handle_t *const pHandle, const brawcap_queue_size_t size) |
Sets the driver queue size (in number of packets) for the specified handle. | |
brawcap_status_t | brawcap_rx_driver_queue_size_get (brawcap_handle_t *const pHandle, brawcap_queue_size_t *const pSize) |
Reads out the currently configured driver receive queue size for the specified handle. | |
Types and functions for bRAWcap receiving.
List of examples:
#define BRAWCAP_RX_COPY_PACKETS_DEFAULT 0 |
#include <brawcap_types_shared.h>
Default minimum packets to copy value which has to be received before any receive function return even if configured timeout exceeds.
#define BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX 2 |
#include <brawcap_types_um.h>
Max number of supported packet (receive) buffers per bRAWcap handle.
Limits the number of buffers which can be attached to a single handle with brawcap_rx_buffer_attach.
typedef UINT16 brawcap_rx_timeout_t |
#include <brawcap_types_shared.h>
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum blocking time in milliseconds for pending bRAWcap receives. If a packet is received or the receive buffer is full before the timeout is reached, receive will return earlier.
typedef UINT32 brawcap_rx_min_packets_t |
#include <brawcap_types_shared.h>
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return. It specifies how many packets should be received before a pending receive returns. Reading more packets in a single call can improve the performance but leads to higher latency.
typedef void(* brawcap_rx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser) |
#include <brawcap_types_um.h>
Receive callback which is called each time a receive has finished. Receiving can be started with brawcap_rx_start and has to be stopped with brawcap_rx_stop. Before anything can be received it is necessary to attach packet buffers to the bRAWcap handle. This can be done by creating new bRAWcap buffers (brawcap_buffer_create) and attach it with brawcap_rx_buffer_attach.
[in] | pHandle | Handle on which the receive returned. |
[in] | status | The overall receive status see brawcap_status_t for possible return values. |
[in] | pBuffer | Pointer to the buffer which has finished receiving. It can be used to access all packets in the buffer and allows to retrieve information for each received packet (e.g. payload, length, timestamp, ...). |
[in] | pUser | Pointer to a user defined context. It allows access to user specific data within the callback. |
enum brawcap_rx_mode_t |
#include <brawcap_types_shared.h>
List of receive modes.
#include <brawcap_types_shared.h>
List of supported receive directions.
The receive direction allows the select for which direction (transmit/receive) the packets shall be captured. This setting can be seen as some kind of generic receive filter.
brawcap_status_t brawcap_rx_packet | ( | brawcap_handle_t *const | pHandle, |
brawcap_packet_t *const | pPacket | ||
) |
#include <brawcap.h>
Receives a single packet from the specified handle.
The caller must provide a valid packet were bRAWcap will store the received data. To create a packet use brawcap_packet_create or use a buffered packet which was returned by a valid buffer with brawcap_buffer_at_index.
[in] | pHandle | bRAWcap handle to receive from. |
[out] | pPacket | Packet were the received data will be stored. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_WARNING_PENDING | Another receive is still pending/active. |
BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not active (anymore) on the adapter. |
BRAWCAP_STATUS_WARNING_DEMO_MODE | Running in demo mode (no license). |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
BRAWCAP_STATUS_INFO_NO_DATA | Returned without any data received (due to timeout). |
brawcap_status_t brawcap_rx_start | ( | brawcap_handle_t *const | pHandle, |
brawcap_rx_callback_t const | callback, | ||
void *const | pUser, | ||
const BOOLEAN | indicateNoPackets | ||
) |
#include <brawcap.h>
Starts the internal receive loop.
To receive data using this method it is necessary to attach memory to the bRAWcap handle were received data can be stored. This can be done by attaching (with brawcap_rx_buffer_attach) a previously created bRAWcap packet buffer (with brawcap_buffer_create).
When a reception has finished (due to timeout, min packets or full buffer) the receive callback will be called for this handle (brawcap_rx_callback_t). In this callback the user application can do it´s post processing on the received data. If the user application does not detach the buffer (with brawcap_rx_buffer_detach) it will be reused for receiving after callback has completed.
The user application should do it´s post processing anyway, as fast as possible. Depending on the current bandwidth the attached buffers may be filled up very fast. If the user application takes to long it will lead to a bottleneck in the reception and the driver runs out of resources. This may result in performance degradation or packet loss.
It is possible to attach more than only one buffer to a single handle. This ensures that the bRAWcap driver can toggle the buffers during the reception. This reduces the time gap the driver has to buffer data internally (because there is no user buffer available). With more than one buffer the driver can still fill up another buffer while the user application does it´s post processing. Therefore in general, using more than one buffer increases the performance.
[in] | pHandle | bRAWcap handle to receive from. |
[in] | callback | Function pointer to user application receive callback. |
[in] | pUser | Pointer to a user defined context. Can be NULL if no user context is required. |
[in] | indicateNoPackets | Specifies if callback is called even without any received data. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_WARNING_PENDING | Another receive is pending or reception is already started. |
brawcap_status_t brawcap_rx_stop | ( | brawcap_handle_t *const | pHandle | ) |
#include <brawcap.h>
Stops the internal receive loop.
[in] | pHandle | bRAWcap handle to stop reception. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_INFO_NOT_RUNNING | There was no receive running. |
brawcap_status_t brawcap_rx_buffer_attach | ( | brawcap_handle_t *const | pHandle, |
brawcap_buffer_t *const | pBuffer | ||
) |
#include <brawcap.h>
Attaches the specified bRAWcap packet buffer to the specified handle.
After attaching a packet buffer to a handle it will be used for receiving data on that handle. Data is only received if the internal receive loop was started/is running (with brawcap_rx_start).
The buffer is locked until:
[in] | pHandle | bRAWcap handle for attaching the buffer. |
[in] | pBuffer | Packet buffer to be attached. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | The buffer is already in use / locked down by another operation. |
BRAWCAP_STATUS_WARNING_LIMIT_REACHED | Limitation of buffer per handle reached (BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX) |
brawcap_status_t brawcap_rx_buffer_detach | ( | brawcap_handle_t *const | pHandle, |
brawcap_buffer_t *const | pBuffer | ||
) |
#include <brawcap.h>
Detaches the specified bRAWcap packet buffer from the specified handle.
After detaching a buffer it is unlocked and can be accessed/modified. It can also be reused for another operation or freed with brawcap_buffer_free if it is not required anymore.
[in] | pHandle | bRAWcap handle from which the buffer is to be detached. |
[in] | pBuffer | Packet buffer to be detached. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_INFO_NOT_ATTACHED | The buffer was not attached. |
brawcap_status_t brawcap_rx_direction_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_rx_direction_t | direction | ||
) |
#include <brawcap.h>
Sets the receive direction for the specified handle.
Possible directions are:
[in] | pHandle | bRAWcap handle to be configured. |
[in] | direction | The direction to be set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_direction_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_rx_direction_t *const | pDirection | ||
) |
#include <brawcap.h>
Reads out the currently configured receive direction of the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pDirection | Will contain the currently configured receive direction, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_min_packets_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_rx_min_packets_t | minPackets | ||
) |
#include <brawcap.h>
Sets the minimum amount of packets to receive for the specified handle.
This value influences how often the bRAWcap driver will return pending receives. It forces the driver to stay in the request as long as not the minimum amount of packets were captured. Setting a higher value here can reduce the overall system load but increases also the responsiveness/latency when the packet was received by the adapter and the indication of the packet to the caller. The initial/default value is set to BRAWCAP_RX_COPY_PACKETS_DEFAULT.
[in] | pHandle | bRAWcap handle to be configured. |
[in] | minPackets | The minimum amount of packets to receive. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_min_packets_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_rx_min_packets_t *const | pMinPackets | ||
) |
#include <brawcap.h>
Reads out the currently configured number of packets to receive for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pMinPackets | Will contain the configured minimum amount of packets per receive, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_timeout_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_rx_timeout_t | timeout_ms | ||
) |
#include <brawcap.h>
Configures the receive timeout for the specified handle.
It´s guaranteed that receive functions will return at least after the specified timeout value, if the configured amount of packets value brawcap_rx_min_packets_t is reached before. If the configured amount of packets are not reached until the timeout occurs, the driver will stay in the request for up to 10 times of the specified timeout time until it final returns. It is also possible to specify a timeout of zero. A timeout of zero is equivalent to "no timeout".
[in] | pHandle | bRAWcap handle to be configured. |
[in] | timeout_ms | Receive timeout in milliseconds to be set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified timeout value is invalid/out of range. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_timeout_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_rx_timeout_t *const | pTimeout_ms | ||
) |
#include <brawcap.h>
Reads out the currently configured receive timeout for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pTimeout_ms | Will contain the configured receive timeout in milliseconds, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_filter_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_filter_t *const | pFilter | ||
) |
#include <brawcap.h>
Sets the specified filter to the specified handle.
For more information on filters see brawcap_filter_t.
[in] | pHandle | bRAWcap handle to be modified. |
[in] | pFilter | The filter to set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not available. |
brawcap_status_t brawcap_rx_filter_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_filter_t *const | pFilter | ||
) |
#include <brawcap.h>
Reads out the currently configured filter for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pFilter | Will contain the currently configured filter, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_promiscuous_mode_set | ( | brawcap_handle_t *const | pHandle, |
const BOOLEAN | enable | ||
) |
#include <brawcap.h>
Sets the current promiscuous mode flag for the specified handle.
If a adapter is set into promiscuous mode it receives not only packages which directly address the adapter. This can be used for recording/sniffing purposes but increases the local system load. Promiscuous mode is a network adapter feature and which can only be modified by bRAWcap. Therefore it is not specific to a bRAWcap handle. Instead it is a per adapter setting which can also be modified from another application.
[in] | pHandle | bRAWcap handle to be modified. |
[in] | enable | Promiscuous mode state to be set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_promiscuous_mode_get | ( | brawcap_handle_t *const | pHandle, |
BOOLEAN *const | pEnabled, | ||
BOOLEAN *const | pEnabledAdapter | ||
) |
#include <brawcap.h>
Reads out the current promiscuous mode state for the specified handle.
Additionally to the promiscuous state of the handle itself it also reads the current promiscuous state of to the underlying adapter.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pEnabled | Will contain the current promiscuous mode state of the handle, afterwards. |
[out] | pEnabledAdapter | Will contain the current promiscuous mode state of the underlying adapter, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_timestamp_capabilities | ( | brawcap_handle_t *const | pHandle, |
brawcap_timestamp_capabilities_t *const | pCapabilities | ||
) |
#include <brawcap.h>
Reads out the available receive timestamp modes for the specified handle.
Some of the timestamp capabilites depend on the features provided by the underlying adapter. Those modes are named with "adapter".
[in] | pHandle | bRAWcap handle to read from. |
[out] | pCapabilities | Will contain the available receive timestamp modes, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_timestamp_mode_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_timestamp_mode_t *const | pMode | ||
) |
#include <brawcap.h>
Reads out the currently configured receive time stamping mode for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pMode | Will contain the currently used receive time stamping mode, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_timestamp_mode_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_timestamp_mode_t | mode | ||
) |
#include <brawcap.h>
Configures the used receive time stamping mode for the specified handle.
[in] | pHandle | bRAWcap handle to be configured. |
[out] | mode | The receive timestamp mode to be configured. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified timestamp mode not available. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_vlan_tagging_set | ( | brawcap_handle_t *const | pHandle, |
const BOOLEAN | enable | ||
) |
#include <brawcap.h>
Sets the current VLAN tagging flag for the specified handle.
If VLAN tagging is enabled, the VLAN Header (defined by IEEE 802.1Q) will be part of the packet payload. By default, the VLAN header is not included in the packet payload.
[in] | pHandle | bRAWcap handle to be configured. |
[in] | enable | VLAN tagging state to be set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_vlan_tagging_get | ( | brawcap_handle_t *const | pHandle, |
BOOLEAN *const | pEnabled | ||
) |
#include <brawcap.h>
Reads out the configured VLAN tagging state for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pEnabled | Will contain the currently configured VLAN tagging state, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
brawcap_status_t brawcap_rx_driver_queue_size_set | ( | brawcap_handle_t *const | pHandle, |
const brawcap_queue_size_t | size | ||
) |
#include <brawcap.h>
Sets the driver queue size (in number of packets) for the specified handle.
A larger driver queue can avoid packet drops for time gaps were no packet buffer is available. But setting large driver queues should only be done if really necessary, because it can consume a lot of memory. Because driver queues exist per handle, the total amount of consumed memory has to summed up for all open handles and their current configuration.
The driver queue size can be adjusted at any time.
[in] | pHandle | bRAWcap handle to be configured. |
[in] | size | Driver receive queue size to be set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified queue size is out of range/invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_rx_driver_queue_size_get | ( | brawcap_handle_t *const | pHandle, |
brawcap_queue_size_t *const | pSize | ||
) |
#include <brawcap.h>
Reads out the currently configured driver receive queue size for the specified handle.
[in] | pHandle | bRAWcap handle to read from. |
[out] | pSize | Will contain the currently configured driver receive queue size, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |