bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
|
bRAWcap API - Shared types. More...
Go to the source code of this file.
Data Structures | |
struct | brawcap_version_fragments_t |
Struct containing the separated version parts. More... | |
union | brawcap_version_t |
bRAWcap version. More... | |
struct | brawcap_bpf_insn_t |
A single BPF pseudo-instruction. More... | |
struct | brawcap_bpf_program_t |
A BPF pseudo-assembly program. More... | |
struct | brawcap_stats_header_t |
Header describing given bRAWcap stats structure. More... | |
struct | brawcap_stats_rx_t |
The bRAWcap receive statistics. More... | |
struct | brawcap_stats_tx_t |
The bRAWcap transmit statistics. More... | |
Macros | |
#define | BRAWCAP_HANDLES_PER_ADAPTER_MAX 5 |
Specifies the maximum supported bRAWcap handles per adapter. | |
#define | BRAWCAP_SUCCESS(status) (status == 0) |
Checks if the returned status indicates a success with no additional info. | |
#define | BRAWCAP_ERROR(status) (status < 0) |
Checks if the returned status is a error. | |
#define | BRAWCAP_WARNING(status) (status > 0 && status < 2000) |
Checks if the returned status is a warning. | |
#define | BRAWCAP_INFO(status) (status >= 2000 && status < 4000) |
Checks if the returned status is a info. | |
#define | BRAWCAP_TIMESTAMP_MODE_SYSL_AVAILABLE(_capabilities) (_capabilities & 0x01) |
Checks if timestamp mode system low precision is supported. | |
#define | BRAWCAP_TIMESTAMP_MODE_SYSH_AVAILABLE(_capabilities) (_capabilities & 0x02) |
Checks if timestamp mode system high precision is supported. | |
#define | BRAWCAP_TIMESTAMP_MODE_SW_AVAILABLE(_capabilities) (_capabilities & 0x04) |
Checks if timestamp mode software is supported. | |
#define | BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYS_AVAILABLE(_capabilities) (_capabilities & 0x08) |
Checks if timestamp mode adapter system is supported. | |
#define | BRAWCAP_TIMESTAMP_MODE_ADAPTER_SW_AVAILABLE(_capabilities) (_capabilities & 0x10) |
Checks if timestamp mode adapter software is supported. | |
#define | BRAWCAP_TIMESTAMP_MODE_ADAPTER_HW_AVAILABLE(_capabilities) (_capabilities & 0x20) |
Checks if timestamp mode adapter hardware is supported. | |
#define | BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN 0 |
If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved. | |
#define | BRAWCAP_TIMESTAMP_NS_PER_SEC 1000000000 |
Number of nanoseconds per second. | |
#define | BRAWCAP_TIMESTAMP_US_PER_SEC 1000000 |
Number of microseconds per second. | |
#define | BRAWCAP_TIMESTAMP_MS_PER_SEC 1000 |
Number of milliseconds per second. | |
#define | BRAWCAP_TIMESTAMP_NS_PER_US 1000 |
Number of nanoseconds per microsecond. | |
#define | BRAWCAP_TIMESTAMP_NS_PER_MS 1000000 |
Number of nanoseconds per millisecond. | |
#define | BRAWCAP_PACKET_SIZE_MAX 9018 |
The maximum supported (byte) size for a single packet payload. | |
#define | BRAWCAP_PACKET_SIZE_MIN 14 |
The minimum required (byte) size for a single packet payload. | |
#define | BRAWCAP_BUFFER_PACKETS_MAX 100000 |
The maximum amount of packets, which can be stored in a packet buffer. | |
#define | BRAWCAP_BUFFER_PACKETS_MIN 1 |
The minimum amount of packets, which a packet buffer must have. | |
#define | BRAWCAP_FILTER_BYTE_MAX_LENGTH 64U |
The maximum supported filter byte mask length in bytes. | |
#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_TX_DRIVER_QUEUE_SIZE_DEFAULT 512 |
Default size in number of packets for driver transmit queues. | |
#define | BRAWCAP_TX_DRIVER_QUEUE_SIZE_MIN 256 |
Minimum size in number of packets supported for driver transmit queues. | |
#define | BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX 4096 |
Maximum size in number of packets supported for driver transmit queues. | |
#define | BRAWCAP_TX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP |
Default timestamp mode for transmitted packets. | |
#define | BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID(__stats_rx) (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID) |
Indicates if the brawcap_stats_rx_t::adapterReceivedPacketsTotal member of the given receive stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID(__stats_rx) (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID) |
Indicates if the brawcap_stats_rx_t::adapterReceivedBytesTotal member of the given receive stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID(__stats_rx) (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID) |
Indicates if the brawcap_stats_rx_t::adapterDroppedPacketsTotal member of the given receive stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID(__stats_tx) (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID) |
Indicates if the brawcap_stats_tx_t::adapterCompletedPacketsTotal member of the given transmit stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID(__stats_tx) (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID) |
Indicates if the brawcap_stats_tx_t::adapterCompletedBytesTotal member of the given transmit stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID(__stats_tx) (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID ) |
Indicates if the brawcap_stats_tx_t::adapterCanceledPacketsTotal member of the given transmit stats is valid. This statistic is provided from the underlying network adapter driver and may be supported or not. | |
#define | BRAWCAP_STATS_RX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_rx_t, handleDroppedPacketsToLong) |
Returns the size of receive statistics revision 1. | |
#define | BRAWCAP_STATS_TX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_tx_t, handleCompletedBytesTotal) |
Returns the size of transmit statistics revision 1. | |
Typedefs | |
typedef UINT32 | brawcap_queue_size_t |
The number of packets which can be (temporary) buffered by the bRAWcap driver queue. | |
typedef UINT32 | brawcap_timestamp_capabilities_t |
Type used for indicating the supported timestamp modes. | |
typedef UINT32 | brawcap_timestamp_resolution_ns_t |
Represents the timestamp resolution in nanoseconds. | |
typedef struct _brawcap_timestamp | brawcap_timestamp_t |
bRAWcap timestamp object. | |
typedef UINT16 | brawcap_packet_size_t |
Type for handling the number of payload bytes per packet. | |
typedef struct _brawcap_packet | brawcap_packet_t |
bRAWcap packet object. | |
typedef UINT32 | brawcap_buffer_packet_count_t |
Type for handling the number of packets which can be stored in a packet buffer. | |
typedef struct _brawcap_buffer | brawcap_buffer_t |
bRAWcap packet buffer object. | |
typedef struct _brawcap_buffer_iterator | brawcap_buffer_iterator_t |
bRAWcap packet buffer iterator object. | |
typedef UINT8 | brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH] |
Fixed size array for storing a filter byte mask. | |
typedef UINT8 | brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH] |
Fixed size array for storing a byte wise bitfield. | |
typedef brawcap_packet_size_t | brawcap_filter_byte_length_t |
Type for specifying the byte filter length. | |
typedef struct _brawcap_filter | brawcap_filter_t |
bRAWcap filter object. | |
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. | |
bRAWcap API - Shared types.
The file includes all (data)types and defines used for bRAWcap (kernel and user space).
All rights exclusively reserved for b-plus GmbH, unless expressly otherwise agreed.
Redistribution in source or any other form, with or without modification, is not permitted.
You may use this code under the according license terms of b-plus. Please contact b-plus at servi.nosp@m.ces@.nosp@m.b-plu.nosp@m.s.co.nosp@m.m to get the appropriate terms and conditions.