diff --git a/sdk/c/doc/html/2_bplus_generic_extensions.css b/sdk/c/doc/html/2_bplus_generic_extensions.css index fa27149..1760c23 100644 --- a/sdk/c/doc/html/2_bplus_generic_extensions.css +++ b/sdk/c/doc/html/2_bplus_generic_extensions.css @@ -192,6 +192,13 @@ html { } } +@media screen and (min-width: 1000px) { + #doc-content > div > div.contents, + .PageDoc > div.contents { + display: block; + } +} + @media (prefers-color-scheme: dark) { html:not(.light-mode) { color-scheme: dark; diff --git a/sdk/c/doc/html/a00002.html b/sdk/c/doc/html/a00002.html new file mode 100644 index 0000000..e845611 --- /dev/null +++ b/sdk/c/doc/html/a00002.html @@ -0,0 +1,130 @@ + + + +
+ + + + ++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap main header. +More...
+#include "brawcap/brawcap.h"
Go to the source code of this file.
+bRAWcap main header.
+This should be included by any project which want to make use of bRAWcap. It will handle the includes of all further required headers.
+All rights exclusively reserved for b-plus technologies 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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates the usage of the adapter handling module. +More...
+bRAWcap Example - Demonstrates the usage of the adapter handling module.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates the usage of the adapter handling module. +More...
+bRAWcap Example - Demonstrates the usage of the adapter handling module.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates the usage of the generic bRAWcap functions. +More...
+bRAWcap Example - Demonstrates the usage of the generic bRAWcap functions.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates how to use the bRAWcap version. +More...
+bRAWcap Example - Demonstrates how to use the bRAWcap version.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets. +More...
+bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates how to throw away specific received packets. +More...
+bRAWcap Example - Demonstrates how to throw away specific received packets.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers. +More...
+bRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes. +More...
+bRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes.
+It shows how to:
This example makes use of C only.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - TODO: +More...
+#include "libbrawcap.h"
bRAWcap Example - TODO:
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap Example - TODO: +More...
+#include "libbrawcap.h"
bRAWcap Example - TODO:
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap API - Functions. +More...
+#include "brawcap_types_um.h"
Go to the source code of this file.
++Functions | |
brawcap_status_t | brawcap_log_level_set (const brawcap_log_type_t type, const brawcap_log_level_t level, const char *pKey) |
Sets the current log level for the given log type to the specified log level. | |
brawcap_status_t | brawcap_log_levels_set (const UINT32 type, const UINT32 level, const char *pKey) |
Sets the current log levels for the given log types to the specified log levels. | |
brawcap_status_t | brawcap_log_level_get (const brawcap_log_type_t type, brawcap_log_level_t *const pLevel) |
Reads the level(s) for the given log type. | |
brawcap_status_t | brawcap_open (const brawcap_adapter_name_t name, brawcap_handle_t **const pHandle) |
Opens a new bRAWcap handle on the adapter, specified by it´s name. | |
brawcap_status_t | brawcap_close (brawcap_handle_t *pHandle) |
Closes the specified bRAWcap handle. | |
brawcap_status_t | brawcap_last_status () |
Reads the last status appeared in bRAWcap, for the calling thread. | |
brawcap_status_t | brawcap_version_api (brawcap_version_t *const pVersion) |
Returns loaded bRAWcap library version. | |
brawcap_status_t | brawcap_version_driver (brawcap_handle_t *const pHandle, brawcap_version_t *const pVersion) |
Reads current version of loaded bRAWcap driver. | |
brawcap_status_t | brawcap_timestamp_mode_get (brawcap_timestamp_t *const pTimestamp, brawcap_timestamp_mode_t *const pMode) |
Reads out the mode of the specified timestamp. | |
brawcap_status_t | brawcap_timestamp_resolution_ns_get (brawcap_timestamp_t *const pTimestamp, brawcap_timestamp_resolution_ns_t *const pResolution_ns) |
Reads out the timestamp resolution of the specified timestamp. | |
brawcap_status_t | brawcap_timestamp_value_ns_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pNanoseconds) |
Reads out the timestamp value in seconds and nanoseconds. | |
brawcap_status_t | brawcap_timestamp_value_ns_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 nanoseconds) |
Sets the timestamp value in seconds and nanoseconds. | |
brawcap_status_t | brawcap_timestamp_value_us_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pMicroseconds) |
Reads out the timestamp value in seconds and microseconds. | |
brawcap_status_t | brawcap_timestamp_value_us_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 microseconds) |
Sets the timestamp value in seconds and microseconds. | |
brawcap_status_t | brawcap_timestamp_value_ms_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pMilliseconds) |
Reads out the timestamp value in seconds and milliseconds. | |
brawcap_status_t | brawcap_timestamp_value_ms_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 milliseconds) |
Sets the timestamp value in seconds and milliseconds. | |
brawcap_status_t | brawcap_packet_create (brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize) |
Creates a new packet. | |
brawcap_status_t | brawcap_packet_free (brawcap_packet_t *pPacket) |
Frees the specified packet. When this function is called the specified packet becomes invalid and it´s memory is released. | |
brawcap_status_t | brawcap_packet_status_get (brawcap_packet_t *const pPacket, brawcap_status_t *const pStatus) |
Reads out the status for the specified packet. The status will be set updated during reception/transmission. It indicates the status of the packet depending on the operation. | |
brawcap_status_t | brawcap_packet_timestamp_get (brawcap_packet_t *const pPacket, brawcap_timestamp_t **const pTimestamp) |
Reads out the timestamp object for the specified packet. | |
brawcap_status_t | brawcap_packet_length_on_wire_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pLengthOnWire) |
Reads out the length on wire of the specified packet. This value is especially useful for received packets. It indicates the total packet payload byte size of the packet on wire. This may not equal to the captured payload byte size. Because the payload byte size depends on the configured filter and it´s bytes to capture parameters. | |
brawcap_status_t | brawcap_packet_payload_max_size_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pMaxPayloadSize) |
Reads out the max supported payload byte size of the specified packet. This value was set during packet creation (or buffer creation if it´s a buffered packet). | |
brawcap_status_t | brawcap_packet_payload_size_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pLength) |
Reads out the captured payload byte size of the specified packet. This indicates the total byte size of the (captured - if received) packet payload. | |
brawcap_status_t | brawcap_packet_payload_get (brawcap_packet_t *const pPacket, const char **const pPayload, brawcap_packet_size_t *const pLength) |
Reads out the payload of the specified packet. | |
brawcap_status_t | brawcap_packet_payload_set (brawcap_packet_t *const pPacket, const char *const pPayload, const brawcap_packet_size_t length) |
Sets the packet payload of the specified packet. | |
brawcap_status_t | brawcap_buffer_create (brawcap_buffer_t **const pBuffer, const brawcap_packet_size_t maxPacketPayloadSize, const brawcap_buffer_packet_count_t numPackets) |
Creates a new packet buffer. | |
brawcap_status_t | brawcap_buffer_free (brawcap_buffer_t *pBuffer) |
Frees the specified packet buffer. When this function is called the specified packet buffer becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_buffer_clear (brawcap_buffer_t *const pBuffer) |
Clears the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_back (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket) |
Adds the specified packet at the end of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_front (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket) |
Adds the specified packet at the front of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_at_index (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket, const brawcap_buffer_packet_count_t index) |
Inserts the specified packet at index/position into the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_at_index (brawcap_buffer_t *const pBuffer, const brawcap_buffer_packet_count_t index, brawcap_packet_t **const pPacket) |
Reads out a buffered packet at the index of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_front (brawcap_buffer_t *const pBuffer, brawcap_packet_t **const pPacket) |
Reads out the first buffered packet of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_back (brawcap_buffer_t *const pBuffer, brawcap_packet_t **const pPacket) |
Reads out the last buffered packet of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_count (brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t *const pPacketCount) |
Reads out the number of currently buffered packets in the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_capacity (brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t *const pPacketCapacity) |
Reads out the total number of packets which can be buffered by the specified packet buffer. This value represents the packet buffer capacity, which is set during buffer creation. | |
brawcap_status_t | brawcap_buffer_iterator_create (brawcap_buffer_iterator_t **const pIterator, brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t startPosition) |
Creates a new iterator for the specified buffer. | |
brawcap_status_t | brawcap_buffer_iterator_free (brawcap_buffer_iterator_t *const pIterator) |
Frees the specified iterator. When this function is called the specified iterator becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_buffer_iterator_next (brawcap_buffer_iterator_t *const pIterator) |
Increments the iterator to the next buffered packet. | |
brawcap_status_t | brawcap_buffer_iterator_prev (brawcap_buffer_iterator_t *const pIterator) |
Decreases the iterator to the previous buffered packet. | |
brawcap_packet_t * | brawcap_buffer_iterator_eval (brawcap_buffer_iterator_t *const pIterator) |
Returns the buffered packet for the specified iterator. | |
brawcap_status_t | brawcap_adapter_list_update () |
Updates the list of supported adapters. This function searches the current machine for supported adapters and add them to the adapter list. | |
brawcap_status_t | brawcap_adapter_list_count (brawcap_adapter_count_t *const pCount) |
Reads out the current number of supported adapters in the adapter list. | |
brawcap_status_t | brawcap_adapter_list_at (const brawcap_adapter_count_t index, brawcap_adapter_name_t name) |
Reads out the adapter name of the adapter at the adapter list index. | |
brawcap_status_t | brawcap_adapter_notify_register (brawcap_adapter_notify_callback_t const callback, void *const pUser) |
Registers the calling process for receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_unregister () |
Unregisters the calling process from receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_handle_register (brawcap_handle_t *const pHandle, brawcap_adapter_notify_handle_callback_t const callback, void *const pUser) |
Registers the specified handle for receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_handle_unregister (brawcap_handle_t *const pHandle) |
Unregisters the specified handle from receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_name_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_name_t name) |
Reads out the adapter name of the specified adapter. | |
brawcap_status_t | brawcap_adapter_friendly_name (const brawcap_adapter_name_t name, char *const friendlyName, UINT32 *const pLength) |
Reads out the currently set adapter friendly name for the specified adapter. | |
brawcap_status_t | brawcap_adapter_friendly_name_by_handle (brawcap_handle_t *const pHandle, char *const friendlyName, UINT32 *const pLength) |
Reads out the currently set friendly name of the specified adapter. | |
brawcap_status_t | brawcap_adapter_description (const brawcap_adapter_name_t name, char *const description, UINT32 *const pLength) |
Reads out the description of the specified adapter. | |
brawcap_status_t | brawcap_adapter_description_by_handle (brawcap_handle_t *const pHandle, char *const description, UINT32 *const pLength) |
Reads out the description of a network adapter based on the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv4 (const brawcap_adapter_name_t name, brawcap_adapter_ipv4_t *const pIpv4) |
Reads out the currently set IPv4 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv4_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_ipv4_t *const pIpv4) |
Reads out the currently set IPv4 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv6 (const brawcap_adapter_name_t name, brawcap_adapter_ipv6_t *const pIpv6) |
Reads out the currently set IPv6 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv6_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_ipv6_t *const pIpv6) |
Reads out the currently set IPv6 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mac (const brawcap_adapter_name_t name, brawcap_adapter_mac_t mac) |
Reads out the MAC address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mac_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_mac_t mac) |
Reads out the MAC address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_rx (const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current receive speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_rx_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current receive speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_tx (const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current transmit speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_tx_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current transmit speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_connection (const brawcap_adapter_name_t name, brawcap_adapter_connection_state_t *const pConnection) |
Reads out the current connection state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_connection_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_connection_state_t *const pConnection) |
Reads out the current connection state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_operation (const brawcap_adapter_name_t name, brawcap_adapter_operation_state_t *const pOperation) |
Reads out the current operation state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_operation_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_operation_state_t *const pOperation) |
Reads out the current operation state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mtu (const brawcap_adapter_name_t name, brawcap_adapter_mtu_t *const pMtu) |
Reads out the configured MTU of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mtu_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_mtu_t *const pMtu) |
Reads out the configured MTU of the specified adapter. | |
brawcap_status_t | brawcap_filter_create (brawcap_filter_t **const pFilter, const brawcap_filter_type_t type) |
Creates a new filter. | |
brawcap_status_t | brawcap_filter_free (brawcap_filter_t *pFilter) |
Frees the specified filter. When this function is called the given filter becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_filter_type_get (brawcap_filter_t *const pFilter, brawcap_filter_type_t *const pType) |
Reads out the type for the specified filter. | |
brawcap_status_t | brawcap_filter_mask_set (brawcap_filter_t *const pFilter, const brawcap_filter_byte_length_t offset, const brawcap_filter_byte_length_t length, const brawcap_filter_mask_array_t mask, const brawcap_filter_ignore_bits_array_t ignoreBits) |
Sets the filter parameters for the specified filter. | |
brawcap_status_t | brawcap_filter_mask_get (brawcap_filter_t *const pFilter, brawcap_filter_byte_length_t *const pOffset, brawcap_filter_byte_length_t *const pLength, brawcap_filter_mask_array_t *const pMask, brawcap_filter_ignore_bits_array_t *const pIgnoreBits) |
Reads out the filter mask parameters for the specified filter. | |
brawcap_status_t | brawcap_filter_activate (brawcap_filter_t *const pFilter) |
Sets the specified filter to active. | |
brawcap_status_t | brawcap_filter_deactivate (brawcap_filter_t *const pFilter) |
Sets the specified filter to inactive. | |
brawcap_status_t | brawcap_filter_is_activated (brawcap_filter_t *const pFilter, BOOLEAN *const pActive) |
Reads out the current activation state of the specified filter. | |
brawcap_status_t | brawcap_filter_bytes_to_capture_set (brawcap_filter_t *const pFilter, const brawcap_packet_size_t offset, const brawcap_packet_size_t length) |
Sets the bytes to capture of the specified filter. | |
brawcap_status_t | brawcap_filter_bytes_to_capture_get (brawcap_filter_t *const pFilter, brawcap_packet_size_t *const pOffset, brawcap_packet_size_t *const pLength) |
Reads out the configured bytes to capture of the specified filter. | |
brawcap_status_t | brawcap_filter_indicate_set (brawcap_filter_t *const pFilter, const BOOLEAN indicate) |
Specifies if packets which matched the specified filter should be indicated to the network stack. | |
brawcap_status_t | brawcap_filter_indicate_get (brawcap_filter_t *const pFilter, BOOLEAN *const pIndicate) |
Reads out the current network stack indication state of the specified filter. | |
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. | |
brawcap_status_t | brawcap_tx_packet (brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket) |
Transmits a single packet on the specified handle. | |
brawcap_status_t | brawcap_tx_start (brawcap_handle_t *const pHandle, brawcap_tx_callback_t const callback, void *pUser) |
Starts the internal transmit loop. | |
brawcap_status_t | brawcap_tx_stop (brawcap_handle_t *const pHandle) |
Stops the internal transmit loop. | |
brawcap_status_t | brawcap_tx_buffer_send (brawcap_handle_t *const pHandle, brawcap_buffer_t *const pBuffer, const BOOLEAN synchronized) |
Pushes the specified buffer to the specified handle transmit queue. | |
brawcap_status_t | brawcap_tx_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_tx_driver_queue_size_get (brawcap_handle_t *const pHandle, brawcap_queue_size_t *const pSize) |
Reads out the currently configured driver transmit queue size for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_capabilities (brawcap_handle_t *const pHandle, brawcap_timestamp_capabilities_t *const pCapabilities) |
Reads out the available transmit timestamp modes for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_mode_set (brawcap_handle_t *const pHandle, const brawcap_timestamp_mode_t mode) |
Configures the used transmit time stamping mode for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_mode_get (brawcap_handle_t *const pHandle, brawcap_timestamp_mode_t *const pMode) |
Reads out the currently configured transmit time stamping mode for the specified handle. | |
brawcap_status_t | brawcap_stats_rx (brawcap_handle_t *const pHandle, brawcap_stats_rx_t *const pStats) |
Reads out the available receive statistic counters for the specified handle. | |
brawcap_status_t | brawcap_stats_tx (brawcap_handle_t *const pHandle, brawcap_stats_tx_t *const pStats) |
Reads out the available transmit statistic counters for the specified handle. | |
bRAWcap API - Functions.
+This file contains generic parts of the API and includes all specific bRAWcap parts.
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
+ |
+ 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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap API - User mode types. +More...
+#include "brawcap_types_shared.h"
Go to the source code of this file.
++Data Structures | |
union | brawcap_adapter_ipv4_t |
IPv4 address. More... | |
union | brawcap_adapter_ipv6_t |
IPv6 address. More... | |
+Macros | |
+#define | _BRAWCAP_API_FUNC(returnType) __declspec(dllimport) returnType __cdecl |
Dynamic/automatic function import for loading/including. | |
+#define | BRAWCAP_ADAPTER_MAC_LENGTH 6 |
Required number of bytes for describing a MAC address. The defined length does not containing any delimiters, it represents the number of MAC address digits. | |
#define | BRAWCAP_ADAPTER_NAME_LENGTH 40 |
The max supported length for an adapter name. | |
#define | BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX 2 |
Max number of supported packet (receive) buffers per bRAWcap handle. | |
+Typedefs | |
typedef struct _brawcap_handle | brawcap_handle_t |
A bRAWcap handle. | |
+typedef UINT8 | brawcap_adapter_count_t |
Type used for counting the available/supported adapters on a machine. | |
typedef UINT8 | brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH] |
Fixed size array describing a MAC address. | |
typedef char | brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH] |
Fixed size array containing a adapter name. | |
typedef UINT64 | brawcap_adapter_mtu_t |
Type for handling the adapter maximum transmission unit (MTU). | |
typedef void(* | brawcap_adapter_notify_callback_t) (const brawcap_adapter_name_t name, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) |
The general callback for adapter change notifications. It will be called each time a available and supported adapter change is detected. | |
typedef void(* | brawcap_adapter_notify_handle_callback_t) (brawcap_handle_t *const pHandle, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) |
The per handle callback for adapter change notifications. It will be called each time a change for the handle underlying adapter (and only for this adapter) is detected. | |
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. | |
typedef void(* | brawcap_tx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser) |
Transmit callback which is called each time a transmission initiated with brawcap_tx_buffer_send has finished. | |
bRAWcap API - User mode types.
+The file includes all (data)types and defines used for bRAWcap (user space only).
+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.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Contains generic types and functions of bRAWcap. +More...
++Macros | |
#define | BRAWCAP_HANDLES_PER_ADAPTER_MAX 5 |
Specifies the maximum supported bRAWcap handles per adapter. | |
+Typedefs | |
typedef UINT32 | brawcap_queue_size_t |
The number of packets which can be (temporary) buffered by the bRAWcap driver queue. | |
typedef struct _brawcap_handle | brawcap_handle_t |
A bRAWcap handle. | |
+Functions | |
brawcap_status_t | brawcap_open (const brawcap_adapter_name_t name, brawcap_handle_t **const pHandle) |
Opens a new bRAWcap handle on the adapter, specified by it´s name. | |
brawcap_status_t | brawcap_close (brawcap_handle_t *pHandle) |
Closes the specified bRAWcap handle. | |
Contains generic types and functions of bRAWcap.
+Everything in here is not part of any specific module, instead those types and functions are relevant for many other modules. It contains for example functions to open/create and close a bRAWcap handle.
+List of examples:
+#define BRAWCAP_HANDLES_PER_ADAPTER_MAX 5 | +
#include <brawcap_types_shared.h>
Specifies the maximum supported bRAWcap handles per adapter.
+typedef UINT32 brawcap_queue_size_t | +
#include <brawcap_types_shared.h>
The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
+The total number of packets which can be buffered by the driver queue is limited to:
typedef struct _brawcap_handle brawcap_handle_t | +
#include <brawcap_types_um.h>
A bRAWcap handle.
+It can be created/opened and deleted/closed. In general every function which communicates with the bRAWcap driver requires a open bRAWcap handle.
+brawcap_status_t brawcap_open | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_handle_t **const | +pHandle | +
+ | ) | ++ |
#include <brawcap.h>
Opens a new bRAWcap handle on the adapter, specified by it´s name.
+The created/opened bRAWcap handle should be saved by the user application and used for calling further bRAWcap functions. Each opened handle shall be closed, if it is not required anymore.
+[in] | name | The name of the adapter to open a bRAWcap handle. |
[out] | pHandle | Will contain the opened bRAWcap handle, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified name does not represent a adapter name (GUID). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Specified adapter name not found/not available. |
BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not running on specified adapter. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_close | +( | +brawcap_handle_t * | +pHandle | ) | ++ |
#include <brawcap.h>
Closes the specified bRAWcap handle.
+The user application should not use the specified handle anymore, after calling this function.
+[in] | pHandle | bRAWcap handle to be closed. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_FAILED | A system error occurred. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Contains all status/return codes of bRAWcap. +More...
++Functions | |
brawcap_status_t | brawcap_last_status () |
Reads the last status appeared in bRAWcap, for the calling thread. | |
Contains all status/return codes of bRAWcap.
+If a bRAWcap function completed successfully and with no additional information it will indicate BRAWCAP_STATUS_SUCCESS.
+If an error occurs the status code will always be negative.
+A status which indicates a warning, will always have a positive value (range 1 to 1999).
+While a status with additional information is always represented by high positive value (range 2000 to 4000).
+It is also possible to request the last "non successful" status for the current thread again with brawcap_last_status. This function works similar to the one defined by the Windows API (GetLastError()).
+enum brawcap_status_t | +
#include <brawcap_types_shared.h>
bRAWcap status/return codes.
+Each status is defined with a descriptive name, which indicates it´s reason. To check for the status code type use one of the defined macros:
Enumerator | |
---|---|
BRAWCAP_STATUS_SUCCESS | Executed successfully, with no additional information. + |
BRAWCAP_STATUS_ERROR_FAILED | Detected a - not further specified - failure. +This shouldn´t happen at all and mostly indicates a issue in OS abstraction. If it happens in a specific situation, please check the system resources (CPU load, memory usage...). If the issue can not be located, feel free to contact our support. + |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Function is not available. +This may be returned due to several conditions:
|
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one specified pointer parameter was invalid. +This is a caller issue. Please check the provided pointers to solve this issue. + |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | At least one parameter content is invalid. +This is a caller issue. Please check the provided parameters and their contents to solve this issue. + |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | At least one parameter is out of bounds. +This is a caller issue. Please check if the provided parameters fit to the given parameter limitations. + |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Given parameter not found. +This is in general a caller issue. For example it can occur if the function expects a local adapter name and the provided name did not match any of the currently available adapters. + |
BRAWCAP_STATUS_ERROR_IN_USE | Indicates that operation failed because the provided object is still in use. +This may happen if another thread uses the same object or another operation for the object is still outstanding. + |
BRAWCAP_STATUS_ERROR_BEYOND_MTU | The packet size is beyond adapter MTU. +This status is especially for transmitted packets. It will be applied if the packet could not be transmitted because it´s length is beyond the configured adapter MTU. + |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communication with the driver failed. +This indicates an error between library and driver communication. +To fix such issues, make sure that the loaded library version matches with the driver version. +In general it is not allowed to mix up library and driver versions. Applications shall always use the deployed bRAWcap library from the system and not deploy it´s own copy of it. +If driver and library version matches and this error still occurs, please contact our support. + |
BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap is not activated (on a specific adapter). +This will be returned if bRAWcap driver is not available (anymore) for the specified bRAWcap handle. For example if the driver was deactivated meanwhile. + |
BRAWCAP_STATUS_ERROR_OVERRUN | A buffer overrun was detected. +This is the case if:
|
BRAWCAP_STATUS_WARNING_DEMO_MODE | The operation was not executed due to demo mode limitations. +This should only be returned if there is no valid license for the requested feature. For more information about demo limitation see chapter Demo Mode in the manual. + |
BRAWCAP_STATUS_WARNING_PENDING | Will be returned if another operation for the same resource is pending. +This could be the case for functions which will initiate a receive/transmit while another receive/transmit is already pending on the specified handle. In general it is not allowed to use receive/transmits in parallel on the same handle. For example if a receive is started, brawcap_rx_packet cannot be used until the receive is stopped. Same applies to transmissions. + |
BRAWCAP_STATUS_WARNING_LIMIT_REACHED | Indicates that a bRAWcap limitation is reached. +This could be the case if there are already max supported number of handles to the same adapter and the caller tries to open another one. + |
BRAWCAP_STATUS_WARNING_CANCELED | Indicates that a operation was canceled. +For example if a packet transmission was initiated and it is somehow canceled. This could be the case due to bRAWcap driver deactivation. If so this status will be applied for each packet which was canceled (not transmitted). + |
BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED | Indicates that not all of the specified content/payload was processed. +It will be returned for example if not all packets of a bRAWcap packet buffer was transmitted. If so the user should check the status of each packet inside the buffer for further information. + |
BRAWCAP_STATUS_WARNING_NO_UPLINK | Indicates that there is currently no uplink on the given adapter. +It will be returned if the user tries to send packets to a adapter which has currently no uplink. + |
BRAWCAP_STATUS_INFO_NOT_RUNNING | No operation running. +This will be returned if the user tries to stop something which is currently not running. For example when trying to stop receiving while it is not running. + |
BRAWCAP_STATUS_INFO_NOT_ATTACHED | Indicates that the given object is not attached. +Will be returned for example if the user tries to detach a packet buffer which is currently not attached to a handle. + |
BRAWCAP_STATUS_INFO_NOT_REGISTERED | Indicates that the given object is not registered. +Will be returned if user tries to unregister from a bRAWcap notification which was not registered before. + |
BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Indicates that the given object was already registered. +Will be returned if user tries to register for something again which is already registered. + |
BRAWCAP_STATUS_INFO_NO_DATA | Indicates that a function returns without any data. +This could be the case if a receive function returns without any received packet. For example if the configured receive timeout is reached. + |
BRAWCAP_STATUS_INFO_TIMEOUT | Indicates that a function returned because of a timeout. +This could be the case if a function has not finished it´s processing until a configured timeout is reached. + |
brawcap_status_t brawcap_last_status | +( | +) | ++ |
#include <brawcap.h>
Reads the last status appeared in bRAWcap, for the calling thread.
+The last status is only updated if it does not equal BRAWCAP_STATUS_SUCCESS. Which means that this function shall never be used to check if a bRAWcap function succeeded. Instead this should always be checked on each bRAWcap function return value directly and only if something different than BRAWCAP_STATUS_SUCCESS is returned, this function can be used to get the last status again.
+The last status may be overwritten when the calling thread calls another bRAWcap function. It is therefore recommended to call this function directly after a bRAWcap function to get the status of that function again.
+Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | If no other status than success happened for the calling thread. |
Any of brawcap_status_t | Please see return of last called function for detailed info. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for operating with bRAWcap version(s). +More...
++Data Structures | |
struct | brawcap_version_fragments_t |
Struct containing the separated version parts. More... | |
union | brawcap_version_t |
bRAWcap version. More... | |
+Functions | |
brawcap_status_t | brawcap_version_api (brawcap_version_t *const pVersion) |
Returns loaded bRAWcap library version. | |
brawcap_status_t | brawcap_version_driver (brawcap_handle_t *const pHandle, brawcap_version_t *const pVersion) |
Reads current version of loaded bRAWcap driver. | |
Types and functions for operating with bRAWcap version(s).
+Here our bRAWcap version structure is defined. This structure allows easy access to each part of the version and due to it´s union the complete value can be used for easy version compares.
+There are currently two functions to retrieve a version. One for the version of the loaded library and another one for the version of the loaded bRAWcap driver on the machine.
+List of examples:
+struct brawcap_version_fragments_t | +
Struct containing the separated version parts.
+union brawcap_version_t | +
bRAWcap version.
+The version is implemented as a union. The complete member allows easy compare between versions. While the fragments allow easy access to each version part (major, minor, patch, build).
+Data Fields | ||
---|---|---|
+brawcap_version_fragments_t | ++fragments | +
+ Separated parts of the version. + |
+UINT64 | ++complete | +
+ Complete version as integer. Use this for comparing versions. + |
brawcap_status_t brawcap_version_api | +( | +brawcap_version_t *const | +pVersion | ) | ++ |
#include <brawcap.h>
Returns loaded bRAWcap library version.
+[out] | pVersion | Will contain the loaded library version, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_version_driver | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_version_t *const | +pVersion | +
+ | ) | ++ |
#include <brawcap.h>
Reads current version of loaded bRAWcap driver.
+[in] | pHandle | bRAWcap handle to read from. |
[out] | pVersion | Will contain the bRAWcap driver version, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for operating with bRAWcap timestamps. +More...
++Macros | |
+#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. | |
+Typedefs | |
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. | |
+Enumerations | |
enum | brawcap_timestamp_mode_t { + BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP = 0x00 +, + BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC = 0x01 +, + BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC = 0x02 +, + BRAWCAP_TIMESTAMP_MODE_SOFTWARE = 0x04 +, + BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM = 0x08 +, + BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE = 0x10 +, + BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE = 0x20 + + } |
List of different timestamp modes. More... | |
+Functions | |
brawcap_status_t | brawcap_timestamp_mode_get (brawcap_timestamp_t *const pTimestamp, brawcap_timestamp_mode_t *const pMode) |
Reads out the mode of the specified timestamp. | |
brawcap_status_t | brawcap_timestamp_resolution_ns_get (brawcap_timestamp_t *const pTimestamp, brawcap_timestamp_resolution_ns_t *const pResolution_ns) |
Reads out the timestamp resolution of the specified timestamp. | |
brawcap_status_t | brawcap_timestamp_value_ns_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pNanoseconds) |
Reads out the timestamp value in seconds and nanoseconds. | |
brawcap_status_t | brawcap_timestamp_value_ns_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 nanoseconds) |
Sets the timestamp value in seconds and nanoseconds. | |
brawcap_status_t | brawcap_timestamp_value_us_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pMicroseconds) |
Reads out the timestamp value in seconds and microseconds. | |
brawcap_status_t | brawcap_timestamp_value_us_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 microseconds) |
Sets the timestamp value in seconds and microseconds. | |
brawcap_status_t | brawcap_timestamp_value_ms_get (brawcap_timestamp_t *const pTimestamp, UINT64 *const pSeconds, UINT32 *const pMilliseconds) |
Reads out the timestamp value in seconds and milliseconds. | |
brawcap_status_t | brawcap_timestamp_value_ms_set (brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 milliseconds) |
Sets the timestamp value in seconds and milliseconds. | |
Types and functions for operating with bRAWcap timestamps.
+At the moment it is not possible to create a standalone timestamp object. Instead a timestamp is always part of a packet. To get the timestamp object use brawcap_packet_timestamp_get on a specific packet. This object can be used than for all functions in this module.
+List of examples:
+#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN 0 | +
#include <brawcap_types_shared.h>
If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved.
+For example this can be the case for adapter hardware timestamps, if the adapter does not report it´s clock frequency.
+typedef UINT32 brawcap_timestamp_capabilities_t | +
#include <brawcap_types_shared.h>
Type used for indicating the supported timestamp modes.
+It has to be interpreted as bitfield.
+ +typedef UINT32 brawcap_timestamp_resolution_ns_t | +
#include <brawcap_types_shared.h>
Represents the timestamp resolution in nanoseconds.
+The resolution can be used to check how accurate a timestamp is. For example if it is set to 1.000.000 ns the timestamp has a accuracy of "only" one millisecond. If it is set to 1 ns instead, it would indicate a very precise timestamp with a resolution of one nanosecond.
+ +typedef struct _brawcap_timestamp brawcap_timestamp_t | +
#include <brawcap_types_shared.h>
bRAWcap timestamp object.
+The timestamp object is part of each packet and has to be used for each timestamp module function. To get a timestamp object from a packet use brawcap_packet_timestamp_get.
+ +enum brawcap_timestamp_mode_t | +
#include <brawcap_types_shared.h>
List of different timestamp modes.
+The mode of a timestamp can be used to check when the timestamp is generated (time of trigger). It can also indicate how accurate a timestamp is.
+Description for the different timestamp types:
brawcap_status_t brawcap_timestamp_mode_get | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | brawcap_timestamp_mode_t *const | +pMode | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the mode of the specified timestamp.
+[in] | pTimestamp | The timestamp to read from. |
[out] | pMode | Will contain the timestamp mode, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_timestamp_resolution_ns_get | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | brawcap_timestamp_resolution_ns_t *const | +pResolution_ns | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the timestamp resolution of the specified timestamp.
+[in] | pTimestamp | The timestamp to read from. |
[out] | pResolution_ns | Will contain the timestamp resolution in nanoseconds, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_timestamp_value_ns_get | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | UINT64 *const | +pSeconds, | +
+ | + | UINT32 *const | +pNanoseconds | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the timestamp value in seconds and nanoseconds.
+The values are based on 00:00 01.01.1970.
+The seconds part contains only whole seconds of the timestamp, while the nanoseconds part contains only the fractional part.
+[in] | pTimestamp | The timestamp to read from. |
[out] | pSeconds | Will contain the whole seconds of the timestamp, afterwards. |
[out] | pNanoseconds | Will contain the fractional part in nanoseconds, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_timestamp_value_ns_set | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | const UINT64 | +seconds, | +
+ | + | const UINT32 | +nanoseconds | +
+ | ) | ++ |
#include <brawcap.h>
Sets the timestamp value in seconds and nanoseconds.
+The values has to be based on 00:00 01.01.1970.
+[in] | pTimestamp | The timestamp to be modified. |
[in] | seconds | Whole seconds since 00:00 01.01.1970. |
[in] | nanoseconds | The fractional part in nanoseconds. This parameter should only contain the fractional timestamp part. That means that it can never exceed 999.999.999 nanoseconds. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second). |
brawcap_status_t brawcap_timestamp_value_us_get | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | UINT64 *const | +pSeconds, | +
+ | + | UINT32 *const | +pMicroseconds | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the timestamp value in seconds and microseconds.
+The values are based on 00:00 01.01.1970.
+The seconds part contains only whole seconds of the timestamp, while the microseconds contains only the fractional part.
+[in] | pTimestamp | The timestamp to read from. |
[out] | pSeconds | Will contain the whole seconds of the timestamp, afterwards. |
[out] | pMicroseconds | Will contain the fractional part in microseconds, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_timestamp_value_us_set | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | const UINT64 | +seconds, | +
+ | + | const UINT32 | +microseconds | +
+ | ) | ++ |
#include <brawcap.h>
Sets the timestamp value in seconds and microseconds.
+The values has to be based on 00:00 01.01.1970.
+[in] | pTimestamp | The timestamp to be modified. |
[in] | seconds | Whole seconds since 00:00 01.01.1970. |
[in] | microseconds | The fractional part in microseconds. This parameter should only contain the fractional timestamp part. That means that it can never exceed 999.999 microseconds. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second). |
brawcap_status_t brawcap_timestamp_value_ms_get | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | UINT64 *const | +pSeconds, | +
+ | + | UINT32 *const | +pMilliseconds | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the timestamp value in seconds and milliseconds.
+The values are based on 00:00 01.01.1970.
+The seconds part contains only whole seconds of the timestamp, while the milliseconds part contains only the fractional part.
+[in] | pTimestamp | The timestamp to read from. |
[out] | pSeconds | Will contain the whole seconds of the timestamp, afterwards. |
[out] | pMilliseconds | Will contain the fractional part in milliseconds, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_timestamp_value_ms_set | +( | +brawcap_timestamp_t *const | +pTimestamp, | +
+ | + | const UINT64 | +seconds, | +
+ | + | const UINT32 | +milliseconds | +
+ | ) | ++ |
#include <brawcap.h>
Sets the timestamp value in seconds and milliseconds.
+The values has to be based on 00:00 01.01.1970.
+[in] | pTimestamp | The timestamp to be modified. |
[in] | seconds | Whole seconds since 00:00 01.01.1970. |
[in] | milliseconds | The fractional part in milliseconds. This parameter should only contain the fractional timestamp part. That means that it can never exceed 999 milliseconds. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second). |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for operating with bRAWcap packets. +More...
++Macros | |
#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. | |
+Typedefs | |
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. | |
+Functions | |
brawcap_status_t | brawcap_packet_create (brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize) |
Creates a new packet. | |
brawcap_status_t | brawcap_packet_free (brawcap_packet_t *pPacket) |
Frees the specified packet. When this function is called the specified packet becomes invalid and it´s memory is released. | |
brawcap_status_t | brawcap_packet_status_get (brawcap_packet_t *const pPacket, brawcap_status_t *const pStatus) |
Reads out the status for the specified packet. The status will be set updated during reception/transmission. It indicates the status of the packet depending on the operation. | |
brawcap_status_t | brawcap_packet_timestamp_get (brawcap_packet_t *const pPacket, brawcap_timestamp_t **const pTimestamp) |
Reads out the timestamp object for the specified packet. | |
brawcap_status_t | brawcap_packet_length_on_wire_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pLengthOnWire) |
Reads out the length on wire of the specified packet. This value is especially useful for received packets. It indicates the total packet payload byte size of the packet on wire. This may not equal to the captured payload byte size. Because the payload byte size depends on the configured filter and it´s bytes to capture parameters. | |
brawcap_status_t | brawcap_packet_payload_max_size_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pMaxPayloadSize) |
Reads out the max supported payload byte size of the specified packet. This value was set during packet creation (or buffer creation if it´s a buffered packet). | |
brawcap_status_t | brawcap_packet_payload_size_get (brawcap_packet_t *const pPacket, brawcap_packet_size_t *const pLength) |
Reads out the captured payload byte size of the specified packet. This indicates the total byte size of the (captured - if received) packet payload. | |
brawcap_status_t | brawcap_packet_payload_get (brawcap_packet_t *const pPacket, const char **const pPayload, brawcap_packet_size_t *const pLength) |
Reads out the payload of the specified packet. | |
brawcap_status_t | brawcap_packet_payload_set (brawcap_packet_t *const pPacket, const char *const pPayload, const brawcap_packet_size_t length) |
Sets the packet payload of the specified packet. | |
Types and functions for operating with bRAWcap packets.
+To create a packet use brawcap_packet_create. If a packet is not required anymore it shall be deleted with brawcap_packet_free.
+List of examples:
+#define BRAWCAP_PACKET_SIZE_MAX 9018 | +
#include <brawcap_types_shared.h>
The maximum supported (byte) size for a single packet payload.
+This value corresponds to jumbo frame size (9000 Bytes) + Ethernet header (14 Bytes) + single VLAN header (4 Bytes).
+ + +#define BRAWCAP_PACKET_SIZE_MIN 14 | +
#include <brawcap_types_shared.h>
The minimum required (byte) size for a single packet payload.
+This corresponds to Ethernet header size.
+typedef UINT16 brawcap_packet_size_t | +
#include <brawcap_types_shared.h>
Type for handling the number of payload bytes per packet.
+Typically the packet payload size is set to the adapters max transmission unit (MTU) size + Ethernet header size and maybe a single VLAN header. Packet payload sizes have to be between BRAWCAP_PACKET_SIZE_MIN and BRAWCAP_PACKET_SIZE_MAX, values below/beyond are not accepted.
+ +typedef struct _brawcap_packet brawcap_packet_t | +
#include <brawcap_types_shared.h>
bRAWcap packet object.
+The packet object has to be used for each packet module function. Packet objects can be created and freed or retrieved from a packet buffer.
+ +brawcap_status_t brawcap_packet_create | +( | +brawcap_packet_t **const | +pPacket, | +
+ | + | const brawcap_packet_size_t | +maxSize | +
+ | ) | ++ |
#include <brawcap.h>
Creates a new packet.
+A packet can be used for receiving (single packet based) or transmitting (also single packet based).
+If a packet is not required anymore it should be freed.
+[out] | pPacket | Will contain the new created packet, afterwards. |
[in] | maxSize | The maximum supported byte size for the packet payload. This value cannot be changed after packet creation and determines how much memory is required for the packet. The packet can only contain payloads up to this value. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Packet payload byte size to low/high. |
BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory). |
brawcap_status_t brawcap_packet_free | +( | +brawcap_packet_t * | +pPacket | ) | ++ |
#include <brawcap.h>
Frees the specified packet. When this function is called the specified packet becomes invalid and it´s memory is released.
+[in] | pPacket | The packet to be freed. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_status_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | brawcap_status_t *const | +pStatus | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the status for the specified packet. The status will be set updated during reception/transmission. It indicates the status of the packet depending on the operation.
+[in] | pPacket | The packet to read from. |
[out] | pStatus | Will contain the packet status, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_timestamp_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | brawcap_timestamp_t **const | +pTimestamp | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the timestamp object for the specified packet.
+[in] | pPacket | The packet to read from. |
[out] | pTimestamp | Will contain the timestamp object of the packet, afterwards. This object can be used by the Timestamp module. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_length_on_wire_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | brawcap_packet_size_t *const | +pLengthOnWire | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the length on wire of the specified packet. This value is especially useful for received packets. It indicates the total packet payload byte size of the packet on wire. This may not equal to the captured payload byte size. Because the payload byte size depends on the configured filter and it´s bytes to capture parameters.
+[in] | pPacket | The packet to read from. |
[out] | pLengthOnWire | Will contain the payload byte length on wire, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_payload_max_size_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | brawcap_packet_size_t *const | +pMaxPayloadSize | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the max supported payload byte size of the specified packet. This value was set during packet creation (or buffer creation if it´s a buffered packet).
+[in] | pPacket | The packet to read from. |
[out] | pMaxPayloadSize | Will contain the max packet payload byte size, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_payload_size_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | brawcap_packet_size_t *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the captured payload byte size of the specified packet. This indicates the total byte size of the (captured - if received) packet payload.
+[in] | pPacket | The packet to read from. |
[out] | pLength | Will contain the captured payload byte size, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_payload_get | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | const char **const | +pPayload, | +
+ | + | brawcap_packet_size_t *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the payload of the specified packet.
+The function returns a pointer to the beginning of the packet payload.
+[in] | pPacket | The packet to read from. |
[out] | pPayload | Will contain a pointer to the beginning of the packet payload, afterwards. |
[out] | pLength | Will contain the total length of the packet payload, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_packet_payload_set | +( | +brawcap_packet_t *const | +pPacket, | +
+ | + | const char *const | +pPayload, | +
+ | + | const brawcap_packet_size_t | +length | +
+ | ) | ++ |
#include <brawcap.h>
Sets the packet payload of the specified packet.
+[in] | pPacket | The packet to be modified. |
[in] | pPayload | Pointer to the beginning of the payload to set. |
[in] | length | Total byte size of the payload to set. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified payload size exceeds the packet max payload size. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for operating with bRAWcap packet buffers. +More...
++Modules | |
Packet Buffer Iterator | |
bRAWcap packet buffer iterators. | |
+Typedefs | |
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. | |
+Functions | |
brawcap_status_t | brawcap_buffer_create (brawcap_buffer_t **const pBuffer, const brawcap_packet_size_t maxPacketPayloadSize, const brawcap_buffer_packet_count_t numPackets) |
Creates a new packet buffer. | |
brawcap_status_t | brawcap_buffer_free (brawcap_buffer_t *pBuffer) |
Frees the specified packet buffer. When this function is called the specified packet buffer becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_buffer_clear (brawcap_buffer_t *const pBuffer) |
Clears the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_back (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket) |
Adds the specified packet at the end of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_front (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket) |
Adds the specified packet at the front of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_add_at_index (brawcap_buffer_t *const pBuffer, const brawcap_packet_t *const pPacket, const brawcap_buffer_packet_count_t index) |
Inserts the specified packet at index/position into the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_at_index (brawcap_buffer_t *const pBuffer, const brawcap_buffer_packet_count_t index, brawcap_packet_t **const pPacket) |
Reads out a buffered packet at the index of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_front (brawcap_buffer_t *const pBuffer, brawcap_packet_t **const pPacket) |
Reads out the first buffered packet of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_back (brawcap_buffer_t *const pBuffer, brawcap_packet_t **const pPacket) |
Reads out the last buffered packet of the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_count (brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t *const pPacketCount) |
Reads out the number of currently buffered packets in the specified packet buffer. | |
brawcap_status_t | brawcap_buffer_capacity (brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t *const pPacketCapacity) |
Reads out the total number of packets which can be buffered by the specified packet buffer. This value represents the packet buffer capacity, which is set during buffer creation. | |
Types and functions for operating with bRAWcap packet buffers.
+To create a new packet buffer use brawcap_buffer_create. If a packet buffer is not required anymore it shall be deleted with brawcap_buffer_free.
+Packet buffers can be used for
A packet buffer can be accessed if:
List of examples:
+typedef UINT32 brawcap_buffer_packet_count_t | +
#include <brawcap_types_shared.h>
Type for handling the number of packets which can be stored in a packet buffer.
+The total amount of packets per packet buffer has to be between BRAWCAP_BUFFER_PACKETS_MIN - BRAWCAP_BUFFER_PACKETS_MAX.
+ +typedef struct _brawcap_buffer brawcap_buffer_t | +
#include <brawcap_types_shared.h>
bRAWcap packet buffer object.
+The packet buffer object has to be used for each packet buffer module function. Packet buffers can be created and freed.
+ +brawcap_status_t brawcap_buffer_create | +( | +brawcap_buffer_t **const | +pBuffer, | +
+ | + | const brawcap_packet_size_t | +maxPacketPayloadSize, | +
+ | + | const brawcap_buffer_packet_count_t | +numPackets | +
+ | ) | ++ |
#include <brawcap.h>
Creates a new packet buffer.
+The created buffer can be used for:
+If a buffer is not required anymore it shall be freed.
+[out] | pBuffer | Will contain the new created packet buffer, afterwards. |
[in] | maxPacketPayloadSize | Specifies the max payload byte size for each packet in the buffer. This cannot be changed after buffer creation and controls the memory size required for each packet in the buffer. When trying to set the packet payload of any buffered packet which exceeds this value, it will fail. The value has to be between BRAWCAP_PACKET_SIZE_MIN and BRAWCAP_PACKET_SIZE_MAX. |
[in] | numPackets | Specifies how many packets can be stored in the buffer. This value, together with the max packet payload size, will control the total amount of memory required for the packet buffer and cannot be changed after buffer creation. The value has to be between BRAWCAP_BUFFER_PACKETS_MIN and BRAWCAP_BUFFER_PACKETS_MAX. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified packet payload or number of packets is invalid. |
BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory). |
brawcap_status_t brawcap_buffer_free | +( | +brawcap_buffer_t * | +pBuffer | ) | ++ |
#include <brawcap.h>
Frees the specified packet buffer. When this function is called the specified packet buffer becomes invalid and it´s memory will be released.
+[in] | pBuffer | The packet buffer to be freed. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
brawcap_status_t brawcap_buffer_clear | +( | +brawcap_buffer_t *const | +pBuffer | ) | ++ |
#include <brawcap.h>
Clears the specified packet buffer.
+All buffered packets will be cleared. It may be used to reuse a already created packet buffer. For example this can be useful after transmission of the packet buffer has finished. Reusing a buffer improves performance and should be preferred instead of always creating and freeing packet buffers.
+[in] | pBuffer | The packet buffer to be cleared. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
brawcap_status_t brawcap_buffer_add_back | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | const brawcap_packet_t *const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Adds the specified packet at the end of the specified packet buffer.
+[in] | pBuffer | The packet buffer to be modified. |
[in] | pPacket | The packet to insert into the buffer. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer. |
brawcap_status_t brawcap_buffer_add_front | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | const brawcap_packet_t *const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Adds the specified packet at the front of the specified packet buffer.
+[in] | pBuffer | The packet buffer to be modified. |
[in] | pPacket | The packet to insert into the buffer. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer. |
brawcap_status_t brawcap_buffer_add_at_index | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | const brawcap_packet_t *const | +pPacket, | +
+ | + | const brawcap_buffer_packet_count_t | +index | +
+ | ) | ++ |
#include <brawcap.h>
Inserts the specified packet at index/position into the specified packet buffer.
+[in] | pBuffer | The packet buffer to be modified. |
[in] | pPacket | The packet to insert into the buffer. |
[in] | index | Index at which the packet should be inserted. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The given index is invalid (exceeds buffer). |
brawcap_status_t brawcap_buffer_at_index | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | const brawcap_buffer_packet_count_t | +index, | +
+ | + | brawcap_packet_t **const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Reads out a buffered packet at the index of the specified packet buffer.
+[in] | pBuffer | The packet buffer to read from. |
[in] | index | The index of the packet. |
[out] | pPacket | Will contain the buffered packet, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The given index is invalid (exceeds buffer). |
brawcap_status_t brawcap_buffer_front | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | brawcap_packet_t **const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the first buffered packet of the specified packet buffer.
+[in] | pBuffer | The packet buffer to read from. |
[out] | pPacket | Will contain the buffered packet, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
brawcap_status_t brawcap_buffer_back | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | brawcap_packet_t **const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the last buffered packet of the specified packet buffer.
+[in] | pBuffer | The packet buffer to read from. |
[out] | pPacket | Will contain the buffered packet, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
brawcap_status_t brawcap_buffer_count | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | brawcap_buffer_packet_count_t *const | +pPacketCount | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the number of currently buffered packets in the specified packet buffer.
+[in] | pBuffer | The packet buffer to read from. |
[out] | pPacketCount | Will contain the number of buffered packets, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
brawcap_status_t brawcap_buffer_capacity | +( | +brawcap_buffer_t *const | +pBuffer, | +
+ | + | brawcap_buffer_packet_count_t *const | +pPacketCapacity | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the total number of packets which can be buffered by the specified packet buffer. This value represents the packet buffer capacity, which is set during buffer creation.
+[in] | pBuffer | The packet buffer to read from. |
[out] | pPacketCapacity | Will contain the total number of packets which can be buffered, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
bRAWcap packet buffer iterators. +More...
++Typedefs | |
typedef struct _brawcap_buffer_iterator | brawcap_buffer_iterator_t |
bRAWcap packet buffer iterator object. | |
+Functions | |
brawcap_status_t | brawcap_buffer_iterator_create (brawcap_buffer_iterator_t **const pIterator, brawcap_buffer_t *const pBuffer, brawcap_buffer_packet_count_t startPosition) |
Creates a new iterator for the specified buffer. | |
brawcap_status_t | brawcap_buffer_iterator_free (brawcap_buffer_iterator_t *const pIterator) |
Frees the specified iterator. When this function is called the specified iterator becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_buffer_iterator_next (brawcap_buffer_iterator_t *const pIterator) |
Increments the iterator to the next buffered packet. | |
brawcap_status_t | brawcap_buffer_iterator_prev (brawcap_buffer_iterator_t *const pIterator) |
Decreases the iterator to the previous buffered packet. | |
brawcap_packet_t * | brawcap_buffer_iterator_eval (brawcap_buffer_iterator_t *const pIterator) |
Returns the buffered packet for the specified iterator. | |
bRAWcap packet buffer iterators.
+To create a new packet buffer iterator use brawcap_buffer_iterator_create. If a packet buffer iterator is not required anymore it shall be deleted with brawcap_buffer_iterator_free.
+List of examples:
+typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t | +
#include <brawcap_types_shared.h>
bRAWcap packet buffer iterator object.
+The packet buffer object has to be used for each packet buffer iterator module function. Packet buffer iterators can be created and freed.
+ +brawcap_status_t brawcap_buffer_iterator_create | +( | +brawcap_buffer_iterator_t **const | +pIterator, | +
+ | + | brawcap_buffer_t *const | +pBuffer, | +
+ | + | brawcap_buffer_packet_count_t | +startPosition | +
+ | ) | ++ |
#include <brawcap.h>
Creates a new iterator for the specified buffer.
+If a iterator is not required anymore it shall be freed.
+[out] | pIterator | Will contain the new created iterator. |
[in] | pBuffer | The buffer for which to create the iterator. |
[in] | startPosition | The start position of the iterator (packet buffer index/position). The specified position must be below the number of currently buffered packets, which can be resolved with brawcap_buffer_count. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit). |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | Start position exceeds number of buffered packets. |
BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory). |
brawcap_status_t brawcap_buffer_iterator_free | +( | +brawcap_buffer_iterator_t *const | +pIterator | ) | ++ |
#include <brawcap.h>
Frees the specified iterator. When this function is called the specified iterator becomes invalid and it´s memory will be released.
+[in] | pIterator | The iterator to be freed. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_buffer_iterator_next | +( | +brawcap_buffer_iterator_t *const | +pIterator | ) | ++ |
#include <brawcap.h>
Increments the iterator to the next buffered packet.
+[in] | pIterator | The iterator to be incremented. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_buffer_iterator_prev | +( | +brawcap_buffer_iterator_t *const | +pIterator | ) | ++ |
#include <brawcap.h>
Decreases the iterator to the previous buffered packet.
+[in] | pIterator | The iterator to be decremented. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_packet_t * brawcap_buffer_iterator_eval | +( | +brawcap_buffer_iterator_t *const | +pIterator | ) | ++ |
#include <brawcap.h>
Returns the buffered packet for the specified iterator.
+[in] | pIterator | The iterator to read from. |
Pointer | Description |
---|---|
brawcap_packet_t | On success a valid bRAWcap packet object pointer. |
NULL | Invalid iterator (e.g. beyond the last or first packet). |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for handling bRAWcap (Ethernet) adapters. +More...
++Data Structures | |
union | brawcap_adapter_ipv4_t |
IPv4 address. More... | |
union | brawcap_adapter_ipv6_t |
IPv6 address. More... | |
+Macros | |
+#define | BRAWCAP_ADAPTER_MAC_LENGTH 6 |
Required number of bytes for describing a MAC address. The defined length does not containing any delimiters, it represents the number of MAC address digits. | |
#define | BRAWCAP_ADAPTER_NAME_LENGTH 40 |
The max supported length for an adapter name. | |
+Typedefs | |
+typedef UINT8 | brawcap_adapter_count_t |
Type used for counting the available/supported adapters on a machine. | |
typedef UINT8 | brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH] |
Fixed size array describing a MAC address. | |
typedef char | brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH] |
Fixed size array containing a adapter name. | |
typedef UINT64 | brawcap_adapter_mtu_t |
Type for handling the adapter maximum transmission unit (MTU). | |
typedef void(* | brawcap_adapter_notify_callback_t) (const brawcap_adapter_name_t name, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) |
The general callback for adapter change notifications. It will be called each time a available and supported adapter change is detected. | |
typedef void(* | brawcap_adapter_notify_handle_callback_t) (brawcap_handle_t *const pHandle, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) |
The per handle callback for adapter change notifications. It will be called each time a change for the handle underlying adapter (and only for this adapter) is detected. | |
+Functions | |
brawcap_status_t | brawcap_adapter_list_update () |
Updates the list of supported adapters. This function searches the current machine for supported adapters and add them to the adapter list. | |
brawcap_status_t | brawcap_adapter_list_count (brawcap_adapter_count_t *const pCount) |
Reads out the current number of supported adapters in the adapter list. | |
brawcap_status_t | brawcap_adapter_list_at (const brawcap_adapter_count_t index, brawcap_adapter_name_t name) |
Reads out the adapter name of the adapter at the adapter list index. | |
brawcap_status_t | brawcap_adapter_notify_register (brawcap_adapter_notify_callback_t const callback, void *const pUser) |
Registers the calling process for receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_unregister () |
Unregisters the calling process from receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_handle_register (brawcap_handle_t *const pHandle, brawcap_adapter_notify_handle_callback_t const callback, void *const pUser) |
Registers the specified handle for receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_notify_handle_unregister (brawcap_handle_t *const pHandle) |
Unregisters the specified handle from receiving adapter change notifications. | |
brawcap_status_t | brawcap_adapter_name_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_name_t name) |
Reads out the adapter name of the specified adapter. | |
brawcap_status_t | brawcap_adapter_friendly_name (const brawcap_adapter_name_t name, char *const friendlyName, UINT32 *const pLength) |
Reads out the currently set adapter friendly name for the specified adapter. | |
brawcap_status_t | brawcap_adapter_friendly_name_by_handle (brawcap_handle_t *const pHandle, char *const friendlyName, UINT32 *const pLength) |
Reads out the currently set friendly name of the specified adapter. | |
brawcap_status_t | brawcap_adapter_description (const brawcap_adapter_name_t name, char *const description, UINT32 *const pLength) |
Reads out the description of the specified adapter. | |
brawcap_status_t | brawcap_adapter_description_by_handle (brawcap_handle_t *const pHandle, char *const description, UINT32 *const pLength) |
Reads out the description of a network adapter based on the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv4 (const brawcap_adapter_name_t name, brawcap_adapter_ipv4_t *const pIpv4) |
Reads out the currently set IPv4 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv4_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_ipv4_t *const pIpv4) |
Reads out the currently set IPv4 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv6 (const brawcap_adapter_name_t name, brawcap_adapter_ipv6_t *const pIpv6) |
Reads out the currently set IPv6 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_ipv6_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_ipv6_t *const pIpv6) |
Reads out the currently set IPv6 address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mac (const brawcap_adapter_name_t name, brawcap_adapter_mac_t mac) |
Reads out the MAC address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mac_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_mac_t mac) |
Reads out the MAC address of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_rx (const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current receive speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_rx_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current receive speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_tx (const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current transmit speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_speed_tx_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_speed_t *const pSpeed) |
Reads out the current transmit speed of the specified adapter. | |
brawcap_status_t | brawcap_adapter_connection (const brawcap_adapter_name_t name, brawcap_adapter_connection_state_t *const pConnection) |
Reads out the current connection state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_connection_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_connection_state_t *const pConnection) |
Reads out the current connection state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_operation (const brawcap_adapter_name_t name, brawcap_adapter_operation_state_t *const pOperation) |
Reads out the current operation state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_operation_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_operation_state_t *const pOperation) |
Reads out the current operation state of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mtu (const brawcap_adapter_name_t name, brawcap_adapter_mtu_t *const pMtu) |
Reads out the configured MTU of the specified adapter. | |
brawcap_status_t | brawcap_adapter_mtu_by_handle (brawcap_handle_t *const pHandle, brawcap_adapter_mtu_t *const pMtu) |
Reads out the configured MTU of the specified adapter. | |
Types and functions for handling bRAWcap (Ethernet) adapters.
+This module provides many features that facilitate the detection of bRAWcap (Ethernet) adapters. It allows to scan the local machine for available and supported adapters, to resolve many useful adapter properties for each adapter and also an adapter change notification.
+Adapter change notifications inform your application directly when any of the available properties have changed, or when a new adapter has been found or an existing one has been removed (e.g. by disabling the interface).
+When you use these functions, they make all calls to the Windows API - related to adapter handling - obsolete.
+List of examples:
+union brawcap_adapter_ipv4_t | +
IPv4 address.
+union brawcap_adapter_ipv6_t | +
IPv6 address.
+#define BRAWCAP_ADAPTER_NAME_LENGTH 40 | +
#include <brawcap_types_um.h>
The max supported length for an adapter name.
+typedef UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH] | +
#include <brawcap_types_um.h>
Fixed size array describing a MAC address.
+The array only contains the MAC address digits without any delimiters.
+typedef char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH] | +
#include <brawcap_types_um.h>
Fixed size array containing a adapter name.
+typedef UINT64 brawcap_adapter_mtu_t | +
#include <brawcap_types_um.h>
Type for handling the adapter maximum transmission unit (MTU).
+It describes the maximum bytes per packet which can be received/transmitted on the adapter. Typical values are 1500 bytes for default sized Ethernet and 9000 bytes for jumbo frames.
+typedef void(* brawcap_adapter_notify_callback_t) (const brawcap_adapter_name_t name, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) | +
#include <brawcap_types_um.h>
The general callback for adapter change notifications. It will be called each time a available and supported adapter change is detected.
+[in] | name | The adapter name on which the change happened. |
[in] | reason | The reason/type of change (see brawcap_adapter_notify_reason_t). |
[in] | properties | A bit field with the properties that have changed (see brawcap_adapter_properties_t). |
[in] | pUser | Pointer to a user defined context. It allows access to user specific data within the callback. |
typedef void(* brawcap_adapter_notify_handle_callback_t) (brawcap_handle_t *const pHandle, const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void *pUser) | +
#include <brawcap_types_um.h>
The per handle callback for adapter change notifications. It will be called each time a change for the handle underlying adapter (and only for this adapter) is detected.
+[in] | pHandle | The handle for which the adapter change notification was registered. |
[in] | reason | The reason/type of change (see brawcap_adapter_notify_reason_t). |
[in] | properties | A bit field with the properties that have changed (see brawcap_adapter_properties_t). |
[in] | pUser | Pointer to a user defined context. It allows access to user specific data within the callback. |
enum brawcap_adapter_speed_t | +
#include <brawcap_types_um.h>
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
+enum brawcap_adapter_connection_state_t | +
#include <brawcap_types_um.h>
List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected).
+enum brawcap_adapter_operation_state_t | +
#include <brawcap_types_um.h>
List of adapter operation states. Values indicating the current adapter operation state (adapter driver status).
+enum brawcap_adapter_notify_reason_t | +
#include <brawcap_types_um.h>
List of reasons for adapter change notifications. This values indicate why a adapter change notification is received.
+Enumerator | |
---|---|
BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN | The notification reason is unknown. + |
BRAWCAP_ADAPTER_NOTIFY_REASON_ADD | A new bRAWcap adapter was detected. E.g. due to enabling bRAWcap driver on an adapter where it was disabled before. + |
BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE | A bRAWcap adapter was removed. E.g. due to disabling bRAWcap driver on an adapter where it was enabled before. + |
BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE | A adapter property has changed. This can have several reasons, for a list of all properties see brawcap_adapter_properties_t. + |
enum brawcap_adapter_properties_t | +
#include <brawcap_types_um.h>
List of adapter properties. They are used to identify adapter change notifications with a property change reason.
+brawcap_status_t brawcap_adapter_list_update | +( | +) | ++ |
#include <brawcap.h>
Updates the list of supported adapters. This function searches the current machine for supported adapters and add them to the adapter list.
+Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
brawcap_status_t brawcap_adapter_list_count | +( | +brawcap_adapter_count_t *const | +pCount | ) | ++ |
#include <brawcap.h>
Reads out the current number of supported adapters in the adapter list.
+[out] | pCount | Will contain the current number of adapters in the list, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_adapter_list_at | +( | +const brawcap_adapter_count_t | +index, | +
+ | + | brawcap_adapter_name_t | +name | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the adapter name of the adapter at the adapter list index.
+[in] | index | The index of the adapter in the adapter list.. |
[out] | name | Will contain the name of the adapter, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified index exceeds adapter list length. |
brawcap_status_t brawcap_adapter_notify_register | +( | +brawcap_adapter_notify_callback_t const | +callback, | +
+ | + | void *const | +pUser | +
+ | ) | ++ |
#include <brawcap.h>
Registers the calling process for receiving adapter change notifications.
+The given callback function will be called each time a adapter change is recognized by bRAWcap for any of the supported adapters on the current machine.
+[in] | callback | Function pointer to the callback function which should be executed each time a adapter change is registered. |
[in] | pUser | Pointer to a user defined context. This allows access to user specific data within the callback. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Calling process has already registered for this notification. |
brawcap_status_t brawcap_adapter_notify_unregister | +( | +) | ++ |
#include <brawcap.h>
Unregisters the calling process from receiving adapter change notifications.
+Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_INFO_NOT_REGISTERED | Calling process was not registered for this notification. |
brawcap_status_t brawcap_adapter_notify_handle_register | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_notify_handle_callback_t const | +callback, | +
+ | + | void *const | +pUser | +
+ | ) | ++ |
#include <brawcap.h>
Registers the specified handle for receiving adapter change notifications.
+This registration only receives adapter change notifications related to the underlying adapter of the given bRAWcap handle. Whereas brawcap_adapter_notify_register notifies about adapter changes for all supported adapters on the current machine.
+Each bRAWcap handle can register for this notification once.
+[in] | pHandle | Handle to register for adapter notifications. |
[in] | pUser | Pointer to a user defined context. This allows access to user specific data within the callback. |
[in] | callback | Function pointer to the callback function which should be executed each time a adapter change is registered. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Specified handle has already registered for this notification. |
brawcap_status_t brawcap_adapter_notify_handle_unregister | +( | +brawcap_handle_t *const | +pHandle | ) | ++ |
#include <brawcap.h>
Unregisters the specified handle from receiving adapter change notifications.
+[in] | pHandle | Handle to unregister for adapter notifications. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_INFO_NOT_REGISTERED | Specified handle was not registered for this notification. |
brawcap_status_t brawcap_adapter_name_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_name_t | +name | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the adapter name of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | name | Will contain the adapter name, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_adapter_friendly_name | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | char *const | +friendlyName, | +
+ | + | UINT32 *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set adapter friendly name for the specified adapter.
+[in] | name | Name of the adapter. |
[out] | friendlyName | Pointer to a buffer which will contain the currently set adapter friendly name, afterwards. This parameter can be NULL. If it is NULL the function will set the required buffer length in pLength and return BRAWCAP_STATUS_ERROR_OVERRUN. |
[in,out] | pLength | Length of the provided buffer. If the specified length is to short, it will be set to the required length and BRAWCAP_STATUS_ERROR_OVERRUN is returned. |
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 | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short. |
brawcap_status_t brawcap_adapter_friendly_name_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | char *const | +friendlyName, | +
+ | + | UINT32 *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set friendly name of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | friendlyName | Pointer to a buffer which will contain the currently set friendly name, afterwards. This parameter can be NULL. If it is NULL the function will set the required buffer length in pLength and return BRAWCAP_STATUS_ERROR_OVERRUN. |
[in,out] | pLength | Length of the provided buffer. If the specified length is to short, it will be set to the required length and BRAWCAP_STATUS_ERROR_OVERRUN is returned. |
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 | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short. |
brawcap_status_t brawcap_adapter_description | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | char *const | +description, | +
+ | + | UINT32 *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the description of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | description | Pointer to a buffer which will contain the description, afterwards. This parameter can be NULL. If it is NULL the function will set the required buffer length in pLength and return BRAWCAP_STATUS_ERROR_OVERRUN. |
[in,out] | pLength | Length of the provided buffer. If the specified length is to short, it will be set to the required length and BRAWCAP_STATUS_ERROR_OVERRUN is returned. |
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 | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short. |
brawcap_status_t brawcap_adapter_description_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | char *const | +description, | +
+ | + | UINT32 *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the description of a network adapter based on the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | description | Pointer to a buffer which will contain the description, afterwards. This parameter can be NULL. If it is NULL the required buffer length will be set for pLength and the function will return BRAWCAP_STATUS_ERROR_OVERRUN. |
[in,out] | pLength | Length of the provided buffer. If the specified length is to short, it will be set to the required length and BRAWCAP_STATUS_ERROR_OVERRUN is returned. |
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 | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short. |
brawcap_status_t brawcap_adapter_ipv4 | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_ipv4_t *const | +pIpv4 | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set IPv4 address of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pIpv4 | Will contain the currently set IPv4 address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_ipv4_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_ipv4_t *const | +pIpv4 | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set IPv4 address of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pIpv4 | Will contain the currently set IPv4 address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_ipv6 | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_ipv6_t *const | +pIpv6 | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set IPv6 address of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pIpv6 | Will contain the currently set IPv6 address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_ipv6_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_ipv6_t *const | +pIpv6 | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently set IPv6 address of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pIpv6 | Will contain the currently set IPv6 address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_mac | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_mac_t | +mac | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the MAC address of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | mac | Will contain the MAC address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_mac_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_mac_t | +mac | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the MAC address of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | mac | Will contain the MAC address, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_speed_rx | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_speed_t *const | +pSpeed | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current receive speed of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pSpeed | Will contain the current receive speed, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_speed_rx_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_speed_t *const | +pSpeed | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current receive speed of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pSpeed | Will contain the current receive speed, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_speed_tx | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_speed_t *const | +pSpeed | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current transmit speed of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pSpeed | Will contain the current transmit speed, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_speed_tx_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_speed_t *const | +pSpeed | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current transmit speed of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pSpeed | Will contain the current transmit speed, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_connection | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_connection_state_t *const | +pConnection | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current connection state of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pConnection | Will contain the current connection 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_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_connection_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_connection_state_t *const | +pConnection | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current connection state of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pConnection | Will contain the current connection 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_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_operation | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_operation_state_t *const | +pOperation | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current operation state of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pOperation | Will contain the current operation 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_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_operation_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_operation_state_t *const | +pOperation | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current operation state of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pOperation | Will contain the current operation 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_ERROR_NOT_AVAILABLE | Not available in demo mode (no license). |
brawcap_status_t brawcap_adapter_mtu | +( | +const brawcap_adapter_name_t | +name, | +
+ | + | brawcap_adapter_mtu_t *const | +pMtu | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the configured MTU of the specified adapter.
+[in] | name | Name of the adapter. |
[out] | pMtu | Will contain the configured MTU, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available. |
brawcap_status_t brawcap_adapter_mtu_by_handle | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_adapter_mtu_t *const | +pMtu | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the configured MTU of the specified adapter.
+[in] | pHandle | The bRAWcap handle to read from. |
[out] | pMtu | Will contain the configured MTU, 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_NOT_AVAILABLE | Not available in demo mode (no license). |
+ |
+ 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.
+enum brawcap_rx_direction_t | +
#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. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for operating with bRAWcap receive filters. +More...
++Data Structures | |
struct | brawcap_bpf_insn_t |
A single BPF pseudo-instruction. More... | |
struct | brawcap_bpf_program_t |
A BPF pseudo-assembly program. More... | |
+Macros | |
+#define | BRAWCAP_FILTER_BYTE_MAX_LENGTH 64U |
The maximum supported filter byte mask length in bytes. | |
+Typedefs | |
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. | |
+Enumerations | |
enum | brawcap_filter_type_t { + BRAWCAP_FILTER_TYPE_BYTE_MASK = 0 +, + BRAWCAP_FILTER_TYPE_BPF = 1 + + } |
List of filter types. More... | |
+Functions | |
brawcap_status_t | brawcap_filter_create (brawcap_filter_t **const pFilter, const brawcap_filter_type_t type) |
Creates a new filter. | |
brawcap_status_t | brawcap_filter_free (brawcap_filter_t *pFilter) |
Frees the specified filter. When this function is called the given filter becomes invalid and it´s memory will be released. | |
brawcap_status_t | brawcap_filter_type_get (brawcap_filter_t *const pFilter, brawcap_filter_type_t *const pType) |
Reads out the type for the specified filter. | |
brawcap_status_t | brawcap_filter_mask_set (brawcap_filter_t *const pFilter, const brawcap_filter_byte_length_t offset, const brawcap_filter_byte_length_t length, const brawcap_filter_mask_array_t mask, const brawcap_filter_ignore_bits_array_t ignoreBits) |
Sets the filter parameters for the specified filter. | |
brawcap_status_t | brawcap_filter_mask_get (brawcap_filter_t *const pFilter, brawcap_filter_byte_length_t *const pOffset, brawcap_filter_byte_length_t *const pLength, brawcap_filter_mask_array_t *const pMask, brawcap_filter_ignore_bits_array_t *const pIgnoreBits) |
Reads out the filter mask parameters for the specified filter. | |
brawcap_status_t | brawcap_filter_activate (brawcap_filter_t *const pFilter) |
Sets the specified filter to active. | |
brawcap_status_t | brawcap_filter_deactivate (brawcap_filter_t *const pFilter) |
Sets the specified filter to inactive. | |
brawcap_status_t | brawcap_filter_is_activated (brawcap_filter_t *const pFilter, BOOLEAN *const pActive) |
Reads out the current activation state of the specified filter. | |
brawcap_status_t | brawcap_filter_bytes_to_capture_set (brawcap_filter_t *const pFilter, const brawcap_packet_size_t offset, const brawcap_packet_size_t length) |
Sets the bytes to capture of the specified filter. | |
brawcap_status_t | brawcap_filter_bytes_to_capture_get (brawcap_filter_t *const pFilter, brawcap_packet_size_t *const pOffset, brawcap_packet_size_t *const pLength) |
Reads out the configured bytes to capture of the specified filter. | |
brawcap_status_t | brawcap_filter_indicate_set (brawcap_filter_t *const pFilter, const BOOLEAN indicate) |
Specifies if packets which matched the specified filter should be indicated to the network stack. | |
brawcap_status_t | brawcap_filter_indicate_get (brawcap_filter_t *const pFilter, BOOLEAN *const pIndicate) |
Reads out the current network stack indication state of the specified filter. | |
Types and functions for operating with bRAWcap receive filters.
+To create a new filter use brawcap_filter_create. If a filter is not required anymore it shall be deleted with brawcap_filter_free.
+List of examples:
struct bpf_insn | +
struct bpf_program | +
A BPF pseudo-assembly program.
+The BPF program can be used to filter incoming packets. To get a BPF program it has to be generated/compiled from a BPF filter string, first.
+Data Fields | ||
---|---|---|
+UINT | ++bf_len | +
+ Indicates the number of instructions of the program. + |
+struct bpf_insn * | ++bf_insns | +
+ A pointer to the first instruction of the program. + |
typedef UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH] | +
#include <brawcap_types_shared.h>
Fixed size array for storing a filter byte mask.
+typedef UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH] | +
#include <brawcap_types_shared.h>
Fixed size array for storing a byte wise bitfield.
+This allows to ignore specific bits in the specified filter byte mask. Each bit which is set to one is ignored in the filter byte mask.
+typedef struct _brawcap_filter brawcap_filter_t | +
#include <brawcap_types_shared.h>
bRAWcap filter object.
+The filter object can be accessed with the bRAWcap filter functions. Filters can be created and freed.
+ +enum brawcap_filter_type_t | +
#include <brawcap_types_shared.h>
List of filter types.
+Enumerator | |
---|---|
BRAWCAP_FILTER_TYPE_BYTE_MASK | A bRAWcap byte filter. + |
BRAWCAP_FILTER_TYPE_BPF | A Berkley Packet Filter. + |
brawcap_status_t brawcap_filter_create | +( | +brawcap_filter_t **const | +pFilter, | +
+ | + | const brawcap_filter_type_t | +type | +
+ | ) | ++ |
#include <brawcap.h>
Creates a new filter.
+The created filter can be used for filtering received packets by applying it to a bRAWcap handle with brawcap_rx_filter_set.
+If a created filter is not required anymore it should be freed with brawcap_filter_free.
+[in] | pFilter | Will contain the new created filter. |
[in] | type | Specifies the type of the created filter. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not supported. |
BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory). |
brawcap_status_t brawcap_filter_free | +( | +brawcap_filter_t * | +pFilter | ) | ++ |
#include <brawcap.h>
Frees the specified filter. When this function is called the given filter becomes invalid and it´s memory will be released.
+[in] | pFilter | The filter to be freed. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_type_get | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | brawcap_filter_type_t *const | +pType | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the type for the specified filter.
+[in] | pFilter | The filter to read from. |
[out] | pType | Will contain the filter type, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_mask_set | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | const brawcap_filter_byte_length_t | +offset, | +
+ | + | const brawcap_filter_byte_length_t | +length, | +
+ | + | const brawcap_filter_mask_array_t | +mask, | +
+ | + | const brawcap_filter_ignore_bits_array_t | +ignoreBits | +
+ | ) | ++ |
#include <brawcap.h>
Sets the filter parameters for the specified filter.
+[in] | pFilter | The filter to be modified. |
[in] | offset | Byte offset of the filter. This value specifies at which packet byte offset the first filter byte shall be applied. |
[in] | length | Byte length of the filter. Specifies the number of bytes used by the filter. This value is limited to BRAWCAP_FILTER_BYTE_MAX_LENGTH. |
[in] | mask | The byte mask for the filter. This is a fixed size byte array. Set the byte values to the filter you want to apply. Only bytes up to the specified filter length are used and following bytes will be ignored. |
[in] | ignoreBits | A fixed size bitfield byte array. The bytes in this array has to be interpreted/used as bitfields. This allows to select if a single bit at the corresponding mask position shall be ignored. To ignore the value of a bit set it´s value to 1. Like the mask, only bytes up to the specified filter length are used and following bytes will be ignored. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type BRAWCAP_FILTER_TYPE_BYTE_MASK. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds BRAWCAP_FILTER_BYTE_MAX_LENGTH. |
brawcap_status_t brawcap_filter_mask_get | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | brawcap_filter_byte_length_t *const | +pOffset, | +
+ | + | brawcap_filter_byte_length_t *const | +pLength, | +
+ | + | brawcap_filter_mask_array_t *const | +pMask, | +
+ | + | brawcap_filter_ignore_bits_array_t *const | +pIgnoreBits | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the filter mask parameters for the specified filter.
+[in] | pFilter | The filter to read from. |
[out] | pOffset | Will contain the filter byte offset, afterwards. |
[out] | pLength | Will contain the filter byte length, afterwards. |
[out] | pMask | Will contain the filter mask bytes, afterwards. |
[out] | pIgnoreBits | Will contain the filter bits to ignore, afterwards |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type BRAWCAP_FILTER_TYPE_BYTE_MASK. |
brawcap_status_t brawcap_filter_activate | +( | +brawcap_filter_t *const | +pFilter | ) | ++ |
#include <brawcap.h>
Sets the specified filter to active.
+[in] | pFilter | The filter to be modified. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_deactivate | +( | +brawcap_filter_t *const | +pFilter | ) | ++ |
#include <brawcap.h>
Sets the specified filter to inactive.
+[in] | pFilter | The filter to be modified. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_is_activated | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | BOOLEAN *const | +pActive | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current activation state of the specified filter.
+[in] | pFilter | The filter to read from. |
[out] | pActive | Will contain the activation state, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_bytes_to_capture_set | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | const brawcap_packet_size_t | +offset, | +
+ | + | const brawcap_packet_size_t | +length | +
+ | ) | ++ |
#include <brawcap.h>
Sets the bytes to capture of the specified filter.
+[in] | pFilter | The filter to be modified. |
[in] | offset | The byte offset, from packet payload beginning, to begin capturing the payload bytes. |
[in] | length | The number of bytes to be captured - beginning at offset. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds BRAWCAP_PACKET_SIZE_MAX. |
brawcap_status_t brawcap_filter_bytes_to_capture_get | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | brawcap_packet_size_t *const | +pOffset, | +
+ | + | brawcap_packet_size_t *const | +pLength | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the configured bytes to capture of the specified filter.
+[in] | pFilter | The filter to read from. |
[out] | pOffset | Will contain the byte offset of the bytes to capture, afterwards. |
[out] | pLength | Will contain the number of bytes to capture, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_indicate_set | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | const BOOLEAN | +indicate | +
+ | ) | ++ |
#include <brawcap.h>
Specifies if packets which matched the specified filter should be indicated to the network stack.
+[in] | pFilter | The filter to be modified. |
[in] | indicate | Flag specifying the network stack indication. If true filtered packets are forwarded to the network stack. If false filtered packets are not forwarded to the network stack, they are only visible for bRAWcap handles. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
brawcap_status_t brawcap_filter_indicate_get | +( | +brawcap_filter_t *const | +pFilter, | +
+ | + | BOOLEAN *const | +pIndicate | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the current network stack indication state of the specified filter.
+[in] | pFilter | The filter to read from. |
[out] | pIndicate | Will contain the current network stack indication, afterwards. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for bRAWcap transmitting. +More...
++Macros | |
+#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. | |
+Typedefs | |
typedef void(* | brawcap_tx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser) |
Transmit callback which is called each time a transmission initiated with brawcap_tx_buffer_send has finished. | |
+Functions | |
brawcap_status_t | brawcap_tx_packet (brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket) |
Transmits a single packet on the specified handle. | |
brawcap_status_t | brawcap_tx_start (brawcap_handle_t *const pHandle, brawcap_tx_callback_t const callback, void *pUser) |
Starts the internal transmit loop. | |
brawcap_status_t | brawcap_tx_stop (brawcap_handle_t *const pHandle) |
Stops the internal transmit loop. | |
brawcap_status_t | brawcap_tx_buffer_send (brawcap_handle_t *const pHandle, brawcap_buffer_t *const pBuffer, const BOOLEAN synchronized) |
Pushes the specified buffer to the specified handle transmit queue. | |
brawcap_status_t | brawcap_tx_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_tx_driver_queue_size_get (brawcap_handle_t *const pHandle, brawcap_queue_size_t *const pSize) |
Reads out the currently configured driver transmit queue size for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_capabilities (brawcap_handle_t *const pHandle, brawcap_timestamp_capabilities_t *const pCapabilities) |
Reads out the available transmit timestamp modes for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_mode_set (brawcap_handle_t *const pHandle, const brawcap_timestamp_mode_t mode) |
Configures the used transmit time stamping mode for the specified handle. | |
brawcap_status_t | brawcap_tx_timestamp_mode_get (brawcap_handle_t *const pHandle, brawcap_timestamp_mode_t *const pMode) |
Reads out the currently configured transmit time stamping mode for the specified handle. | |
Types and functions for bRAWcap transmitting.
+typedef void(* brawcap_tx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser) | +
#include <brawcap_types_um.h>
Transmit callback which is called each time a transmission initiated with brawcap_tx_buffer_send has finished.
+[in] | pHandle | Handle on which the transmission has finished. |
[in] | status | The overall transmission status see brawcap_status_t for possible return values. |
[in] | pBuffer | Pointer to the buffer which has finished transmission (initiated with brawcap_tx_buffer_send). It can be used to access all packets in the buffer - after transmission - and allows to retrieve information about each packet (e.g. (transmission) status, timestamp, ...). |
[in] | pUser | Pointer to a user defined context (allows access to user specific data within the callback). |
brawcap_status_t brawcap_tx_packet | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_packet_t *const | +pPacket | +
+ | ) | ++ |
#include <brawcap.h>
Transmits a single packet on the specified handle.
+The caller must provide a valid packet filled up with the payload to transmit.
+For creating a packet use brawcap_packet_create. After creating the packet set all the required packet fields and than call this function to initiate a transmission.
+When transmission has finished (the function returns) the packet fields are updated.
+To check if the transmission was successful check for the function return status or the packet status itself with brawcap_packet_status_get. If the packet was transmitted and transmit time stamping was enabled the packet timestamp will contain the transmission time, which be accessed with brawcap_packet_timestamp_get.
+[in] | pHandle | bRAWcap handle to transmit on. |
[in,out] | pPacket | Packet to be transmitted. |
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_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_WARNING_NOT_ALL_PROCESSED | The transmission failed (or payload was not fully transmitted). |
brawcap_status_t brawcap_tx_start | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_tx_callback_t const | +callback, | +
+ | + | void * | +pUser | +
+ | ) | ++ |
#include <brawcap.h>
Starts the internal transmit loop.
+To transmit data using this method push previously filled packet buffers to the handle by using brawcap_tx_buffer_send. After that the buffer will be locked down by the handle and added to it´s transmission queue.
+For creating a new packet buffer which can be used for transmission use brawcap_buffer_create.
+When a packet buffer transmission has completed the transmit callback will be called for this handle and with the corresponding packet buffer. From within the callback the buffer can be accessed for post processing (it is unlocked before entering the callback). It is also possible to do post processing from a different thread and after the callback.
+In general executing to long in the callback can lead to a bottleneck in the transmission. It´s not as critical as it is for receiving but it should be still kept in mind.
+Like brawcap_tx_packet does, also each packet in transmitted packet buffers will be updated (e.g. packet status, transmission timestamp). The user application can access those updated information after transmission has completed.
+A completed packet buffer transmission will automatically detach the buffer from the handle. It is not needed to detach it explicitly (which would be required for receive buffers).
+[in] | pHandle | bRAWcap handle to transmit on. |
[in] | callback | Function pointer to user application transmit callback. |
[in] | pUser | Pointer to a user defined context. Can be NULL if no user context is required. |
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 transmit is pending or transmission is already started. |
brawcap_status_t brawcap_tx_stop | +( | +brawcap_handle_t *const | +pHandle | ) | ++ |
#include <brawcap.h>
Stops the internal transmit loop.
+[in] | pHandle | bRAWcap handle to stop transmission on. |
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 transmission running. |
brawcap_status_t brawcap_tx_buffer_send | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_buffer_t *const | +pBuffer, | +
+ | + | const BOOLEAN | +synchronized | +
+ | ) | ++ |
#include <brawcap.h>
Pushes the specified buffer to the specified handle transmit queue.
+After pushing a packet buffer to the handle for transmission it is locked down by the handle until transmission has completed (and the transmit callback is called).
+With the synchronized flag it is possible to activate a synchronized transmission of the specified packet buffer. This means that the driver reads the time gap between each packet in the packet buffer and waits until it has been elapsed before initiating transmission.
+[in] | pHandle | bRAWcap handle for sending the buffer. |
[in] | pBuffer | Packet buffer to be sent. |
[in] | synchronized | Flag indicating if the packets in the packet buffer should be sent synchronized. |
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_t brawcap_tx_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.
+For transmission the driver queue size may be increased if high data rates should be reached (for example 10GBit/s). With a larger transmission queue the driver can forward more packets to the network adapter at the same time. Therefore if the transmission rate is below the expected value it may be solved by a larger driver queue size.
+The driver queue size can be adjusted at any time.
+[in] | pHandle | bRAWcap handle to be configured. |
[in] | size | Driver transmit 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_tx_driver_queue_size_get | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_queue_size_t *const | +pSize | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently configured driver transmit queue size for the specified handle.
+[in] | pHandle | bRAWcap handle to read from. |
[out] | pSize | Will contain the currently configured driver transmit queue size, 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_tx_timestamp_capabilities | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_timestamp_capabilities_t *const | +pCapabilities | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the available transmit timestamp modes for the specified handle.
+Some of the timestamp capabilities 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 transmit 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_tx_timestamp_mode_set | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | const brawcap_timestamp_mode_t | +mode | +
+ | ) | ++ |
#include <brawcap.h>
Configures the used transmit time stamping mode for the specified handle.
+[in] | pHandle | bRAWcap handle to be configured. |
[in] | mode | The transmit 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_tx_timestamp_mode_get | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_timestamp_mode_t *const | +pMode | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the currently configured transmit time stamping mode for the specified handle.
+[in] | pHandle | bRAWcap handle to read from. |
[out] | pMode | Will contain the currently used transmit 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 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for bRAWcap statistics. +More...
++Data Structures | |
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_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. | |
+Enumerations | |
enum | brawcap_stats_type_t { + BRAWCAP_STATS_TYPE_RX = 1 +, + BRAWCAP_STATS_TYPE_TX = 2 + + } |
List of all available statistic types. More... | |
enum | brawcap_stats_rx_revision_t { BRAWCAP_STATS_RX_REVISION_1 = 1 + } |
List of all available receive statistic revisions. More... | |
enum | brawcap_stats_tx_revision_t { BRAWCAP_STATS_TX_REVISION_1 = 1 + } |
List of all available transmit statistic revisions. More... | |
+Functions | |
brawcap_status_t | brawcap_stats_rx (brawcap_handle_t *const pHandle, brawcap_stats_rx_t *const pStats) |
Reads out the available receive statistic counters for the specified handle. | |
brawcap_status_t | brawcap_stats_tx (brawcap_handle_t *const pHandle, brawcap_stats_tx_t *const pStats) |
Reads out the available transmit statistic counters for the specified handle. | |
Types and functions for bRAWcap statistics.
+struct brawcap_stats_header_t | +
Header describing given bRAWcap stats structure.
+struct brawcap_stats_rx_t | +
The bRAWcap receive statistics.
+This can be used to retrieve all available bRAWcap statistics and counters related to receive path. After creating the structure, its header has to be initialized.
+The brawcap_stats_header_t::type shall be set to BRAWCAP_STATS_TYPE_RX.
+The brawcap_stats_header_t::revision shall be set to one of the following values:
+The brawcap_stats_header_t::size shall be set depending on your selected version by using the macro:
Data Fields | ||
---|---|---|
+brawcap_stats_header_t | ++header | ++Header for receive statistics. This has to be always initialized by the user after creation before using it. |
+UINT32 | ++adapterValid | ++Bitfield indicating which counters provided by the underlying network adapter driver are valid. |
+UINT64 | ++adapterReceivedPacketsTotal | +
+Total number of received packets by the underlying network adapter.
|
+UINT64 | ++adapterReceivedBytesTotal | +
+Total number of received bytes by the underlying network adapter.
|
+UINT64 | ++adapterDroppedPacketsTotal | +
+Total number of received bytes by the underlying network adapter.
|
+UINT64 | ++driverIndicatedPacketsTotal | +
+The total number of indicated packets to the upper network stack by bRAWcap on the corresponding adapter.
|
+UINT64 | ++driverReceivedPacketsTotal | +
+The total number of received packets by bRAWcap on the corresponding adapter.
|
+UINT64 | ++handleReceivedPacketsTotal | +
+The total number of received packets by the given bRAWcap handle.
|
+UINT64 | ++handleReceivedPacketsMatched | +
+The total number of packets which have matched the given bRAWcap handle filter.
|
+UINT64 | ++handleReceivedPacketsQueued | +
+The total number of packets which was queued to the handles driver queue.
|
+UINT64 | ++handleReceivedPacketsDirect | +
+The total number of packets which could be directly delivered to user space memory.
|
+UINT64 | ++handleReceivedBytesTotal | +
+The total number of received bytes by the given bRAWcap handle.
|
+UINT64 | ++handleDroppedPacketsTotal | +
+The total number of packets which was dropped for the handle (sum of all reasons).
|
+UINT64 | ++handleDroppedPacketsQueue | +
+The total number of packets which was dropped for the handle because of resources (driver queue overrun).
|
+UINT64 | ++handleDroppedPacketsToLong | +
+The total number of packets which was dropped for the handle their length exceeds the handles configured max packet size.
|
struct brawcap_stats_tx_t | +
The bRAWcap transmit statistics.
+This can be used to retrieve all available bRAWcap statistics and counters related to transmit path. After creating the structure, its header has to be initialized.
+The brawcap_stats_header_t::type shall be set to BRAWCAP_STATS_TYPE_TX.
+The brawcap_stats_header_t::revision shall be set to one of the following values:
+The brawcap_stats_header_t::size shall be set depending on your selected version by using the macro:
Data Fields | ||
---|---|---|
+brawcap_stats_header_t | ++header | ++Header for transmit statistics. This has to be always initialized by the user after creation before using it. |
+UINT32 | ++adapterValid | ++Bitfield indicating which counters provided by the underlying network adapter driver are valid. |
+UINT64 | ++adapterCompletedPacketsTotal | +
+Total number of (completed) transmitted packets by the underlying network adapter.
|
+UINT64 | ++adapterCompletedBytesTotal | +
+Total number of (completed) transmitted bytes by the underlying network adapter.
|
+UINT64 | ++adapterCanceledPacketsTotal | +
+Total number of canceled transmitted packets by the underlying network adapter.
|
+UINT64 | ++driverInitiatedPacketsTotal | +
+Total number of initiated packets to transmit by the bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverInitiatedPacketsStack | +
+Initiated packets to transmit from upper network stack detected by bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverInitiatedPacketsHandles | +
+Initiated packets to transmit from bRAWcap driver itself on the corresponding adapter.
|
+UINT64 | ++driverCanceledPacketsTotal | +
+Total number of canceled packets to transmit by the bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverCanceledPacketsStack | +
+Canceled packets to transmit from the upper network stack detected by bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverCanceledPacketsHandles | +
+Canceled packets to transmit from bRAWcap driver itself on the corresponding adapter.
|
+UINT64 | ++driverCompletedPacketsTotal | +
+Total number of completed transmitted packets detected by bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverCompletedPacketsStack | +
+Completed packets to transmit from the upper network stack detected by bRAWcap driver on the corresponding adapter.
|
+UINT64 | ++driverCompletedPacketsHandles | +
+Completed packets to transmit from the bRAWcap driver itself on the corresponding adapter.
|
+UINT64 | ++handleInitiatedPacketsTotal | +
+Total number of initiated packets to transmit for the handle.
|
+UINT64 | ++handleCanceledPacketsTotal | +
+Total number of canceled packets to transmit for the handle.
|
+UINT64 | ++handleCompletedPacketsTotal | +
+Total number of completed transmitted packets for the handle.
|
+UINT64 | ++handleCompletedBytesTotal | ++ |
enum brawcap_stats_type_t | +
#include <brawcap_types_shared.h>
List of all available statistic types.
+Enumerator | |
---|---|
BRAWCAP_STATS_TYPE_RX | Type for receive stats. + |
BRAWCAP_STATS_TYPE_TX | Type for transmit stats. + |
enum brawcap_stats_rx_revision_t | +
#include <brawcap_types_shared.h>
List of all available receive statistic revisions.
+Enumerator | |
---|---|
BRAWCAP_STATS_RX_REVISION_1 | Revision 1 for receive stats. + |
enum brawcap_stats_tx_revision_t | +
#include <brawcap_types_shared.h>
List of all available transmit statistic revisions.
+Enumerator | |
---|---|
BRAWCAP_STATS_TX_REVISION_1 | Revision 1 for transmit stats. + |
brawcap_status_t brawcap_stats_rx | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_stats_rx_t *const | +pStats | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the available receive statistic counters for the specified handle.
+[in] | pHandle | bRAWcap handle to read from. |
[in,out] | pStats | Will contain the current receive statistic counters, afterwards. The header of the statistic struct hast to be filled by the caller, before calling this function. If it is not filled or contains invalid data, the function will fail and return a error. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The header was invalid (type or revision). |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified size in the header was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
brawcap_status_t brawcap_stats_tx | +( | +brawcap_handle_t *const | +pHandle, | +
+ | + | brawcap_stats_tx_t *const | +pStats | +
+ | ) | ++ |
#include <brawcap.h>
Reads out the available transmit statistic counters for the specified handle.
+[in] | pHandle | bRAWcap handle to read from. |
[in,out] | pStats | Will contain the current transmit statistic counters, afterwards. The header of the statistic struct hast to be filled by the caller, before calling this function. If it is not filled or contains invalid data, the function will fail and return a error. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The header was invalid (type or revision). |
BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified size in the header was invalid. |
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Defines required for automatic/dynamic bRAWcap API function importing. +More...
++Macros | |
+#define | _BRAWCAP_API_FUNC(returnType) __declspec(dllimport) returnType __cdecl |
Dynamic/automatic function import for loading/including. | |
Defines required for automatic/dynamic bRAWcap API function importing.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
Types and functions for handling/modifying the bRAWcap logging. +More...
++Enumerations | |
enum | brawcap_log_level_t { + BRAWCAP_LOG_LEVEL_DEBUG = 0x01 +, + BRAWCAP_LOG_LEVEL_VERBOSE = 0x02 +, + BRAWCAP_LOG_LEVEL_NOTICE = 0x04 +, + BRAWCAP_LOG_LEVEL_WARNING = 0x08 +, + BRAWCAP_LOG_LEVEL_ERROR = 0x10 + + } |
List of bRAWcap log levels. More... | |
enum | brawcap_log_type_t { + BRAWCAP_LOG_TYPE_GENERIC = 0x01 +, + BRAWCAP_LOG_TYPE_ADAPTER = 0x02 +, + BRAWCAP_LOG_TYPE_RECEIVE = 0x04 +, + BRAWCAP_LOG_TYPE_TRANSMIT = 0x08 +, + BRAWCAP_LOG_TYPE_LICENSE = 0x10 +, + BRAWCAP_LOG_TYPE_ALL = 0xFFFF + + } |
List of bRAWcap log types. More... | |
+Functions | |
brawcap_status_t | brawcap_log_level_set (const brawcap_log_type_t type, const brawcap_log_level_t level, const char *pKey) |
Sets the current log level for the given log type to the specified log level. | |
brawcap_status_t | brawcap_log_levels_set (const UINT32 type, const UINT32 level, const char *pKey) |
Sets the current log levels for the given log types to the specified log levels. | |
brawcap_status_t | brawcap_log_level_get (const brawcap_log_type_t type, brawcap_log_level_t *const pLevel) |
Reads the level(s) for the given log type. | |
Types and functions for handling/modifying the bRAWcap logging.
+This module provides some functions for configuring the bRAWcap logging behavior. The bRAWcap logger supports different log levels and types, which allows to configure the logging for specific types independent to each other. Increasing the log level may help during development of the user application which shall use bRAWcap.
+enum brawcap_log_level_t | +
#include <brawcap_types_um.h>
List of bRAWcap log levels.
+The log levels allows to (de)activate additional log entries. This can be especially useful during development, to get a more detailed log from bRAWcap.
+enum brawcap_log_type_t | +
#include <brawcap_types_um.h>
List of bRAWcap log types.
+The log types allows to adjust log levels for each type independent. To distinguish between different types each logentry will be prefixed with it´s type, this increases the readability of the logfile.
+brawcap_status_t brawcap_log_level_set | +( | +const brawcap_log_type_t | +type, | +
+ | + | const brawcap_log_level_t | +level, | +
+ | + | const char * | +pKey | +
+ | ) | ++ |
#include <brawcap.h>
Sets the current log level for the given log type to the specified log level.
+[in] | type | Log type for which to configure the log level. |
[in] | level | The log level to be applied. |
[in] | pKey | Key required to activate debug logging. For any other log level than BRAWCAP_LOG_LEVEL_DEBUG this parameter is not required and should be set to NULL. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Attempted to enable debug logging with wrong key. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | None of the specified log types is available. |
brawcap_status_t brawcap_log_levels_set | +( | +const UINT32 | +type, | +
+ | + | const UINT32 | +level, | +
+ | + | const char * | +pKey | +
+ | ) | ++ |
#include <brawcap.h>
Sets the current log levels for the given log types to the specified log levels.
+[in] | type | Log types for which to configure the log level(s). Value has to be interpreted as bitfield. This allows to (de)activate levels for several types with only one call. |
[in] | level | The log levels to be applied. Value has to be interpreted as bitfield. This allows to (de)activate several levels with only one call. |
[in] | pKey | Key required to activate debug logging. For any other log level than BRAWCAP_LOG_LEVEL_DEBUG this parameter is not required and should be set to NULL. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Attempted to enable debug logging with wrong key. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | None of the specified log types is available. |
brawcap_status_t brawcap_log_level_get | +( | +const brawcap_log_type_t | +type, | +
+ | + | brawcap_log_level_t *const | +pLevel | +
+ | ) | ++ |
#include <brawcap.h>
Reads the level(s) for the given log type.
+[in] | type | Log type for which to read the log level. It is only possible to retrieve the log level for one type. Call this function for each type to resolve all log levels. |
[out] | pLevel | Will contain the currently configured log level(s), afterwards. This value shall be interpreted as bitfield, which allows to resolve all log levels for the type with only one call. |
Status | Description |
---|---|
BRAWCAP_STATUS_SUCCESS | Success. |
BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid. |
BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified log types is invalid. |
+ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to open and close bRAWcap handles to each available adapter on the machine. If any unexpected status is returned, it will close all handles and print the unexpected status to console. Therefore brawcap_last_status is used.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to read library (/API) and driver version of bRAWcap. After reading the versions it will check if both versions match.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to get all currently available adapters on the machine. And how to get the properties for each adapter. The adapters and their properties will be printed to command line output.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to register and handle adapter change notifications. It will print each received notification to command line. Each output will also include the change reason and the new adapter property value.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to use the bRAWcap single packet receive feature. It opens a handle to the first available bRAWcap adapter, creates a bRAWcap packet to store received data to. For each received packet it will print the packet information to console.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to use the bRAWcap single packet receive feature. It opens a handle to the first available bRAWcap adapter, creates a bRAWcap packet to store received data to. For each received packet it will print the packet information to console.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how to configure the different timestamp modes and read timestamp information from single received packets. It opens a handle to the first available bRAWcap adapter, creates a bRAWcap packet to store received data to and applies the configured timestamp mode. For each received packet it will print it´s applied timestamp info.
++ |
+ bRAWcap 1.0.1
+
+ b-plus Technologies - Ethernet Performance Transmitter Receiver
+ |
+
This example shows how bRAWcap can be used to filter (discard) specific packets by using a byte filter.
+Cbrawcap_adapter_ipv4_t | IPv4 address |
Cbrawcap_adapter_ipv6_t | IPv6 address |
Cbrawcap_bpf_insn_t | A single BPF pseudo-instruction |
Cbrawcap_bpf_program_t | A BPF pseudo-assembly program |
Cbrawcap_stats_header_t | Header describing given bRAWcap stats structure |
Cbrawcap_stats_rx_t | The bRAWcap receive statistics |
Cbrawcap_stats_tx_t | The bRAWcap transmit statistics |
Cbrawcap_version_fragments_t | Struct containing the separated version parts |
Cbrawcap_version_t | BRAWcap version |
Cbrawcap_adapter_ipv4_t | IPv4 address |
Cbrawcap_adapter_ipv6_t | IPv6 address |
Cbrawcap_bpf_insn_t | A single BPF pseudo-instruction |
Cbrawcap_bpf_program_t | A BPF pseudo-assembly program |
Cbrawcap_stats_header_t | Header describing given bRAWcap stats structure |
Cbrawcap_stats_rx_t | The bRAWcap receive statistics |
Cbrawcap_stats_tx_t | The bRAWcap transmit statistics |
Cbrawcap_version_fragments_t | Struct containing the separated version parts |
Cbrawcap_version_t | BRAWcap version |
Files | |
file | brawcap.h [code] |
bRAWcap API - Functions. | |
file | brawcap.h [code] |
bRAWcap API - Functions. | |
file | brawcap_types_shared.h [code] |
bRAWcap API - Shared types. | |
file | brawcap_types_shared.h [code] |
bRAWcap API - Shared types. | |
file | brawcap_types_um.h [code] |
bRAWcap API - User mode types. | |
file | brawcap_types_um.h [code] |
bRAWcap API - User mode types. | |
Files | |
file | 01_adapter_property_reader.c |
bRAWcap Example - Demonstrates the usage of the adapter handling module. | |
file | 01_adapter_property_reader.c |
bRAWcap Example - Demonstrates the usage of the adapter handling module. | |
file | 02_adapter_change_notifier.c |
bRAWcap Example - Demonstrates the usage of the adapter handling module. | |
file | 02_adapter_change_notifier.c |
bRAWcap Example - Demonstrates the usage of the adapter handling module. | |
file | 03_generic_handle_opener.c |
bRAWcap Example - Demonstrates the usage of the generic bRAWcap functions. | |
file | 03_generic_handle_opener.c |
bRAWcap Example - Demonstrates the usage of the generic bRAWcap functions. | |
file | 04_version_comparator.c |
bRAWcap Example - Demonstrates how to use the bRAWcap version. | |
file | 04_version_comparator.c |
bRAWcap Example - Demonstrates how to use the bRAWcap version. | |
file | 05_receive_simple_packet_receiver.c |
bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets. | |
file | 05_receive_simple_packet_receiver.c |
bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets. | |
file | 06_filter_firewall.c |
bRAWcap Example - Demonstrates how to throw away specific received packets. | |
file | 06_filter_firewall.c |
bRAWcap Example - Demonstrates how to throw away specific received packets. | |
file | 07_receive_buffered_receiver.c |
bRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers. | |
file | 07_receive_buffered_receiver.c |
bRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers. | |
file | 08_receive_timestamp_inspector.c |
bRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes. | |
file | 08_receive_timestamp_inspector.c |
bRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes. | |
file | 09_transmit_simple_packet_transmitter.c |
bRAWcap Example - TODO: | |
file | 09_transmit_simple_packet_transmitter.c |
bRAWcap Example - TODO: | |
file | 10_transmit_buffered_transmitter.c |
bRAWcap Example - TODO: | |
file | 10_transmit_buffered_transmitter.c |
bRAWcap Example - TODO: | |
▼ brawcap | |
brawcap.h | BRAWcap API - Functions |
brawcap_types_shared.h | BRAWcap API - Shared types |
brawcap_types_um.h | BRAWcap API - User mode types |
brawcap.h | BRAWcap API - Functions |
brawcap_types_shared.h | BRAWcap API - Shared types |
brawcap_types_um.h | BRAWcap API - User mode types |
▼ examples | |
01_adapter_property_reader.c | BRAWcap Example - Demonstrates the usage of the adapter handling module |
02_adapter_change_notifier.c | BRAWcap Example - Demonstrates the usage of the adapter handling module |
03_generic_handle_opener.c | BRAWcap Example - Demonstrates the usage of the generic bRAWcap functions |
04_version_comparator.c | BRAWcap Example - Demonstrates how to use the bRAWcap version |
05_receive_simple_packet_receiver.c | BRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets |
06_filter_firewall.c | BRAWcap Example - Demonstrates how to throw away specific received packets |
07_receive_buffered_receiver.c | BRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers |
08_receive_timestamp_inspector.c | BRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes |
09_transmit_simple_packet_transmitter.c | BRAWcap Example - TODO: |
10_transmit_buffered_transmitter.c | BRAWcap Example - TODO: |
libbrawcap.h | BRAWcap main header |
01_adapter_property_reader.c | BRAWcap Example - Demonstrates the usage of the adapter handling module |
02_adapter_change_notifier.c | BRAWcap Example - Demonstrates the usage of the adapter handling module |
03_generic_handle_opener.c | BRAWcap Example - Demonstrates the usage of the generic bRAWcap functions |
04_version_comparator.c | BRAWcap Example - Demonstrates how to use the bRAWcap version |
05_receive_simple_packet_receiver.c | BRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets |
06_filter_firewall.c | BRAWcap Example - Demonstrates how to throw away specific received packets |
07_receive_buffered_receiver.c | BRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers |
08_receive_timestamp_inspector.c | BRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes |
09_transmit_simple_packet_transmitter.c | BRAWcap Example - TODO: |
10_transmit_buffered_transmitter.c | BRAWcap Example - TODO: |
libbrawcap.h | BRAWcap main header |
b-plus technologies GmbH
Ulrichsberger Str. 17
@@ -126,7 +126,7 @@
Legal Notice
Software Copyright
-
The API documentation is grouped into different modules. Each module is describing a specific part of the API.
bRAWcap API is written in C and fully compatible to C99. All header files describing the API can be found in sdk\c\include
. bRAWcap has in general four header files. It is recommended to always include the base header sdk\c\include\libbrawcap.h
, which will than include all other headers for you.
bRAWcap API is written in C and fully compatible to C99. All header files describing the API can be found in sdk\c\include
. bRAWcap has in general four header files. It is recommended to always include the base header sdk\c\include\libbrawcap.h
, which will than include all other headers for you.
Here is a list of the other headers and a short description of their content:
sdk\c\include\brawcap.h
- Function prototypessdk\c\include\brawcap_types_um.h
- User mode definitions and typessdk\c\include\brawcap_types_shared.h
- Shared definitions and typessdk\c\include\brawcap.h
- Function prototypessdk\c\include\brawcap_types_um.h
- User mode definitions and typessdk\c\include\brawcap_types_shared.h
- Shared definitions and typesDemo
Demo
+ cxxopts
+
+
+ PDCursesMod
+
+ +
Setup
+ NSIS
+
+ +
Doc
+ doxygen-awesome-css
+
+ +
First of all bRAWcap is handle based, which means that there can be several handles attached to the same adapter. This makes it possible that several processes (applications) can use bRAWcap independent from each other. If several applications use bRAWcap with the same receive filter for example, the CPU load will increase. Especially if the handles use no filtering (all packets are processed) the resulting CPU load have to be multiplied by the number of handles (for example if one handle produces 3% CPU load, than three handles will result in 9% CPU load).
In general it is recommended to set the receive filter very precisely, that only packets which are really required are processed by bRAWcap. Overlapping filters on the same adapter should be avoided, if possible.
-bRAWcap also allows to only process a subpart of each packet and not always the hole packet (see brawcap_filter_bytes_to_capture_set API function documentation). So if you are not interested in headers for example, configure bRAWcap to only supply the payload without headers.
+bRAWcap also allows to only process a subpart of each packet and not always the hole packet (see brawcap_filter_bytes_to_capture_set API function documentation). So if you are not interested in headers for example, configure bRAWcap to only supply the payload without headers.
Update history of bRAWcap and all of it´s components.
Release Date: 2024-11-05
+++Highlights
++
+- Updated driver signature method to Microsoft Attestation signature. Driver can no be installed and executed on Windows 10 & 11 with Secure Boot activated.
+
++Changes
++
+- Driver & Library
++
+- Generic
++
+- Added new API function for activating several log types and log levels at once (brawcap_log_levels_set)
+- Demo App
++
+- Generic
++
+- Command line parameter to adjust demo log levels.
+- CPP Wrapper
++
+- Added new API function for activating several log types and log levels at once (BRAWcap::LogLevelsSet)
+- Setup
++
+- Improved driver installation-file to isolate driver in Windows driver store depending on Windows version
+- All b-plus and third party licenses will be available in installation directory ./licenses subpath
+
++Bugfixes
++
+- Driver & Library
++
+- [none]
+- Demo App
++
+- [none]
+- Setup
++
+- [none]
+
+Open Issues
++
+- Driver & Library
++
+- [none]
+- Demo App
++
+- [none]
+- Setup
++
+- [none]
+