From 0a93a64b9ee8ab6225064a4b2bc71cdca21a1715 Mon Sep 17 00:00:00 2001 From: Johannes Fellinger Date: Tue, 12 Nov 2024 13:04:06 +0100 Subject: [PATCH] Updated to new bRAWcap Release 1.0.1 Updated DOC --- 2_bplus_generic_extensions.css | 7 + libbrawcap_8h.html => a00002.html | 6 +- ...awcap_8h_source.html => a00002_source.html | 8 +- ...r__property__reader_8c.html => a00005.html | 4 +- ...r__change__notifier_8c.html => a00008.html | 4 +- ...ric__handle__opener_8c.html => a00011.html | 6 +- ...version__comparator_8c.html => a00014.html | 4 +- ...e__packet__receiver_8c.html => a00017.html | 4 +- 06__filter__firewall_8c.html => a00020.html | 4 +- ..._buffered__receiver_8c.html => a00023.html | 4 +- ...imestamp__inspector_8c.html => a00026.html | 4 +- ...packet__transmitter_8c.html => a00029.html | 4 +- ...ffered__transmitter_8c.html => a00032.html | 4 +- a00035.html | 482 ++ brawcap_8h_source.html => a00035_source.html | 5088 +++++++++-------- brawcap__types__shared_8h.html => a00038.html | 234 +- ...hared_8h_source.html => a00038_source.html | 596 +- brawcap__types__um_8h.html => a00041.html | 152 +- a00041_source.html | 702 +++ group__brawcap__generics.html => a00047.html | 76 +- group__brawcap__status.html => a00048.html | 88 +- group__brawcap__version.html => a00049.html | 62 +- group__brawcap__timestamp.html => a00050.html | 190 +- group__brawcap__packet.html => a00051.html | 200 +- group__brawcap__buffer.html => a00052.html | 244 +- ...wcap__buffer__iterator.html => a00053.html | 96 +- group__brawcap__adapter.html => a00054.html | 688 +-- group__brawcap__receive.html => a00055.html | 486 +- group__brawcap__filter.html => a00056.html | 280 +- group__brawcap__transmit.html => a00057.html | 192 +- group__brawcap__stats.html => a00058.html | 156 +- group__brawcap__lib.html => a00059.html | 2 +- group__brawcap__logging.html => a00060.html | 142 +- ...ndle_opener_8c-example.html => a00918.html | 58 +- ..._comparator_8c-example.html => a00919.html | 88 +- ...erty_reader_8c-example.html => a00920.html | 182 +- ...ge_notifier_8c-example.html => a00921.html | 190 +- ...et_receiver_8c-example.html => a00922.html | 106 +- ...ed_receiver_8c-example.html => a00923.html | 132 +- ...p_inspector_8c-example.html => a00924.html | 196 +- ...er_firewall_8c-example.html => a00925.html | 136 +- annotated.html | 20 +- brawcap_8h.html | 479 -- brawcap__types__um_8h_source.html | 700 --- classes.html | 4 +- dir_7b89567e327017dae4de490a86c928ab.html | 14 +- dir_d28a4824dc47e487b107a5db32ef43c4.html | 42 +- examples.html | 18 +- files.html | 30 +- functions.html | 100 +- functions_vars.html | 100 +- globals.html | 4 +- globals_b.html | 563 +- globals_defs.html | 94 +- globals_enum.html | 32 +- globals_eval.html | 168 +- globals_func.html | 229 +- globals_type.html | 50 +- index.html | 562 +- modules.html | 30 +- search/all_0.js | 18 +- search/all_1.js | 2 +- search/all_10.js | 2 +- search/all_11.js | 6 +- search/all_12.js | 6 +- search/all_13.js | 6 +- search/all_14.js | 2 +- search/all_15.js | 2 +- search/all_2.js | 2 +- search/all_3.js | 18 +- search/all_4.js | 593 +- search/all_5.js | 4 +- search/all_6.js | 22 +- search/all_7.js | 2 +- search/all_8.js | 2 +- search/all_9.js | 24 +- search/all_a.js | 2 +- search/all_b.js | 4 +- search/all_c.js | 2 +- search/all_d.js | 4 +- search/all_e.js | 4 +- search/all_f.js | 8 +- search/classes_0.js | 18 +- search/enums_0.js | 30 +- search/enumvalues_0.js | 166 +- search/files_0.js | 18 +- search/files_1.js | 2 +- search/files_2.js | 6 +- search/files_3.js | 2 +- search/functions_0.js | 227 +- search/groups_0.js | 2 +- search/groups_1.js | 2 +- search/groups_2.js | 2 +- search/groups_3.js | 2 +- search/groups_4.js | 6 +- search/groups_5.js | 4 +- search/groups_6.js | 4 +- search/groups_7.js | 4 +- search/groups_8.js | 2 +- search/typedefs_0.js | 48 +- search/variables_0.js | 16 +- search/variables_1.js | 8 +- search/variables_2.js | 4 +- search/variables_3.js | 22 +- search/variables_4.js | 2 +- search/variables_5.js | 24 +- search/variables_6.js | 4 +- search/variables_7.js | 2 +- search/variables_8.js | 4 +- search/variables_9.js | 2 +- search/variables_a.js | 2 +- search/variables_b.js | 2 +- search/variables_c.js | 2 +- search/variables_d.js | 2 +- search/variables_e.js | 2 +- 115 files changed, 8247 insertions(+), 7677 deletions(-) rename libbrawcap_8h.html => a00002.html (97%) rename libbrawcap_8h_source.html => a00002_source.html (94%) rename 01__adapter__property__reader_8c.html => a00005.html (98%) rename 02__adapter__change__notifier_8c.html => a00008.html (98%) rename 03__generic__handle__opener_8c.html => a00011.html (96%) rename 04__version__comparator_8c.html => a00014.html (98%) rename 05__receive__simple__packet__receiver_8c.html => a00017.html (98%) rename 06__filter__firewall_8c.html => a00020.html (98%) rename 07__receive__buffered__receiver_8c.html => a00023.html (98%) rename 08__receive__timestamp__inspector_8c.html => a00026.html (98%) rename 09__transmit__simple__packet__transmitter_8c.html => a00029.html (98%) rename 10__transmit__buffered__transmitter_8c.html => a00032.html (98%) create mode 100644 a00035.html rename brawcap_8h_source.html => a00035_source.html (52%) rename brawcap__types__shared_8h.html => a00038.html (66%) rename brawcap__types__shared_8h_source.html => a00038_source.html (69%) rename brawcap__types__um_8h.html => a00041.html (54%) create mode 100644 a00041_source.html rename group__brawcap__generics.html => a00047.html (63%) rename group__brawcap__status.html => a00048.html (73%) rename group__brawcap__version.html => a00049.html (69%) rename group__brawcap__timestamp.html => a00050.html (67%) rename group__brawcap__packet.html => a00051.html (58%) rename group__brawcap__buffer.html => a00052.html (54%) rename group__brawcap__buffer__iterator.html => a00053.html (62%) rename group__brawcap__adapter.html => a00054.html (54%) rename group__brawcap__receive.html => a00055.html (56%) rename group__brawcap__filter.html => a00056.html (58%) rename group__brawcap__transmit.html => a00057.html (56%) rename group__brawcap__stats.html => a00058.html (69%) rename group__brawcap__lib.html => a00059.html (99%) rename group__brawcap__logging.html => a00060.html (61%) rename 03_generic_handle_opener_8c-example.html => a00918.html (71%) rename 04_version_comparator_8c-example.html => a00919.html (57%) rename 01_adapter_property_reader_8c-example.html => a00920.html (56%) rename 02_adapter_change_notifier_8c-example.html => a00921.html (55%) rename 05_receive_simple_packet_receiver_8c-example.html => a00922.html (67%) rename 07_receive_buffered_receiver_8c-example.html => a00923.html (64%) rename 08_receive_timestamp_inspector_8c-example.html => a00924.html (62%) rename 06_filter_firewall_8c-example.html => a00925.html (63%) delete mode 100644 brawcap_8h.html delete mode 100644 brawcap__types__um_8h_source.html diff --git a/2_bplus_generic_extensions.css b/2_bplus_generic_extensions.css index fa27149..1760c23 100644 --- a/2_bplus_generic_extensions.css +++ b/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/libbrawcap_8h.html b/a00002.html similarity index 97% rename from libbrawcap_8h.html rename to a00002.html index 26bcae5..e845611 100644 --- a/libbrawcap_8h.html +++ b/a00002.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -111,9 +111,9 @@

bRAWcap main header. More...

-
#include "brawcap/brawcap.h"
+
#include "brawcap/brawcap.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

Detailed Description

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.

diff --git a/libbrawcap_8h_source.html b/a00002_source.html similarity index 94% rename from libbrawcap_8h_source.html rename to a00002_source.html index d4ab3af..2941eaa 100644 --- a/libbrawcap_8h_source.html +++ b/a00002_source.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,7 +108,7 @@
libbrawcap.h
-Go to the documentation of this file.
1/**
+Go to the documentation of this file.
1/**
2 * @file libbrawcap.h
3 * @brief bRAWcap main header.
4 *
@@ -125,8 +125,8 @@
15 * You may use this code under the according license terms of b-plus.
16 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
17 */
-
18#include "brawcap/brawcap.h"
-
bRAWcap API - Functions.
+
18#include "brawcap/brawcap.h"
+
bRAWcap API - Functions.
diff --git a/01__adapter__property__reader_8c.html b/a00005.html similarity index 98% rename from 01__adapter__property__reader_8c.html rename to a00005.html index 5a75bdb..40fb2d8 100644 --- a/01__adapter__property__reader_8c.html +++ b/a00005.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates the usage of the adapter handling module. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdlib.h>
#include <stdio.h>

Detailed Description

diff --git a/02__adapter__change__notifier_8c.html b/a00008.html similarity index 98% rename from 02__adapter__change__notifier_8c.html rename to a00008.html index 272590b..f741a2a 100644 --- a/02__adapter__change__notifier_8c.html +++ b/a00008.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates the usage of the adapter handling module. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdlib.h>
#include <stdio.h>

Detailed Description

diff --git a/03__generic__handle__opener_8c.html b/a00011.html similarity index 96% rename from 03__generic__handle__opener_8c.html rename to a00011.html index 0540c7d..a3bf701 100644 --- a/03__generic__handle__opener_8c.html +++ b/a00011.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates the usage of the generic bRAWcap functions. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdlib.h>
#include <stdio.h>

Detailed Description

@@ -123,7 +123,7 @@

It shows how to:

This example makes use of C only.

Version
1.0
diff --git a/04__version__comparator_8c.html b/a00014.html similarity index 98% rename from 04__version__comparator_8c.html rename to a00014.html index 851a215..dcae8bf 100644 --- a/04__version__comparator_8c.html +++ b/a00014.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates how to use the bRAWcap version. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdio.h>

Detailed Description

bRAWcap Example - Demonstrates how to use the bRAWcap version.

diff --git a/05__receive__simple__packet__receiver_8c.html b/a00017.html similarity index 98% rename from 05__receive__simple__packet__receiver_8c.html rename to a00017.html index 58ca62e..0aacc20 100644 --- a/05__receive__simple__packet__receiver_8c.html +++ b/a00017.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdio.h>

Detailed Description

bRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets.

diff --git a/06__filter__firewall_8c.html b/a00020.html similarity index 98% rename from 06__filter__firewall_8c.html rename to a00020.html index a3c5ce7..15db121 100644 --- a/06__filter__firewall_8c.html +++ b/a00020.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates how to throw away specific received packets. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
diff --git a/07__receive__buffered__receiver_8c.html b/a00023.html similarity index 98% rename from 07__receive__buffered__receiver_8c.html rename to a00023.html index a25f727..092406f 100644 --- a/07__receive__buffered__receiver_8c.html +++ b/a00023.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdio.h>
#include <stdlib.h>

Detailed Description

diff --git a/08__receive__timestamp__inspector_8c.html b/a00026.html similarity index 98% rename from 08__receive__timestamp__inspector_8c.html rename to a00026.html index 275c132..fdd63aa 100644 --- a/08__receive__timestamp__inspector_8c.html +++ b/a00026.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes. More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"
#include <stdio.h>
#include <time.h>

Detailed Description

diff --git a/09__transmit__simple__packet__transmitter_8c.html b/a00029.html similarity index 98% rename from 09__transmit__simple__packet__transmitter_8c.html rename to a00029.html index c1f94e4..5b4f1d9 100644 --- a/09__transmit__simple__packet__transmitter_8c.html +++ b/a00029.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - TODO: More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"

Detailed Description

bRAWcap Example - TODO:

Version
1.0
diff --git a/10__transmit__buffered__transmitter_8c.html b/a00032.html similarity index 98% rename from 10__transmit__buffered__transmitter_8c.html rename to a00032.html index 4dfd2cc..8501dba 100644 --- a/10__transmit__buffered__transmitter_8c.html +++ b/a00032.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,7 +115,7 @@

bRAWcap Example - TODO: More...

-
#include "libbrawcap.h"
+
#include "libbrawcap.h"

Detailed Description

bRAWcap Example - TODO:

Version
1.0
diff --git a/a00035.html b/a00035.html new file mode 100644 index 0000000..bf69f4d --- /dev/null +++ b/a00035.html @@ -0,0 +1,482 @@ + + + + + + + + +bRAWcap: brawcap.h File Reference + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
bRAWcap 1.0.1 +
+
b-plus Technologies - Ethernet Performance Transmitter Receiver
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+ +
brawcap.h File Reference
+
+
+ +

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_tbrawcap_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.
 
+

Detailed Description

+

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.

+
+ + + + + + diff --git a/brawcap_8h_source.html b/a00035_source.html similarity index 52% rename from brawcap_8h_source.html rename to a00035_source.html index 4bd2494..8876add 100644 --- a/brawcap_8h_source.html +++ b/a00035_source.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -112,7 +112,7 @@
brawcap.h
-Go to the documentation of this file.
1/**
+Go to the documentation of this file.
1/**
2 * @file brawcap.h
3 *
4 * @brief bRAWcap API - Functions.
@@ -132,7 +132,7 @@
18#ifndef BRAWCAP_H
19#define BRAWCAP_H
20
-
21#include "brawcap_types_um.h"
+
21#include "brawcap_types_um.h"
22
23#if defined(__cplusplus)
24extern "C"
@@ -147,458 +147,458 @@
33 */
34
35/**
-
36 * @brief Sets the current log level(s) for the given log type(s) to the specified log level(s).
+
36 * @brief Sets the current log level for the given log type to the specified log level.
37 *
-
38 * @param[in] type Log type(s) for which to configure the log level(s).
-
39 * Value has to be interpreted as bitfield.
-
40 * This allows to (de)activate levels for several types with only one call.
+
38 * @param[in] type Log type for which to configure the log level.
+
39 *
+
40 * @param[in] level The log level to be applied.
41 *
-
42 * @param[in] level The log level to be applied.
-
43 * Value has to be interpreted as bitfield.
-
44 * This allows to (de)activate several levels with only one call.
+
42 * @param[in] pKey Key required to activate debug logging.
+
43 * For any other log level than @ref BRAWCAP_LOG_LEVEL_DEBUG this parameter is not required
+
44 * and should be set to NULL.
45 *
-
46 * @param[in] pKey Key required to activate debug logging.
-
47 * For any other log level than @ref BRAWCAP_LOG_LEVEL_DEBUG this parameter is not required
-
48 * and should be set to NULL.
-
49 *
-
50 * @return
-
51 * Status | Description
-
52 * ---------------------------------------------- | -------------------------------------------------------------------
-
53 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
54 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Attempted to enable debug logging with wrong key.
-
55 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | None of the specified log types is available.
-
56 */
- -
58brawcap_log_level_set(const brawcap_log_type_t type, const brawcap_log_level_t level, const char* pKey);
-
59
-
60/**
-
61 * @brief Reads the level(s) for the given log type.
+
46 * @return
+
47 * Status | Description
+
48 * ---------------------------------------------- | -------------------------------------------------------------------
+
49 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
50 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Attempted to enable debug logging with wrong key.
+
51 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | None of the specified log types is available.
+
52 */
+ +
54brawcap_log_level_set(const brawcap_log_type_t type, const brawcap_log_level_t level, const char* pKey);
+
55
+
56/**
+
57 * @brief Sets the current log levels for the given log types to the specified log levels.
+
58 *
+
59 * @param[in] type Log types for which to configure the log level(s).
+
60 * Value has to be interpreted as bitfield.
+
61 * This allows to (de)activate levels for several types with only one call.
62 *
-
63 * @param[in] type Log type for which to read the log level.
-
64 * It is only possible to retrieve the log level for one type.
-
65 * Call this function for each type to resolve all log levels.
+
63 * @param[in] level The log levels to be applied.
+
64 * Value has to be interpreted as bitfield.
+
65 * This allows to (de)activate several levels with only one call.
66 *
-
67 * @param[out] pLevel Will contain the currently configured log level(s), afterwards.
-
68 * This value shall be interpreted as bitfield, which allows to resolve all log levels for the type with only one call.
-
69 *
-
70 * @return
-
71 * Status | Description
-
72 * ---------------------------------------------- | -------------------------------------------------------------------
-
73 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
74 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
75 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified log types is invalid.
-
76 */
- - -
79
-
80/**@}*/
-
81#endif
-
82
-
83/************************************************ GENERIC ************************************************************/
-
84#if 1
-
85/**
-
86 * @addtogroup brawcap_generics
-
87 * @{
-
88 */
-
89
-
90/**
-
91 * @brief Opens a new bRAWcap handle on the adapter, specified by it´s name.
-
92 *
-
93 * The created/opened bRAWcap handle should be saved by the user application and used for calling further bRAWcap
-
94 * functions. Each opened handle shall be @ref brawcap_close "closed", if it is not required anymore.
-
95 *
-
96 * @note On Windows a adapter name is always represented by a GUID.
-
97 *
-
98 * @note bRAWcap supports multiple handles to the same adapter.
-
99 * But the total number of open handles on the same adapter is limited to @ref BRAWCAP_HANDLES_PER_ADAPTER_MAX.
-
100 *
-
101 * @warning Opening multiple handles to the same adapter, with the same receive filter leads to redundancy and
-
102 * performance degradation and therefore should be avoided, if possible.
-
103 *
-
104 * @param[in] name The name of the adapter to open a bRAWcap handle.
-
105 *
-
106 * @param[out] pHandle Will contain the opened bRAWcap handle, afterwards.
-
107 *
-
108 * @return
-
109 * Status | Description
-
110 * ---------------------------------------------- | -------------------------------------------------------------------
-
111 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
112 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
113 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified name does not represent a adapter name (GUID).
-
114 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Specified adapter name not found/not available.
-
115 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not running on specified adapter.
-
116 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
117 */
- - -
120
-
121/**
-
122 * @brief Closes the specified bRAWcap handle.
-
123 *
-
124 * The user application should not use the specified handle anymore, after calling this function.
-
125 *
-
126 * @warning Closing bRAWcap handles is not thread safe and the user is responsible for synchronization.
-
127 *
-
128 * @param[in] pHandle bRAWcap handle to be closed.
-
129 *
-
130 * @return
-
131 * Status | Description
-
132 * ---------------------------------------------- | -------------------------------------------------------------------
-
133 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
134 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
135 * @ref BRAWCAP_STATUS_ERROR_FAILED | A system error occurred.
-
136 */
- - -
139
-
140/**@}*/
-
141#endif
-
142
-
143/************************************************** STATUS ***********************************************************/
-
144#if 1
-
145/**
-
146 * @addtogroup brawcap_status
-
147 * @{
-
148 */
-
149
-
150/**
-
151 * @brief Reads the last status appeared in bRAWcap, for the calling thread.
-
152 *
-
153 * The last status is only updated if it does not equal @ref BRAWCAP_STATUS_SUCCESS.
-
154 * Which means that this function shall never be used to check if a bRAWcap function succeeded.
-
155 * Instead this should always be checked on each bRAWcap function return value directly
-
156 * and only if something different than @ref BRAWCAP_STATUS_SUCCESS is returned,
-
157 * this function can be used to get the last status again.
-
158 *
-
159 * The last status may be overwritten when the calling thread calls another bRAWcap function.
-
160 * It is therefore recommended to call this function directly after a bRAWcap function to get the status of that
-
161 * function again.
-
162 *
-
163 * @note If yet, no other status than @ref BRAWCAP_STATUS_SUCCESS occurred for the calling thread,
-
164 * @ref BRAWCAP_STATUS_SUCCESS will be returned.
-
165 *
-
166 * @return
-
167 * Status | Description
-
168 * ---------------------------------------------- | ------------------------------------------------------------------
-
169 * @ref BRAWCAP_STATUS_SUCCESS | If no other status than success happened for the calling thread.
-
170 * Any of @ref brawcap_status_t | Please see return of last called function for detailed info.
-
171 */
- - -
174
-
175/**@}*/
-
176#endif
-
177
-
178/************************************************ VERSION ************************************************************/
-
179#if 1
-
180/**
-
181 * @addtogroup brawcap_version
-
182 * @{
-
183 */
-
184
-
185/**
-
186 * @brief Returns loaded bRAWcap library version.
-
187 *
-
188 * @param[out] pVersion Will contain the loaded library version, afterwards.
-
189 *
-
190 * @return
-
191 * Status | Description
-
192 * ---------------------------------------------- | ------------------------------------------------------------------
-
193 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
194 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
195 */
- - -
198
-
199/**
-
200 * @brief Reads current version of loaded bRAWcap driver.
-
201 *
-
202 * @note The driver version is the same for each adapter.
-
203 * Therefore, it doesn´t matter which handle/adapter is used to read the driver version.
-
204 *
-
205 * @param[in] pHandle bRAWcap handle to read from.
-
206 *
-
207 * @param[out] pVersion Will contain the bRAWcap driver version, afterwards.
+
67 * @param[in] pKey Key required to activate debug logging.
+
68 * For any other log level than @ref BRAWCAP_LOG_LEVEL_DEBUG this parameter is not required
+
69 * and should be set to NULL.
+
70 *
+
71 * @return
+
72 * Status | Description
+
73 * ---------------------------------------------- | -------------------------------------------------------------------
+
74 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
75 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Attempted to enable debug logging with wrong key.
+
76 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | None of the specified log types is available.
+
77 */
+ +
79brawcap_log_levels_set(const UINT32 type, const UINT32 level, const char* pKey);
+
80
+
81/**
+
82 * @brief Reads the level(s) for the given log type.
+
83 *
+
84 * @param[in] type Log type for which to read the log level.
+
85 * It is only possible to retrieve the log level for one type.
+
86 * Call this function for each type to resolve all log levels.
+
87 *
+
88 * @param[out] pLevel Will contain the currently configured log level(s), afterwards.
+
89 * This value shall be interpreted as bitfield, which allows to resolve all log levels for the type with only one call.
+
90 *
+
91 * @return
+
92 * Status | Description
+
93 * ---------------------------------------------- | -------------------------------------------------------------------
+
94 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
95 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
96 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified log types is invalid.
+
97 */
+ + +
100
+
101/**@}*/
+
102#endif
+
103
+
104/************************************************ GENERIC ************************************************************/
+
105#if 1
+
106/**
+
107 * @addtogroup brawcap_generics
+
108 * @{
+
109 */
+
110
+
111/**
+
112 * @brief Opens a new bRAWcap handle on the adapter, specified by it´s name.
+
113 *
+
114 * The created/opened bRAWcap handle should be saved by the user application and used for calling further bRAWcap
+
115 * functions. Each opened handle shall be @ref brawcap_close "closed", if it is not required anymore.
+
116 *
+
117 * @note On Windows a adapter name is always represented by a GUID.
+
118 *
+
119 * @note bRAWcap supports multiple handles to the same adapter.
+
120 * But the total number of open handles on the same adapter is limited to @ref BRAWCAP_HANDLES_PER_ADAPTER_MAX.
+
121 *
+
122 * @warning Opening multiple handles to the same adapter, with the same receive filter leads to redundancy and
+
123 * performance degradation and therefore should be avoided, if possible.
+
124 *
+
125 * @param[in] name The name of the adapter to open a bRAWcap handle.
+
126 *
+
127 * @param[out] pHandle Will contain the opened bRAWcap handle, afterwards.
+
128 *
+
129 * @return
+
130 * Status | Description
+
131 * ---------------------------------------------- | -------------------------------------------------------------------
+
132 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
133 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
134 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The specified name does not represent a adapter name (GUID).
+
135 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Specified adapter name not found/not available.
+
136 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not running on specified adapter.
+
137 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
138 */
+ + +
141
+
142/**
+
143 * @brief Closes the specified bRAWcap handle.
+
144 *
+
145 * The user application should not use the specified handle anymore, after calling this function.
+
146 *
+
147 * @warning Closing bRAWcap handles is not thread safe and the user is responsible for synchronization.
+
148 *
+
149 * @param[in] pHandle bRAWcap handle to be closed.
+
150 *
+
151 * @return
+
152 * Status | Description
+
153 * ---------------------------------------------- | -------------------------------------------------------------------
+
154 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
155 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
156 * @ref BRAWCAP_STATUS_ERROR_FAILED | A system error occurred.
+
157 */
+ + +
160
+
161/**@}*/
+
162#endif
+
163
+
164/************************************************** STATUS ***********************************************************/
+
165#if 1
+
166/**
+
167 * @addtogroup brawcap_status
+
168 * @{
+
169 */
+
170
+
171/**
+
172 * @brief Reads the last status appeared in bRAWcap, for the calling thread.
+
173 *
+
174 * The last status is only updated if it does not equal @ref BRAWCAP_STATUS_SUCCESS.
+
175 * Which means that this function shall never be used to check if a bRAWcap function succeeded.
+
176 * Instead this should always be checked on each bRAWcap function return value directly
+
177 * and only if something different than @ref BRAWCAP_STATUS_SUCCESS is returned,
+
178 * this function can be used to get the last status again.
+
179 *
+
180 * The last status may be overwritten when the calling thread calls another bRAWcap function.
+
181 * It is therefore recommended to call this function directly after a bRAWcap function to get the status of that
+
182 * function again.
+
183 *
+
184 * @note If yet, no other status than @ref BRAWCAP_STATUS_SUCCESS occurred for the calling thread,
+
185 * @ref BRAWCAP_STATUS_SUCCESS will be returned.
+
186 *
+
187 * @return
+
188 * Status | Description
+
189 * ---------------------------------------------- | ------------------------------------------------------------------
+
190 * @ref BRAWCAP_STATUS_SUCCESS | If no other status than success happened for the calling thread.
+
191 * Any of @ref brawcap_status_t | Please see return of last called function for detailed info.
+
192 */
+ + +
195
+
196/**@}*/
+
197#endif
+
198
+
199/************************************************ VERSION ************************************************************/
+
200#if 1
+
201/**
+
202 * @addtogroup brawcap_version
+
203 * @{
+
204 */
+
205
+
206/**
+
207 * @brief Returns loaded bRAWcap library version.
208 *
-
209 * @return
-
210 * Status | Description
-
211 * ---------------------------------------------- | ------------------------------------------------------------------
-
212 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
213 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
214 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
215 */
- - -
218
-
219/**@}*/
-
220#endif
-
221
-
222/*********************************************** TIMESTAMP ***********************************************************/
-
223#if 1
-
224/**
-
225 * @addtogroup brawcap_timestamp
-
226 * @{
-
227 */
-
228
-
229/**
-
230 * @brief Reads out the mode of the specified timestamp.
-
231 *
-
232 * @param[in] pTimestamp The timestamp to read from.
-
233 *
-
234 * @param[out] pMode Will contain the timestamp mode, afterwards.
-
235 *
-
236 * @return
-
237 * Status | Description
-
238 * ---------------------------------------------- | ------------------------------------------------------------------
-
239 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
240 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
241 */
- - -
244
+
209 * @param[out] pVersion Will contain the loaded library version, afterwards.
+
210 *
+
211 * @return
+
212 * Status | Description
+
213 * ---------------------------------------------- | ------------------------------------------------------------------
+
214 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
215 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
216 */
+ + +
219
+
220/**
+
221 * @brief Reads current version of loaded bRAWcap driver.
+
222 *
+
223 * @note The driver version is the same for each adapter.
+
224 * Therefore, it doesn´t matter which handle/adapter is used to read the driver version.
+
225 *
+
226 * @param[in] pHandle bRAWcap handle to read from.
+
227 *
+
228 * @param[out] pVersion Will contain the bRAWcap driver version, afterwards.
+
229 *
+
230 * @return
+
231 * Status | Description
+
232 * ---------------------------------------------- | ------------------------------------------------------------------
+
233 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
234 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
235 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
236 */
+ + +
239
+
240/**@}*/
+
241#endif
+
242
+
243/*********************************************** TIMESTAMP ***********************************************************/
+
244#if 1
245/**
-
246 * @brief Reads out the timestamp resolution of the specified timestamp.
-
247 *
-
248 * @note If the resolution is unknown it will be set to zero (@ref BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN)
-
249 *
-
250 * @param[in] pTimestamp The timestamp to read from.
-
251 *
-
252 * @param[out] pResolution_ns Will contain the timestamp resolution in nanoseconds, afterwards.
-
253 *
-
254 * @return
-
255 * Status | Description
-
256 * ---------------------------------------------- | ------------------------------------------------------------------
-
257 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
258 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
259 */
- - -
262 brawcap_timestamp_resolution_ns_t* const pResolution_ns);
-
263
-
264/**
-
265 * @brief Reads out the timestamp value in seconds and nanoseconds.
-
266 *
-
267 * The values are based on 00:00 01.01.1970.
+
246 * @addtogroup brawcap_timestamp
+
247 * @{
+
248 */
+
249
+
250/**
+
251 * @brief Reads out the mode of the specified timestamp.
+
252 *
+
253 * @param[in] pTimestamp The timestamp to read from.
+
254 *
+
255 * @param[out] pMode Will contain the timestamp mode, afterwards.
+
256 *
+
257 * @return
+
258 * Status | Description
+
259 * ---------------------------------------------- | ------------------------------------------------------------------
+
260 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
261 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
262 */
+ + +
265
+
266/**
+
267 * @brief Reads out the timestamp resolution of the specified timestamp.
268 *
-
269 * The seconds part contains only whole seconds of the timestamp,
-
270 * while the nanoseconds part contains only the fractional part.
-
271 *
-
272 * @param[in] pTimestamp The timestamp to read from.
-
273 *
-
274 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
-
275 *
-
276 * @param[out] pNanoseconds Will contain the fractional part in nanoseconds, afterwards.
-
277 *
-
278 * @return
-
279 * Status | Description
-
280 * ---------------------------------------------- | ------------------------------------------------------------------
-
281 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
282 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
283 */
- -
285brawcap_timestamp_value_ns_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
-
286 UINT32* const pNanoseconds);
-
287
-
288/**
-
289 * @brief Sets the timestamp value in seconds and nanoseconds.
-
290 *
-
291 * The values has to be based on 00:00 01.01.1970.
+
269 * @note If the resolution is unknown it will be set to zero (@ref BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN)
+
270 *
+
271 * @param[in] pTimestamp The timestamp to read from.
+
272 *
+
273 * @param[out] pResolution_ns Will contain the timestamp resolution in nanoseconds, afterwards.
+
274 *
+
275 * @return
+
276 * Status | Description
+
277 * ---------------------------------------------- | ------------------------------------------------------------------
+
278 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
279 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
280 */
+ + +
283 brawcap_timestamp_resolution_ns_t* const pResolution_ns);
+
284
+
285/**
+
286 * @brief Reads out the timestamp value in seconds and nanoseconds.
+
287 *
+
288 * The values are based on 00:00 01.01.1970.
+
289 *
+
290 * The seconds part contains only whole seconds of the timestamp,
+
291 * while the nanoseconds part contains only the fractional part.
292 *
-
293 * @param[in] pTimestamp The timestamp to be modified.
+
293 * @param[in] pTimestamp The timestamp to read from.
294 *
-
295 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
295 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
296 *
-
297 * @param[in] nanoseconds The fractional part in nanoseconds.
-
298 * This parameter should only contain the fractional timestamp part.
-
299 * That means that it can never exceed 999.999.999 nanoseconds.
-
300 *
-
301 * @return
-
302 * Status | Description
-
303 * ---------------------------------------------- | ------------------------------------------------------------------
-
304 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
305 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
306 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
-
307 */
- -
309brawcap_timestamp_value_ns_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 nanoseconds);
-
310
-
311/**
-
312 * @brief Reads out the timestamp value in seconds and microseconds.
+
297 * @param[out] pNanoseconds Will contain the fractional part in nanoseconds, afterwards.
+
298 *
+
299 * @return
+
300 * Status | Description
+
301 * ---------------------------------------------- | ------------------------------------------------------------------
+
302 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
303 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
304 */
+ +
306brawcap_timestamp_value_ns_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
+
307 UINT32* const pNanoseconds);
+
308
+
309/**
+
310 * @brief Sets the timestamp value in seconds and nanoseconds.
+
311 *
+
312 * The values has to be based on 00:00 01.01.1970.
313 *
-
314 * The values are based on 00:00 01.01.1970.
+
314 * @param[in] pTimestamp The timestamp to be modified.
315 *
-
316 * The seconds part contains only whole seconds of the timestamp,
-
317 * while the microseconds contains only the fractional part.
-
318 *
-
319 * @param[in] pTimestamp The timestamp to read from.
-
320 *
-
321 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
-
322 *
-
323 * @param[out] pMicroseconds Will contain the fractional part in microseconds, afterwards.
-
324 *
-
325 * @return
-
326 * Status | Description
-
327 * ---------------------------------------------- | ------------------------------------------------------------------
-
328 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
329 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
330 */
- -
332brawcap_timestamp_value_us_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
-
333 UINT32* const pMicroseconds);
-
334
-
335/**
-
336 * @brief Sets the timestamp value in seconds and microseconds.
-
337 *
-
338 * The values has to be based on 00:00 01.01.1970.
+
316 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
317 *
+
318 * @param[in] nanoseconds The fractional part in nanoseconds.
+
319 * This parameter should only contain the fractional timestamp part.
+
320 * That means that it can never exceed 999.999.999 nanoseconds.
+
321 *
+
322 * @return
+
323 * Status | Description
+
324 * ---------------------------------------------- | ------------------------------------------------------------------
+
325 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
326 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
327 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
+
328 */
+ +
330brawcap_timestamp_value_ns_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 nanoseconds);
+
331
+
332/**
+
333 * @brief Reads out the timestamp value in seconds and microseconds.
+
334 *
+
335 * The values are based on 00:00 01.01.1970.
+
336 *
+
337 * The seconds part contains only whole seconds of the timestamp,
+
338 * while the microseconds contains only the fractional part.
339 *
-
340 * @param[in] pTimestamp The timestamp to be modified.
+
340 * @param[in] pTimestamp The timestamp to read from.
341 *
-
342 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
342 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
343 *
-
344 * @param[in] microseconds The fractional part in microseconds.
-
345 * This parameter should only contain the fractional timestamp part.
-
346 * That means that it can never exceed 999.999 microseconds.
-
347 *
-
348 * @return
-
349 * Status | Description
-
350 * ---------------------------------------------- | ------------------------------------------------------------------
-
351 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
352 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
353 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
-
354 *
-
355 */
- -
357brawcap_timestamp_value_us_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 microseconds);
-
358
-
359/**
-
360 * @brief Reads out the timestamp value in seconds and milliseconds.
-
361 *
-
362 * The values are based on 00:00 01.01.1970.
-
363 *
-
364 * The seconds part contains only whole seconds of the timestamp,
-
365 * while the milliseconds part contains only the fractional part.
-
366 *
-
367 * @param[in] pTimestamp The timestamp to read from.
+
344 * @param[out] pMicroseconds Will contain the fractional part in microseconds, afterwards.
+
345 *
+
346 * @return
+
347 * Status | Description
+
348 * ---------------------------------------------- | ------------------------------------------------------------------
+
349 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
350 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
351 */
+ +
353brawcap_timestamp_value_us_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
+
354 UINT32* const pMicroseconds);
+
355
+
356/**
+
357 * @brief Sets the timestamp value in seconds and microseconds.
+
358 *
+
359 * The values has to be based on 00:00 01.01.1970.
+
360 *
+
361 * @param[in] pTimestamp The timestamp to be modified.
+
362 *
+
363 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
364 *
+
365 * @param[in] microseconds The fractional part in microseconds.
+
366 * This parameter should only contain the fractional timestamp part.
+
367 * That means that it can never exceed 999.999 microseconds.
368 *
-
369 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
-
370 *
-
371 * @param[out] pMilliseconds Will contain the fractional part in milliseconds, afterwards.
-
372 *
-
373 * @return
-
374 * Status | Description
-
375 * ---------------------------------------------- | ------------------------------------------------------------------
-
376 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
377 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
378 */
- -
380brawcap_timestamp_value_ms_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
-
381 UINT32* const pMilliseconds);
-
382
-
383/**
-
384 * @brief Sets the timestamp value in seconds and milliseconds.
-
385 *
-
386 * The values has to be based on 00:00 01.01.1970.
+
369 * @return
+
370 * Status | Description
+
371 * ---------------------------------------------- | ------------------------------------------------------------------
+
372 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
373 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
374 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
+
375 *
+
376 */
+ +
378brawcap_timestamp_value_us_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 microseconds);
+
379
+
380/**
+
381 * @brief Reads out the timestamp value in seconds and milliseconds.
+
382 *
+
383 * The values are based on 00:00 01.01.1970.
+
384 *
+
385 * The seconds part contains only whole seconds of the timestamp,
+
386 * while the milliseconds part contains only the fractional part.
387 *
-
388 * @param[in] pTimestamp The timestamp to be modified.
+
388 * @param[in] pTimestamp The timestamp to read from.
389 *
-
390 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
390 * @param[out] pSeconds Will contain the whole seconds of the timestamp, afterwards.
391 *
-
392 * @param[in] milliseconds The fractional part in milliseconds.
-
393 * This parameter should only contain the fractional timestamp part.
-
394 * That means that it can never exceed 999 milliseconds.
-
395 *
-
396 * @return
-
397 * Status | Description
-
398 * ---------------------------------------------- | ------------------------------------------------------------------
-
399 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
400 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
401 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
-
402 */
- -
404brawcap_timestamp_value_ms_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 milliseconds);
-
405
-
406/**@}*/
-
407#endif
-
408
-
409/************************************************ PACKET *************************************************************/
-
410#if 1
-
411/**
-
412 * @addtogroup brawcap_packet
-
413 * @{
-
414 */
-
415
-
416/**
-
417 * @brief Creates a new packet.
-
418 *
-
419 * A packet can be used for @ref brawcap_rx_packet "receiving" (single packet based) or
-
420 * @ref brawcap_tx_packet "transmitting"
-
421 * (also single packet based).
-
422 *
-
423 * If a packet is not required anymore it should be @ref brawcap_packet_free "freed".
-
424 *
-
425 * @param[out] pPacket Will contain the new created packet, afterwards.
-
426 *
-
427 * @param[in] maxSize The maximum supported byte size for the packet payload.
-
428 * This value cannot be changed after packet creation and determines how much memory is required for the packet.
-
429 * The packet can only contain payloads up to this value.
-
430 *
-
431 * @return
-
432 * Status | Description
-
433 * ---------------------------------------------- | ------------------------------------------------------------------
-
434 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
435 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
436 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Packet payload byte size to low/high.
-
437 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
-
438 */
- - -
441
-
442/**
-
443 * @brief Frees the specified packet.
-
444 * When this function is called the specified packet becomes invalid and it´s memory is released.
+
392 * @param[out] pMilliseconds Will contain the fractional part in milliseconds, afterwards.
+
393 *
+
394 * @return
+
395 * Status | Description
+
396 * ---------------------------------------------- | ------------------------------------------------------------------
+
397 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
398 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
399 */
+ +
401brawcap_timestamp_value_ms_get(brawcap_timestamp_t* const pTimestamp, UINT64* const pSeconds,
+
402 UINT32* const pMilliseconds);
+
403
+
404/**
+
405 * @brief Sets the timestamp value in seconds and milliseconds.
+
406 *
+
407 * The values has to be based on 00:00 01.01.1970.
+
408 *
+
409 * @param[in] pTimestamp The timestamp to be modified.
+
410 *
+
411 * @param[in] seconds Whole seconds since 00:00 01.01.1970.
+
412 *
+
413 * @param[in] milliseconds The fractional part in milliseconds.
+
414 * This parameter should only contain the fractional timestamp part.
+
415 * That means that it can never exceed 999 milliseconds.
+
416 *
+
417 * @return
+
418 * Status | Description
+
419 * ---------------------------------------------- | ------------------------------------------------------------------
+
420 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
421 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
422 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Nanosecond value to high (only fraction of second).
+
423 */
+ +
425brawcap_timestamp_value_ms_set(brawcap_timestamp_t* const pTimestamp, const UINT64 seconds, const UINT32 milliseconds);
+
426
+
427/**@}*/
+
428#endif
+
429
+
430/************************************************ PACKET *************************************************************/
+
431#if 1
+
432/**
+
433 * @addtogroup brawcap_packet
+
434 * @{
+
435 */
+
436
+
437/**
+
438 * @brief Creates a new packet.
+
439 *
+
440 * A packet can be used for @ref brawcap_rx_packet "receiving" (single packet based) or
+
441 * @ref brawcap_tx_packet "transmitting"
+
442 * (also single packet based).
+
443 *
+
444 * If a packet is not required anymore it should be @ref brawcap_packet_free "freed".
445 *
-
446 * @warning Freeing a packet is not thread safe and the user is responsible for synchronization.
+
446 * @param[out] pPacket Will contain the new created packet, afterwards.
447 *
-
448 * @param[in] pPacket The packet to be freed.
-
449 *
-
450 * @return
-
451 * Status | Description
-
452 * ---------------------------------------------- | ------------------------------------------------------------------
-
453 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
454 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
455 */
- - -
458
-
459/**
-
460 * @brief Reads out the status for the specified packet.
-
461 * The status will be set updated during reception/transmission.
-
462 * It indicates the status of the packet depending on the operation.
-
463 *
-
464 * @param[in] pPacket The packet to read from.
-
465 *
-
466 * @param[out] pStatus Will contain the packet status, afterwards.
-
467 *
-
468 * @return
-
469 * Status | Description
-
470 * ---------------------------------------------- | ------------------------------------------------------------------
-
471 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
472 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
473 */
- - -
476
-
477/**
-
478 * @brief Reads out the @ref brawcap_timestamp "timestamp" object for the specified packet.
-
479 *
-
480 * @attention The timestamp is part of the packet itself.
-
481 * Therefore the returned timestamp is only valid as long as the packet itself is valid.
-
482 * The user application shall not store the timestamp object separately and only used it as long as the packet is valid.
-
483 *
-
484 * @param[in] pPacket The packet to read from.
-
485 *
-
486 * @param[out] pTimestamp Will contain the timestamp object of the packet, afterwards.
-
487 * This object can be used by the @ref brawcap_timestamp module.
+
448 * @param[in] maxSize The maximum supported byte size for the packet payload.
+
449 * This value cannot be changed after packet creation and determines how much memory is required for the packet.
+
450 * The packet can only contain payloads up to this value.
+
451 *
+
452 * @return
+
453 * Status | Description
+
454 * ---------------------------------------------- | ------------------------------------------------------------------
+
455 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
456 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
457 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Packet payload byte size to low/high.
+
458 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
+
459 */
+ + +
462
+
463/**
+
464 * @brief Frees the specified packet.
+
465 * When this function is called the specified packet becomes invalid and it´s memory is released.
+
466 *
+
467 * @warning Freeing a packet is not thread safe and the user is responsible for synchronization.
+
468 *
+
469 * @param[in] pPacket The packet to be freed.
+
470 *
+
471 * @return
+
472 * Status | Description
+
473 * ---------------------------------------------- | ------------------------------------------------------------------
+
474 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
475 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
476 */
+ + +
479
+
480/**
+
481 * @brief Reads out the status for the specified packet.
+
482 * The status will be set updated during reception/transmission.
+
483 * It indicates the status of the packet depending on the operation.
+
484 *
+
485 * @param[in] pPacket The packet to read from.
+
486 *
+
487 * @param[out] pStatus Will contain the packet status, afterwards.
488 *
489 * @return
490 * Status | Description
@@ -606,20 +606,20 @@
492 * @ref BRAWCAP_STATUS_SUCCESS | Success.
493 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
494 */
- - + +
497
498/**
-
499 * @brief Reads out the length on wire of the specified packet.
-
500 * This value is especially useful for received packets.
-
501 * It indicates the total packet payload byte size of the packet on wire.
-
502 * This may not equal to the @ref brawcap_packet_payload_size_get "captured payload byte size".
-
503 * Because the payload byte size depends on the configured filter and it´s
-
504 * @ref brawcap_filter_bytes_to_capture_set "bytes to capture" parameters.
-
505 *
-
506 * @param[in] pPacket The packet to read from.
-
507 *
-
508 * @param[out] pLengthOnWire Will contain the payload byte length on wire, afterwards.
+
499 * @brief Reads out the @ref brawcap_timestamp "timestamp" object for the specified packet.
+
500 *
+
501 * @attention The timestamp is part of the packet itself.
+
502 * Therefore the returned timestamp is only valid as long as the packet itself is valid.
+
503 * The user application shall not store the timestamp object separately and only used it as long as the packet is valid.
+
504 *
+
505 * @param[in] pPacket The packet to read from.
+
506 *
+
507 * @param[out] pTimestamp Will contain the timestamp object of the packet, afterwards.
+
508 * This object can be used by the @ref brawcap_timestamp module.
509 *
510 * @return
511 * Status | Description
@@ -627,226 +627,226 @@
513 * @ref BRAWCAP_STATUS_SUCCESS | Success.
514 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
515 */
- - + +
518
519/**
-
520 * @brief Reads out the max supported payload byte size of the specified packet.
-
521 * This value was set during packet @ref brawcap_packet_create "creation"
-
522 * (or @ref brawcap_buffer_create "buffer creation" if it´s a buffered packet).
-
523 *
-
524 * @param[in] pPacket The packet to read from.
-
525 *
-
526 * @param[out] pMaxPayloadSize Will contain the max packet payload byte size, afterwards.
-
527 *
-
528 * @return
-
529 * Status | Description
-
530 * ---------------------------------------------- | ------------------------------------------------------------------
-
531 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
532 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
533 */
- - -
536
-
537/**
-
538 * @brief Reads out the captured payload byte size of the specified packet.
-
539 * This indicates the total byte size of the (captured - if received) packet payload
-
540 *
-
541 * @param[in] pPacket The packet to read from.
-
542 *
-
543 * @param[out] pLength Will contain the captured payload byte size, afterwards.
+
520 * @brief Reads out the length on wire of the specified packet.
+
521 * This value is especially useful for received packets.
+
522 * It indicates the total packet payload byte size of the packet on wire.
+
523 * This may not equal to the @ref brawcap_packet_payload_size_get "captured payload byte size".
+
524 * Because the payload byte size depends on the configured filter and it´s
+
525 * @ref brawcap_filter_bytes_to_capture_set "bytes to capture" parameters.
+
526 *
+
527 * @param[in] pPacket The packet to read from.
+
528 *
+
529 * @param[out] pLengthOnWire Will contain the payload byte length on wire, afterwards.
+
530 *
+
531 * @return
+
532 * Status | Description
+
533 * ---------------------------------------------- | ------------------------------------------------------------------
+
534 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
535 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
536 */
+ + +
539
+
540/**
+
541 * @brief Reads out the max supported payload byte size of the specified packet.
+
542 * This value was set during packet @ref brawcap_packet_create "creation"
+
543 * (or @ref brawcap_buffer_create "buffer creation" if it´s a buffered packet).
544 *
-
545 * @return
-
546 * Status | Description
-
547 * ---------------------------------------------- | ------------------------------------------------------------------
-
548 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
549 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
550 */
- - -
553
-
554/**
-
555 * @brief Reads out the payload of the specified packet.
-
556 *
-
557 * The function returns a pointer to the beginning of the packet payload.
-
558 *
-
559 * @note The returned payload pointer should be only accessed as long as the packet is not freed.
-
560 * If post processing is required a copy of the required payload should be done.
+
545 * @param[in] pPacket The packet to read from.
+
546 *
+
547 * @param[out] pMaxPayloadSize Will contain the max packet payload byte size, afterwards.
+
548 *
+
549 * @return
+
550 * Status | Description
+
551 * ---------------------------------------------- | ------------------------------------------------------------------
+
552 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
553 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
554 */
+ + +
557
+
558/**
+
559 * @brief Reads out the captured payload byte size of the specified packet.
+
560 * This indicates the total byte size of the (captured - if received) packet payload
561 *
-
562 * @attention Accessing the packet payload is not thread safe and user is responsible for synchronization.
+
562 * @param[in] pPacket The packet to read from.
563 *
-
564 * @param[in] pPacket The packet to read from.
+
564 * @param[out] pLength Will contain the captured payload byte size, afterwards.
565 *
-
566 * @param[out] pPayload Will contain a pointer to the beginning of the packet payload, afterwards.
-
567 *
-
568 * @param[out] pLength Will contain the total length of the packet payload, afterwards.
-
569 *
-
570 * @return
-
571 * Status | Description
-
572 * ---------------------------------------------- | ------------------------------------------------------------------
-
573 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
574 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
575 */
- -
577brawcap_packet_payload_get(brawcap_packet_t* const pPacket, const char** const pPayload,
-
578 brawcap_packet_size_t* const pLength);
-
579
-
580/**
-
581 * @brief Sets the packet payload of the specified packet.
+
566 * @return
+
567 * Status | Description
+
568 * ---------------------------------------------- | ------------------------------------------------------------------
+
569 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
570 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
571 */
+ + +
574
+
575/**
+
576 * @brief Reads out the payload of the specified packet.
+
577 *
+
578 * The function returns a pointer to the beginning of the packet payload.
+
579 *
+
580 * @note The returned payload pointer should be only accessed as long as the packet is not freed.
+
581 * If post processing is required a copy of the required payload should be done.
582 *
-
583 * @note It is not allowed to set a larger payload than the max byte payload size
-
584 * (specified during @ref brawcap_packet_create "packet creation" or
-
585 * @ref brawcap_buffer_create "buffer creation").
-
586 * If a larger payload is specified the function will fail and return an error.
-
587 *
-
588 * @param[in] pPacket The packet to be modified.
-
589 *
-
590 * @param[in] pPayload Pointer to the beginning of the payload to set.
-
591 *
-
592 * @param[in] length Total byte size of the payload to set.
-
593 *
-
594 * @return
-
595 * Status | Description
-
596 * ---------------------------------------------- | ------------------------------------------------------------------
-
597 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
598 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
599 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified payload size exceeds the packet max payload size.
-
600 */
- -
602brawcap_packet_payload_set(brawcap_packet_t* const pPacket, const char* const pPayload,
-
603 const brawcap_packet_size_t length);
-
604
-
605/**@}*/
-
606#endif
-
607
-
608/************************************************* BUFFER ************************************************************/
-
609#if 1
-
610/**
-
611 * @addtogroup brawcap_buffer
-
612 * @{
-
613 */
-
614
-
615/**
-
616 * @brief Creates a new packet buffer.
-
617 *
-
618 * The created buffer can be used for:
-
619 * - Receiving by @ref brawcap_rx_buffer_attach "attaching" it.
-
620 * - Transmitting by @ref brawcap_tx_buffer_send "sending" it.
-
621 *
-
622 * If a buffer is not required anymore it shall be @ref brawcap_buffer_free "freed".
-
623 *
-
624 * @param[out] pBuffer Will contain the new created packet buffer, afterwards.
-
625 *
-
626 * @param[in] maxPacketPayloadSize Specifies the max payload byte size for each packet in the buffer.
-
627 * This cannot be changed after buffer creation and controls the memory size required for each packet in the buffer.
-
628 * When trying to set the packet payload of any buffered packet which exceeds this value, it will fail.
-
629 * The value has to be between @ref BRAWCAP_PACKET_SIZE_MIN and @ref BRAWCAP_PACKET_SIZE_MAX.
-
630 *
-
631 * @param[in] numPackets Specifies how many packets can be stored in the buffer.
-
632 * This value, together with the max packet payload size, will control the total amount of memory required for
-
633 * the packet buffer and cannot be changed after buffer creation.
-
634 * The value has to be between @ref BRAWCAP_BUFFER_PACKETS_MIN and @ref BRAWCAP_BUFFER_PACKETS_MAX.
-
635 *
-
636 * @return
-
637 * Status | Description
-
638 * ---------------------------------------------- | ------------------------------------------------------------------
-
639 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
640 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
641 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified packet payload or number of packets is invalid.
-
642 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
-
643 */
- -
645brawcap_buffer_create(brawcap_buffer_t** const pBuffer, const brawcap_packet_size_t maxPacketPayloadSize,
-
646 const brawcap_buffer_packet_count_t numPackets);
-
647
-
648/**
-
649 * @brief Frees the specified packet buffer.
-
650 * When this function is called the specified packet buffer becomes invalid and it´s memory will be released.
+
583 * @attention Accessing the packet payload is not thread safe and user is responsible for synchronization.
+
584 *
+
585 * @param[in] pPacket The packet to read from.
+
586 *
+
587 * @param[out] pPayload Will contain a pointer to the beginning of the packet payload, afterwards.
+
588 *
+
589 * @param[out] pLength Will contain the total length of the packet payload, afterwards.
+
590 *
+
591 * @return
+
592 * Status | Description
+
593 * ---------------------------------------------- | ------------------------------------------------------------------
+
594 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
595 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
596 */
+ +
598brawcap_packet_payload_get(brawcap_packet_t* const pPacket, const char** const pPayload,
+
599 brawcap_packet_size_t* const pLength);
+
600
+
601/**
+
602 * @brief Sets the packet payload of the specified packet.
+
603 *
+
604 * @note It is not allowed to set a larger payload than the max byte payload size
+
605 * (specified during @ref brawcap_packet_create "packet creation" or
+
606 * @ref brawcap_buffer_create "buffer creation").
+
607 * If a larger payload is specified the function will fail and return an error.
+
608 *
+
609 * @param[in] pPacket The packet to be modified.
+
610 *
+
611 * @param[in] pPayload Pointer to the beginning of the payload to set.
+
612 *
+
613 * @param[in] length Total byte size of the payload to set.
+
614 *
+
615 * @return
+
616 * Status | Description
+
617 * ---------------------------------------------- | ------------------------------------------------------------------
+
618 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
619 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
620 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified payload size exceeds the packet max payload size.
+
621 */
+ +
623brawcap_packet_payload_set(brawcap_packet_t* const pPacket, const char* const pPayload,
+
624 const brawcap_packet_size_t length);
+
625
+
626/**@}*/
+
627#endif
+
628
+
629/************************************************* BUFFER ************************************************************/
+
630#if 1
+
631/**
+
632 * @addtogroup brawcap_buffer
+
633 * @{
+
634 */
+
635
+
636/**
+
637 * @brief Creates a new packet buffer.
+
638 *
+
639 * The created buffer can be used for:
+
640 * - Receiving by @ref brawcap_rx_buffer_attach "attaching" it.
+
641 * - Transmitting by @ref brawcap_tx_buffer_send "sending" it.
+
642 *
+
643 * If a buffer is not required anymore it shall be @ref brawcap_buffer_free "freed".
+
644 *
+
645 * @param[out] pBuffer Will contain the new created packet buffer, afterwards.
+
646 *
+
647 * @param[in] maxPacketPayloadSize Specifies the max payload byte size for each packet in the buffer.
+
648 * This cannot be changed after buffer creation and controls the memory size required for each packet in the buffer.
+
649 * When trying to set the packet payload of any buffered packet which exceeds this value, it will fail.
+
650 * The value has to be between @ref BRAWCAP_PACKET_SIZE_MIN and @ref BRAWCAP_PACKET_SIZE_MAX.
651 *
-
652 * @warning Freeing a buffer is not thread safe and the user is responsible for synchronization.
-
653 *
-
654 * @param[in] pBuffer The packet buffer to be freed.
-
655 *
-
656 * @return
-
657 * Status | Description
-
658 * ---------------------------------------------- | ------------------------------------------------------------------
-
659 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
660 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
661 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
662 */
- - -
665
-
666/**
-
667 * @brief Clears the specified packet buffer.
-
668 *
-
669 * All buffered packets will be cleared.
-
670 * It may be used to reuse a already created packet buffer.
-
671 * For example this can be useful after transmission of the packet buffer has finished.
-
672 * Reusing a buffer improves performance and should be preferred instead of always creating and freeing packet
-
673 * buffers.
+
652 * @param[in] numPackets Specifies how many packets can be stored in the buffer.
+
653 * This value, together with the max packet payload size, will control the total amount of memory required for
+
654 * the packet buffer and cannot be changed after buffer creation.
+
655 * The value has to be between @ref BRAWCAP_BUFFER_PACKETS_MIN and @ref BRAWCAP_BUFFER_PACKETS_MAX.
+
656 *
+
657 * @return
+
658 * Status | Description
+
659 * ---------------------------------------------- | ------------------------------------------------------------------
+
660 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
661 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
662 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified packet payload or number of packets is invalid.
+
663 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
+
664 */
+ +
666brawcap_buffer_create(brawcap_buffer_t** const pBuffer, const brawcap_packet_size_t maxPacketPayloadSize,
+
667 const brawcap_buffer_packet_count_t numPackets);
+
668
+
669/**
+
670 * @brief Frees the specified packet buffer.
+
671 * When this function is called the specified packet buffer becomes invalid and it´s memory will be released.
+
672 *
+
673 * @warning Freeing a buffer is not thread safe and the user is responsible for synchronization.
674 *
-
675 * @warning After calling this function all buffered packets in the packet buffer become invalid and shall not be used
-
676 * anymore.
-
677 *
-
678 * @param[in] pBuffer The packet buffer to be cleared.
-
679 *
-
680 * @return
-
681 * Status | Description
-
682 * ---------------------------------------------- | ------------------------------------------------------------------
-
683 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
684 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
685 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
686 */
- - -
689
-
690/**
-
691 * @brief Adds the specified packet at the end of the specified packet buffer.
-
692 *
-
693 * @param[in] pBuffer The packet buffer to be modified.
-
694 *
-
695 * @param[in] pPacket The packet to insert into the buffer.
-
696 *
-
697 * @return
-
698 * Status | Description
-
699 * ---------------------------------------------- | ------------------------------------------------------------------
-
700 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
701 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
702 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
703 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached.
-
704 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer.
-
705 */
- -
707brawcap_buffer_add_back(brawcap_buffer_t* const pBuffer, const brawcap_packet_t* const pPacket);
-
708
-
709/**
-
710 * @brief Adds the specified packet at the front of the specified packet buffer.
-
711 *
-
712 * @param[in] pBuffer The packet buffer to be modified.
+
675 * @param[in] pBuffer The packet buffer to be freed.
+
676 *
+
677 * @return
+
678 * Status | Description
+
679 * ---------------------------------------------- | ------------------------------------------------------------------
+
680 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
681 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
682 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
683 */
+ + +
686
+
687/**
+
688 * @brief Clears the specified packet buffer.
+
689 *
+
690 * All buffered packets will be cleared.
+
691 * It may be used to reuse a already created packet buffer.
+
692 * For example this can be useful after transmission of the packet buffer has finished.
+
693 * Reusing a buffer improves performance and should be preferred instead of always creating and freeing packet
+
694 * buffers.
+
695 *
+
696 * @warning After calling this function all buffered packets in the packet buffer become invalid and shall not be used
+
697 * anymore.
+
698 *
+
699 * @param[in] pBuffer The packet buffer to be cleared.
+
700 *
+
701 * @return
+
702 * Status | Description
+
703 * ---------------------------------------------- | ------------------------------------------------------------------
+
704 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
705 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
706 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
707 */
+ + +
710
+
711/**
+
712 * @brief Adds the specified packet at the end of the specified packet buffer.
713 *
-
714 * @param[in] pPacket The packet to insert into the buffer.
+
714 * @param[in] pBuffer The packet buffer to be modified.
715 *
-
716 * @return
-
717 * Status | Description
-
718 * ---------------------------------------------- | ------------------------------------------------------------------
-
719 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
720 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
721 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
722 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached.
-
723 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer.
-
724 */
- -
726brawcap_buffer_add_front(brawcap_buffer_t* const pBuffer, const brawcap_packet_t* const pPacket);
-
727
-
728/**
-
729 * @brief Inserts the specified packet at index/position into the specified packet buffer.
-
730 *
-
731 * @param[in] pBuffer The packet buffer to be modified.
+
716 * @param[in] pPacket The packet to insert into the buffer.
+
717 *
+
718 * @return
+
719 * Status | Description
+
720 * ---------------------------------------------- | ------------------------------------------------------------------
+
721 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
722 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
723 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
724 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached.
+
725 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer.
+
726 */
+ +
728brawcap_buffer_add_back(brawcap_buffer_t* const pBuffer, const brawcap_packet_t* const pPacket);
+
729
+
730/**
+
731 * @brief Adds the specified packet at the front of the specified packet buffer.
732 *
-
733 * @param[in] pPacket The packet to insert into the buffer.
+
733 * @param[in] pBuffer The packet buffer to be modified.
734 *
-
735 * @param[in] index Index at which the packet should be inserted.
+
735 * @param[in] pPacket The packet to insert into the buffer.
736 *
737 * @return
738 * Status | Description
@@ -856,1017 +856,1017 @@
742 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
743 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached.
744 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer.
-
745 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The given index is invalid (exceeds buffer).
-
746 */
- - - -
750
-
751/**
-
752 * @brief Reads out a buffered packet at the index of the specified packet buffer.
+
745 */
+ +
747brawcap_buffer_add_front(brawcap_buffer_t* const pBuffer, const brawcap_packet_t* const pPacket);
+
748
+
749/**
+
750 * @brief Inserts the specified packet at index/position into the specified packet buffer.
+
751 *
+
752 * @param[in] pBuffer The packet buffer to be modified.
753 *
-
754 * @param[in] pBuffer The packet buffer to read from.
+
754 * @param[in] pPacket The packet to insert into the buffer.
755 *
-
756 * @param[in] index The index of the packet.
+
756 * @param[in] index Index at which the packet should be inserted.
757 *
-
758 * @param[out] pPacket Will contain the buffered packet, afterwards.
-
759 *
-
760 * @return
-
761 * Status | Description
-
762 * ---------------------------------------------- | ------------------------------------------------------------------
-
763 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
764 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
765 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
758 * @return
+
759 * Status | Description
+
760 * ---------------------------------------------- | ------------------------------------------------------------------
+
761 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
762 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
763 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
764 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | The max number of packets for the buffer is reached.
+
765 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The packet payload length is to long for the buffer.
766 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The given index is invalid (exceeds buffer).
767 */
- - -
770 brawcap_packet_t** const pPacket);
+ + +
771
772/**
-
773 * @brief Reads out the first buffered packet of the specified packet buffer.
+
773 * @brief Reads out a buffered packet at the index of the specified packet buffer.
774 *
775 * @param[in] pBuffer The packet buffer to read from.
776 *
-
777 * @param[out] pPacket Will contain the buffered packet, afterwards.
+
777 * @param[in] index The index of the packet.
778 *
-
779 * @return
-
780 * Status | Description
-
781 * ---------------------------------------------- | ------------------------------------------------------------------
-
782 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
783 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
784 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
785 */
- - -
788
-
789/**
-
790 * @brief Reads out the last buffered packet of the specified packet buffer.
-
791 *
-
792 * @param[in] pBuffer The packet buffer to read from.
-
793 *
-
794 * @param[out] pPacket Will contain the buffered packet, afterwards.
+
779 * @param[out] pPacket Will contain the buffered packet, afterwards.
+
780 *
+
781 * @return
+
782 * Status | Description
+
783 * ---------------------------------------------- | ------------------------------------------------------------------
+
784 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
785 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
786 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
787 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The given index is invalid (exceeds buffer).
+
788 */
+ + +
791 brawcap_packet_t** const pPacket);
+
792
+
793/**
+
794 * @brief Reads out the first buffered packet of the specified packet buffer.
795 *
-
796 * @return
-
797 * Status | Description
-
798 * ---------------------------------------------- | ------------------------------------------------------------------
-
799 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
800 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
801 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
802 */
- - -
805
-
806/**
-
807 * @brief Reads out the number of currently buffered packets in the specified packet buffer.
-
808 *
-
809 * @param[in] pBuffer The packet buffer to read from.
-
810 *
-
811 * @param[out] pPacketCount Will contain the number of buffered packets, afterwards.
+
796 * @param[in] pBuffer The packet buffer to read from.
+
797 *
+
798 * @param[out] pPacket Will contain the buffered packet, afterwards.
+
799 *
+
800 * @return
+
801 * Status | Description
+
802 * ---------------------------------------------- | ------------------------------------------------------------------
+
803 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
804 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
805 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
806 */
+ + +
809
+
810/**
+
811 * @brief Reads out the last buffered packet of the specified packet buffer.
812 *
-
813 * @return
-
814 * Status | Description
-
815 * ---------------------------------------------- | ------------------------------------------------------------------
-
816 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
817 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
818 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
819 */
- - -
822
-
823/**
-
824 * @brief Reads out the total number of packets which can be buffered by the specified packet buffer.
-
825 * This value represents the packet buffer capacity, which is set during buffer creation.
-
826 *
-
827 * @param[in] pBuffer The packet buffer to read from.
-
828 *
-
829 * @param[out] pPacketCapacity Will contain the total number of packets which can be buffered, afterwards.
-
830 *
-
831 * @return
-
832 * Status | Description
-
833 * ---------------------------------------------- | ------------------------------------------------------------------
-
834 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
835 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
836 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
837 */
- - -
840
-
841/********************************************* BUFFER ITERATOR ********************************************************/
-
842#if 1
-
843/**
-
844 * @addtogroup brawcap_buffer_iterator
-
845 * @{
-
846 */
-
847
-
848/**
-
849 * @brief Creates a new iterator for the specified buffer.
-
850 *
-
851 * If a iterator is not required anymore it shall be @ref brawcap_buffer_iterator_free "freed".
-
852 *
-
853 * @param[out] pIterator Will contain the new created iterator.
-
854 *
-
855 * @param[in] pBuffer The buffer for which to create the iterator.
-
856 *
-
857 * @param[in] startPosition The start position of the iterator (packet buffer index/position).
-
858 * The specified position must be below the number of currently buffered packets,
-
859 * which can be resolved with @ref brawcap_buffer_count.
-
860 *
-
861 * @return
-
862 * Status | Description
-
863 * ---------------------------------------------- | ------------------------------------------------------------------
-
864 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
865 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
866 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
-
867 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Start position exceeds number of buffered packets.
-
868 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
-
869 */
- - -
872 brawcap_buffer_packet_count_t startPosition);
-
873
-
874/**
-
875 * @brief Frees the specified iterator.
-
876 * When this function is called the specified iterator becomes invalid and it´s memory will be released.
+
813 * @param[in] pBuffer The packet buffer to read from.
+
814 *
+
815 * @param[out] pPacket Will contain the buffered packet, afterwards.
+
816 *
+
817 * @return
+
818 * Status | Description
+
819 * ---------------------------------------------- | ------------------------------------------------------------------
+
820 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
821 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
822 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
823 */
+ + +
826
+
827/**
+
828 * @brief Reads out the number of currently buffered packets in the specified packet buffer.
+
829 *
+
830 * @param[in] pBuffer The packet buffer to read from.
+
831 *
+
832 * @param[out] pPacketCount Will contain the number of buffered packets, afterwards.
+
833 *
+
834 * @return
+
835 * Status | Description
+
836 * ---------------------------------------------- | ------------------------------------------------------------------
+
837 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
838 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
839 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
840 */
+ + +
843
+
844/**
+
845 * @brief Reads out the total number of packets which can be buffered by the specified packet buffer.
+
846 * This value represents the packet buffer capacity, which is set during buffer creation.
+
847 *
+
848 * @param[in] pBuffer The packet buffer to read from.
+
849 *
+
850 * @param[out] pPacketCapacity Will contain the total number of packets which can be buffered, afterwards.
+
851 *
+
852 * @return
+
853 * Status | Description
+
854 * ---------------------------------------------- | ------------------------------------------------------------------
+
855 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
856 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
857 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
858 */
+ + +
861
+
862/********************************************* BUFFER ITERATOR ********************************************************/
+
863#if 1
+
864/**
+
865 * @addtogroup brawcap_buffer_iterator
+
866 * @{
+
867 */
+
868
+
869/**
+
870 * @brief Creates a new iterator for the specified buffer.
+
871 *
+
872 * If a iterator is not required anymore it shall be @ref brawcap_buffer_iterator_free "freed".
+
873 *
+
874 * @param[out] pIterator Will contain the new created iterator.
+
875 *
+
876 * @param[in] pBuffer The buffer for which to create the iterator.
877 *
-
878 * @warning Freeing a iterator is not thread safe and the user is responsible for synchronization.
-
879 *
-
880 * @param[in] pIterator The iterator to be freed.
+
878 * @param[in] startPosition The start position of the iterator (packet buffer index/position).
+
879 * The specified position must be below the number of currently buffered packets,
+
880 * which can be resolved with @ref brawcap_buffer_count.
881 *
882 * @return
883 * Status | Description
884 * ---------------------------------------------- | ------------------------------------------------------------------
885 * @ref BRAWCAP_STATUS_SUCCESS | Success.
886 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
887 */
- - -
890
-
891/**
-
892 * @brief Increments the iterator to the next buffered packet.
-
893 *
-
894 * @param[in] pIterator The iterator to be incremented.
-
895 *
-
896 * @return
-
897 * Status | Description
-
898 * ---------------------------------------------- | ------------------------------------------------------------------
-
899 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
900 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
901 */
- - -
904
-
905/**
-
906 * @brief Decreases the iterator to the previous buffered packet.
-
907 *
-
908 * @param[in] pIterator The iterator to be decremented.
-
909 *
-
910 * @return
-
911 * Status | Description
-
912 * ---------------------------------------------- | ------------------------------------------------------------------
-
913 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
914 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
915 */
- - -
918
-
919/**
-
920 * @brief Returns the buffered packet for the specified iterator.
-
921 *
-
922 * @param[in] pIterator The iterator to read from.
-
923 *
-
924 * @return
-
925 * Pointer | Description
-
926 * ---------------------------------------------- | ------------------------------------------------------------------
-
927 * @ref brawcap_packet_t | On success a valid bRAWcap packet object pointer.
-
928 * NULL | Invalid iterator (e.g. beyond the last or first packet).
-
929 */
- - -
932
-
933/**@}*/
-
934#endif
-
935
-
936/**@}*/
-
937#endif
-
938
-
939/************************************************ ADAPTER ************************************************************/
-
940#if 1
-
941/**
-
942 * @addtogroup brawcap_adapter
-
943 * @{
-
944 */
-
945
-
946/**
-
947 * @brief Updates the list of supported adapters.
-
948 * This function searches the current machine for supported adapters and add them to the adapter list.
-
949 *
-
950 * @note The list will be initialized when calling the first bRAWcap function and not update automatically after that.
-
951 * To update the list later on use this function.
-
952 * A alternative to detect new/removed adapters is
-
953 * @ref brawcap_adapter_notify_register "registering for change notifications".
-
954 *
-
955 * @attention The adapter list is not thread safe.
-
956 * Therefore parallel calls to this function, @ref brawcap_adapter_list_count and @ref brawcap_adapter_list_at
-
957 * should be avoided or at least synchronized.
-
958 * If the list is changed by this function and another thread is currently retrieving information from the list
-
959 * it may lead to undefined behavior or even a crash if the number of entries is reduced.
-
960 *
-
961 * @return
-
962 * Status | Description
-
963 * ---------------------------------------------- | ------------------------------------------------------------------
-
964 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
965 */
- - -
968
-
969/**
-
970 * @brief Reads out the current number of supported adapters in the adapter list.
-
971 *
-
972 * @note The count is only updated after a call to @ref brawcap_adapter_list_update.
-
973 *
-
974 * @attention Updating the list and retrieving information from it is not thread safe.
-
975 * Therefore accessing it from different threads shall be avoided or synchronized.
-
976 *
-
977 * @param[out] pCount Will contain the current number of adapters in the list, afterwards.
-
978 *
-
979 * @return
-
980 * Status | Description
-
981 * ---------------------------------------------- | ------------------------------------------------------------------
-
982 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
983 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
984 */
- - -
987
-
988/**
-
989 * @brief Reads out the adapter name of the adapter at the adapter list index.
-
990 *
-
991 * @note The adapter list is only updated after a call to @ref brawcap_adapter_list_update.
+
887 * @ref BRAWCAP_STATUS_ERROR_IN_USE | Buffer is still in use/pending (receive/transmit).
+
888 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Start position exceeds number of buffered packets.
+
889 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
+
890 */
+ + +
893 brawcap_buffer_packet_count_t startPosition);
+
894
+
895/**
+
896 * @brief Frees the specified iterator.
+
897 * When this function is called the specified iterator becomes invalid and it´s memory will be released.
+
898 *
+
899 * @warning Freeing a iterator is not thread safe and the user is responsible for synchronization.
+
900 *
+
901 * @param[in] pIterator The iterator to be freed.
+
902 *
+
903 * @return
+
904 * Status | Description
+
905 * ---------------------------------------------- | ------------------------------------------------------------------
+
906 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
907 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
908 */
+ + +
911
+
912/**
+
913 * @brief Increments the iterator to the next buffered packet.
+
914 *
+
915 * @param[in] pIterator The iterator to be incremented.
+
916 *
+
917 * @return
+
918 * Status | Description
+
919 * ---------------------------------------------- | ------------------------------------------------------------------
+
920 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
921 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
922 */
+ + +
925
+
926/**
+
927 * @brief Decreases the iterator to the previous buffered packet.
+
928 *
+
929 * @param[in] pIterator The iterator to be decremented.
+
930 *
+
931 * @return
+
932 * Status | Description
+
933 * ---------------------------------------------- | ------------------------------------------------------------------
+
934 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
935 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
936 */
+ + +
939
+
940/**
+
941 * @brief Returns the buffered packet for the specified iterator.
+
942 *
+
943 * @param[in] pIterator The iterator to read from.
+
944 *
+
945 * @return
+
946 * Pointer | Description
+
947 * ---------------------------------------------- | ------------------------------------------------------------------
+
948 * @ref brawcap_packet_t | On success a valid bRAWcap packet object pointer.
+
949 * NULL | Invalid iterator (e.g. beyond the last or first packet).
+
950 */
+ + +
953
+
954/**@}*/
+
955#endif
+
956
+
957/**@}*/
+
958#endif
+
959
+
960/************************************************ ADAPTER ************************************************************/
+
961#if 1
+
962/**
+
963 * @addtogroup brawcap_adapter
+
964 * @{
+
965 */
+
966
+
967/**
+
968 * @brief Updates the list of supported adapters.
+
969 * This function searches the current machine for supported adapters and add them to the adapter list.
+
970 *
+
971 * @note The list will be initialized when calling the first bRAWcap function and not update automatically after that.
+
972 * To update the list later on use this function.
+
973 * A alternative to detect new/removed adapters is
+
974 * @ref brawcap_adapter_notify_register "registering for change notifications".
+
975 *
+
976 * @attention The adapter list is not thread safe.
+
977 * Therefore parallel calls to this function, @ref brawcap_adapter_list_count and @ref brawcap_adapter_list_at
+
978 * should be avoided or at least synchronized.
+
979 * If the list is changed by this function and another thread is currently retrieving information from the list
+
980 * it may lead to undefined behavior or even a crash if the number of entries is reduced.
+
981 *
+
982 * @return
+
983 * Status | Description
+
984 * ---------------------------------------------- | ------------------------------------------------------------------
+
985 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
986 */
+ + +
989
+
990/**
+
991 * @brief Reads out the current number of supported adapters in the adapter list.
992 *
-
993 * @attention Updating the list and retrieving information from it is not thread safe.
-
994 * Therefore accessing it from different threads shall be avoided or synchronized.
-
995 *
-
996 * @param[in] index The index of the adapter in the adapter list..
+
993 * @note The count is only updated after a call to @ref brawcap_adapter_list_update.
+
994 *
+
995 * @attention Updating the list and retrieving information from it is not thread safe.
+
996 * Therefore accessing it from different threads shall be avoided or synchronized.
997 *
-
998 * @param[out] name Will contain the name of the adapter, afterwards.
+
998 * @param[out] pCount Will contain the current number of adapters in the list, afterwards.
999 *
1000 * @return
1001 * Status | Description
1002 * ---------------------------------------------- | ------------------------------------------------------------------
1003 * @ref BRAWCAP_STATUS_SUCCESS | Success.
1004 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1005 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified index exceeds adapter list length.
-
1006 */
- - -
1009
-
1010/**
-
1011 * @brief Registers the calling process for receiving adapter change notifications.
-
1012 *
-
1013 * The given callback function will be called each time a adapter change is recognized by bRAWcap for any of the
-
1014 * supported adapters on the current machine.
-
1015 *
-
1016 * @attention Blocking for long periods within the callback function can lead to incorrect behavior
-
1017 * and should be avoided.
-
1018 * If you need to process a lot on adapter changes it is recommended to do the processing in
-
1019 * another thread rather than directly within the callback.
+
1005 */
+ + +
1008
+
1009/**
+
1010 * @brief Reads out the adapter name of the adapter at the adapter list index.
+
1011 *
+
1012 * @note The adapter list is only updated after a call to @ref brawcap_adapter_list_update.
+
1013 *
+
1014 * @attention Updating the list and retrieving information from it is not thread safe.
+
1015 * Therefore accessing it from different threads shall be avoided or synchronized.
+
1016 *
+
1017 * @param[in] index The index of the adapter in the adapter list..
+
1018 *
+
1019 * @param[out] name Will contain the name of the adapter, afterwards.
1020 *
-
1021 * @note Calls to the registered callback function are serialized.
-
1022 * This means that the callback can not be called in parallel and
-
1023 * one call has to be finished before another one is received.
-
1024 *
-
1025 * @note Each process can only register for notifications once.
-
1026 *
-
1027 * @param[in] callback Function pointer to the callback function which should be executed each time
-
1028 * a adapter change is registered.
-
1029 *
-
1030 * @param[in] pUser Pointer to a user defined context.
-
1031 * This allows access to user specific data within the callback.
-
1032 *
-
1033 * @return
-
1034 * Status | Description
-
1035 * ---------------------------------------------- | ------------------------------------------------------------------
-
1036 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1037 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1038 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1039 * @ref BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Calling process has already registered for this notification.
-
1040 */
- - -
1043
-
1044/**
-
1045 * @brief Unregisters the calling process from receiving adapter change notifications.
-
1046 *
-
1047 * @return
-
1048 * Status | Description
-
1049 * ---------------------------------------------- | ------------------------------------------------------------------
-
1050 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1051 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1052 * @ref BRAWCAP_STATUS_INFO_NOT_REGISTERED | Calling process was not registered for this notification.
-
1053 */
- - -
1056
-
1057/**
-
1058 * @brief Registers the specified handle for receiving adapter change notifications.
-
1059 *
-
1060 * This registration only receives adapter change notifications related to the underlying adapter of the given
-
1061 * bRAWcap handle.
-
1062 * Whereas @ref brawcap_adapter_notify_register notifies about adapter changes for all supported adapters on the
-
1063 * current machine.
-
1064 *
-
1065 * Each bRAWcap handle can register for this notification once.
-
1066 *
-
1067 * @attention Blocking for long periods within the callback function can lead to incorrect behavior
-
1068 * and should be avoided. If you need to process a lot on adapter changes it is recommended to do the processing in
-
1069 * another thread rather than directly within the callback.
-
1070 *
-
1071 * @note Calls to the registered callback function are serialized.
-
1072 * This means that the callback can not be called in parallel and
-
1073 * one call has to be finished before another one is received.
-
1074 *
-
1075 * @param[in] pHandle Handle to register for adapter notifications.
-
1076 *
-
1077 * @param[in] pUser Pointer to a user defined context.
-
1078 * This allows access to user specific data within the callback.
-
1079 *
-
1080 * @param[in] callback Function pointer to the callback function which should be executed each time
-
1081 * a adapter change is registered.
-
1082 *
-
1083 * @return
-
1084 * Status | Description
-
1085 * ---------------------------------------------- | ------------------------------------------------------------------
-
1086 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1087 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1088 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1089 * @ref BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Specified handle has already registered for this notification.
-
1090 */
- - -
1093 brawcap_adapter_notify_handle_callback_t const callback, void* const pUser);
-
1094
-
1095/**
-
1096 * @brief Unregisters the specified handle from receiving adapter change notifications.
+
1021 * @return
+
1022 * Status | Description
+
1023 * ---------------------------------------------- | ------------------------------------------------------------------
+
1024 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1025 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1026 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified index exceeds adapter list length.
+
1027 */
+ + +
1030
+
1031/**
+
1032 * @brief Registers the calling process for receiving adapter change notifications.
+
1033 *
+
1034 * The given callback function will be called each time a adapter change is recognized by bRAWcap for any of the
+
1035 * supported adapters on the current machine.
+
1036 *
+
1037 * @attention Blocking for long periods within the callback function can lead to incorrect behavior
+
1038 * and should be avoided.
+
1039 * If you need to process a lot on adapter changes it is recommended to do the processing in
+
1040 * another thread rather than directly within the callback.
+
1041 *
+
1042 * @note Calls to the registered callback function are serialized.
+
1043 * This means that the callback can not be called in parallel and
+
1044 * one call has to be finished before another one is received.
+
1045 *
+
1046 * @note Each process can only register for notifications once.
+
1047 *
+
1048 * @param[in] callback Function pointer to the callback function which should be executed each time
+
1049 * a adapter change is registered.
+
1050 *
+
1051 * @param[in] pUser Pointer to a user defined context.
+
1052 * This allows access to user specific data within the callback.
+
1053 *
+
1054 * @return
+
1055 * Status | Description
+
1056 * ---------------------------------------------- | ------------------------------------------------------------------
+
1057 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1058 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1059 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1060 * @ref BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Calling process has already registered for this notification.
+
1061 */
+ + +
1064
+
1065/**
+
1066 * @brief Unregisters the calling process from receiving adapter change notifications.
+
1067 *
+
1068 * @return
+
1069 * Status | Description
+
1070 * ---------------------------------------------- | ------------------------------------------------------------------
+
1071 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1072 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1073 * @ref BRAWCAP_STATUS_INFO_NOT_REGISTERED | Calling process was not registered for this notification.
+
1074 */
+ + +
1077
+
1078/**
+
1079 * @brief Registers the specified handle for receiving adapter change notifications.
+
1080 *
+
1081 * This registration only receives adapter change notifications related to the underlying adapter of the given
+
1082 * bRAWcap handle.
+
1083 * Whereas @ref brawcap_adapter_notify_register notifies about adapter changes for all supported adapters on the
+
1084 * current machine.
+
1085 *
+
1086 * Each bRAWcap handle can register for this notification once.
+
1087 *
+
1088 * @attention Blocking for long periods within the callback function can lead to incorrect behavior
+
1089 * and should be avoided. If you need to process a lot on adapter changes it is recommended to do the processing in
+
1090 * another thread rather than directly within the callback.
+
1091 *
+
1092 * @note Calls to the registered callback function are serialized.
+
1093 * This means that the callback can not be called in parallel and
+
1094 * one call has to be finished before another one is received.
+
1095 *
+
1096 * @param[in] pHandle Handle to register for adapter notifications.
1097 *
-
1098 * @param[in] pHandle Handle to unregister for adapter notifications.
-
1099 *
-
1100 * @return
-
1101 * Status | Description
-
1102 * ---------------------------------------------- | ------------------------------------------------------------------
-
1103 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1104 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1105 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1106 * @ref BRAWCAP_STATUS_INFO_NOT_REGISTERED | Specified handle was not registered for this notification.
-
1107 */
- - -
1110
-
1111/**
-
1112 * @brief Reads out the adapter name of the specified adapter.
-
1113 *
-
1114 * @param[in] pHandle The bRAWcap handle to read from.
-
1115 *
-
1116 * @param[out] name Will contain the adapter name, afterwards.
-
1117 *
-
1118 * @return
-
1119 * Status | Description
-
1120 * ---------------------------------------------- | ------------------------------------------------------------------
-
1121 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1122 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1123 */
- - -
1126
-
1127/**
-
1128 * @brief Reads out the currently set adapter friendly name for the specified adapter.
-
1129 *
-
1130 * @param[in] name Name of the adapter.
-
1131 *
-
1132 * @param[out] friendlyName Pointer to a buffer which will contain the currently set adapter friendly name, afterwards.
-
1133 * This parameter can be NULL.
-
1134 * If it is NULL the function will set the required buffer length in pLength and
-
1135 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
+
1098 * @param[in] pUser Pointer to a user defined context.
+
1099 * This allows access to user specific data within the callback.
+
1100 *
+
1101 * @param[in] callback Function pointer to the callback function which should be executed each time
+
1102 * a adapter change is registered.
+
1103 *
+
1104 * @return
+
1105 * Status | Description
+
1106 * ---------------------------------------------- | ------------------------------------------------------------------
+
1107 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1108 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1109 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1110 * @ref BRAWCAP_STATUS_INFO_ALREADY_REGISTERED | Specified handle has already registered for this notification.
+
1111 */
+ + +
1114 brawcap_adapter_notify_handle_callback_t const callback, void* const pUser);
+
1115
+
1116/**
+
1117 * @brief Unregisters the specified handle from receiving adapter change notifications.
+
1118 *
+
1119 * @param[in] pHandle Handle to unregister for adapter notifications.
+
1120 *
+
1121 * @return
+
1122 * Status | Description
+
1123 * ---------------------------------------------- | ------------------------------------------------------------------
+
1124 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1125 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1126 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1127 * @ref BRAWCAP_STATUS_INFO_NOT_REGISTERED | Specified handle was not registered for this notification.
+
1128 */
+ + +
1131
+
1132/**
+
1133 * @brief Reads out the adapter name of the specified adapter.
+
1134 *
+
1135 * @param[in] pHandle The bRAWcap handle to read from.
1136 *
-
1137 * @param[inout] pLength Length of the provided buffer.
-
1138 * If the specified length is to short,
-
1139 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
-
1140 *
-
1141 * @return
-
1142 * Status | Description
-
1143 * ---------------------------------------------- | ------------------------------------------------------------------
-
1144 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1145 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1146 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1147 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1148 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
-
1149 */
- -
1151brawcap_adapter_friendly_name(const brawcap_adapter_name_t name, char* const friendlyName, UINT32* const pLength);
-
1152
-
1153/**
-
1154 * @brief Reads out the currently set friendly name of the specified adapter.
-
1155 *
-
1156 * @param[in] pHandle The bRAWcap handle to read from.
+
1137 * @param[out] name Will contain the adapter name, afterwards.
+
1138 *
+
1139 * @return
+
1140 * Status | Description
+
1141 * ---------------------------------------------- | ------------------------------------------------------------------
+
1142 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1143 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1144 */
+ + +
1147
+
1148/**
+
1149 * @brief Reads out the currently set adapter friendly name for the specified adapter.
+
1150 *
+
1151 * @param[in] name Name of the adapter.
+
1152 *
+
1153 * @param[out] friendlyName Pointer to a buffer which will contain the currently set adapter friendly name, afterwards.
+
1154 * This parameter can be NULL.
+
1155 * If it is NULL the function will set the required buffer length in pLength and
+
1156 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
1157 *
-
1158 * @param[out] friendlyName Pointer to a buffer which will contain the currently set friendly name, afterwards.
-
1159 * This parameter can be NULL.
-
1160 * If it is NULL the function will set the required buffer length in pLength and
-
1161 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
-
1162 *
-
1163 * @param[inout] pLength Length of the provided buffer.
-
1164 * If the specified length is to short,
-
1165 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
-
1166 *
-
1167 * @return
-
1168 * Status | Description
-
1169 * ---------------------------------------------- | -----------------------------------------------------------
-
1170 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1171 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1172 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1173 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
-
1174 */
- -
1176brawcap_adapter_friendly_name_by_handle(brawcap_handle_t* const pHandle, char* const friendlyName,
-
1177 UINT32* const pLength);
-
1178
-
1179/**
-
1180 * @brief Reads out the description of the specified adapter.
-
1181 *
-
1182 * @note Adapter descriptions are set depending on the loaded network adapter driver.
-
1183 * This means it will not change as long as the network driver is not changed.
-
1184 *
-
1185 * @param[in] name Name of the adapter.
-
1186 *
-
1187 * @param[out] description Pointer to a buffer which will contain the description, afterwards.
-
1188 * This parameter can be NULL.
-
1189 * If it is NULL the function will set the required buffer length in pLength and
-
1190 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
-
1191 *
-
1192 * @param[inout] pLength Length of the provided buffer.
-
1193 * If the specified length is to short,
-
1194 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
-
1195 *
-
1196 * @return
-
1197 * Status | Description
-
1198 * ---------------------------------------------- | -----------------------------------------------------------
-
1199 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1200 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1201 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1202 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1203 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
-
1204 */
- -
1206brawcap_adapter_description(const brawcap_adapter_name_t name, char* const description, UINT32* const pLength);
-
1207
-
1208/**
-
1209 * @brief Reads out the description of a network adapter based on the specified adapter.
-
1210 *
-
1211 * @note Adapter descriptions are set depending on the loaded network adapter driver.
-
1212 * This means it will not change as long as the network driver is not changed.
-
1213 *
-
1214 * @param[in] pHandle The bRAWcap handle to read from.
-
1215 *
-
1216 * @param[out] description Pointer to a buffer which will contain the description, afterwards.
-
1217 * This parameter can be NULL.
-
1218 * If it is NULL the required buffer length will be set for pLength and the
-
1219 * function will return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
-
1220 *
-
1221 * @param[inout] pLength Length of the provided buffer.
-
1222 * If the specified length is to short,
-
1223 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
-
1224 *
-
1225 * @return
-
1226 * Status | Description
-
1227 * ---------------------------------------------- | -----------------------------------------------------------
-
1228 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1229 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1230 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1231 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
-
1232 */
- -
1234brawcap_adapter_description_by_handle(brawcap_handle_t* const pHandle, char* const description, UINT32* const pLength);
-
1235
-
1236/**
-
1237 * @brief Reads out the currently set IPv4 address of the specified adapter.
-
1238 *
-
1239 * @param[in] name Name of the adapter.
-
1240 *
-
1241 * @param[out] pIpv4 Will contain the currently set IPv4 address, afterwards.
-
1242 *
-
1243 * @return
-
1244 * Status | Description
-
1245 * ---------------------------------------------- | -----------------------------------------------------------
-
1246 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1247 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1248 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1249 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1250 */
- - -
1253
-
1254/**
-
1255 * @brief Reads out the currently set IPv4 address of the specified adapter.
-
1256 *
-
1257 * @param[in] pHandle The bRAWcap handle to read from.
-
1258 *
-
1259 * @param[out] pIpv4 Will contain the currently set IPv4 address, afterwards.
-
1260 *
-
1261 * @return
-
1262 * Status | Description
-
1263 * ---------------------------------------------- | -----------------------------------------------------------
-
1264 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1265 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1266 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1267 */
- - -
1270
-
1271/**
-
1272 * @brief Reads out the currently set IPv6 address of the specified adapter.
-
1273 *
-
1274 * @param[in] name Name of the adapter.
-
1275 *
-
1276 * @param[out] pIpv6 Will contain the currently set IPv6 address, afterwards.
+
1158 * @param[inout] pLength Length of the provided buffer.
+
1159 * If the specified length is to short,
+
1160 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
+
1161 *
+
1162 * @return
+
1163 * Status | Description
+
1164 * ---------------------------------------------- | ------------------------------------------------------------------
+
1165 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1166 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1167 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1168 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1169 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
+
1170 */
+ +
1172brawcap_adapter_friendly_name(const brawcap_adapter_name_t name, char* const friendlyName, UINT32* const pLength);
+
1173
+
1174/**
+
1175 * @brief Reads out the currently set friendly name of the specified adapter.
+
1176 *
+
1177 * @param[in] pHandle The bRAWcap handle to read from.
+
1178 *
+
1179 * @param[out] friendlyName Pointer to a buffer which will contain the currently set friendly name, afterwards.
+
1180 * This parameter can be NULL.
+
1181 * If it is NULL the function will set the required buffer length in pLength and
+
1182 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
+
1183 *
+
1184 * @param[inout] pLength Length of the provided buffer.
+
1185 * If the specified length is to short,
+
1186 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
+
1187 *
+
1188 * @return
+
1189 * Status | Description
+
1190 * ---------------------------------------------- | -----------------------------------------------------------
+
1191 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1192 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1193 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1194 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
+
1195 */
+ +
1197brawcap_adapter_friendly_name_by_handle(brawcap_handle_t* const pHandle, char* const friendlyName,
+
1198 UINT32* const pLength);
+
1199
+
1200/**
+
1201 * @brief Reads out the description of the specified adapter.
+
1202 *
+
1203 * @note Adapter descriptions are set depending on the loaded network adapter driver.
+
1204 * This means it will not change as long as the network driver is not changed.
+
1205 *
+
1206 * @param[in] name Name of the adapter.
+
1207 *
+
1208 * @param[out] description Pointer to a buffer which will contain the description, afterwards.
+
1209 * This parameter can be NULL.
+
1210 * If it is NULL the function will set the required buffer length in pLength and
+
1211 * return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
+
1212 *
+
1213 * @param[inout] pLength Length of the provided buffer.
+
1214 * If the specified length is to short,
+
1215 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
+
1216 *
+
1217 * @return
+
1218 * Status | Description
+
1219 * ---------------------------------------------- | -----------------------------------------------------------
+
1220 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1221 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1222 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1223 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1224 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
+
1225 */
+ +
1227brawcap_adapter_description(const brawcap_adapter_name_t name, char* const description, UINT32* const pLength);
+
1228
+
1229/**
+
1230 * @brief Reads out the description of a network adapter based on the specified adapter.
+
1231 *
+
1232 * @note Adapter descriptions are set depending on the loaded network adapter driver.
+
1233 * This means it will not change as long as the network driver is not changed.
+
1234 *
+
1235 * @param[in] pHandle The bRAWcap handle to read from.
+
1236 *
+
1237 * @param[out] description Pointer to a buffer which will contain the description, afterwards.
+
1238 * This parameter can be NULL.
+
1239 * If it is NULL the required buffer length will be set for pLength and the
+
1240 * function will return @ref BRAWCAP_STATUS_ERROR_OVERRUN.
+
1241 *
+
1242 * @param[inout] pLength Length of the provided buffer.
+
1243 * If the specified length is to short,
+
1244 * it will be set to the required length and @ref BRAWCAP_STATUS_ERROR_OVERRUN is returned.
+
1245 *
+
1246 * @return
+
1247 * Status | Description
+
1248 * ---------------------------------------------- | -----------------------------------------------------------
+
1249 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1250 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1251 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1252 * @ref BRAWCAP_STATUS_ERROR_OVERRUN | Given buffer length was to short.
+
1253 */
+ +
1255brawcap_adapter_description_by_handle(brawcap_handle_t* const pHandle, char* const description, UINT32* const pLength);
+
1256
+
1257/**
+
1258 * @brief Reads out the currently set IPv4 address of the specified adapter.
+
1259 *
+
1260 * @param[in] name Name of the adapter.
+
1261 *
+
1262 * @param[out] pIpv4 Will contain the currently set IPv4 address, afterwards.
+
1263 *
+
1264 * @return
+
1265 * Status | Description
+
1266 * ---------------------------------------------- | -----------------------------------------------------------
+
1267 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1268 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1269 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1270 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1271 */
+ + +
1274
+
1275/**
+
1276 * @brief Reads out the currently set IPv4 address of the specified adapter.
1277 *
-
1278 * @return
-
1279 * Status | Description
-
1280 * ---------------------------------------------- | -----------------------------------------------------------
-
1281 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1282 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1283 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1284 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1285 */
- - -
1288
-
1289/**
-
1290 * @brief Reads out the currently set IPv6 address of the specified adapter.
-
1291 *
-
1292 * @param[in] pHandle The bRAWcap handle to read from.
-
1293 *
-
1294 * @param[out] pIpv6 Will contain the currently set IPv6 address, afterwards.
-
1295 *
-
1296 * @return
-
1297 * Status | Description
-
1298 * ---------------------------------------------- | -----------------------------------------------------------
-
1299 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1300 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1301 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1302 */
- - -
1305
-
1306/**
-
1307 * @brief Reads out the MAC address of the specified adapter.
-
1308 *
-
1309 * @param[in] name Name of the adapter.
-
1310 *
-
1311 * @param[out] mac Will contain the MAC address, afterwards.
+
1278 * @param[in] pHandle The bRAWcap handle to read from.
+
1279 *
+
1280 * @param[out] pIpv4 Will contain the currently set IPv4 address, afterwards.
+
1281 *
+
1282 * @return
+
1283 * Status | Description
+
1284 * ---------------------------------------------- | -----------------------------------------------------------
+
1285 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1286 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1287 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1288 */
+ + +
1291
+
1292/**
+
1293 * @brief Reads out the currently set IPv6 address of the specified adapter.
+
1294 *
+
1295 * @param[in] name Name of the adapter.
+
1296 *
+
1297 * @param[out] pIpv6 Will contain the currently set IPv6 address, afterwards.
+
1298 *
+
1299 * @return
+
1300 * Status | Description
+
1301 * ---------------------------------------------- | -----------------------------------------------------------
+
1302 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1303 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1304 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1305 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1306 */
+ + +
1309
+
1310/**
+
1311 * @brief Reads out the currently set IPv6 address of the specified adapter.
1312 *
-
1313 * @return
-
1314 * Status | Description
-
1315 * ---------------------------------------------- | -----------------------------------------------------------
-
1316 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1317 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1318 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1319 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1320 */
- - -
1323
-
1324/**
-
1325 * @brief Reads out the MAC address of the specified adapter.
-
1326 *
-
1327 * @param[in] pHandle The bRAWcap handle to read from.
-
1328 *
-
1329 * @param[out] mac Will contain the MAC address, afterwards.
-
1330 *
-
1331 * @return
-
1332 * Status | Description
-
1333 * ---------------------------------------------- | -----------------------------------------------------------
-
1334 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1335 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1336 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1337 */
- - -
1340
-
1341/**
-
1342 * @brief Reads out the current receive speed of the specified adapter.
-
1343 *
-
1344 * @param[in] name Name of the adapter.
-
1345 *
-
1346 * @param[out] pSpeed Will contain the current receive speed, afterwards.
+
1313 * @param[in] pHandle The bRAWcap handle to read from.
+
1314 *
+
1315 * @param[out] pIpv6 Will contain the currently set IPv6 address, afterwards.
+
1316 *
+
1317 * @return
+
1318 * Status | Description
+
1319 * ---------------------------------------------- | -----------------------------------------------------------
+
1320 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1321 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1322 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1323 */
+ + +
1326
+
1327/**
+
1328 * @brief Reads out the MAC address of the specified adapter.
+
1329 *
+
1330 * @param[in] name Name of the adapter.
+
1331 *
+
1332 * @param[out] mac Will contain the MAC address, afterwards.
+
1333 *
+
1334 * @return
+
1335 * Status | Description
+
1336 * ---------------------------------------------- | -----------------------------------------------------------
+
1337 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1338 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1339 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1340 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1341 */
+ + +
1344
+
1345/**
+
1346 * @brief Reads out the MAC address of the specified adapter.
1347 *
-
1348 * @return
-
1349 * Status | Description
-
1350 * ---------------------------------------------- | -----------------------------------------------------------
-
1351 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1352 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1353 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1354 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1355 */
- - -
1358
-
1359/**
-
1360 * @brief Reads out the current receive speed of the specified adapter.
-
1361 *
-
1362 * @param[in] pHandle The bRAWcap handle to read from.
-
1363 *
-
1364 * @param[out] pSpeed Will contain the current receive speed, afterwards.
-
1365 *
-
1366 * @return
-
1367 * Status | Description
-
1368 * ---------------------------------------------- | -----------------------------------------------------------
-
1369 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1370 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1371 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1372 */
- - -
1375
-
1376/**
-
1377 * @brief Reads out the current transmit speed of the specified adapter.
-
1378 *
-
1379 * @param[in] name Name of the adapter.
-
1380 *
-
1381 * @param[out] pSpeed Will contain the current transmit speed, afterwards.
+
1348 * @param[in] pHandle The bRAWcap handle to read from.
+
1349 *
+
1350 * @param[out] mac Will contain the MAC address, afterwards.
+
1351 *
+
1352 * @return
+
1353 * Status | Description
+
1354 * ---------------------------------------------- | -----------------------------------------------------------
+
1355 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1356 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1357 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1358 */
+ + +
1361
+
1362/**
+
1363 * @brief Reads out the current receive speed of the specified adapter.
+
1364 *
+
1365 * @param[in] name Name of the adapter.
+
1366 *
+
1367 * @param[out] pSpeed Will contain the current receive speed, afterwards.
+
1368 *
+
1369 * @return
+
1370 * Status | Description
+
1371 * ---------------------------------------------- | -----------------------------------------------------------
+
1372 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1373 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1374 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1375 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1376 */
+ + +
1379
+
1380/**
+
1381 * @brief Reads out the current receive speed of the specified adapter.
1382 *
-
1383 * @return
-
1384 * Status | Description
-
1385 * ---------------------------------------------- | -----------------------------------------------------------
-
1386 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1387 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1388 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1389 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1390 */
- - -
1393
-
1394/**
-
1395 * @brief Reads out the current transmit speed of the specified adapter.
-
1396 *
-
1397 * @param[in] pHandle The bRAWcap handle to read from.
-
1398 *
-
1399 * @param[out] pSpeed Will contain the current transmit speed, afterwards.
-
1400 *
-
1401 * @return
-
1402 * Status | Description
-
1403 * ---------------------------------------------- | -----------------------------------------------------------
-
1404 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1405 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1406 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1407 */
- - -
1410
-
1411/**
-
1412 * @brief Reads out the current connection state of the specified adapter.
-
1413 *
-
1414 * @param[in] name Name of the adapter.
-
1415 *
-
1416 * @param[out] pConnection Will contain the current connection state, afterwards.
+
1383 * @param[in] pHandle The bRAWcap handle to read from.
+
1384 *
+
1385 * @param[out] pSpeed Will contain the current receive speed, afterwards.
+
1386 *
+
1387 * @return
+
1388 * Status | Description
+
1389 * ---------------------------------------------- | -----------------------------------------------------------
+
1390 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1391 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1392 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1393 */
+ + +
1396
+
1397/**
+
1398 * @brief Reads out the current transmit speed of the specified adapter.
+
1399 *
+
1400 * @param[in] name Name of the adapter.
+
1401 *
+
1402 * @param[out] pSpeed Will contain the current transmit speed, afterwards.
+
1403 *
+
1404 * @return
+
1405 * Status | Description
+
1406 * ---------------------------------------------- | -----------------------------------------------------------
+
1407 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1408 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1409 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1410 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1411 */
+ + +
1414
+
1415/**
+
1416 * @brief Reads out the current transmit speed of the specified adapter.
1417 *
-
1418 * @return
-
1419 * Status | Description
-
1420 * ---------------------------------------------- | -----------------------------------------------------------
-
1421 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1422 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1423 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1424 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1425 */
- - -
1428
-
1429/**
-
1430 * @brief Reads out the current connection state of the specified adapter.
-
1431 *
-
1432 * @param[in] pHandle The bRAWcap handle to read from.
-
1433 *
-
1434 * @param[out] pConnection Will contain the current connection state, afterwards.
-
1435 *
-
1436 * @return
-
1437 * Status | Description
-
1438 * ---------------------------------------------- | -----------------------------------------------------------
-
1439 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1440 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1441 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1442 */
- - -
1445 brawcap_adapter_connection_state_t* const pConnection);
-
1446
-
1447/**
-
1448 * @brief Reads out the current operation state of the specified adapter.
-
1449 *
-
1450 * @param[in] name Name of the adapter.
-
1451 *
-
1452 * @param[out] pOperation Will contain the current operation state, afterwards.
-
1453 *
-
1454 * @return
-
1455 * Status | Description
-
1456 * ---------------------------------------------- | -----------------------------------------------------------
-
1457 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1458 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1459 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1460 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1461 */
- - -
1464
-
1465/**
-
1466 * @brief Reads out the current operation state of the specified adapter.
-
1467 *
-
1468 * @param[in] pHandle The bRAWcap handle to read from.
-
1469 *
-
1470 * @param[out] pOperation Will contain the current operation state, afterwards.
-
1471 *
-
1472 * @return
-
1473 * Status | Description
-
1474 * ---------------------------------------------- | -----------------------------------------------------------
-
1475 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1476 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1477 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1478 */
- - -
1481 brawcap_adapter_operation_state_t* const pOperation);
-
1482
-
1483/**
-
1484 * @brief Reads out the configured MTU of the specified adapter.
-
1485 *
-
1486 * @param[in] name Name of the adapter.
-
1487 *
-
1488 * @param[out] pMtu Will contain the configured MTU, afterwards.
-
1489 *
-
1490 * @return
-
1491 * Status | Description
-
1492 * ---------------------------------------------- | -----------------------------------------------------------
-
1493 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1494 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1495 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1496 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
-
1497 */
- - -
1500
-
1501/**
-
1502 * @brief Reads out the configured MTU of the specified adapter.
-
1503 *
-
1504 * @param[in] pHandle The bRAWcap handle to read from.
-
1505 *
-
1506 * @param[out] pMtu Will contain the configured MTU, afterwards.
-
1507 *
-
1508 * @return
-
1509 * Status | Description
-
1510 * ---------------------------------------------- | -----------------------------------------------------------
-
1511 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1512 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1513 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
-
1514 */
- - -
1517
-
1518/**@}*/
-
1519#endif
-
1520
-
1521/************************************************ RECEIVE ************************************************************/
-
1522#if 1
-
1523/**
-
1524 * @addtogroup brawcap_receive
-
1525 * @{
-
1526 */
-
1527
-
1528/********************************************** RECEIVE FILTER *******************************************************/
-
1529#if 1
-
1530/**
-
1531 * @addtogroup brawcap_filter
-
1532 * @{
-
1533 */
-
1534
-
1535/**
-
1536 * @brief Creates a new filter.
-
1537 *
-
1538 * The created filter can be used for filtering received packets by applying it to a bRAWcap handle with
-
1539 * @ref brawcap_rx_filter_set.
-
1540 *
-
1541 * If a created filter is not required anymore it should be freed with @ref brawcap_filter_free.
-
1542 *
-
1543 * @note Currently only the @ref BRAWCAP_FILTER_TYPE_BYTE_MASK filter type is supported.
-
1544 * Support for @ref BRAWCAP_FILTER_TYPE_BPF may be added later on.
-
1545 *
-
1546 * @param[in] pFilter Will contain the new created filter.
-
1547 *
-
1548 * @param[in] type Specifies the type of the created filter.
-
1549 *
-
1550 * @return
-
1551 * Status | Description
-
1552 * ---------------------------------------------- | ------------------------------------------------------------------
-
1553 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1554 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1555 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not supported.
-
1556 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
-
1557 */
- - -
1560
-
1561/**
-
1562 * @brief Frees the specified filter.
-
1563 * When this function is called the given filter becomes invalid and it´s memory will be released.
-
1564 *
-
1565 * @warning Freeing a filter is not thread safe and the user is responsible for synchronization.
+
1418 * @param[in] pHandle The bRAWcap handle to read from.
+
1419 *
+
1420 * @param[out] pSpeed Will contain the current transmit speed, afterwards.
+
1421 *
+
1422 * @return
+
1423 * Status | Description
+
1424 * ---------------------------------------------- | -----------------------------------------------------------
+
1425 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1426 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1427 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1428 */
+ + +
1431
+
1432/**
+
1433 * @brief Reads out the current connection state of the specified adapter.
+
1434 *
+
1435 * @param[in] name Name of the adapter.
+
1436 *
+
1437 * @param[out] pConnection Will contain the current connection state, afterwards.
+
1438 *
+
1439 * @return
+
1440 * Status | Description
+
1441 * ---------------------------------------------- | -----------------------------------------------------------
+
1442 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1443 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1444 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1445 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1446 */
+ + +
1449
+
1450/**
+
1451 * @brief Reads out the current connection state of the specified adapter.
+
1452 *
+
1453 * @param[in] pHandle The bRAWcap handle to read from.
+
1454 *
+
1455 * @param[out] pConnection Will contain the current connection state, afterwards.
+
1456 *
+
1457 * @return
+
1458 * Status | Description
+
1459 * ---------------------------------------------- | -----------------------------------------------------------
+
1460 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1461 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1462 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1463 */
+ + +
1466 brawcap_adapter_connection_state_t* const pConnection);
+
1467
+
1468/**
+
1469 * @brief Reads out the current operation state of the specified adapter.
+
1470 *
+
1471 * @param[in] name Name of the adapter.
+
1472 *
+
1473 * @param[out] pOperation Will contain the current operation state, afterwards.
+
1474 *
+
1475 * @return
+
1476 * Status | Description
+
1477 * ---------------------------------------------- | -----------------------------------------------------------
+
1478 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1479 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1480 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1481 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1482 */
+ + +
1485
+
1486/**
+
1487 * @brief Reads out the current operation state of the specified adapter.
+
1488 *
+
1489 * @param[in] pHandle The bRAWcap handle to read from.
+
1490 *
+
1491 * @param[out] pOperation Will contain the current operation state, afterwards.
+
1492 *
+
1493 * @return
+
1494 * Status | Description
+
1495 * ---------------------------------------------- | -----------------------------------------------------------
+
1496 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1497 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1498 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1499 */
+ + +
1502 brawcap_adapter_operation_state_t* const pOperation);
+
1503
+
1504/**
+
1505 * @brief Reads out the configured MTU of the specified adapter.
+
1506 *
+
1507 * @param[in] name Name of the adapter.
+
1508 *
+
1509 * @param[out] pMtu Will contain the configured MTU, afterwards.
+
1510 *
+
1511 * @return
+
1512 * Status | Description
+
1513 * ---------------------------------------------- | -----------------------------------------------------------
+
1514 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1515 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1516 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1517 * @ref BRAWCAP_STATUS_ERROR_NOT_FOUND | Adapter name not found/not available.
+
1518 */
+ + +
1521
+
1522/**
+
1523 * @brief Reads out the configured MTU of the specified adapter.
+
1524 *
+
1525 * @param[in] pHandle The bRAWcap handle to read from.
+
1526 *
+
1527 * @param[out] pMtu Will contain the configured MTU, afterwards.
+
1528 *
+
1529 * @return
+
1530 * Status | Description
+
1531 * ---------------------------------------------- | -----------------------------------------------------------
+
1532 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1533 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1534 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Not available in demo mode (no license).
+
1535 */
+ + +
1538
+
1539/**@}*/
+
1540#endif
+
1541
+
1542/************************************************ RECEIVE ************************************************************/
+
1543#if 1
+
1544/**
+
1545 * @addtogroup brawcap_receive
+
1546 * @{
+
1547 */
+
1548
+
1549/********************************************** RECEIVE FILTER *******************************************************/
+
1550#if 1
+
1551/**
+
1552 * @addtogroup brawcap_filter
+
1553 * @{
+
1554 */
+
1555
+
1556/**
+
1557 * @brief Creates a new filter.
+
1558 *
+
1559 * The created filter can be used for filtering received packets by applying it to a bRAWcap handle with
+
1560 * @ref brawcap_rx_filter_set.
+
1561 *
+
1562 * If a created filter is not required anymore it should be freed with @ref brawcap_filter_free.
+
1563 *
+
1564 * @note Currently only the @ref BRAWCAP_FILTER_TYPE_BYTE_MASK filter type is supported.
+
1565 * Support for @ref BRAWCAP_FILTER_TYPE_BPF may be added later on.
1566 *
-
1567 * @param[in] pFilter The filter to be freed.
+
1567 * @param[in] pFilter Will contain the new created filter.
1568 *
-
1569 * @return
-
1570 * Status | Description
-
1571 * ---------------------------------------------- | ------------------------------------------------------------------
-
1572 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1573 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1574 */
- - -
1577
-
1578/**
-
1579 * @brief Reads out the type for the specified filter.
-
1580 *
-
1581 * @param[in] pFilter The filter to read from.
-
1582 *
-
1583 * @param[out] pType Will contain the filter type, afterwards.
-
1584 *
-
1585 * @return
-
1586 * Status | Description
-
1587 * ---------------------------------------------- | ------------------------------------------------------------------
-
1588 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1589 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1590 */
- - -
1593
-
1594/**
-
1595 * @brief Sets the filter parameters for the specified filter.
-
1596 *
-
1597 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
-
1598 *
-
1599 * @param[in] pFilter The filter to be modified.
-
1600 *
-
1601 * @param[in] offset Byte offset of the filter.
-
1602 * This value specifies at which packet byte offset the first filter byte shall be applied.
+
1569 * @param[in] type Specifies the type of the created filter.
+
1570 *
+
1571 * @return
+
1572 * Status | Description
+
1573 * ---------------------------------------------- | ------------------------------------------------------------------
+
1574 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1575 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1576 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not supported.
+
1577 * @ref BRAWCAP_STATUS_ERROR_FAILED | System error occurred (e.g. out of memory).
+
1578 */
+ + +
1581
+
1582/**
+
1583 * @brief Frees the specified filter.
+
1584 * When this function is called the given filter becomes invalid and it´s memory will be released.
+
1585 *
+
1586 * @warning Freeing a filter is not thread safe and the user is responsible for synchronization.
+
1587 *
+
1588 * @param[in] pFilter The filter to be freed.
+
1589 *
+
1590 * @return
+
1591 * Status | Description
+
1592 * ---------------------------------------------- | ------------------------------------------------------------------
+
1593 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1594 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1595 */
+ + +
1598
+
1599/**
+
1600 * @brief Reads out the type for the specified filter.
+
1601 *
+
1602 * @param[in] pFilter The filter to read from.
1603 *
-
1604 * @param[in] length Byte length of the filter.
-
1605 * Specifies the number of bytes used by the filter.
-
1606 * This value is limited to @ref BRAWCAP_FILTER_BYTE_MAX_LENGTH.
-
1607 *
-
1608 * @param[in] mask The byte mask for the filter.
-
1609 * This is a fixed size byte array.
-
1610 * Set the byte values to the filter you want to apply.
-
1611 * Only bytes up to the specified filter length are used and following bytes will be ignored.
-
1612 *
-
1613 * @param[in] ignoreBits A fixed size bitfield byte array.
-
1614 * The bytes in this array has to be interpreted/used as bitfields.
-
1615 * This allows to select if a single bit at the corresponding mask position shall be ignored.
-
1616 * To ignore the value of a bit set it´s value to 1.
-
1617 * Like the mask, only bytes up to the specified filter length are used and following bytes will be ignored.
-
1618 *
-
1619 * @return
-
1620 * Status | Description
-
1621 * ---------------------------------------------- | ------------------------------------------------------------------
-
1622 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1623 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1624 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type @ref BRAWCAP_FILTER_TYPE_BYTE_MASK.
-
1625 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds @ref BRAWCAP_FILTER_BYTE_MAX_LENGTH.
-
1626 */
- - - -
1630 const brawcap_filter_ignore_bits_array_t ignoreBits);
-
1631
-
1632/**
-
1633 * @brief Reads out the filter mask parameters for the specified filter.
-
1634 *
-
1635 * @param[in] pFilter The filter to read from.
-
1636 *
-
1637 * @param[out] pOffset Will contain the filter byte offset, afterwards.
-
1638 *
-
1639 * @param[out] pLength Will contain the filter byte length, afterwards.
-
1640 *
-
1641 * @param[out] pMask Will contain the filter mask bytes, afterwards.
-
1642 *
-
1643 * @param[out] pIgnoreBits Will contain the filter bits to ignore, afterwards
-
1644 *
-
1645 * @return
-
1646 * Status | Description
-
1647 * ---------------------------------------------- | ------------------------------------------------------------------
-
1648 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1649 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1650 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type @ref BRAWCAP_FILTER_TYPE_BYTE_MASK.
-
1651 */
- - -
1654 brawcap_filter_byte_length_t* const pLength, brawcap_filter_mask_array_t* const pMask,
-
1655 brawcap_filter_ignore_bits_array_t* const pIgnoreBits);
-
1656
-
1657/**
-
1658 * @brief Sets the specified filter to active.
+
1604 * @param[out] pType Will contain the filter type, afterwards.
+
1605 *
+
1606 * @return
+
1607 * Status | Description
+
1608 * ---------------------------------------------- | ------------------------------------------------------------------
+
1609 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1610 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1611 */
+ + +
1614
+
1615/**
+
1616 * @brief Sets the filter parameters for the specified filter.
+
1617 *
+
1618 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1619 *
+
1620 * @param[in] pFilter The filter to be modified.
+
1621 *
+
1622 * @param[in] offset Byte offset of the filter.
+
1623 * This value specifies at which packet byte offset the first filter byte shall be applied.
+
1624 *
+
1625 * @param[in] length Byte length of the filter.
+
1626 * Specifies the number of bytes used by the filter.
+
1627 * This value is limited to @ref BRAWCAP_FILTER_BYTE_MAX_LENGTH.
+
1628 *
+
1629 * @param[in] mask The byte mask for the filter.
+
1630 * This is a fixed size byte array.
+
1631 * Set the byte values to the filter you want to apply.
+
1632 * Only bytes up to the specified filter length are used and following bytes will be ignored.
+
1633 *
+
1634 * @param[in] ignoreBits A fixed size bitfield byte array.
+
1635 * The bytes in this array has to be interpreted/used as bitfields.
+
1636 * This allows to select if a single bit at the corresponding mask position shall be ignored.
+
1637 * To ignore the value of a bit set it´s value to 1.
+
1638 * Like the mask, only bytes up to the specified filter length are used and following bytes will be ignored.
+
1639 *
+
1640 * @return
+
1641 * Status | Description
+
1642 * ---------------------------------------------- | ------------------------------------------------------------------
+
1643 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1644 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1645 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type @ref BRAWCAP_FILTER_TYPE_BYTE_MASK.
+
1646 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds @ref BRAWCAP_FILTER_BYTE_MAX_LENGTH.
+
1647 */
+ + + +
1651 const brawcap_filter_ignore_bits_array_t ignoreBits);
+
1652
+
1653/**
+
1654 * @brief Reads out the filter mask parameters for the specified filter.
+
1655 *
+
1656 * @param[in] pFilter The filter to read from.
+
1657 *
+
1658 * @param[out] pOffset Will contain the filter byte offset, afterwards.
1659 *
-
1660 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1660 * @param[out] pLength Will contain the filter byte length, afterwards.
1661 *
-
1662 * @param[in] pFilter The filter to be modified.
+
1662 * @param[out] pMask Will contain the filter mask bytes, afterwards.
1663 *
-
1664 * @return
-
1665 * Status | Description
-
1666 * ---------------------------------------------- | ------------------------------------------------------------------
-
1667 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1668 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1669 */
- - -
1672
-
1673/**
-
1674 * @brief Sets the specified filter to inactive.
-
1675 *
-
1676 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
-
1677 *
-
1678 * @param[in] pFilter The filter to be modified.
-
1679 *
-
1680 * @return
-
1681 * Status | Description
-
1682 * ---------------------------------------------- | ------------------------------------------------------------------
-
1683 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1684 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1685 */
- - -
1688
-
1689/**
-
1690 * @brief Reads out the current activation state of the specified filter.
-
1691 *
-
1692 * @param[in] pFilter The filter to read from.
-
1693 *
-
1694 * @param[out] pActive Will contain the activation state, afterwards.
-
1695 *
-
1696 * @return
-
1697 * Status | Description
-
1698 * ---------------------------------------------- | ------------------------------------------------------------------
-
1699 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1700 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1701 */
- -
1703brawcap_filter_is_activated(brawcap_filter_t* const pFilter, BOOLEAN* const pActive);
-
1704
-
1705/**
-
1706 * @brief Sets the bytes to capture of the specified filter.
-
1707 *
-
1708 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
-
1709 *
-
1710 * @param[in] pFilter The filter to be modified.
-
1711 *
-
1712 * @param[in] offset The byte offset, from packet payload beginning, to begin capturing the payload bytes.
-
1713 *
-
1714 * @param[in] length The number of bytes to be captured - beginning at offset.
-
1715 *
-
1716 * @return
-
1717 * Status | Description
-
1718 * ---------------------------------------------- | ------------------------------------------------------------------
-
1719 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1720 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1721 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds @ref BRAWCAP_PACKET_SIZE_MAX.
+
1664 * @param[out] pIgnoreBits Will contain the filter bits to ignore, afterwards
+
1665 *
+
1666 * @return
+
1667 * Status | Description
+
1668 * ---------------------------------------------- | ------------------------------------------------------------------
+
1669 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1670 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1671 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | Specified filter is not of type @ref BRAWCAP_FILTER_TYPE_BYTE_MASK.
+
1672 */
+ + +
1675 brawcap_filter_byte_length_t* const pLength, brawcap_filter_mask_array_t* const pMask,
+
1676 brawcap_filter_ignore_bits_array_t* const pIgnoreBits);
+
1677
+
1678/**
+
1679 * @brief Sets the specified filter to active.
+
1680 *
+
1681 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1682 *
+
1683 * @param[in] pFilter The filter to be modified.
+
1684 *
+
1685 * @return
+
1686 * Status | Description
+
1687 * ---------------------------------------------- | ------------------------------------------------------------------
+
1688 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1689 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1690 */
+ + +
1693
+
1694/**
+
1695 * @brief Sets the specified filter to inactive.
+
1696 *
+
1697 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1698 *
+
1699 * @param[in] pFilter The filter to be modified.
+
1700 *
+
1701 * @return
+
1702 * Status | Description
+
1703 * ---------------------------------------------- | ------------------------------------------------------------------
+
1704 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1705 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1706 */
+ + +
1709
+
1710/**
+
1711 * @brief Reads out the current activation state of the specified filter.
+
1712 *
+
1713 * @param[in] pFilter The filter to read from.
+
1714 *
+
1715 * @param[out] pActive Will contain the activation state, afterwards.
+
1716 *
+
1717 * @return
+
1718 * Status | Description
+
1719 * ---------------------------------------------- | ------------------------------------------------------------------
+
1720 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1721 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
1722 */
- - -
1725 const brawcap_packet_size_t length);
-
1726
-
1727/**
-
1728 * @brief Reads out the configured bytes to capture of the specified filter.
-
1729 *
-
1730 * @param[in] pFilter The filter to read from.
-
1731 *
-
1732 * @param[out] pOffset Will contain the byte offset of the bytes to capture, afterwards.
-
1733 *
-
1734 * @param[out] pLength Will contain the number of bytes to capture, afterwards.
-
1735 *
-
1736 * @return
-
1737 * Status | Description
-
1738 * ---------------------------------------------- | ------------------------------------------------------------------
-
1739 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1740 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1741 */
- - -
1744 brawcap_packet_size_t* const pLength);
-
1745
-
1746/**
-
1747 * @brief Specifies if packets which matched the specified filter should be indicated to the network stack.
-
1748 *
-
1749 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+ +
1724brawcap_filter_is_activated(brawcap_filter_t* const pFilter, BOOLEAN* const pActive);
+
1725
+
1726/**
+
1727 * @brief Sets the bytes to capture of the specified filter.
+
1728 *
+
1729 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1730 *
+
1731 * @param[in] pFilter The filter to be modified.
+
1732 *
+
1733 * @param[in] offset The byte offset, from packet payload beginning, to begin capturing the payload bytes.
+
1734 *
+
1735 * @param[in] length The number of bytes to be captured - beginning at offset.
+
1736 *
+
1737 * @return
+
1738 * Status | Description
+
1739 * ---------------------------------------------- | ------------------------------------------------------------------
+
1740 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1741 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1742 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified offset+length exceeds @ref BRAWCAP_PACKET_SIZE_MAX.
+
1743 */
+ + +
1746 const brawcap_packet_size_t length);
+
1747
+
1748/**
+
1749 * @brief Reads out the configured bytes to capture of the specified filter.
1750 *
-
1751 * @param[in] pFilter The filter to be modified.
+
1751 * @param[in] pFilter The filter to read from.
1752 *
-
1753 * @param[in] indicate Flag specifying the network stack indication.
-
1754 * If true filtered packets are forwarded to the network stack.
-
1755 * If false filtered packets are not forwarded to the network stack, they are only visible for bRAWcap handles.
+
1753 * @param[out] pOffset Will contain the byte offset of the bytes to capture, afterwards.
+
1754 *
+
1755 * @param[out] pLength Will contain the number of bytes to capture, afterwards.
1756 *
1757 * @return
1758 * Status | Description
@@ -1874,420 +1874,420 @@
1760 * @ref BRAWCAP_STATUS_SUCCESS | Success.
1761 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
1762 */
- -
1764brawcap_filter_indicate_set(brawcap_filter_t* const pFilter, const BOOLEAN indicate);
-
1765
-
1766/**
-
1767 * @brief Reads out the current network stack indication state of the specified filter.
-
1768 *
-
1769 * @param[in] pFilter The filter to read from.
-
1770 *
-
1771 * @param[out] pIndicate Will contain the current network stack indication, afterwards.
-
1772 *
-
1773 * @return
-
1774 * Status | Description
-
1775 * ---------------------------------------------- | ------------------------------------------------------------------
-
1776 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1777 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
-
1778 */
- -
1780brawcap_filter_indicate_get(brawcap_filter_t* const pFilter, BOOLEAN* const pIndicate);
-
1781
-
1782/**@}*/
-
1783#endif
-
1784
-
1785/**
-
1786 * @brief Receives a single packet from the specified handle.
-
1787 *
-
1788 * The caller must provide a valid packet were bRAWcap will store the received data.
-
1789 * To create a packet use @ref brawcap_packet_create or use a buffered packet which was returned by a
-
1790 * valid buffer with @ref brawcap_buffer_at_index.
+ + +
1765 brawcap_packet_size_t* const pLength);
+
1766
+
1767/**
+
1768 * @brief Specifies if packets which matched the specified filter should be indicated to the network stack.
+
1769 *
+
1770 * @note Changes will only effect after applying the modified filter to a handle with @ref brawcap_rx_filter_set.
+
1771 *
+
1772 * @param[in] pFilter The filter to be modified.
+
1773 *
+
1774 * @param[in] indicate Flag specifying the network stack indication.
+
1775 * If true filtered packets are forwarded to the network stack.
+
1776 * If false filtered packets are not forwarded to the network stack, they are only visible for bRAWcap handles.
+
1777 *
+
1778 * @return
+
1779 * Status | Description
+
1780 * ---------------------------------------------- | ------------------------------------------------------------------
+
1781 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1782 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1783 */
+ +
1785brawcap_filter_indicate_set(brawcap_filter_t* const pFilter, const BOOLEAN indicate);
+
1786
+
1787/**
+
1788 * @brief Reads out the current network stack indication state of the specified filter.
+
1789 *
+
1790 * @param[in] pFilter The filter to read from.
1791 *
-
1792 * @note Parallel receives per handle are not allowed. This means that if there is any other receive pending on the
-
1793 * handle each further initiated receive will fail until the pending operation has finished.
-
1794 *
-
1795 * @param[in] pHandle bRAWcap handle to receive from.
-
1796 *
-
1797 * @param[out] pPacket Packet were the received data will be stored.
-
1798 *
-
1799 * @return
-
1800 * Status | Description
-
1801 * ---------------------------------------------- | -----------------------------------------------------------
-
1802 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1803 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1804 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another receive is still pending/active.
-
1805 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not active (anymore) on the adapter.
-
1806 * @ref BRAWCAP_STATUS_WARNING_DEMO_MODE | Running in demo mode (no license).
-
1807 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
1808 * @ref BRAWCAP_STATUS_INFO_NO_DATA | Returned without any data received (due to timeout).
-
1809 */
- - -
1812
-
1813/**
-
1814 * @brief Starts the internal receive loop.
+
1792 * @param[out] pIndicate Will contain the current network stack indication, afterwards.
+
1793 *
+
1794 * @return
+
1795 * Status | Description
+
1796 * ---------------------------------------------- | ------------------------------------------------------------------
+
1797 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1798 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the pointer parameters was invalid.
+
1799 */
+ +
1801brawcap_filter_indicate_get(brawcap_filter_t* const pFilter, BOOLEAN* const pIndicate);
+
1802
+
1803/**@}*/
+
1804#endif
+
1805
+
1806/**
+
1807 * @brief Receives a single packet from the specified handle.
+
1808 *
+
1809 * The caller must provide a valid packet were bRAWcap will store the received data.
+
1810 * To create a packet use @ref brawcap_packet_create or use a buffered packet which was returned by a
+
1811 * valid buffer with @ref brawcap_buffer_at_index.
+
1812 *
+
1813 * @note Parallel receives per handle are not allowed. This means that if there is any other receive pending on the
+
1814 * handle each further initiated receive will fail until the pending operation has finished.
1815 *
-
1816 * To receive data using this method it is necessary to attach memory to the
-
1817 * bRAWcap handle were received data can be stored. This can be done by attaching (with @ref brawcap_rx_buffer_attach)
-
1818 * a previously created bRAWcap packet buffer (with @ref brawcap_buffer_create).
+
1816 * @param[in] pHandle bRAWcap handle to receive from.
+
1817 *
+
1818 * @param[out] pPacket Packet were the received data will be stored.
1819 *
-
1820 * When a reception has finished (due to timeout, min packets or full buffer) the receive callback will be called
-
1821 * for this handle (@ref brawcap_rx_callback_t). In this callback the user application can do it´s post
-
1822 * processing on the received data. If the user application does not detach the buffer
-
1823 * (with @ref brawcap_rx_buffer_detach) it will be reused for receiving after callback has completed.
-
1824 *
-
1825 * The user application should do it´s post processing anyway, as fast as possible. Depending on the current
-
1826 * bandwidth the attached buffers may be filled up very fast. If the user application takes to long it
-
1827 * will lead to a bottleneck in the reception and the driver runs out of resources. This may result in performance
-
1828 * degradation or packet loss.
-
1829 *
-
1830 * It is possible to attach more than only one buffer to a single handle. This ensures that the bRAWcap driver can
-
1831 * toggle the buffers during the reception. This reduces the time gap the driver has to buffer data internally (because
-
1832 * there is no user buffer available). With more than one buffer the driver can still fill up another buffer while the
-
1833 * user application does it´s post processing. Therefore in general, using more than one buffer increases the
-
1834 * performance.
-
1835 *
-
1836 * @note Due to the focus on optimized throughput with minimal CPU load bRAWcap does not fill up the packets in the
-
1837 * buffer with the same sequence they were received by the adapter.
-
1838 * Here we want to give some additional information on the topic of "packet sequence/timestamp":
-
1839 * - First of all it should be known that the receive sequence may not be equal to the sending sequence.
-
1840 * Due to several senders or some network managers in between (switches and so on...).
-
1841 * For any protocols which require a ordered packet stream, there will be at least one field in the packet
-
1842 * payload which allows to sort the packets on the receiver side.
-
1843 * This is a "higher" layer topic and not part of bRAWcap.
-
1844 * - With the bRAWcap supported timestamp mechanisms it is possible to sort the received packets corresponding to
-
1845 * their receive timestamps. But keep in mind that only the @ref BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE guarantees
-
1846 * that the receive timestamps really match the received packet sequence on the adapter. To use the named timestamp
-
1847 * mechanism, the underlying network adapter must support it. Any other timestamp is generated by software. Windows
-
1848 * is not a realtime operation system, and therefore due to multithreading, scheduling (...) it could happen
-
1849 * that some packets are processed before other packets which was received earlier.
-
1850 * Especially the Windows network stack feature called "receive side scaling" can also increase the issue
-
1851 * of incorrect packet sequences.
-
1852 *
-
1853 * @invariant The user parameter allows access to user defined context.
-
1854 * The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating
-
1855 * the context in the callback before accessing it.
+
1820 * @return
+
1821 * Status | Description
+
1822 * ---------------------------------------------- | -----------------------------------------------------------
+
1823 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1824 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1825 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another receive is still pending/active.
+
1826 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not active (anymore) on the adapter.
+
1827 * @ref BRAWCAP_STATUS_WARNING_DEMO_MODE | Running in demo mode (no license).
+
1828 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
1829 * @ref BRAWCAP_STATUS_INFO_NO_DATA | Returned without any data received (due to timeout).
+
1830 */
+ + +
1833
+
1834/**
+
1835 * @brief Starts the internal receive loop.
+
1836 *
+
1837 * To receive data using this method it is necessary to attach memory to the
+
1838 * bRAWcap handle were received data can be stored. This can be done by attaching (with @ref brawcap_rx_buffer_attach)
+
1839 * a previously created bRAWcap packet buffer (with @ref brawcap_buffer_create).
+
1840 *
+
1841 * When a reception has finished (due to timeout, min packets or full buffer) the receive callback will be called
+
1842 * for this handle (@ref brawcap_rx_callback_t). In this callback the user application can do it´s post
+
1843 * processing on the received data. If the user application does not detach the buffer
+
1844 * (with @ref brawcap_rx_buffer_detach) it will be reused for receiving after callback has completed.
+
1845 *
+
1846 * The user application should do it´s post processing anyway, as fast as possible. Depending on the current
+
1847 * bandwidth the attached buffers may be filled up very fast. If the user application takes to long it
+
1848 * will lead to a bottleneck in the reception and the driver runs out of resources. This may result in performance
+
1849 * degradation or packet loss.
+
1850 *
+
1851 * It is possible to attach more than only one buffer to a single handle. This ensures that the bRAWcap driver can
+
1852 * toggle the buffers during the reception. This reduces the time gap the driver has to buffer data internally (because
+
1853 * there is no user buffer available). With more than one buffer the driver can still fill up another buffer while the
+
1854 * user application does it´s post processing. Therefore in general, using more than one buffer increases the
+
1855 * performance.
1856 *
-
1857 * @attention After starting receive @ref brawcap_rx_packet can not be used until you stop the receive
-
1858 * with @ref brawcap_rx_stop, because parallel receives are not allowed.
-
1859 *
-
1860 * @param[in] pHandle bRAWcap handle to receive from.
-
1861 *
-
1862 * @param[in] callback Function pointer to user application receive callback.
-
1863 *
-
1864 * @param[in] pUser Pointer to a user defined context. Can be NULL if no user context is required.
-
1865 *
-
1866 * @param[in] indicateNoPackets Specifies if callback is called even without any received data.
-
1867 *
-
1868 * @return
-
1869 * Status | Description
-
1870 * ---------------------------------------------- | -----------------------------------------------------------
-
1871 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1872 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1873 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another receive is pending or reception is already started.
-
1874 */
- -
1876brawcap_rx_start(brawcap_handle_t* const pHandle, brawcap_rx_callback_t const callback, void* const pUser,
-
1877 const BOOLEAN indicateNoPackets);
-
1878
-
1879/**
-
1880 * @brief Stops the internal receive loop.
-
1881 *
-
1882 * @param[in] pHandle bRAWcap handle to stop reception.
-
1883 *
-
1884 * @return
-
1885 * Status | Description
-
1886 * ---------------------------------------------- | -----------------------------------------------------------
-
1887 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1888 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1889 * @ref BRAWCAP_STATUS_INFO_NOT_RUNNING | There was no receive running.
-
1890 */
- - -
1893
-
1894/**
-
1895 * @brief Attaches the specified bRAWcap packet buffer to the specified handle.
-
1896 *
-
1897 * After attaching a packet buffer to a handle it will be used for receiving data on that handle.
-
1898 * Data is only received if the internal receive loop was started/is running (with @ref brawcap_rx_start).
-
1899 *
-
1900 * The buffer is locked until:
-
1901 * - It is detached from the handle with @ref brawcap_rx_buffer_detach.
-
1902 * - A receive has finished and the receive callback is called (buffer is not locked during callback execution).
-
1903 *
-
1904 * @note A buffer can be attached only once and is than locked down by the handle it is attached to.
-
1905 * This means that it has to be detached before it can be used again for another handle.
-
1906 *
-
1907 * @param[in] pHandle bRAWcap handle for attaching the buffer.
-
1908 *
-
1909 * @param[in] pBuffer Packet buffer to be attached.
-
1910 *
-
1911 * @return
-
1912 * Status | Description
-
1913 * ---------------------------------------------- | -----------------------------------------------------------
-
1914 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1915 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1916 * @ref BRAWCAP_STATUS_ERROR_IN_USE | The buffer is already in use / locked down by another operation.
-
1917 * @ref BRAWCAP_STATUS_WARNING_LIMIT_REACHED | Limitation of buffer per handle reached (@ref BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX)
-
1918 */
- - -
1921
-
1922/**
-
1923 * @brief Detaches the specified bRAWcap packet buffer from the specified handle.
+
1857 * @note Due to the focus on optimized throughput with minimal CPU load bRAWcap does not fill up the packets in the
+
1858 * buffer with the same sequence they were received by the adapter.
+
1859 * Here we want to give some additional information on the topic of "packet sequence/timestamp":
+
1860 * - First of all it should be known that the receive sequence may not be equal to the sending sequence.
+
1861 * Due to several senders or some network managers in between (switches and so on...).
+
1862 * For any protocols which require a ordered packet stream, there will be at least one field in the packet
+
1863 * payload which allows to sort the packets on the receiver side.
+
1864 * This is a "higher" layer topic and not part of bRAWcap.
+
1865 * - With the bRAWcap supported timestamp mechanisms it is possible to sort the received packets corresponding to
+
1866 * their receive timestamps. But keep in mind that only the @ref BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE guarantees
+
1867 * that the receive timestamps really match the received packet sequence on the adapter. To use the named timestamp
+
1868 * mechanism, the underlying network adapter must support it. Any other timestamp is generated by software. Windows
+
1869 * is not a realtime operation system, and therefore due to multithreading, scheduling (...) it could happen
+
1870 * that some packets are processed before other packets which was received earlier.
+
1871 * Especially the Windows network stack feature called "receive side scaling" can also increase the issue
+
1872 * of incorrect packet sequences.
+
1873 *
+
1874 * @invariant The user parameter allows access to user defined context.
+
1875 * The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating
+
1876 * the context in the callback before accessing it.
+
1877 *
+
1878 * @attention After starting receive @ref brawcap_rx_packet can not be used until you stop the receive
+
1879 * with @ref brawcap_rx_stop, because parallel receives are not allowed.
+
1880 *
+
1881 * @param[in] pHandle bRAWcap handle to receive from.
+
1882 *
+
1883 * @param[in] callback Function pointer to user application receive callback.
+
1884 *
+
1885 * @param[in] pUser Pointer to a user defined context. Can be NULL if no user context is required.
+
1886 *
+
1887 * @param[in] indicateNoPackets Specifies if callback is called even without any received data.
+
1888 *
+
1889 * @return
+
1890 * Status | Description
+
1891 * ---------------------------------------------- | -----------------------------------------------------------
+
1892 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1893 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1894 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another receive is pending or reception is already started.
+
1895 */
+ +
1897brawcap_rx_start(brawcap_handle_t* const pHandle, brawcap_rx_callback_t const callback, void* const pUser,
+
1898 const BOOLEAN indicateNoPackets);
+
1899
+
1900/**
+
1901 * @brief Stops the internal receive loop.
+
1902 *
+
1903 * @param[in] pHandle bRAWcap handle to stop reception.
+
1904 *
+
1905 * @return
+
1906 * Status | Description
+
1907 * ---------------------------------------------- | -----------------------------------------------------------
+
1908 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1909 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1910 * @ref BRAWCAP_STATUS_INFO_NOT_RUNNING | There was no receive running.
+
1911 */
+ + +
1914
+
1915/**
+
1916 * @brief Attaches the specified bRAWcap packet buffer to the specified handle.
+
1917 *
+
1918 * After attaching a packet buffer to a handle it will be used for receiving data on that handle.
+
1919 * Data is only received if the internal receive loop was started/is running (with @ref brawcap_rx_start).
+
1920 *
+
1921 * The buffer is locked until:
+
1922 * - It is detached from the handle with @ref brawcap_rx_buffer_detach.
+
1923 * - A receive has finished and the receive callback is called (buffer is not locked during callback execution).
1924 *
-
1925 * After detaching a buffer it is unlocked and can be accessed/modified.
-
1926 * It can also be reused for another operation or freed with @ref brawcap_buffer_free if it is not required anymore.
+
1925 * @note A buffer can be attached only once and is than locked down by the handle it is attached to.
+
1926 * This means that it has to be detached before it can be used again for another handle.
1927 *
-
1928 * @param[in] pHandle bRAWcap handle from which the buffer is to be detached.
+
1928 * @param[in] pHandle bRAWcap handle for attaching the buffer.
1929 *
-
1930 * @param[in] pBuffer Packet buffer to be detached.
+
1930 * @param[in] pBuffer Packet buffer to be attached.
1931 *
1932 * @return
1933 * Status | Description
1934 * ---------------------------------------------- | -----------------------------------------------------------
1935 * @ref BRAWCAP_STATUS_SUCCESS | Success.
1936 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1937 * @ref BRAWCAP_STATUS_INFO_NOT_ATTACHED | The buffer was not attached.
-
1938 */
- - -
1941
-
1942/**
-
1943 * @brief Sets the receive direction for the specified handle.
-
1944 *
-
1945 * Possible directions are:
-
1946 * - @ref BRAWCAP_RX_DIRECTION_UNKNOWN
-
1947 * - @ref BRAWCAP_RX_DIRECTION_IN
-
1948 * - @ref BRAWCAP_RX_DIRECTION_OUT
-
1949 * - @ref BRAWCAP_RX_DIRECTION_BOTH
+
1937 * @ref BRAWCAP_STATUS_ERROR_IN_USE | The buffer is already in use / locked down by another operation.
+
1938 * @ref BRAWCAP_STATUS_WARNING_LIMIT_REACHED | Limitation of buffer per handle reached (@ref BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX)
+
1939 */
+ + +
1942
+
1943/**
+
1944 * @brief Detaches the specified bRAWcap packet buffer from the specified handle.
+
1945 *
+
1946 * After detaching a buffer it is unlocked and can be accessed/modified.
+
1947 * It can also be reused for another operation or freed with @ref brawcap_buffer_free if it is not required anymore.
+
1948 *
+
1949 * @param[in] pHandle bRAWcap handle from which the buffer is to be detached.
1950 *
-
1951 * @param[in] pHandle bRAWcap handle to be configured.
+
1951 * @param[in] pBuffer Packet buffer to be detached.
1952 *
-
1953 * @param[in] direction The direction to be set.
-
1954 *
-
1955 * @return
-
1956 * Status | Description
-
1957 * ---------------------------------------------- | -----------------------------------------------------------
-
1958 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1959 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1960 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
1961 */
- - -
1964
-
1965/**
-
1966 * @brief Reads out the currently configured receive direction of the specified handle.
-
1967 *
-
1968 * @param[in] pHandle bRAWcap handle to read from.
-
1969 *
-
1970 * @param[out] pDirection Will contain the currently configured receive direction, afterwards.
+
1953 * @return
+
1954 * Status | Description
+
1955 * ---------------------------------------------- | -----------------------------------------------------------
+
1956 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1957 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1958 * @ref BRAWCAP_STATUS_INFO_NOT_ATTACHED | The buffer was not attached.
+
1959 */
+ + +
1962
+
1963/**
+
1964 * @brief Sets the receive direction for the specified handle.
+
1965 *
+
1966 * Possible directions are:
+
1967 * - @ref BRAWCAP_RX_DIRECTION_UNKNOWN
+
1968 * - @ref BRAWCAP_RX_DIRECTION_IN
+
1969 * - @ref BRAWCAP_RX_DIRECTION_OUT
+
1970 * - @ref BRAWCAP_RX_DIRECTION_BOTH
1971 *
-
1972 * @return
-
1973 * Status | Description
-
1974 * ---------------------------------------------- | -----------------------------------------------------------
-
1975 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
1976 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
1977 */
- - -
1980
-
1981/**
-
1982 * @brief Sets the minimum amount of packets to receive for the specified handle.
-
1983 *
-
1984 * This value influences how often the bRAWcap driver will return pending receives.
-
1985 * It forces the driver to stay in the request as long as not the minimum amount of packets were captured.
-
1986 * Setting a higher value here can reduce the overall system load but increases also the responsiveness/latency
-
1987 * when the packet was received by the adapter and the indication of the packet to the caller.
-
1988 * The initial/default value is set to @ref BRAWCAP_RX_COPY_PACKETS_DEFAULT.
-
1989 *
-
1990 * @invariant If high receive rates should be reached (and many packets coming in), a high value is preferred.
-
1991 * Otherwise if low latency is required the best effort would be to set this value to zero.
+
1972 * @param[in] pHandle bRAWcap handle to be configured.
+
1973 *
+
1974 * @param[in] direction The direction to be set.
+
1975 *
+
1976 * @return
+
1977 * Status | Description
+
1978 * ---------------------------------------------- | -----------------------------------------------------------
+
1979 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1980 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1981 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
1982 */
+ + +
1985
+
1986/**
+
1987 * @brief Reads out the currently configured receive direction of the specified handle.
+
1988 *
+
1989 * @param[in] pHandle bRAWcap handle to read from.
+
1990 *
+
1991 * @param[out] pDirection Will contain the currently configured receive direction, afterwards.
1992 *
-
1993 * @note Independent from this value the receive will at least return if it pends for 10 times the configured
-
1994 * receive timeout. This avoid infinite blocking (infinite blocking is only the possible if the receive timeout is zero).
-
1995 * If this value is set to zero it will always return after the first receive timeout.
-
1996 * And if the given buffer becomes filled up before the timeout is reached it will return when the buffer is full.
-
1997 *
-
1998 * @param[in] pHandle bRAWcap handle to be configured.
-
1999 *
-
2000 * @param[in] minPackets The minimum amount of packets to receive.
-
2001 *
-
2002 * @return
-
2003 * Status | Description
-
2004 * ---------------------------------------------- | -----------------------------------------------------------
-
2005 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2006 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2007 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2008 */
- - -
2011
-
2012/**
-
2013 * @brief Reads out the currently configured number of packets to receive for the specified handle.
-
2014 *
-
2015 * @param[in] pHandle bRAWcap handle to read from.
-
2016 *
-
2017 * @param[out] pMinPackets Will contain the configured minimum amount of packets per receive, afterwards.
+
1993 * @return
+
1994 * Status | Description
+
1995 * ---------------------------------------------- | -----------------------------------------------------------
+
1996 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
1997 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
1998 */
+ + +
2001
+
2002/**
+
2003 * @brief Sets the minimum amount of packets to receive for the specified handle.
+
2004 *
+
2005 * This value influences how often the bRAWcap driver will return pending receives.
+
2006 * It forces the driver to stay in the request as long as not the minimum amount of packets were captured.
+
2007 * Setting a higher value here can reduce the overall system load but increases also the responsiveness/latency
+
2008 * when the packet was received by the adapter and the indication of the packet to the caller.
+
2009 * The initial/default value is set to @ref BRAWCAP_RX_COPY_PACKETS_DEFAULT.
+
2010 *
+
2011 * @invariant If high receive rates should be reached (and many packets coming in), a high value is preferred.
+
2012 * Otherwise if low latency is required the best effort would be to set this value to zero.
+
2013 *
+
2014 * @note Independent from this value the receive will at least return if it pends for 10 times the configured
+
2015 * receive timeout. This avoid infinite blocking (infinite blocking is only the possible if the receive timeout is zero).
+
2016 * If this value is set to zero it will always return after the first receive timeout.
+
2017 * And if the given buffer becomes filled up before the timeout is reached it will return when the buffer is full.
2018 *
-
2019 * @return
-
2020 * Status | Description
-
2021 * ---------------------------------------------- | -----------------------------------------------------------
-
2022 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2023 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2024 */
- - -
2027
-
2028/**
-
2029 * @brief Configures the receive timeout for the specified handle.
-
2030 *
-
2031 * It´s guaranteed that receive functions will return at least after the specified timeout value,
-
2032 * if the configured amount of packets value @ref brawcap_rx_min_packets_t is reached before.
-
2033 * If the configured amount of packets are not reached until the timeout occurs, the driver will stay in the request
-
2034 * for up to 10 times of the specified timeout time until it final returns.
-
2035 * It is also possible to specify a timeout of zero. A timeout of zero is equivalent to "no timeout".
-
2036 *
-
2037 * @note Default timeout value is @ref BRAWCAP_RX_TIMEOUT_MS_DEFAULT.
-
2038 * And the max supported timeout is @ref BRAWCAP_RX_TIMEOUT_MS_MAX.
+
2019 * @param[in] pHandle bRAWcap handle to be configured.
+
2020 *
+
2021 * @param[in] minPackets The minimum amount of packets to receive.
+
2022 *
+
2023 * @return
+
2024 * Status | Description
+
2025 * ---------------------------------------------- | -----------------------------------------------------------
+
2026 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2027 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2028 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2029 */
+ + +
2032
+
2033/**
+
2034 * @brief Reads out the currently configured number of packets to receive for the specified handle.
+
2035 *
+
2036 * @param[in] pHandle bRAWcap handle to read from.
+
2037 *
+
2038 * @param[out] pMinPackets Will contain the configured minimum amount of packets per receive, afterwards.
2039 *
-
2040 * @attention Be careful in using infinite timeouts.
-
2041 * It could lead to a endless blocking behaviour.
-
2042 * For example if there are no packets received which meet your configured filter on the underlying adapter.
-
2043 *
-
2044 * @param[in] pHandle bRAWcap handle to be configured.
-
2045 *
-
2046 * @param[in] timeout_ms Receive timeout in milliseconds to be set.
-
2047 *
-
2048 * @return
-
2049 * Status | Description
-
2050 * ---------------------------------------------- | -----------------------------------------------------------
-
2051 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2052 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2053 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified timeout value is invalid/out of range.
-
2054 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2055 */
- - -
2058
-
2059/**
-
2060 * @brief Reads out the currently configured receive timeout for the specified handle
-
2061 *
-
2062 * @param[in] pHandle bRAWcap handle to read from.
-
2063 *
-
2064 * @param[out] pTimeout_ms Will contain the configured receive timeout in milliseconds, afterwards.
-
2065 *
-
2066 * @return
-
2067 * Status | Description
-
2068 * ---------------------------------------------- | -----------------------------------------------------------
-
2069 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2070 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2071 */
- - -
2074
-
2075/**
-
2076 * @brief Sets the specified filter to the specified handle.
-
2077 *
-
2078 * For more information on filters see @ref brawcap_filter_t.
-
2079 *
-
2080 * @note Each handle can have exactly one filter applied.
-
2081 * If several filters shall be applied to the same adapter,
-
2082 * it is required to open several bRAWcap handles to the same adapter.
-
2083 *
-
2084 * @param[in] pHandle bRAWcap handle to be modified.
-
2085 *
-
2086 * @param[in] pFilter The filter to set.
-
2087 *
-
2088 * @return
-
2089 * Status | Description
-
2090 * ---------------------------------------------- | -----------------------------------------------------------
-
2091 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2092 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2093 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2094 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not available.
-
2095 */
- -
2097brawcap_rx_filter_set(brawcap_handle_t* const pHandle, const brawcap_filter_t* const pFilter);
-
2098
-
2099/**
-
2100 * @brief Reads out the currently configured filter for the specified handle.
-
2101 *
-
2102 * @param[in] pHandle bRAWcap handle to read from.
-
2103 *
-
2104 * @param[out] pFilter Will contain the currently configured filter, afterwards.
-
2105 *
-
2106 * @return
-
2107 * Status | Description
-
2108 * ---------------------------------------------- | -----------------------------------------------------------
-
2109 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2110 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2111 */
- - -
2114
-
2115/**
-
2116 * @brief Sets the current promiscuous mode flag for the specified handle.
-
2117 *
-
2118 * If a adapter is set into promiscuous mode it receives not only packages which directly address the adapter.
-
2119 * This can be used for recording/sniffing purposes but increases the local system load.
-
2120 * Promiscuous mode is a network adapter feature and which can only be modified by bRAWcap.
-
2121 * Therefore it is not specific to a bRAWcap handle. Instead it is a per adapter setting which can also be
-
2122 * modified from another application.
-
2123 *
-
2124 * @note Promiscuous mode will be reset automatically upon deleting the corresponding handle.
-
2125 * Which means if it was activated due to the bRAWcap handle it will be disabled again when the handle is closed.
+
2040 * @return
+
2041 * Status | Description
+
2042 * ---------------------------------------------- | -----------------------------------------------------------
+
2043 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2044 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2045 */
+ + +
2048
+
2049/**
+
2050 * @brief Configures the receive timeout for the specified handle.
+
2051 *
+
2052 * It´s guaranteed that receive functions will return at least after the specified timeout value,
+
2053 * if the configured amount of packets value @ref brawcap_rx_min_packets_t is reached before.
+
2054 * If the configured amount of packets are not reached until the timeout occurs, the driver will stay in the request
+
2055 * for up to 10 times of the specified timeout time until it final returns.
+
2056 * It is also possible to specify a timeout of zero. A timeout of zero is equivalent to "no timeout".
+
2057 *
+
2058 * @note Default timeout value is @ref BRAWCAP_RX_TIMEOUT_MS_DEFAULT.
+
2059 * And the max supported timeout is @ref BRAWCAP_RX_TIMEOUT_MS_MAX.
+
2060 *
+
2061 * @attention Be careful in using infinite timeouts.
+
2062 * It could lead to a endless blocking behaviour.
+
2063 * For example if there are no packets received which meet your configured filter on the underlying adapter.
+
2064 *
+
2065 * @param[in] pHandle bRAWcap handle to be configured.
+
2066 *
+
2067 * @param[in] timeout_ms Receive timeout in milliseconds to be set.
+
2068 *
+
2069 * @return
+
2070 * Status | Description
+
2071 * ---------------------------------------------- | -----------------------------------------------------------
+
2072 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2073 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2074 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified timeout value is invalid/out of range.
+
2075 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2076 */
+ + +
2079
+
2080/**
+
2081 * @brief Reads out the currently configured receive timeout for the specified handle
+
2082 *
+
2083 * @param[in] pHandle bRAWcap handle to read from.
+
2084 *
+
2085 * @param[out] pTimeout_ms Will contain the configured receive timeout in milliseconds, afterwards.
+
2086 *
+
2087 * @return
+
2088 * Status | Description
+
2089 * ---------------------------------------------- | -----------------------------------------------------------
+
2090 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2091 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2092 */
+ + +
2095
+
2096/**
+
2097 * @brief Sets the specified filter to the specified handle.
+
2098 *
+
2099 * For more information on filters see @ref brawcap_filter_t.
+
2100 *
+
2101 * @note Each handle can have exactly one filter applied.
+
2102 * If several filters shall be applied to the same adapter,
+
2103 * it is required to open several bRAWcap handles to the same adapter.
+
2104 *
+
2105 * @param[in] pHandle bRAWcap handle to be modified.
+
2106 *
+
2107 * @param[in] pFilter The filter to set.
+
2108 *
+
2109 * @return
+
2110 * Status | Description
+
2111 * ---------------------------------------------- | -----------------------------------------------------------
+
2112 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2113 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2114 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2115 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified filter type is not available.
+
2116 */
+ +
2118brawcap_rx_filter_set(brawcap_handle_t* const pHandle, const brawcap_filter_t* const pFilter);
+
2119
+
2120/**
+
2121 * @brief Reads out the currently configured filter for the specified handle.
+
2122 *
+
2123 * @param[in] pHandle bRAWcap handle to read from.
+
2124 *
+
2125 * @param[out] pFilter Will contain the currently configured filter, afterwards.
2126 *
-
2127 * @attention Because of the per adapter scope, promiscuous mode can not explicitly modified by bRAWcap.
-
2128 * Instead if at least one application or another bRAWcap handle activated it, it will stay enabled until the last
-
2129 * application/handle which has activated it, is closed or deactivates it again.
-
2130 *
-
2131 * @param[in] pHandle bRAWcap handle to be modified.
-
2132 *
-
2133 * @param[in] enable Promiscuous mode state to be set.
-
2134 *
-
2135 * @return
-
2136 * Status | Description
-
2137 * ---------------------------------------------- | -----------------------------------------------------------
-
2138 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2139 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2140 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2141 */
- -
2143brawcap_rx_promiscuous_mode_set(brawcap_handle_t* const pHandle, const BOOLEAN enable);
-
2144
-
2145/**
-
2146 * @brief Reads out the current promiscuous mode state for the specified handle.
+
2127 * @return
+
2128 * Status | Description
+
2129 * ---------------------------------------------- | -----------------------------------------------------------
+
2130 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2131 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2132 */
+ + +
2135
+
2136/**
+
2137 * @brief Sets the current promiscuous mode flag for the specified handle.
+
2138 *
+
2139 * If a adapter is set into promiscuous mode it receives not only packages which directly address the adapter.
+
2140 * This can be used for recording/sniffing purposes but increases the local system load.
+
2141 * Promiscuous mode is a network adapter feature and which can only be modified by bRAWcap.
+
2142 * Therefore it is not specific to a bRAWcap handle. Instead it is a per adapter setting which can also be
+
2143 * modified from another application.
+
2144 *
+
2145 * @note Promiscuous mode will be reset automatically upon deleting the corresponding handle.
+
2146 * Which means if it was activated due to the bRAWcap handle it will be disabled again when the handle is closed.
2147 *
-
2148 * Additionally to the promiscuous state of the handle itself it also reads the current promiscuous state of to the
-
2149 * underlying adapter.
-
2150 *
-
2151 * @param[in] pHandle bRAWcap handle to read from.
-
2152 *
-
2153 * @param[out] pEnabled Will contain the current promiscuous mode state of the handle, afterwards.
-
2154 *
-
2155 * @param[out] pEnabledAdapter Will contain the current promiscuous mode state of the underlying adapter, afterwards.
-
2156 *
-
2157 * @return
-
2158 * Status | Description
-
2159 * ---------------------------------------------- | -----------------------------------------------------------
-
2160 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2161 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2162 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2163 */
- -
2165brawcap_rx_promiscuous_mode_get(brawcap_handle_t* const pHandle, BOOLEAN* const pEnabled,
-
2166 BOOLEAN* const pEnabledAdapter);
-
2167
-
2168/**
-
2169 * @brief Reads out the available receive timestamp modes for the specified handle.
-
2170 *
-
2171 * Some of the timestamp capabilites depend on the features provided by the underlying adapter.
-
2172 * Those modes are named with "adapter".
+
2148 * @attention Because of the per adapter scope, promiscuous mode can not explicitly modified by bRAWcap.
+
2149 * Instead if at least one application or another bRAWcap handle activated it, it will stay enabled until the last
+
2150 * application/handle which has activated it, is closed or deactivates it again.
+
2151 *
+
2152 * @param[in] pHandle bRAWcap handle to be modified.
+
2153 *
+
2154 * @param[in] enable Promiscuous mode state to be set.
+
2155 *
+
2156 * @return
+
2157 * Status | Description
+
2158 * ---------------------------------------------- | -----------------------------------------------------------
+
2159 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2160 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2161 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2162 */
+ +
2164brawcap_rx_promiscuous_mode_set(brawcap_handle_t* const pHandle, const BOOLEAN enable);
+
2165
+
2166/**
+
2167 * @brief Reads out the current promiscuous mode state for the specified handle.
+
2168 *
+
2169 * Additionally to the promiscuous state of the handle itself it also reads the current promiscuous state of to the
+
2170 * underlying adapter.
+
2171 *
+
2172 * @param[in] pHandle bRAWcap handle to read from.
2173 *
-
2174 * @param[in] pHandle bRAWcap handle to read from.
+
2174 * @param[out] pEnabled Will contain the current promiscuous mode state of the handle, afterwards.
2175 *
-
2176 * @param[out] pCapabilities Will contain the available receive timestamp modes, afterwards.
+
2176 * @param[out] pEnabledAdapter Will contain the current promiscuous mode state of the underlying adapter, afterwards.
2177 *
2178 * @return
2179 * Status | Description
@@ -2296,415 +2296,415 @@
2182 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
2183 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
2184 */
- - -
2187 brawcap_timestamp_capabilities_t* const pCapabilities);
+ +
2186brawcap_rx_promiscuous_mode_get(brawcap_handle_t* const pHandle, BOOLEAN* const pEnabled,
+
2187 BOOLEAN* const pEnabledAdapter);
2188
2189/**
-
2190 * @brief Reads out the currently configured receive time stamping mode for the specified handle.
+
2190 * @brief Reads out the available receive timestamp modes for the specified handle.
2191 *
-
2192 * @param[in] pHandle bRAWcap handle to read from.
-
2193 *
-
2194 * @param[out] pMode Will contain the currently used receive time stamping mode, afterwards.
-
2195 *
-
2196 * @return
-
2197 * Status | Description
-
2198 * ---------------------------------------------- | -----------------------------------------------------------
-
2199 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2200 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2201 */
- - -
2204
-
2205/**
-
2206 * @brief Configures the used receive time stamping mode for the specified handle.
-
2207 *
-
2208 *
-
2209 * @note Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported
-
2210 * before setting it. To check if a timestamp mode is available use @ref brawcap_rx_timestamp_capabilities.
-
2211 *
-
2212 * @param[in] pHandle bRAWcap handle to be configured.
-
2213 *
-
2214 * @param[out] mode The receive timestamp mode to be configured.
-
2215 *
-
2216 * @return
-
2217 * Status | Description
-
2218 * ---------------------------------------------- | -----------------------------------------------------------
-
2219 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2220 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2221 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified timestamp mode not available.
-
2222 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2223 */
- - -
2226
-
2227/**
-
2228 * @brief Sets the current VLAN tagging flag for the specified handle.
+
2192 * Some of the timestamp capabilites depend on the features provided by the underlying adapter.
+
2193 * Those modes are named with "adapter".
+
2194 *
+
2195 * @param[in] pHandle bRAWcap handle to read from.
+
2196 *
+
2197 * @param[out] pCapabilities Will contain the available receive timestamp modes, afterwards.
+
2198 *
+
2199 * @return
+
2200 * Status | Description
+
2201 * ---------------------------------------------- | -----------------------------------------------------------
+
2202 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2203 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2204 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2205 */
+ + +
2208 brawcap_timestamp_capabilities_t* const pCapabilities);
+
2209
+
2210/**
+
2211 * @brief Reads out the currently configured receive time stamping mode for the specified handle.
+
2212 *
+
2213 * @param[in] pHandle bRAWcap handle to read from.
+
2214 *
+
2215 * @param[out] pMode Will contain the currently used receive time stamping mode, afterwards.
+
2216 *
+
2217 * @return
+
2218 * Status | Description
+
2219 * ---------------------------------------------- | -----------------------------------------------------------
+
2220 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2221 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2222 */
+ + +
2225
+
2226/**
+
2227 * @brief Configures the used receive time stamping mode for the specified handle.
+
2228 *
2229 *
-
2230 * If VLAN tagging is enabled, the VLAN Header (defined by IEEE 802.1Q) will be part of the packet payload.
-
2231 * By default, the VLAN header is not included in the packet payload.
+
2230 * @note Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported
+
2231 * before setting it. To check if a timestamp mode is available use @ref brawcap_rx_timestamp_capabilities.
2232 *
2233 * @param[in] pHandle bRAWcap handle to be configured.
2234 *
-
2235 * @param[in] enable VLAN tagging state to be set.
+
2235 * @param[out] mode The receive timestamp mode to be configured.
2236 *
2237 * @return
2238 * Status | Description
2239 * ---------------------------------------------- | -----------------------------------------------------------
2240 * @ref BRAWCAP_STATUS_SUCCESS | Success.
2241 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2242 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2243 */
- -
2245brawcap_rx_vlan_tagging_set(brawcap_handle_t* const pHandle, const BOOLEAN enable);
-
2246
-
2247/**
-
2248 * @brief Reads out the configured VLAN tagging state for the specified handle.
-
2249 *
-
2250 * @param[in] pHandle bRAWcap handle to read from.
-
2251 *
-
2252 * @param[out] pEnabled Will contain the currently configured VLAN tagging state, afterwards.
+
2242 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified timestamp mode not available.
+
2243 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2244 */
+ + +
2247
+
2248/**
+
2249 * @brief Sets the current VLAN tagging flag for the specified handle.
+
2250 *
+
2251 * If VLAN tagging is enabled, the VLAN Header (defined by IEEE 802.1Q) will be part of the packet payload.
+
2252 * By default, the VLAN header is not included in the packet payload.
2253 *
-
2254 * @return
-
2255 * Status | Description
-
2256 * ---------------------------------------------- | -----------------------------------------------------------
-
2257 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2258 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2259 */
- -
2261brawcap_rx_vlan_tagging_get(brawcap_handle_t* const pHandle, BOOLEAN* const pEnabled);
-
2262
-
2263/**
-
2264 * @brief Sets the driver queue size (in number of packets) for the specified handle.
-
2265 *
-
2266 * A larger driver queue can avoid packet drops for time gaps were no packet buffer is available.
-
2267 * But setting large driver queues should only be done if really necessary, because it can consume a lot of memory.
-
2268 * Because driver queues exist per handle, the total amount of consumed memory has to summed up for all open handles
-
2269 * and their current configuration.
+
2254 * @param[in] pHandle bRAWcap handle to be configured.
+
2255 *
+
2256 * @param[in] enable VLAN tagging state to be set.
+
2257 *
+
2258 * @return
+
2259 * Status | Description
+
2260 * ---------------------------------------------- | -----------------------------------------------------------
+
2261 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2262 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2263 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2264 */
+ +
2266brawcap_rx_vlan_tagging_set(brawcap_handle_t* const pHandle, const BOOLEAN enable);
+
2267
+
2268/**
+
2269 * @brief Reads out the configured VLAN tagging state for the specified handle.
2270 *
-
2271 * The driver queue size can be adjusted at any time.
+
2271 * @param[in] pHandle bRAWcap handle to read from.
2272 *
-
2273 * @note The default queue size is @see BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets).
-
2274 * And its max limitation is @see BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
-
2275 *
-
2276 * @attention Reducing the queue size during runtime may result in packet loss.
-
2277 * This may be the case if there are more packets stored in the queue than the new size can accommodate.
-
2278 *
-
2279 * @param[in] pHandle bRAWcap handle to be configured.
-
2280 *
-
2281 * @param[in] size Driver receive queue size to be set.
-
2282 *
-
2283 * @return
-
2284 * Status | Description
-
2285 * ---------------------------------------------- | -----------------------------------------------------------
-
2286 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2287 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2288 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified queue size is out of range/invalid.
-
2289 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2290 */
- - -
2293
-
2294/**
-
2295 * @brief Reads out the currently configured driver receive queue size for the specified handle.
+
2273 * @param[out] pEnabled Will contain the currently configured VLAN tagging state, afterwards.
+
2274 *
+
2275 * @return
+
2276 * Status | Description
+
2277 * ---------------------------------------------- | -----------------------------------------------------------
+
2278 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2279 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2280 */
+ +
2282brawcap_rx_vlan_tagging_get(brawcap_handle_t* const pHandle, BOOLEAN* const pEnabled);
+
2283
+
2284/**
+
2285 * @brief Sets the driver queue size (in number of packets) for the specified handle.
+
2286 *
+
2287 * A larger driver queue can avoid packet drops for time gaps were no packet buffer is available.
+
2288 * But setting large driver queues should only be done if really necessary, because it can consume a lot of memory.
+
2289 * Because driver queues exist per handle, the total amount of consumed memory has to summed up for all open handles
+
2290 * and their current configuration.
+
2291 *
+
2292 * The driver queue size can be adjusted at any time.
+
2293 *
+
2294 * @note The default queue size is @see BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets).
+
2295 * And its max limitation is @see BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
2296 *
-
2297 * @param[in] pHandle bRAWcap handle to read from.
-
2298 *
-
2299 * @param[out] pSize Will contain the currently configured driver receive queue size, afterwards.
-
2300 *
-
2301 * @return
-
2302 * Status | Description
-
2303 * ---------------------------------------------- | -----------------------------------------------------------
-
2304 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2305 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2306 */
- - -
2309
-
2310/**@}*/
-
2311#endif
-
2312
-
2313/*********************************************** TRANSMIT ************************************************************/
-
2314#if 1
+
2297 * @attention Reducing the queue size during runtime may result in packet loss.
+
2298 * This may be the case if there are more packets stored in the queue than the new size can accommodate.
+
2299 *
+
2300 * @param[in] pHandle bRAWcap handle to be configured.
+
2301 *
+
2302 * @param[in] size Driver receive queue size to be set.
+
2303 *
+
2304 * @return
+
2305 * Status | Description
+
2306 * ---------------------------------------------- | -----------------------------------------------------------
+
2307 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2308 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2309 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified queue size is out of range/invalid.
+
2310 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2311 */
+ + +
2314
2315/**
-
2316 * @addtogroup brawcap_transmit
-
2317 * @{
-
2318 */
-
2319
-
2320/**
-
2321 * @brief Transmits a single packet on the specified handle.
-
2322 *
-
2323 * The caller must provide a valid packet filled up with the payload to transmit.
-
2324 *
-
2325 * For creating a packet use @ref brawcap_packet_create. After creating the packet set all the required packet fields
-
2326 * and than call this function to initiate a transmission.
-
2327 *
-
2328 * When transmission has finished (the function returns) the packet fields are updated.
-
2329 *
-
2330 * To check if the transmission was successful check for the function return status or the packet status itself
-
2331 * with @ref brawcap_packet_status_get. If the packet was transmitted and transmit time stamping was enabled the packet
-
2332 * timestamp will contain the transmission time, which be accessed with @ref brawcap_packet_timestamp_get.
-
2333 *
-
2334 * @param[in] pHandle bRAWcap handle to transmit on.
-
2335 *
-
2336 * @param[inout] pPacket Packet to be transmitted.
-
2337 *
-
2338 * @return
-
2339 * Status | Description
-
2340 * ---------------------------------------------- | -----------------------------------------------------------
-
2341 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2342 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2343 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not active (anymore) on the adapter.
-
2344 * @ref BRAWCAP_STATUS_WARNING_DEMO_MODE | Running in demo mode (no license).
-
2345 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2346 * @ref BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED | The transmission failed (or payload was not fully transmitted).
-
2347 */
- - -
2350
-
2351/**
-
2352 * @brief Starts the internal transmit loop.
-
2353 *
-
2354 * To transmit data using this method push previously filled packet buffers to the handle by using
-
2355 * @ref brawcap_tx_buffer_send. After that the buffer will be locked down by the handle and added to it´s transmission
-
2356 * queue.
-
2357 *
-
2358 * For creating a new packet buffer which can be used for transmission use @ref brawcap_buffer_create.
-
2359 *
-
2360 * When a packet buffer transmission has completed the @ref brawcap_tx_callback_t "transmit callback" will be
-
2361 * called for this handle and with the corresponding packet buffer. From within the callback the buffer can be
-
2362 * accessed for post processing (it is unlocked before entering the callback). It is also possible to do
-
2363 * post processing from a different thread and after the callback.
-
2364 *
-
2365 * In general executing to long in the callback can lead to a bottleneck in the transmission.
-
2366 * It´s not as critical as it is for receiving but it should be still kept in mind.
-
2367 *
-
2368 * Like @ref brawcap_tx_packet does, also each packet in transmitted packet buffers will be updated (e.g. packet status,
-
2369 * transmission timestamp). The user application can access those updated information after transmission has completed.
-
2370 *
-
2371 * A completed packet buffer transmission will automatically detach the buffer from the handle.
-
2372 * It is not needed to detach it explicitly (which would be required for receive buffers).
-
2373 *
-
2374 * @note The buffers are transmitted in the same order they have been added by the user application with
-
2375 * @ref brawcap_tx_buffer_send.
-
2376 *
-
2377 * @invariant The user parameter allows access to user defined context.
-
2378 * The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating
-
2379 * the context in the callback before accessing it.
+
2316 * @brief Reads out the currently configured driver receive queue size for the specified handle.
+
2317 *
+
2318 * @param[in] pHandle bRAWcap handle to read from.
+
2319 *
+
2320 * @param[out] pSize Will contain the currently configured driver receive queue size, afterwards.
+
2321 *
+
2322 * @return
+
2323 * Status | Description
+
2324 * ---------------------------------------------- | -----------------------------------------------------------
+
2325 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2326 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2327 */
+ + +
2330
+
2331/**@}*/
+
2332#endif
+
2333
+
2334/*********************************************** TRANSMIT ************************************************************/
+
2335#if 1
+
2336/**
+
2337 * @addtogroup brawcap_transmit
+
2338 * @{
+
2339 */
+
2340
+
2341/**
+
2342 * @brief Transmits a single packet on the specified handle.
+
2343 *
+
2344 * The caller must provide a valid packet filled up with the payload to transmit.
+
2345 *
+
2346 * For creating a packet use @ref brawcap_packet_create. After creating the packet set all the required packet fields
+
2347 * and than call this function to initiate a transmission.
+
2348 *
+
2349 * When transmission has finished (the function returns) the packet fields are updated.
+
2350 *
+
2351 * To check if the transmission was successful check for the function return status or the packet status itself
+
2352 * with @ref brawcap_packet_status_get. If the packet was transmitted and transmit time stamping was enabled the packet
+
2353 * timestamp will contain the transmission time, which be accessed with @ref brawcap_packet_timestamp_get.
+
2354 *
+
2355 * @param[in] pHandle bRAWcap handle to transmit on.
+
2356 *
+
2357 * @param[inout] pPacket Packet to be transmitted.
+
2358 *
+
2359 * @return
+
2360 * Status | Description
+
2361 * ---------------------------------------------- | -----------------------------------------------------------
+
2362 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2363 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2364 * @ref BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE | bRAWcap driver is not active (anymore) on the adapter.
+
2365 * @ref BRAWCAP_STATUS_WARNING_DEMO_MODE | Running in demo mode (no license).
+
2366 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2367 * @ref BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED | The transmission failed (or payload was not fully transmitted).
+
2368 */
+ + +
2371
+
2372/**
+
2373 * @brief Starts the internal transmit loop.
+
2374 *
+
2375 * To transmit data using this method push previously filled packet buffers to the handle by using
+
2376 * @ref brawcap_tx_buffer_send. After that the buffer will be locked down by the handle and added to it´s transmission
+
2377 * queue.
+
2378 *
+
2379 * For creating a new packet buffer which can be used for transmission use @ref brawcap_buffer_create.
2380 *
-
2381 * @attention After starting transmission, @ref brawcap_tx_packet can not be used - on this handle - until tranmission
-
2382 * is stopped with @ref brawcap_tx_stop, because parallel transmissions are not allowed
-
2383 *
-
2384 * @param[in] pHandle bRAWcap handle to transmit on.
+
2381 * When a packet buffer transmission has completed the @ref brawcap_tx_callback_t "transmit callback" will be
+
2382 * called for this handle and with the corresponding packet buffer. From within the callback the buffer can be
+
2383 * accessed for post processing (it is unlocked before entering the callback). It is also possible to do
+
2384 * post processing from a different thread and after the callback.
2385 *
-
2386 * @param[in] callback Function pointer to user application transmit callback.
-
2387 *
-
2388 * @param[in] pUser Pointer to a user defined context. Can be NULL if no user context is required.
-
2389 *
-
2390 * @return
-
2391 * Status | Description
-
2392 * ---------------------------------------------- | -----------------------------------------------------------
-
2393 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2394 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2395 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another transmit is pending or transmission is already started.
-
2396 */
- -
2398brawcap_tx_start(brawcap_handle_t* const pHandle, brawcap_tx_callback_t const callback, void* pUser);
-
2399
-
2400/**
-
2401 * @brief Stops the internal transmit loop.
-
2402 *
-
2403 * @param[in] pHandle bRAWcap handle to stop transmission on.
+
2386 * In general executing to long in the callback can lead to a bottleneck in the transmission.
+
2387 * It´s not as critical as it is for receiving but it should be still kept in mind.
+
2388 *
+
2389 * Like @ref brawcap_tx_packet does, also each packet in transmitted packet buffers will be updated (e.g. packet status,
+
2390 * transmission timestamp). The user application can access those updated information after transmission has completed.
+
2391 *
+
2392 * A completed packet buffer transmission will automatically detach the buffer from the handle.
+
2393 * It is not needed to detach it explicitly (which would be required for receive buffers).
+
2394 *
+
2395 * @note The buffers are transmitted in the same order they have been added by the user application with
+
2396 * @ref brawcap_tx_buffer_send.
+
2397 *
+
2398 * @invariant The user parameter allows access to user defined context.
+
2399 * The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating
+
2400 * the context in the callback before accessing it.
+
2401 *
+
2402 * @attention After starting transmission, @ref brawcap_tx_packet can not be used - on this handle - until tranmission
+
2403 * is stopped with @ref brawcap_tx_stop, because parallel transmissions are not allowed
2404 *
-
2405 * @return
-
2406 * Status | Description
-
2407 * ---------------------------------------------- | -----------------------------------------------------------
-
2408 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2409 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2410 * @ref BRAWCAP_STATUS_INFO_NOT_RUNNING | There was no transmission running.
-
2411 */
- - -
2414
-
2415/**
-
2416 * @brief Pushes the specified buffer to the specified handle transmit queue.
-
2417 *
-
2418 * After pushing a packet buffer to the handle for transmission it is locked down by the handle until transmission
-
2419 * has completed (and the @ref brawcap_tx_callback_t "transmit callback" is called).
-
2420 *
-
2421 * With the synchronized flag it is possible to activate a synchronized transmission of the specified packet buffer.
-
2422 * This means that the driver reads the time gap between each packet in the packet buffer and waits until it has been
-
2423 * elapsed before initiating transmission.
-
2424 *
-
2425 * @attention For synchronized transmission it is necessary to sort the packets in the buffer by rising timestamp.
-
2426 * Furthermore, it is currently not supported to specify a "start time" when the first packet should be transmitted.
-
2427 * Therefore if you want to start transmission depending on the first packet timestamp you should wait until the
-
2428 * time is reached and after this initiate the transmission by calling this function. The driver itself only
-
2429 * evaluates the time gaps between each packet in the buffer.
-
2430 *
-
2431 * @note Packet buffers are transmitted in the same order they was pushed to the handle.
-
2432 *
-
2433 * @invariant Keep in mind that the packet timestamp is updated after transmission has been completed by the
-
2434 * transmission timestamp (depending on the configured timestamp mode). Therefore if there was a packet timestamp set
-
2435 * for example to send synchronized, this timestamp will be overwritten.
-
2436 *
-
2437 * @param[in] pHandle bRAWcap handle for sending the buffer.
+
2405 * @param[in] pHandle bRAWcap handle to transmit on.
+
2406 *
+
2407 * @param[in] callback Function pointer to user application transmit callback.
+
2408 *
+
2409 * @param[in] pUser Pointer to a user defined context. Can be NULL if no user context is required.
+
2410 *
+
2411 * @return
+
2412 * Status | Description
+
2413 * ---------------------------------------------- | -----------------------------------------------------------
+
2414 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2415 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2416 * @ref BRAWCAP_STATUS_WARNING_PENDING | Another transmit is pending or transmission is already started.
+
2417 */
+ +
2419brawcap_tx_start(brawcap_handle_t* const pHandle, brawcap_tx_callback_t const callback, void* pUser);
+
2420
+
2421/**
+
2422 * @brief Stops the internal transmit loop.
+
2423 *
+
2424 * @param[in] pHandle bRAWcap handle to stop transmission on.
+
2425 *
+
2426 * @return
+
2427 * Status | Description
+
2428 * ---------------------------------------------- | -----------------------------------------------------------
+
2429 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2430 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2431 * @ref BRAWCAP_STATUS_INFO_NOT_RUNNING | There was no transmission running.
+
2432 */
+ + +
2435
+
2436/**
+
2437 * @brief Pushes the specified buffer to the specified handle transmit queue.
2438 *
-
2439 * @param[in] pBuffer Packet buffer to be sent.
-
2440 *
-
2441 * @param[in] synchronized Flag indicating if the packets in the packet buffer should be sent synchronized.
-
2442 *
-
2443 * @return
-
2444 * Status | Description
-
2445 * ---------------------------------------------- | -----------------------------------------------------------
-
2446 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2447 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2448 * @ref BRAWCAP_STATUS_ERROR_IN_USE | The buffer is already in use / locked down by another operation.
-
2449 */
- -
2451brawcap_tx_buffer_send(brawcap_handle_t* const pHandle, brawcap_buffer_t* const pBuffer, const BOOLEAN synchronized);
-
2452
-
2453/**
-
2454 * @brief Sets the driver queue size (in number of packets) for the specified handle.
-
2455 *
-
2456 * For transmission the driver queue size may be increased if high data rates should be reached (for example 10GBit/s).
-
2457 * With a larger transmission queue the driver can forward more packets to the network adapter at the same time.
-
2458 * Therefore if the transmission rate is below the expected value it may be solved by a larger driver queue size.
+
2439 * After pushing a packet buffer to the handle for transmission it is locked down by the handle until transmission
+
2440 * has completed (and the @ref brawcap_tx_callback_t "transmit callback" is called).
+
2441 *
+
2442 * With the synchronized flag it is possible to activate a synchronized transmission of the specified packet buffer.
+
2443 * This means that the driver reads the time gap between each packet in the packet buffer and waits until it has been
+
2444 * elapsed before initiating transmission.
+
2445 *
+
2446 * @attention For synchronized transmission it is necessary to sort the packets in the buffer by rising timestamp.
+
2447 * Furthermore, it is currently not supported to specify a "start time" when the first packet should be transmitted.
+
2448 * Therefore if you want to start transmission depending on the first packet timestamp you should wait until the
+
2449 * time is reached and after this initiate the transmission by calling this function. The driver itself only
+
2450 * evaluates the time gaps between each packet in the buffer.
+
2451 *
+
2452 * @note Packet buffers are transmitted in the same order they was pushed to the handle.
+
2453 *
+
2454 * @invariant Keep in mind that the packet timestamp is updated after transmission has been completed by the
+
2455 * transmission timestamp (depending on the configured timestamp mode). Therefore if there was a packet timestamp set
+
2456 * for example to send synchronized, this timestamp will be overwritten.
+
2457 *
+
2458 * @param[in] pHandle bRAWcap handle for sending the buffer.
2459 *
-
2460 * The driver queue size can be adjusted at any time.
+
2460 * @param[in] pBuffer Packet buffer to be sent.
2461 *
-
2462 * @note The default queue size is @see BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets).
-
2463 * And its max limitation is @see BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
-
2464 *
-
2465 * @attention Reducing the queue size during runtime may result in packet transmission cancellation.
-
2466 * This may be the case if there are more packets pending for transmission than the new size can accommodate.
-
2467 *
-
2468 * @param[in] pHandle bRAWcap handle to be configured.
-
2469 *
-
2470 * @param[in] size Driver transmit queue size to be set.
-
2471 *
-
2472 * @return
-
2473 * Status | Description
-
2474 * ---------------------------------------------- | -----------------------------------------------------------
-
2475 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2476 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2477 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified queue size is out of range/invalid.
-
2478 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2479 */
- - -
2482
-
2483/**
-
2484 * @brief Reads out the currently configured driver transmit queue size for the specified handle.
+
2462 * @param[in] synchronized Flag indicating if the packets in the packet buffer should be sent synchronized.
+
2463 *
+
2464 * @return
+
2465 * Status | Description
+
2466 * ---------------------------------------------- | -----------------------------------------------------------
+
2467 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2468 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2469 * @ref BRAWCAP_STATUS_ERROR_IN_USE | The buffer is already in use / locked down by another operation.
+
2470 */
+ +
2472brawcap_tx_buffer_send(brawcap_handle_t* const pHandle, brawcap_buffer_t* const pBuffer, const BOOLEAN synchronized);
+
2473
+
2474/**
+
2475 * @brief Sets the driver queue size (in number of packets) for the specified handle.
+
2476 *
+
2477 * For transmission the driver queue size may be increased if high data rates should be reached (for example 10GBit/s).
+
2478 * With a larger transmission queue the driver can forward more packets to the network adapter at the same time.
+
2479 * Therefore if the transmission rate is below the expected value it may be solved by a larger driver queue size.
+
2480 *
+
2481 * The driver queue size can be adjusted at any time.
+
2482 *
+
2483 * @note The default queue size is @see BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets).
+
2484 * And its max limitation is @see BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
2485 *
-
2486 * @param[in] pHandle bRAWcap handle to read from.
-
2487 *
-
2488 * @param[out] pSize Will contain the currently configured driver transmit queue size, afterwards.
-
2489 *
-
2490 * @return
-
2491 * Status | Description
-
2492 * ---------------------------------------------- | -----------------------------------------------------------
-
2493 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2494 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2495 */
- - -
2498
-
2499/**
-
2500 * @brief Reads out the available transmit timestamp modes for the specified handle.
-
2501 *
-
2502 * Some of the timestamp capabilities depend on the features provided by the underlying adapter.
-
2503 * Those modes are named with "adapter".
-
2504 *
-
2505 * @param[in] pHandle bRAWcap handle to read from.
+
2486 * @attention Reducing the queue size during runtime may result in packet transmission cancellation.
+
2487 * This may be the case if there are more packets pending for transmission than the new size can accommodate.
+
2488 *
+
2489 * @param[in] pHandle bRAWcap handle to be configured.
+
2490 *
+
2491 * @param[in] size Driver transmit queue size to be set.
+
2492 *
+
2493 * @return
+
2494 * Status | Description
+
2495 * ---------------------------------------------- | -----------------------------------------------------------
+
2496 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2497 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2498 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | Specified queue size is out of range/invalid.
+
2499 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2500 */
+ + +
2503
+
2504/**
+
2505 * @brief Reads out the currently configured driver transmit queue size for the specified handle.
2506 *
-
2507 * @param[out] pCapabilities Will contain the available transmit timestamp modes, afterwards.
+
2507 * @param[in] pHandle bRAWcap handle to read from.
2508 *
-
2509 * @return
-
2510 * Status | Description
-
2511 * ---------------------------------------------- | -----------------------------------------------------------
-
2512 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2513 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2514 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2515 */
- - -
2518 brawcap_timestamp_capabilities_t* const pCapabilities);
+
2509 * @param[out] pSize Will contain the currently configured driver transmit queue size, afterwards.
+
2510 *
+
2511 * @return
+
2512 * Status | Description
+
2513 * ---------------------------------------------- | -----------------------------------------------------------
+
2514 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2515 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2516 */
+ +
2519
2520/**
-
2521 * @brief Configures the used transmit time stamping mode for the specified handle.
+
2521 * @brief Reads out the available transmit timestamp modes for the specified handle.
2522 *
-
2523 * @note Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported
-
2524 * before setting it. To check if a timestamp mode is available use @ref brawcap_tx_timestamp_capabilities.
+
2523 * Some of the timestamp capabilities depend on the features provided by the underlying adapter.
+
2524 * Those modes are named with "adapter".
2525 *
-
2526 * @param[in] pHandle bRAWcap handle to be configured.
+
2526 * @param[in] pHandle bRAWcap handle to read from.
2527 *
-
2528 * @param[in] mode The transmit timestamp mode to be configured.
+
2528 * @param[out] pCapabilities Will contain the available transmit timestamp modes, afterwards.
2529 *
2530 * @return
2531 * Status | Description
2532 * ---------------------------------------------- | -----------------------------------------------------------
2533 * @ref BRAWCAP_STATUS_SUCCESS | Success.
2534 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2535 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified timestamp mode not available.
-
2536 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2537 */
- - +
2535 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2536 */
+ + +
2539 brawcap_timestamp_capabilities_t* const pCapabilities);
2540
2541/**
-
2542 * @brief Reads out the currently configured transmit time stamping mode for the specified handle.
+
2542 * @brief Configures the used transmit time stamping mode for the specified handle.
2543 *
-
2544 * @param[in] pHandle bRAWcap handle to read from.
-
2545 *
-
2546 * @param[out] pMode Will contain the currently used transmit time stamping mode, afterwards.
-
2547 *
-
2548 * @return
-
2549 * Status | Description
-
2550 * ---------------------------------------------- | -----------------------------------------------------------
-
2551 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2552 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2553 */
- - -
2556
-
2557/**@}*/
-
2558#endif
-
2559
-
2560/************************************************* STATS **************************************************************/
-
2561#if 1
+
2544 * @note Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported
+
2545 * before setting it. To check if a timestamp mode is available use @ref brawcap_tx_timestamp_capabilities.
+
2546 *
+
2547 * @param[in] pHandle bRAWcap handle to be configured.
+
2548 *
+
2549 * @param[in] mode The transmit timestamp mode to be configured.
+
2550 *
+
2551 * @return
+
2552 * Status | Description
+
2553 * ---------------------------------------------- | -----------------------------------------------------------
+
2554 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2555 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2556 * @ref BRAWCAP_STATUS_ERROR_NOT_AVAILABLE | Specified timestamp mode not available.
+
2557 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2558 */
+ + +
2561
2562/**
-
2563 * @addtogroup brawcap_stats
-
2564 * @{
-
2565 */
-
2566
-
2567/**
-
2568 * @brief Reads out the available receive statistic counters for the specified handle.
-
2569 *
-
2570 * @param[in] pHandle bRAWcap handle to read from.
-
2571 *
-
2572 * @param[inout] pStats Will contain the current receive statistic counters, afterwards.
-
2573 * The header of the statistic struct hast to be filled by the caller, before calling this function.
-
2574 * If it is not filled or contains invalid data, the function will fail and return a error.
-
2575 *
-
2576 * @return
-
2577 * Status | Description
-
2578 * ---------------------------------------------- | -----------------------------------------------------------
-
2579 * @ref BRAWCAP_STATUS_SUCCESS | Success.
-
2580 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
-
2581 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The header was invalid (type or revision).
-
2582 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified size in the header was invalid.
-
2583 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
-
2584 */
- - +
2563 * @brief Reads out the currently configured transmit time stamping mode for the specified handle.
+
2564 *
+
2565 * @param[in] pHandle bRAWcap handle to read from.
+
2566 *
+
2567 * @param[out] pMode Will contain the currently used transmit time stamping mode, afterwards.
+
2568 *
+
2569 * @return
+
2570 * Status | Description
+
2571 * ---------------------------------------------- | -----------------------------------------------------------
+
2572 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2573 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2574 */
+ + +
2577
+
2578/**@}*/
+
2579#endif
+
2580
+
2581/************************************************* STATS **************************************************************/
+
2582#if 1
+
2583/**
+
2584 * @addtogroup brawcap_stats
+
2585 * @{
+
2586 */
2587
2588/**
-
2589 * @brief Reads out the available transmit statistic counters for the specified handle.
+
2589 * @brief Reads out the available receive statistic counters for the specified handle.
2590 *
2591 * @param[in] pHandle bRAWcap handle to read from.
2592 *
-
2593 * @param[inout] pStats Will contain the current transmit statistic counters, afterwards.
+
2593 * @param[inout] pStats Will contain the current receive statistic counters, afterwards.
2594 * The header of the statistic struct hast to be filled by the caller, before calling this function.
2595 * If it is not filled or contains invalid data, the function will fail and return a error.
2596 *
@@ -2717,170 +2717,192 @@
2603 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified size in the header was invalid.
2604 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
2605 */
- - + +
2608
-
2609/**@}*/
-
2610#endif
-
2611
-
2612#if defined(__cplusplus)
-
2613}
-
2614#endif //(__cplusplus)
-
2615
-
2616#endif //BRAWCAP_H
-
bRAWcap API - User mode types.
-
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_notify_unregister()
Unregisters the calling process 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_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_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_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_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_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_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_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_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_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_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_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.
-
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 th...
Definition: brawcap_types_um.h:416
-
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_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.
-
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:247
-
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:304
-
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.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:285
-
brawcap_status_t brawcap_adapter_list_update()
Updates the list of supported adapters. This function searches the current machine for supported adap...
-
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.
-
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 su...
Definition: brawcap_types_um.h:398
-
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_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_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_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:315
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
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_speed_tx(const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed)
Reads out the current transmit speed of the specified adapter.
-
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:335
-
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_operation(const brawcap_adapter_name_t name, brawcap_adapter_operation_state_t *const pOperation)
Reads out the current operation state of the specified adapter.
-
IPv4 address.
Definition: brawcap_types_um.h:261
-
IPv6 address.
Definition: brawcap_types_um.h:271
-
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...
-
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
-
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_buffer_iterator_prev(brawcap_buffer_iterator_t *const pIterator)
Decreases the iterator to the previous buffered packet.
-
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_next(brawcap_buffer_iterator_t *const pIterator)
Increments the iterator to the next buffered packet.
-
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
-
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_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_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_free(brawcap_buffer_t *pBuffer)
Frees the specified packet buffer. When this function is called the specified packet buffer becomes i...
-
UINT32 brawcap_buffer_packet_count_t
Type for handling the number of packets which can be stored in a packet buffer.
Definition: brawcap_types_shared.h:734
-
brawcap_status_t brawcap_buffer_clear(brawcap_buffer_t *const pBuffer)
Clears 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_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_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....
-
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_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_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.
-
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
-
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_create(brawcap_filter_t **const pFilter, const brawcap_filter_type_t type)
Creates a new filter.
-
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
-
brawcap_status_t brawcap_filter_deactivate(brawcap_filter_t *const pFilter)
Sets the specified filter to inactive.
-
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_is_activated(brawcap_filter_t *const pFilter, BOOLEAN *const pActive)
Reads out the current activation state of the specified filter.
-
brawcap_filter_type_t
List of filter types.
Definition: brawcap_types_shared.h:927
-
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
-
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_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_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_free(brawcap_filter_t *pFilter)
Frees the specified filter. When this function is called the given filter becomes invalid and it´s me...
-
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
-
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_activate(brawcap_filter_t *const pFilter)
Sets the specified filter to active.
-
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.
-
UINT32 brawcap_queue_size_t
The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
Definition: brawcap_types_shared.h:94
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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.
-
#define _BRAWCAP_API_FUNC(returnType)
Dynamic/automatic function import for loading/including.
Definition: brawcap_types_um.h:45
-
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_log_type_t
List of bRAWcap log types.
Definition: brawcap_types_um.h:129
-
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(s) for the given log type(s) to the specified log level(s).
-
brawcap_log_level_t
List of bRAWcap log levels.
Definition: brawcap_types_um.h:77
-
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
-
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_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 ...
-
brawcap_status_t brawcap_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
-
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
-
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 pack...
-
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_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 pa...
-
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/transm...
-
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
-
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_packet(brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
Receives a single packet from 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_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_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_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_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_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_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_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_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_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_stop(brawcap_handle_t *const pHandle)
Stops the internal receive loop.
-
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_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_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_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_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_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.
-
UINT32 brawcap_rx_min_packets_t
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return....
Definition: brawcap_types_shared.h:1047
-
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_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.
-
UINT16 brawcap_rx_timeout_t
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum block...
Definition: brawcap_types_shared.h:1037
-
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 braw...
Definition: brawcap_types_um.h:469
-
brawcap_rx_direction_t
List of supported receive directions.
Definition: brawcap_types_shared.h:1074
-
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.
-
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
-
The bRAWcap transmit statistics.
Definition: brawcap_types_shared.h:1421
-
brawcap_status_t brawcap_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
-
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_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_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_us_set(brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 microseconds)
Sets the timestamp value in seconds and microseconds.
-
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
-
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.
-
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
-
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
-
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_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_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_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_packet(brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
Transmits a single packet on 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_tx_stop(brawcap_handle_t *const pHandle)
Stops the internal transmit loop.
-
brawcap_status_t brawcap_tx_start(brawcap_handle_t *const pHandle, brawcap_tx_callback_t const callback, void *pUser)
Starts the internal transmit loop.
-
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 ...
Definition: brawcap_types_um.h:499
-
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_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_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 version.
Definition: brawcap_types_shared.h:426
+
2609/**
+
2610 * @brief Reads out the available transmit statistic counters for the specified handle.
+
2611 *
+
2612 * @param[in] pHandle bRAWcap handle to read from.
+
2613 *
+
2614 * @param[inout] pStats Will contain the current transmit statistic counters, afterwards.
+
2615 * The header of the statistic struct hast to be filled by the caller, before calling this function.
+
2616 * If it is not filled or contains invalid data, the function will fail and return a error.
+
2617 *
+
2618 * @return
+
2619 * Status | Description
+
2620 * ---------------------------------------------- | -----------------------------------------------------------
+
2621 * @ref BRAWCAP_STATUS_SUCCESS | Success.
+
2622 * @ref BRAWCAP_STATUS_ERROR_INVALID_POINTER | At least one of the given pointer parameters was invalid.
+
2623 * @ref BRAWCAP_STATUS_ERROR_INVALID_PARAM | The header was invalid (type or revision).
+
2624 * @ref BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE | The specified size in the header was invalid.
+
2625 * @ref BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED | Communicating with bRAWcap driver failed.
+
2626 */
+ + +
2629
+
2630/**@}*/
+
2631#endif
+
2632
+
2633#if defined(__cplusplus)
+
2634}
+
2635#endif //(__cplusplus)
+
2636
+
2637#endif //BRAWCAP_H
+
bRAWcap API - User mode types.
+
UINT32 brawcap_queue_size_t
The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
Definition: brawcap_types_shared.h:94
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
bRAWcap version.
Definition: brawcap_types_shared.h:426
+
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.
+
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
+
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_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_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_us_set(brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 microseconds)
Sets the timestamp value in seconds and microseconds.
+
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
+
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.
+
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
+
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
+
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_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_value_ns_set(brawcap_timestamp_t *const pTimestamp, const UINT64 seconds, const UINT32 nanoseconds)
Sets the timestamp value in seconds and nanoseconds.
+
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
+
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_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 ...
+
brawcap_status_t brawcap_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
+
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
+
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 pack...
+
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_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 pa...
+
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/transm...
+
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
+
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
+
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_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_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_free(brawcap_buffer_t *pBuffer)
Frees the specified packet buffer. When this function is called the specified packet buffer becomes i...
+
UINT32 brawcap_buffer_packet_count_t
Type for handling the number of packets which can be stored in a packet buffer.
Definition: brawcap_types_shared.h:734
+
brawcap_status_t brawcap_buffer_clear(brawcap_buffer_t *const pBuffer)
Clears 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_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_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....
+
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_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_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_iterator_free(brawcap_buffer_iterator_t *const pIterator)
Frees the specified iterator. When this function is called the specified iterator becomes invalid and...
+
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
+
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_buffer_iterator_prev(brawcap_buffer_iterator_t *const pIterator)
Decreases the iterator to the previous buffered packet.
+
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_next(brawcap_buffer_iterator_t *const pIterator)
Increments the iterator to the next buffered packet.
+
IPv4 address.
Definition: brawcap_types_um.h:263
+
IPv6 address.
Definition: brawcap_types_um.h:273
+
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_notify_unregister()
Unregisters the calling process 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_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_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_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_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_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_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_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_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_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_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_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.
+
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 th...
Definition: brawcap_types_um.h:418
+
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_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.
+
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:249
+
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:306
+
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.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:287
+
brawcap_status_t brawcap_adapter_list_update()
Updates the list of supported adapters. This function searches the current machine for supported adap...
+
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.
+
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 su...
Definition: brawcap_types_um.h:400
+
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_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_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_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:317
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
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_speed_tx(const brawcap_adapter_name_t name, brawcap_adapter_speed_t *const pSpeed)
Reads out the current transmit speed of the specified adapter.
+
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:337
+
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_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_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_packet(brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
Receives a single packet from 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_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_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_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_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_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_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_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_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_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_stop(brawcap_handle_t *const pHandle)
Stops the internal receive loop.
+
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_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_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_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_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_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.
+
UINT32 brawcap_rx_min_packets_t
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return....
Definition: brawcap_types_shared.h:1047
+
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_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.
+
UINT16 brawcap_rx_timeout_t
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum block...
Definition: brawcap_types_shared.h:1037
+
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 braw...
Definition: brawcap_types_um.h:471
+
brawcap_rx_direction_t
List of supported receive directions.
Definition: brawcap_types_shared.h:1074
+
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
+
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_create(brawcap_filter_t **const pFilter, const brawcap_filter_type_t type)
Creates a new filter.
+
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
+
brawcap_status_t brawcap_filter_deactivate(brawcap_filter_t *const pFilter)
Sets the specified filter to inactive.
+
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_is_activated(brawcap_filter_t *const pFilter, BOOLEAN *const pActive)
Reads out the current activation state of the specified filter.
+
brawcap_filter_type_t
List of filter types.
Definition: brawcap_types_shared.h:927
+
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
+
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_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_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_free(brawcap_filter_t *pFilter)
Frees the specified filter. When this function is called the given filter becomes invalid and it´s me...
+
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
+
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_activate(brawcap_filter_t *const pFilter)
Sets the specified filter to active.
+
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_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_packet(brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
Transmits a single packet on 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_tx_stop(brawcap_handle_t *const pHandle)
Stops the internal transmit loop.
+
brawcap_status_t brawcap_tx_start(brawcap_handle_t *const pHandle, brawcap_tx_callback_t const callback, void *pUser)
Starts the internal transmit loop.
+
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 ...
Definition: brawcap_types_um.h:501
+
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_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.
+
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
+
The bRAWcap transmit statistics.
Definition: brawcap_types_shared.h:1421
+
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.
+
#define _BRAWCAP_API_FUNC(returnType)
Dynamic/automatic function import for loading/including.
Definition: brawcap_types_um.h:45
+
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_log_type_t
List of bRAWcap log types.
Definition: brawcap_types_um.h:129
+
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_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_log_level_t
List of bRAWcap log levels.
Definition: brawcap_types_um.h:77
diff --git a/brawcap__types__shared_8h.html b/a00038.html similarity index 66% rename from brawcap__types__shared_8h.html rename to a00038.html index 2be56e7..1f113b6 100644 --- a/brawcap__types__shared_8h.html +++ b/a00038.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -121,35 +121,35 @@

bRAWcap API - Shared types. More...

-

Go to the source code of this file.

+

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...
 
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...
 
- + - + - + - + - + - + - + - + - + - + - + +#define  +#define  +#define  - + - + - + - + - + - + +#define  +#define 

Macros

#define BRAWCAP_HANDLES_PER_ADAPTER_MAX   5
#define BRAWCAP_HANDLES_PER_ADAPTER_MAX   5
 Specifies the maximum supported bRAWcap handles per adapter.
 
@@ -170,29 +170,29 @@
 
#define BRAWCAP_TIMESTAMP_MODE_SYSL_AVAILABLE(_capabilities)   (_capabilities & 0x01)
 Checks if timestamp mode system low precision is supported.
 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.
 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.
 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.
 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.
 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.
 Checks if timestamp mode adapter hardware is supported.
 
#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN   0
#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN   0
 If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved.
 
@@ -215,10 +215,10 @@ #define BRAWCAP_TIMESTAMP_NS_PER_MS   1000000
 Number of nanoseconds per millisecond.
 
#define BRAWCAP_PACKET_SIZE_MAX   9018
#define BRAWCAP_PACKET_SIZE_MAX   9018
 The maximum supported (byte) size for a single packet payload.
 
#define BRAWCAP_PACKET_SIZE_MIN   14
#define BRAWCAP_PACKET_SIZE_MIN   14
 The minimum required (byte) size for a single packet payload.
 
@@ -233,7 +233,7 @@ #define BRAWCAP_FILTER_BYTE_MAX_LENGTH   64U
 The maximum supported filter byte mask length in bytes.
 
#define BRAWCAP_RX_COPY_PACKETS_DEFAULT   0
#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.
 
@@ -241,7 +241,7 @@
 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
BRAWCAP_RX_TIMESTAMP_MODE_DEFAULT   BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
 Default receive timestamp mode which will be used.
 
@@ -261,7 +261,7 @@
 Maximum size (in number of packets) supported for driver receive queues.
 
-#define BRAWCAP_RX_DIRECTION_DEFAULT   BRAWCAP_RX_DIRECTION_BOTH
BRAWCAP_RX_DIRECTION_DEFAULT   BRAWCAP_RX_DIRECTION_BOTH
 Default receive direction which will be used.
 
@@ -277,206 +277,206 @@
 Maximum size in number of packets supported for driver transmit queues.
 
-#define BRAWCAP_TX_TIMESTAMP_MODE_DEFAULT   BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
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.
 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.
 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.
 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.
 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.
 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.
 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)
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)
BRAWCAP_STATS_TX_SIZEOF_REVISION_1   _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_tx_t, handleCompletedBytesTotal)
 Returns the size of transmit statistics revision 1.
 
- + - + - + - + - + - + - + - + - + - + - + +typedef brawcap_packet_size_t  - + - + - +

Typedefs

typedef UINT32 brawcap_queue_size_t
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
typedef UINT32 brawcap_timestamp_capabilities_t
 Type used for indicating the supported timestamp modes.
 
typedef UINT32 brawcap_timestamp_resolution_ns_t
typedef UINT32 brawcap_timestamp_resolution_ns_t
 Represents the timestamp resolution in nanoseconds.
 
typedef struct _brawcap_timestamp brawcap_timestamp_t
typedef struct _brawcap_timestamp brawcap_timestamp_t
 bRAWcap timestamp object.
 
typedef UINT16 brawcap_packet_size_t
typedef UINT16 brawcap_packet_size_t
 Type for handling the number of payload bytes per packet.
 
typedef struct _brawcap_packet brawcap_packet_t
typedef struct _brawcap_packet brawcap_packet_t
 bRAWcap packet object.
 
typedef UINT32 brawcap_buffer_packet_count_t
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
typedef struct _brawcap_buffer brawcap_buffer_t
 bRAWcap packet buffer object.
 
typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
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]
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]
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
brawcap_filter_byte_length_t
 Type for specifying the byte filter length.
 
typedef struct _brawcap_filter brawcap_filter_t
typedef struct _brawcap_filter brawcap_filter_t
 bRAWcap filter object.
 
typedef UINT16 brawcap_rx_timeout_t
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
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.
 
- - + - - + - - + - - + - - + - - + - - + - - +

Enumerations

enum  brawcap_status_t {
-  BRAWCAP_STATUS_SUCCESS = 0 +
enum  brawcap_status_t {
+  BRAWCAP_STATUS_SUCCESS = 0 ,
-  BRAWCAP_STATUS_ERROR_FAILED = -1 +  BRAWCAP_STATUS_ERROR_FAILED = -1 ,
-  BRAWCAP_STATUS_ERROR_NOT_AVAILABLE = -2 +  BRAWCAP_STATUS_ERROR_NOT_AVAILABLE = -2 ,
-  BRAWCAP_STATUS_ERROR_INVALID_POINTER = -3 +  BRAWCAP_STATUS_ERROR_INVALID_POINTER = -3 ,
-  BRAWCAP_STATUS_ERROR_INVALID_PARAM = -4 +  BRAWCAP_STATUS_ERROR_INVALID_PARAM = -4 ,
-  BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE = -5 +  BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE = -5 ,
-  BRAWCAP_STATUS_ERROR_NOT_FOUND = -6 +  BRAWCAP_STATUS_ERROR_NOT_FOUND = -6 ,
-  BRAWCAP_STATUS_ERROR_IN_USE = -7 +  BRAWCAP_STATUS_ERROR_IN_USE = -7 ,
-  BRAWCAP_STATUS_ERROR_BEYOND_MTU = -8 +  BRAWCAP_STATUS_ERROR_BEYOND_MTU = -8 ,
-  BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED = -9 +  BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED = -9 ,
-  BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE = -10 +  BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE = -10 ,
-  BRAWCAP_STATUS_ERROR_OVERRUN = -11 +  BRAWCAP_STATUS_ERROR_OVERRUN = -11 ,
-  BRAWCAP_STATUS_WARNING_DEMO_MODE = 1 +  BRAWCAP_STATUS_WARNING_DEMO_MODE = 1 ,
-  BRAWCAP_STATUS_WARNING_PENDING = 2 +  BRAWCAP_STATUS_WARNING_PENDING = 2 ,
-  BRAWCAP_STATUS_WARNING_LIMIT_REACHED = 3 +  BRAWCAP_STATUS_WARNING_LIMIT_REACHED = 3 ,
-  BRAWCAP_STATUS_WARNING_CANCELED = 4 +  BRAWCAP_STATUS_WARNING_CANCELED = 4 ,
-  BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED = 5 +  BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED = 5 ,
-  BRAWCAP_STATUS_WARNING_NO_UPLINK = 6 +  BRAWCAP_STATUS_WARNING_NO_UPLINK = 6 ,
-  BRAWCAP_STATUS_INFO_NOT_RUNNING = 2000 +  BRAWCAP_STATUS_INFO_NOT_RUNNING = 2000 ,
-  BRAWCAP_STATUS_INFO_NOT_ATTACHED = 2001 +  BRAWCAP_STATUS_INFO_NOT_ATTACHED = 2001 ,
-  BRAWCAP_STATUS_INFO_NOT_REGISTERED = 2002 +  BRAWCAP_STATUS_INFO_NOT_REGISTERED = 2002 ,
-  BRAWCAP_STATUS_INFO_ALREADY_REGISTERED = 2003 +  BRAWCAP_STATUS_INFO_ALREADY_REGISTERED = 2003 ,
-  BRAWCAP_STATUS_INFO_NO_DATA = 2004 +  BRAWCAP_STATUS_INFO_NO_DATA = 2004 ,
-  BRAWCAP_STATUS_INFO_TIMEOUT = 2005 +  BRAWCAP_STATUS_INFO_TIMEOUT = 2005
}
 bRAWcap status/return codes. More...
 bRAWcap status/return codes. More...
 
enum  brawcap_timestamp_mode_t {
-  BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP = 0x00 +
enum  brawcap_timestamp_mode_t {
+  BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP = 0x00 ,
-  BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC = 0x01 +  BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC = 0x01 ,
-  BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC = 0x02 +  BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC = 0x02 ,
-  BRAWCAP_TIMESTAMP_MODE_SOFTWARE = 0x04 +  BRAWCAP_TIMESTAMP_MODE_SOFTWARE = 0x04 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM = 0x08 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM = 0x08 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE = 0x10 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE = 0x10 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE = 0x20 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE = 0x20
}
 List of different timestamp modes. More...
 List of different timestamp modes. More...
 
enum  brawcap_filter_type_t {
-  BRAWCAP_FILTER_TYPE_BYTE_MASK = 0 +
enum  brawcap_filter_type_t {
+  BRAWCAP_FILTER_TYPE_BYTE_MASK = 0 ,
-  BRAWCAP_FILTER_TYPE_BPF = 1 +  BRAWCAP_FILTER_TYPE_BPF = 1
}
 List of filter types. More...
 List of filter types. More...
 
enum  brawcap_rx_mode_t {
-  BRAWCAP_RX_MODE_LIVE = 1 +
enum  brawcap_rx_mode_t {
+  BRAWCAP_RX_MODE_LIVE = 1 ,
-  BRAWCAP_RX_MODE_DUMP = 2 +  BRAWCAP_RX_MODE_DUMP = 2
}
 List of receive modes. More...
 List of receive modes. More...
 
enum  brawcap_rx_direction_t {
-  BRAWCAP_RX_DIRECTION_UNKNOWN = 0x00 +
enum  brawcap_rx_direction_t {
+  BRAWCAP_RX_DIRECTION_UNKNOWN = 0x00 ,
-  BRAWCAP_RX_DIRECTION_IN = 0x01 +  BRAWCAP_RX_DIRECTION_IN = 0x01 ,
-  BRAWCAP_RX_DIRECTION_OUT = 0x02 +  BRAWCAP_RX_DIRECTION_OUT = 0x02 ,
-  BRAWCAP_RX_DIRECTION_BOTH = 0x03 +  BRAWCAP_RX_DIRECTION_BOTH = 0x03
}
 List of supported receive directions. More...
 List of supported receive directions. More...
 
enum  brawcap_stats_type_t {
-  BRAWCAP_STATS_TYPE_RX = 1 +
enum  brawcap_stats_type_t {
+  BRAWCAP_STATS_TYPE_RX = 1 ,
-  BRAWCAP_STATS_TYPE_TX = 2 +  BRAWCAP_STATS_TYPE_TX = 2
}
 List of all available statistic types. More...
 List of all available statistic types. More...
 
enum  brawcap_stats_rx_revision_t { BRAWCAP_STATS_RX_REVISION_1 = 1 +
enum  brawcap_stats_rx_revision_t { BRAWCAP_STATS_RX_REVISION_1 = 1 }
 List of all available receive statistic revisions. More...
 List of all available receive statistic revisions. More...
 
enum  brawcap_stats_tx_revision_t { BRAWCAP_STATS_TX_REVISION_1 = 1 +
enum  brawcap_stats_tx_revision_t { BRAWCAP_STATS_TX_REVISION_1 = 1 }
 List of all available transmit statistic revisions. More...
 List of all available transmit statistic revisions. More...
 

Detailed Description

diff --git a/brawcap__types__shared_8h_source.html b/a00038_source.html similarity index 69% rename from brawcap__types__shared_8h_source.html rename to a00038_source.html index 2de36a0..6ae1f84 100644 --- a/brawcap__types__shared_8h_source.html +++ b/a00038_source.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -112,7 +112,7 @@
brawcap_types_shared.h
-Go to the documentation of this file.
1/**
+Go to the documentation of this file.
1/**
2 * @file brawcap_types_shared.h
3 *
4 * @brief bRAWcap API - Shared types.
@@ -188,7 +188,7 @@
74 * @attention If this number of handles is reached (for a specific adapter) each additional @ref brawcap_open "open"
75 * will fail.
76 */
-
77#define BRAWCAP_HANDLES_PER_ADAPTER_MAX 5
+
77#define BRAWCAP_HANDLES_PER_ADAPTER_MAX 5
78
79/**
80 * @brief The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
@@ -205,7 +205,7 @@
91 * large queues shouldn´t be required in optimized configurations and that they can consume a lot of memory if they
92 * are not configured with care.
93 */
-
94typedef UINT32 brawcap_queue_size_t;
+
94typedef UINT32 brawcap_queue_size_t;
95
96/**@}*/
97#endif
@@ -233,22 +233,22 @@
119/**
120 * @brief Checks if the returned status indicates a success with no additional info.
121 */
-
122#define BRAWCAP_SUCCESS(status) (status == 0)
+
122#define BRAWCAP_SUCCESS(status) (status == 0)
123
124/**
125 * @brief Checks if the returned status is a error.
126 */
-
127#define BRAWCAP_ERROR(status) (status < 0)
+
127#define BRAWCAP_ERROR(status) (status < 0)
128
129/**
130 * @brief Checks if the returned status is a warning.
131 */
-
132#define BRAWCAP_WARNING(status) (status > 0 && status < 2000)
+
132#define BRAWCAP_WARNING(status) (status > 0 && status < 2000)
133
134/**
135 * @brief Checks if the returned status is a info.
136 */
-
137#define BRAWCAP_INFO(status) (status >= 2000 && status < 4000)
+
137#define BRAWCAP_INFO(status) (status >= 2000 && status < 4000)
138
139/**
140 * @brief bRAWcap status/return codes.
@@ -260,10 +260,10 @@
146 * - Status indicates @ref BRAWCAP_WARNING "warning"
147 * - Status indicates @ref BRAWCAP_INFO "info"
148 */
-
149typedef enum _brawcap_status
+
149typedef enum _brawcap_status
150{
151 // SUCCESS (== 0)
-
152 BRAWCAP_STATUS_SUCCESS = 0, /*!< Executed successfully, with no additional information. */
+
152 BRAWCAP_STATUS_SUCCESS = 0, /*!< Executed successfully, with no additional information. */
153
154 // ERROR (< 0)
155 #if 1
@@ -274,7 +274,7 @@
160 * If it happens in a specific situation, please check the system resources (CPU load, memory usage...).
161 * If the issue can not be located, feel free to contact our support.
162 */
- +
164 /**
165 * @brief Function is not available.
166 *
@@ -283,28 +283,28 @@
169 * - The current machine does not support the feature.
170 * - Higher API registration privilege is required.
171 */
- +
173 /**
174 * @brief At least one specified pointer parameter was invalid.
175 *
176 * This is a caller issue.
177 * Please check the provided pointers to solve this issue.
178 */
- +
180 /**
181 * @brief At least one parameter content is invalid.
182 *
183 * This is a caller issue.
184 * Please check the provided parameters and their contents to solve this issue.
185 */
- +
187 /**
188 * @brief At least one parameter is out of bounds.
189 *
190 * This is a caller issue.
191 * Please check if the provided parameters fit to the given parameter limitations.
192 */
- +
194 /**
195 * @brief Given parameter not found.
196 *
@@ -312,13 +312,13 @@
198 * For example it can occur if the function expects a local adapter name and the
199 * provided name did not match any of the currently available adapters.
200 */
- +
202 /**
203 * @brief Indicates that operation failed because the provided object is still in use.
204 *
205 * This may happen if another thread uses the same object or another operation for the object is still outstanding.
206 */
- +
208 /**
209 * @brief The packet size is beyond adapter MTU.
210 *
@@ -326,7 +326,7 @@
212 * It will be applied if the packet could not be transmitted because
213 * it´s length is beyond the configured adapter MTU.
214 */
- +
216 /**
217 * @brief Communication with the driver failed.
218 *
@@ -340,7 +340,7 @@
226 *
227 * If driver and library version matches and this error still occurs, please contact our support.
228 */
- +
230 /**
231 * @brief bRAWcap is not activated (on a specific adapter).
232 *
@@ -348,7 +348,7 @@
234 * for the specified bRAWcap handle.
235 * For example if the driver was deactivated meanwhile.
236 */
- +
238 /**
239 * @brief A buffer overrun was detected.
240 *
@@ -356,7 +356,7 @@
242 * - The provided buffer length was to short for the content.
243 * - A bRAWcap packet buffer has reached it´s "packet" capacity.
244 */
- +
246 #endif
247
248 // WARNING (1 to 1999)
@@ -367,7 +367,7 @@
253 * This should only be returned if there is no valid license for the requested feature.
254 * For more information about demo limitation see chapter @ref demo-mode "Demo Mode" in the manual.
255 */
- +
257 /**
258 * @brief Will be returned if another operation for the same resource is pending.
259 *
@@ -377,14 +377,14 @@
263 * For example if a receive is @ref brawcap_rx_start "started", @ref brawcap_rx_packet cannot be used until the
264 * receive is @ref brawcap_rx_stop "stopped". Same applies to transmissions.
265 */
- +
267 /**
268 * @brief Indicates that a bRAWcap limitation is reached.
269 *
270 * This could be the case if there are already max supported number of handles to the same adapter
271 * and the caller tries to open another one.
272 */
- +
274 /**
275 * @brief Indicates that a operation was canceled.
276 *
@@ -392,20 +392,20 @@
278 * This could be the case due to bRAWcap driver deactivation.
279 * If so this status will be applied for each packet which was canceled (not transmitted).
280 */
- +
282 /**
283 * @brief Indicates that not all of the specified content/payload was processed.
284 *
285 * It will be returned for example if not all packets of a bRAWcap packet buffer was transmitted.
286 * If so the user should check the status of each packet inside the buffer for further information.
287 */
- +
289 /**
290 * @brief Indicates that there is currently no uplink on the given adapter.
291 *
292 * It will be returned if the user tries to send packets to a adapter which has currently no uplink.
293 */
- +
295 #endif
296
297 // INFO (2000 - 3999)
@@ -416,43 +416,43 @@
302 * This will be returned if the user tries to stop something which is currently not running.
303 * For example when trying to stop receiving while it is not running.
304 */
- +
306 /**
307 * @brief Indicates that the given object is not attached.
308 *
309 * Will be returned for example if the user tries to detach a packet buffer
310 * which is currently not attached to a handle.
311 */
- +
313 /**
314 * @brief Indicates that the given object is not registered.
315 *
316 * Will be returned if user tries to unregister from a bRAWcap notification
317 * which was not registered before.
318 */
- +
320 /**
321 * @brief Indicates that the given object was already registered.
322 *
323 * Will be returned if user tries to register for something again
324 * which is already registered.
325 */
- +
327 /**
328 * @brief Indicates that a function returns without any data.
329 *
330 * This could be the case if a receive function returns without any received packet.
331 * For example if the configured receive timeout is reached.
332 */
- +
334 /**
335 * @brief Indicates that a function returned because of a timeout.
336 *
337 * This could be the case if a function has not finished it´s processing until a configured timeout is reached.
338 */
- +
340 #endif
- +
342
343/**@}*/
344#endif
@@ -491,7 +491,7 @@
377/**
378 * @brief Struct containing the separated version parts.
379 */
-
380typedef struct _brawcap_version_fragments
+
380typedef struct _brawcap_version_fragments
381{
382 /**
383 * @brief Build version.
@@ -501,7 +501,7 @@
387 * Versions with different build versions only should not appear.
388 * API and ABI always stays compatible between different build versions.
389 */
-
390 UINT16 build;
+
390 UINT16 build;
391 /**
392 * @brief Patch version.
393 *
@@ -510,7 +510,7 @@
396 * API and ABI always stays compatible between different patch versions.
397 *
398 */
-
399 UINT16 patch;
+
399 UINT16 patch;
400 /**
401 * @brief Minor version.
402 *
@@ -518,7 +518,7 @@
404 * Will be increased if the release contains new features (and maybe some bugfixes).
405 * API always stays compatible between different minor versions.
406 */
-
407 UINT16 minor;
+
407 UINT16 minor;
408 /**
409 * @brief Major version.
410 *
@@ -527,8 +527,8 @@
413 * break the API compatibility.
414 * API compatibility between different major versions is not guaranteed.
415 */
-
416 UINT16 major;
- +
416 UINT16 major;
+
418
419/**
420 * @brief bRAWcap version.
@@ -536,11 +536,11 @@
422 * The version is implemented as a union. The complete member allows easy compare between versions.
423 * While the fragments allow easy access to each version part (major, minor, patch, build).
424 */
-
425typedef union _brawcap_version
+
425typedef union _brawcap_version
426{
-
427 brawcap_version_fragments_t fragments; /*!< Separated parts of the version.*/
-
428 UINT64 complete; /*!< Complete version as integer. Use this for comparing versions. */
- +
427 brawcap_version_fragments_t fragments; /*!< Separated parts of the version.*/
+
428 UINT64 complete; /*!< Complete version as integer. Use this for comparing versions. */
+
430
431/**@}*/
432#endif
@@ -568,32 +568,32 @@
454/**
455 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC "system low precision" is supported.
456 */
-
457#define BRAWCAP_TIMESTAMP_MODE_SYSL_AVAILABLE(_capabilities) (_capabilities & 0x01)
+
457#define BRAWCAP_TIMESTAMP_MODE_SYSL_AVAILABLE(_capabilities) (_capabilities & 0x01)
458
459/**
460 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC "system high precision" is supported.
461 */
-
462#define BRAWCAP_TIMESTAMP_MODE_SYSH_AVAILABLE(_capabilities) (_capabilities & 0x02)
+
462#define BRAWCAP_TIMESTAMP_MODE_SYSH_AVAILABLE(_capabilities) (_capabilities & 0x02)
463
464/**
465 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_SOFTWARE "software" is supported.
466 */
-
467#define BRAWCAP_TIMESTAMP_MODE_SW_AVAILABLE(_capabilities) (_capabilities & 0x04)
+
467#define BRAWCAP_TIMESTAMP_MODE_SW_AVAILABLE(_capabilities) (_capabilities & 0x04)
468
469/**
470 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM "adapter system" is supported.
471 */
-
472#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYS_AVAILABLE(_capabilities) (_capabilities & 0x08)
+
472#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYS_AVAILABLE(_capabilities) (_capabilities & 0x08)
473
474/**
475 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE "adapter software" is supported.
476 */
-
477#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_SW_AVAILABLE(_capabilities) (_capabilities & 0x10)
+
477#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_SW_AVAILABLE(_capabilities) (_capabilities & 0x10)
478
479/**
480 * @brief Checks if timestamp mode @ref BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE "adapter hardware" is supported.
481 */
-
482#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_HW_AVAILABLE(_capabilities) (_capabilities & 0x20)
+
482#define BRAWCAP_TIMESTAMP_MODE_ADAPTER_HW_AVAILABLE(_capabilities) (_capabilities & 0x20)
483
484/**
485 * @brief If a timestamp resolution is set to this value,
@@ -602,32 +602,32 @@
488 * For example this can be the case for adapter hardware timestamps,
489 * if the adapter does not report it´s clock frequency.
490 */
-
491#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN 0
+
491#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN 0
492
493/**
494 * @brief Number of nanoseconds per second.
495 */
-
496#define BRAWCAP_TIMESTAMP_NS_PER_SEC 1000000000
+
496#define BRAWCAP_TIMESTAMP_NS_PER_SEC 1000000000
497
498/**
499 * @brief Number of microseconds per second.
500 */
-
501#define BRAWCAP_TIMESTAMP_US_PER_SEC 1000000
+
501#define BRAWCAP_TIMESTAMP_US_PER_SEC 1000000
502
503/**
504 * @brief Number of milliseconds per second.
505 */
-
506#define BRAWCAP_TIMESTAMP_MS_PER_SEC 1000
+
506#define BRAWCAP_TIMESTAMP_MS_PER_SEC 1000
507
508/**
509 * @brief Number of nanoseconds per microsecond.
510 */
-
511#define BRAWCAP_TIMESTAMP_NS_PER_US 1000
+
511#define BRAWCAP_TIMESTAMP_NS_PER_US 1000
512
513/**
514 * @brief Number of nanoseconds per millisecond.
515 */
-
516#define BRAWCAP_TIMESTAMP_NS_PER_MS 1000000
+
516#define BRAWCAP_TIMESTAMP_NS_PER_MS 1000000
517
518
519/**
@@ -635,7 +635,7 @@
521 *
522 * It has to be interpreted as bitfield.
523 */
- +
525
526/**
527 * @brief Represents the timestamp resolution in nanoseconds.
@@ -644,7 +644,7 @@
530 * For example if it is set to 1.000.000 ns the timestamp has a accuracy of "only" one millisecond.
531 * If it is set to 1 ns instead, it would indicate a very precise timestamp with a resolution of one nanosecond.
532 */
- +
534
535/**
536 * @brief List of different timestamp modes.
@@ -684,37 +684,37 @@
570 * - Receive: When the packet is recognized by the bRAWcap driver (forwarded from the underlying driver)
571 * - Transmit: When the transmission complete event is recognized by the bRAWcap driver
572 */
-
573typedef enum _brawcap_timestamp_mode
+
573typedef enum _brawcap_timestamp_mode
574{
575 /**
576 * @brief No timestamp.
577 */
- +
579 /**
580 * @brief A low precision system timestamp created by bRAWcap driver.
581 */
- +
583 /**
584 * @brief A high precision system timestamp created by bRAWcap driver.
585 */
- +
587 /**
588 * @brief A software timestamp created by bRAWcap driver.
589 */
- +
591 /**
592 * @brief A system timestamp created by the network adapter driver.
593 */
- +
595 /**
596 * @brief A software timestamp created by the network adapter driver.
597 */
- +
599 /**
600 * @brief A hardware timestamp created by the network adapter hardware/firmware.
601 */
- - + +
604
605/**
606 * @brief bRAWcap timestamp object.
@@ -723,7 +723,7 @@
609 * has to be used for each timestamp module function.
610 * To get a timestamp object from a packet use @ref brawcap_packet_timestamp_get.
611 */
-
612typedef struct _brawcap_timestamp brawcap_timestamp_t;
+
612typedef struct _brawcap_timestamp brawcap_timestamp_t;
613
614/**@}*/
615#endif
@@ -760,7 +760,7 @@
646 *
647 * This value corresponds to jumbo frame size (9000 Bytes) + Ethernet header (14 Bytes) + single VLAN header (4 Bytes).
648 */
-
649#define BRAWCAP_PACKET_SIZE_MAX 9018
+
649#define BRAWCAP_PACKET_SIZE_MAX 9018
650
651/**
652 * @brief The minimum required (byte) size for a single packet payload.
@@ -771,7 +771,7 @@
657 * If smaller packets are sent the network adapter will automatically add some padding at the end of the payload.
658 * The padding contains zeros only and after the last padding/payload byte the Ethernet FCS will be added.
659 */
-
660#define BRAWCAP_PACKET_SIZE_MIN 14
+
660#define BRAWCAP_PACKET_SIZE_MIN 14
661
662/**
663 * @brief Type for handling the number of payload bytes per packet.
@@ -781,7 +781,7 @@
667 * Packet payload sizes have to be between @ref BRAWCAP_PACKET_SIZE_MIN and @ref BRAWCAP_PACKET_SIZE_MAX,
668 * values below/beyond are not accepted.
669 */
- +
671
672/**
673 * @brief bRAWcap packet object.
@@ -790,7 +790,7 @@
676 * Packet objects can be @ref brawcap_packet_create "created" and @ref brawcap_packet_free "freed"
677 * or retrieved from a @ref brawcap_buffer "packet buffer".
678 */
-
679typedef struct _brawcap_packet brawcap_packet_t;
+
679typedef struct _brawcap_packet brawcap_packet_t;
680
681/**@}*/
682#endif
@@ -832,12 +832,12 @@
718/**
719 * @brief The maximum amount of packets, which can be stored in a packet buffer.
720 */
-
721#define BRAWCAP_BUFFER_PACKETS_MAX 100000
+
721#define BRAWCAP_BUFFER_PACKETS_MAX 100000
722
723/**
724 * @brief The minimum amount of packets, which a packet buffer must have.
725 */
-
726#define BRAWCAP_BUFFER_PACKETS_MIN 1
+
726#define BRAWCAP_BUFFER_PACKETS_MIN 1
727
728/**
729 * @brief Type for handling the number of packets which can be stored in a packet buffer.
@@ -845,7 +845,7 @@
731 * The total amount of packets per packet buffer has to be between @ref BRAWCAP_BUFFER_PACKETS_MIN -
732 * @ref BRAWCAP_BUFFER_PACKETS_MAX.
733 */
- +
735
736/**
737 * @brief bRAWcap packet buffer object.
@@ -853,7 +853,7 @@
739 * The packet buffer object has to be used for each packet buffer module function.
740 * Packet buffers can be @ref brawcap_buffer_create "created" and @ref brawcap_buffer_free "freed".
741 */
-
742typedef struct _brawcap_buffer brawcap_buffer_t;
+
742typedef struct _brawcap_buffer brawcap_buffer_t;
743
744/********************************************* BUFFER ITERATOR ********************************************************/
745#if 1
@@ -881,7 +881,7 @@
767 * Packet buffer iterators can be @ref brawcap_buffer_iterator_create "created" and @ref brawcap_buffer_iterator_free
768 * "freed".
769 */
-
770typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t;
+
770typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t;
771
772/**@}*/
773#endif
@@ -1002,7 +1002,7 @@
888/**
889 * @brief The maximum supported filter byte mask length in bytes.
890 */
-
891#define BRAWCAP_FILTER_BYTE_MAX_LENGTH 64U
+
891#define BRAWCAP_FILTER_BYTE_MAX_LENGTH 64U
892
893/**
894 * @brief Fixed size array for storing a filter byte mask.
@@ -1011,7 +1011,7 @@
897 * If the used filter does not require the complete mask length.
898 * bRAWcap evaluates only the bytes up to the specified filter length.
899 */
- +
901
902/**
903 * @brief Fixed size array for storing a byte wise bitfield.
@@ -1023,12 +1023,12 @@
909 * If the used filter does not require the complete mask length.
910 * bRAWcap evaluates only the bytes up to the specified filter length.
911 */
- +
913
914/**
915 * @brief Type for specifying the byte filter length.
916 */
- +
918
919/**
920 * @brief List of filter types.
@@ -1037,32 +1037,32 @@
923 * A BPF (Berkley Packet Filter) filter, which is equivalent to the one which libpcap uses,
924 * may be added in the future.
925 */
-
926typedef enum _brawcap_filter_type
+
926typedef enum _brawcap_filter_type
927{
928 /**
929 * @brief A bRAWcap byte filter.
930 */
- +
932 /**
933 * @brief A Berkley Packet Filter.
934 */
- - -
937 typedef struct bpf_insn* brawcap_bpf_insn_t;
+ + +
937 typedef struct bpf_insn* brawcap_bpf_insn_t;
938
-
939 typedef struct bpf_program* brawcap_bpf_program_t;
+
939 typedef struct bpf_program* brawcap_bpf_program_t;
940#ifdef _BRAWCAP_DEFINE_BPF_STRUCTS_INTERNAL
941 /**
942 * @brief A single BPF pseudo-instruction.
943 *
944 * Contains a single instruction for the BPF.
945 */
-
946 struct bpf_insn
+
946 struct bpf_insn
947 {
-
948 USHORT code; /*!< Instruction type and addressing mode. */
-
949 UCHAR jt; /*!< Jump if true. */
-
950 UCHAR jf; /*!< Jump if false. */
-
951 UINT32 k; /*!< Generic field used for various purposes. */
+
948 USHORT code; /*!< Instruction type and addressing mode. */
+
949 UCHAR jt; /*!< Jump if true. */
+
950 UCHAR jf; /*!< Jump if false. */
+
951 UINT32 k; /*!< Generic field used for various purposes. */
952 };
953
954 /**
@@ -1071,10 +1071,10 @@
957 * The BPF program can be used to filter incoming packets.
958 * To get a BPF program it has to be generated/compiled from a BPF filter string, first.
959 */
- +
961 {
-
962 UINT bf_len; /*!< Indicates the number of instructions of the program. */
-
963 struct bpf_insn* bf_insns; /*!< A pointer to the first instruction of the program. */
+
962 UINT bf_len; /*!< Indicates the number of instructions of the program. */
+
963 struct bpf_insn* bf_insns; /*!< A pointer to the first instruction of the program. */
964 };
965#endif
966
@@ -1084,7 +1084,7 @@
970 * The filter object can be accessed with the bRAWcap filter functions.
971 * Filters can be @ref brawcap_filter_create "created" and @ref brawcap_filter_free "freed".
972 */
-
973typedef struct _brawcap_filter brawcap_filter_t;
+
973typedef struct _brawcap_filter brawcap_filter_t;
974
975/**@}*/
976#endif
@@ -1099,43 +1099,43 @@
985 * @warning If a timeout of zero which is equivalent to infinite wait is configured it blocks until
986 * the minimum amount of packets are received and will not return earlier.
987 */
-
988#define BRAWCAP_RX_COPY_PACKETS_DEFAULT 0
+
988#define BRAWCAP_RX_COPY_PACKETS_DEFAULT 0
989
990/**
991 * @brief Default timeout in milliseconds after which a bRAWcap receive returns,
992 * even if buffer is not yet full but the configured receive min packets to copy must be reached.
993 */
-
994#define BRAWCAP_RX_TIMEOUT_MS_DEFAULT 10
+
994#define BRAWCAP_RX_TIMEOUT_MS_DEFAULT 10
995
996/**
997 * @brief Default receive timestamp mode which will be used.
998 */
-
999#define BRAWCAP_RX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
+
999#define BRAWCAP_RX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
1000
1001/**
1002 * @brief Default VLAN tagging mode which will be used.
1003 */
-
1004#define BRAWCAP_RX_VLAN_TAGGING_DEFAULT FALSE
+
1004#define BRAWCAP_RX_VLAN_TAGGING_DEFAULT FALSE
1005
1006/**
1007 * @brief Default size for driver receive queues in number of packets.
1008 */
-
1009#define BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT 4096
+
1009#define BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT 4096
1010
1011/**
1012 * @brief Maximum supported receive timeout in number of milliseconds.
1013 */
-
1014#define BRAWCAP_RX_TIMEOUT_MS_MAX 5000
+
1014#define BRAWCAP_RX_TIMEOUT_MS_MAX 5000
1015
1016/**
1017 * @brief Maximum size (in number of packets) supported for driver receive queues.
1018 */
-
1019#define BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX 40000
+
1019#define BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX 40000
1020
1021/**
1022 * @brief Default receive direction which will be used.
1023 */
-
1024#define BRAWCAP_RX_DIRECTION_DEFAULT BRAWCAP_RX_DIRECTION_BOTH
+
1024#define BRAWCAP_RX_DIRECTION_DEFAULT BRAWCAP_RX_DIRECTION_BOTH
1025
1026/**
1027 * @brief Type for handling receive timeouts in number of milliseconds.
@@ -1148,7 +1148,7 @@
1034 * - @ref brawcap_rx_start - the minimum amount of packets to copy is reached (see @ref brawcap_rx_min_packets_t)
1035 * or the attached buffer is full - whichever comes first.
1036 */
- +
1038
1039/**
1040 * @brief Type for handling the minimum amount of packets to copy before a bRAWcap receive will return.
@@ -1158,25 +1158,25 @@
1044 * @note This setting is only used with looped receive (@ref brawcap_rx_start) and has no impact on single packet
1045 * reception (@ref brawcap_rx_packet).
1046 */
- +
1048
1049/**
1050 * @brief List of receive modes.
1051 */
-
1052typedef enum _brawcap_rx_mode
+
1052typedef enum _brawcap_rx_mode
1053{
1054 /**
1055 * @brief Received packets are stored in a user created bRAWcap packet (buffer) and provided to the
1056 * calling application for processing.
1057 */
- +
1059 /**
1060 * @brief Received packets are directly written to disk.
1061 *
1062 * @note Dumping mode is not yet supported and may be added to later releases.
1063 */
- - + +
1066
1067/**
1068 * @brief List of supported receive directions.
@@ -1184,16 +1184,16 @@
1070 * The receive direction allows the select for which direction (transmit/receive) the packets shall be captured.
1071 * This setting can be seen as some kind of generic receive filter.
1072 */
-
1073typedef enum _brawcap_rx_direction
+
1073typedef enum _brawcap_rx_direction
1074{
1075 /**
1076 * @brief Stops to receive packets of any direction.
1077 */
- +
1079 /**
1080 * @brief Only received packets by the network adapter will be received.
1081 */
- +
1083 /**
1084 * @brief Only transmitted packets by bRAWcap or upper network stack drivers will be received.
1085 * This allows some kind of loopback for packets which are transmitted to the network.
@@ -1202,13 +1202,13 @@
1088 * not transmitted/received via a real network adapter. Instead Windows creates a separate "virtual" adapter
1089 * for localhost communication. This adapter is currently not supported by bRAWcap.
1090 */
- +
1092 /**
1093 * @brief Both transmitted packets by bRAWcap or upper network stack drivers and received packets from the
1094 * underlying network adapter will be received.
1095 */
- - + +
1098
1099/**@}*/
1100#endif
@@ -1224,22 +1224,22 @@
1110/**
1111 * @brief Default size in number of packets for driver transmit queues.
1112 */
-
1113#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT 512
+
1113#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT 512
1114
1115/**
1116 * @brief Minimum size in number of packets supported for driver transmit queues.
1117 */
-
1118#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_MIN 256
+
1118#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_MIN 256
1119
1120/**
1121 * @brief Maximum size in number of packets supported for driver transmit queues.
1122 */
-
1123#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX 4096
+
1123#define BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX 4096
1124
1125/**
1126 * @brief Default timestamp mode for transmitted packets.
1127 */
-
1128#define BRAWCAP_TX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
+
1128#define BRAWCAP_TX_TIMESTAMP_MODE_DEFAULT BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
1129
1130/**@}*/
1131#endif
@@ -1280,7 +1280,7 @@
1166 * @brief Indicates if the @ref brawcap_stats_rx_t.adapterReceivedPacketsTotal member of the given receive stats is
1167 * valid. This statistic is provided from the underlying network adapter driver and may be supported or not.
1168 */
-
1169#define BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID(__stats_rx) \
+
1169#define BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID(__stats_rx) \
1170 (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID)
1171/**
1172 * @internal
@@ -1292,7 +1292,7 @@
1178 * @brief Indicates if the @ref brawcap_stats_rx_t.adapterReceivedBytesTotal member of the given receive stats is valid.
1179 * This statistic is provided from the underlying network adapter driver and may be supported or not.
1180 */
-
1181#define BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID(__stats_rx) \
+
1181#define BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID(__stats_rx) \
1182 (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID)
1183/**
1184 * @internal
@@ -1304,7 +1304,7 @@
1190 * @brief Indicates if the @ref brawcap_stats_rx_t.adapterDroppedPacketsTotal member of the given receive stats is
1191 * valid. This statistic is provided from the underlying network adapter driver and may be supported or not.
1192 */
-
1193#define BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID(__stats_rx) \
+
1193#define BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID(__stats_rx) \
1194 (__stats_rx.adapterValid & _BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID)
1195
1196/**
@@ -1317,7 +1317,7 @@
1203 * @brief Indicates if the @ref brawcap_stats_tx_t.adapterCompletedPacketsTotal member of the given transmit stats is
1204 * valid. This statistic is provided from the underlying network adapter driver and may be supported or not.
1205 */
-
1206#define BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID(__stats_tx) \
+
1206#define BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID(__stats_tx) \
1207 (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID)
1208/**
1209 * @internal
@@ -1329,7 +1329,7 @@
1215 * @brief Indicates if the @ref brawcap_stats_tx_t.adapterCompletedBytesTotal member of the given transmit stats is
1216 * valid. This statistic is provided from the underlying network adapter driver and may be supported or not.
1217 */
-
1218#define BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID(__stats_tx) \
+
1218#define BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID(__stats_tx) \
1219 (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID)
1220/**
1221 * @internal
@@ -1341,7 +1341,7 @@
1227 * @brief Indicates if the @ref brawcap_stats_tx_t.adapterCanceledPacketsTotal member of the given transmit stats is
1228 * valid. This statistic is provided from the underlying network adapter driver and may be supported or not.
1229 */
-
1230#define BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID(__stats_tx) \
+
1230#define BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID(__stats_tx) \
1231 (__stats_tx.adapterValid & _BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID )
1232
1233/**
@@ -1351,50 +1351,50 @@
1237 * the header first before make use of it.
1238 * This is required to allow backward compatibility for applications using older versions.
1239 */
-
1240typedef struct _brawcap_stats_header
+
1240typedef struct _brawcap_stats_header
1241{
1242 /**
1243 * @brief Indicates which type of stats it is.
1244 */
-
1245 BYTE type;
+
1245 BYTE type;
1246 /**
1247 * @brief Indicates the revision of the stats.
1248 * @note It is preferred to always use the latest version available in your bRAWcap header file.
1249 * But you can also use older versions if you dont want to access members added in the newer versions.
1250 */
- +
1252 /**
1253 * @brief Should be set to the size of the structure depending on it´s type and revision.
1254 * You should use the BRAWCAP_STATS_..._SIZEOF_REVISION_X macros for initializing this member.
1255 */
-
1256 UINT16 size;
- +
1256 UINT16 size;
+
1258
1259/**
1260 * @brief List of all available statistic types.
1261 */
-
1262typedef enum _brawcap_stats_type
+
1262typedef enum _brawcap_stats_type
1263{
1264 /**
1265 * @brief Type for receive stats.
1266 */
- +
1268 /**
1269 * @brief Type for transmit stats.
1270 */
- - + +
1273
1274/**
1275 * @brief List of all available receive statistic revisions.
1276 */
-
1277typedef enum _brawcap_stats_rx_revision
+
1277typedef enum _brawcap_stats_rx_revision
1278{
1279 /**
1280 * @brief Revision 1 for receive stats.
1281 */
- - + +
1284
1285/**
1286 * @brief The bRAWcap receive statistics.
@@ -1413,106 +1413,106 @@
1299 * @attention User is responsible for initializing the structure header before using it.
1300 * Otherwise it may lead to undefined behaviour.
1301 */
-
1302typedef struct _brawcap_stats_rx
+
1302typedef struct _brawcap_stats_rx
1303{
1304 /**
1305 * @brief Header for receive statistics.
1306 * This has to be always initialized by the user after creation before using it.
1307 */
- +
1309 /**
1310 * @brief Bitfield indicating which counters provided by the underlying network adapter driver are valid.
1311 */
- +
1313 /**
1314 * @brief Total number of received packets by the underlying network adapter.
1315 * @note You should check if the network adapter supports this counter with
1316 * @ref BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID.
1317 * If the counter is not supported it will be always zero.
1318 */
- +
1320 /**
1321 * @brief Total number of received bytes by the underlying network adapter.
1322 * @note You should check if the network adapter supports this counter with
1323 * @ref BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID.
1324 * If the counter is not supported it will be always zero.
1325 */
- +
1327 /**
1328 * @brief Total number of received bytes by the underlying network adapter.
1329 * @note You should check if the network adapter supports this counter with
1330 * @ref BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID.
1331 * If the counter is not supported it will be always zero.
1332 */
- +
1334 /**
1335 * @brief The total number of indicated packets to the upper network stack by bRAWcap on the corresponding adapter.
1336 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1337 */
- +
1339 /**
1340 * @brief The total number of received packets by bRAWcap on the corresponding adapter.
1341 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter..
1342 */
- +
1344 /**
1345 * @brief The total number of received packets by the given bRAWcap handle.
1346 * @note This counter relates to a handle and will be deleted when the handle is closed.
1347 */
- +
1349 /**
1350 * @brief The total number of packets which have matched the given bRAWcap handle filter.
1351 * @note This counter relates to a handle and will be deleted when the handle is closed.
1352 */
- +
1354 /**
1355 * @brief The total number of packets which was queued to the handles driver queue.
1356 * @note This counter relates to a handle and will be deleted when the handle is closed.
1357 */
- +
1359 /**
1360 * @brief The total number of packets which could be directly delivered to user space memory.
1361 * @note This counter relates to a handle and will be deleted when the handle is closed.
1362 */
- +
1364 /**
1365 * @brief The total number of received bytes by the given bRAWcap handle.
1366 * @note This counter relates to a handle and will be deleted when the handle is closed
1367 */
- +
1369 /**
1370 * @brief The total number of packets which was dropped for the handle (sum of all reasons).
1371 * @note This counter relates to a handle and will be deleted when the handle is closed.
1372 */
- +
1374 /**
1375 * @brief The total number of packets which was dropped for the handle because of resources (driver queue overrun).
1376 * @note This counter relates to a handle and will be deleted when the handle is closed.
1377 */
- +
1379 /**
1380 * @brief The total number of packets which was dropped for the handle their length exceeds the handles configured max
1381 * packet size.
1382 * @note This counter relates to a handle and will be deleted when the handle is closed.
1383 */
- - + +
1386
1387/**
1388 * @brief Returns the size of receive statistics revision 1.
1389 */
-
1390#define BRAWCAP_STATS_RX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_rx_t, handleDroppedPacketsToLong)
+
1390#define BRAWCAP_STATS_RX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_rx_t, handleDroppedPacketsToLong)
1391
1392/**
1393 * @brief List of all available transmit statistic revisions.
1394 */
-
1395typedef enum _brawcap_stats_tx_revision
+
1395typedef enum _brawcap_stats_tx_revision
1396{
1397 /**
1398 * @brief Revision 1 for transmit stats.
1399 */
- - + +
1402
1403/**
1404 * @brief The bRAWcap transmit statistics.
@@ -1531,234 +1531,234 @@
1417 * @attention User is responsible for initializing the structure header before using it.
1418 * Otherwise it may lead to undefined behaviour.
1419 */
-
1420typedef struct _brawcap_stats_tx
+
1420typedef struct _brawcap_stats_tx
1421{
1422 /**
1423 * @brief Header for transmit statistics.
1424 * This has to be always initialized by the user after creation before using it.
1425 */
- +
1427 /**
1428 * @brief Bitfield indicating which counters provided by the underlying network adapter driver are valid.
1429 *
1430 */
- +
1432 /**
1433 * @brief Total number of (completed) transmitted packets by the underlying network adapter.
1434 * @note You should check if the network adapter supports this counter with
1435 * @ref BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID.
1436 * If the counter is not supported it will be always zero.
1437 */
- +
1439 /**
1440 * @brief Total number of (completed) transmitted bytes by the underlying network adapter.
1441 * @note You should check if the network adapter supports this counter with
1442 * @ref BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID.
1443 * If the counter is not supported it will be always zero.
1444 */
- +
1446 /**
1447 * @brief Total number of canceled transmitted packets by the underlying network adapter.
1448 * @note You should check if the network adapter supports this counter with
1449 * @ref BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID.
1450 * If the counter is not supported it will be always zero.
1451 */
- +
1453 /**
1454 * @brief Total number of initiated packets to transmit by the bRAWcap driver on the corresponding adapter.
1455 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1456 */
- +
1458 /**
1459 * @brief Initiated packets to transmit from upper network stack detected by bRAWcap driver on
1460 * the corresponding adapter.
1461 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1462 */
- +
1464 /**
1465 * @brief Initiated packets to transmit from bRAWcap driver itself on the corresponding adapter.
1466 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1467 */
- +
1469 /**
1470 * @brief Total number of canceled packets to transmit by the bRAWcap driver on the corresponding adapter.
1471 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1472 */
- +
1474 /**
1475 * @brief Canceled packets to transmit from the upper network stack detected by bRAWcap driver on the
1476 * corresponding adapter.
1477 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1478 */
- +
1480 /**
1481 * @brief Canceled packets to transmit from bRAWcap driver itself on the corresponding adapter.
1482 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1483 */
- +
1485 /**
1486 * @brief Total number of completed transmitted packets detected by bRAWcap driver on the corresponding adapter.
1487 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1488 */
- +
1490 /**
1491 * @brief Completed packets to transmit from the upper network stack detected by bRAWcap driver on the corresponding
1492 * adapter.
1493 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1494 */
- +
1496 /**
1497 * @brief Completed packets to transmit from the bRAWcap driver itself on the corresponding adapter.
1498 * @note This counter will reset if bRAWcap driver is restarted, or it is deactivated on the adapter.
1499 */
- +
1501 /**
1502 * @brief Total number of initiated packets to transmit for the handle.
1503 * @note This counter relates to a handle and will be deleted when the handle is closed.
1504 */
- +
1506 /**
1507 * @brief Total number of canceled packets to transmit for the handle.
1508 * @note This counter relates to a handle and will be deleted when the handle is closed.
1509 */
- +
1511 /**
1512 * @brief Total number of completed transmitted packets for the handle.
1513 * @note This counter relates to a handle and will be deleted when the handle is closed.
1514 */
- +
1516
1517 UINT64 handleCompletedBytesTotal;
- +
1519
1520/**
1521 * @brief Returns the size of transmit statistics revision 1.
1522 */
-
1523#define BRAWCAP_STATS_TX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_tx_t, handleCompletedBytesTotal)
+
1523#define BRAWCAP_STATS_TX_SIZEOF_REVISION_1 _BRAWCAP_SIZEOF_STRUCT(brawcap_stats_tx_t, handleCompletedBytesTotal)
1524
1525/**@}*/
1526#endif
1527
1528#endif // BRAWCAP_TYPES_SHARED_H
-
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
-
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
-
UINT32 brawcap_buffer_packet_count_t
Type for handling the number of packets which can be stored in a packet buffer.
Definition: brawcap_types_shared.h:734
-
UCHAR jt
Definition: brawcap_types_shared.h:949
-
UINT32 k
Definition: brawcap_types_shared.h:951
-
UCHAR jf
Definition: brawcap_types_shared.h:950
-
UINT bf_len
Definition: brawcap_types_shared.h:962
-
struct bpf_insn * bf_insns
Definition: brawcap_types_shared.h:963
-
USHORT code
Definition: brawcap_types_shared.h:948
-
#define BRAWCAP_FILTER_BYTE_MAX_LENGTH
The maximum supported filter byte mask length in bytes.
Definition: brawcap_types_shared.h:891
-
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
-
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
-
brawcap_filter_type_t
List of filter types.
Definition: brawcap_types_shared.h:927
-
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
-
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
-
@ BRAWCAP_FILTER_TYPE_BPF
A Berkley Packet Filter.
Definition: brawcap_types_shared.h:935
-
@ BRAWCAP_FILTER_TYPE_BYTE_MASK
A bRAWcap byte filter.
Definition: brawcap_types_shared.h:931
-
A single BPF pseudo-instruction.
Definition: brawcap_types_shared.h:947
-
A BPF pseudo-assembly program.
Definition: brawcap_types_shared.h:961
-
UINT32 brawcap_queue_size_t
The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
Definition: brawcap_types_shared.h:94
-
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
-
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
-
brawcap_rx_mode_t
List of receive modes.
Definition: brawcap_types_shared.h:1053
-
UINT32 brawcap_rx_min_packets_t
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return....
Definition: brawcap_types_shared.h:1047
-
UINT16 brawcap_rx_timeout_t
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum block...
Definition: brawcap_types_shared.h:1037
-
brawcap_rx_direction_t
List of supported receive directions.
Definition: brawcap_types_shared.h:1074
-
@ BRAWCAP_RX_MODE_LIVE
Received packets are stored in a user created bRAWcap packet (buffer) and provided to the calling app...
Definition: brawcap_types_shared.h:1058
-
@ BRAWCAP_RX_MODE_DUMP
Received packets are directly written to disk.
Definition: brawcap_types_shared.h:1064
-
@ BRAWCAP_RX_DIRECTION_UNKNOWN
Stops to receive packets of any direction.
Definition: brawcap_types_shared.h:1078
-
@ BRAWCAP_RX_DIRECTION_IN
Only received packets by the network adapter will be received.
Definition: brawcap_types_shared.h:1082
-
@ BRAWCAP_RX_DIRECTION_OUT
Only transmitted packets by bRAWcap or upper network stack drivers will be received....
Definition: brawcap_types_shared.h:1091
-
@ BRAWCAP_RX_DIRECTION_BOTH
Both transmitted packets by bRAWcap or upper network stack drivers and received packets from the unde...
Definition: brawcap_types_shared.h:1096
-
UINT64 driverInitiatedPacketsHandles
Initiated packets to transmit from bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1468
-
UINT64 handleDroppedPacketsTotal
The total number of packets which was dropped for the handle (sum of all reasons).
Definition: brawcap_types_shared.h:1373
-
UINT64 driverCompletedPacketsStack
Completed packets to transmit from the upper network stack detected by bRAWcap driver on the correspo...
Definition: brawcap_types_shared.h:1495
-
UINT64 driverReceivedPacketsTotal
The total number of received packets by bRAWcap on the corresponding adapter.
Definition: brawcap_types_shared.h:1343
-
UINT64 handleReceivedPacketsMatched
The total number of packets which have matched the given bRAWcap handle filter.
Definition: brawcap_types_shared.h:1353
-
UINT64 handleCompletedPacketsTotal
Total number of completed transmitted packets for the handle.
Definition: brawcap_types_shared.h:1515
-
BYTE revision
Indicates the revision of the stats.
Definition: brawcap_types_shared.h:1251
-
UINT64 adapterDroppedPacketsTotal
Total number of received bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1333
-
UINT64 adapterReceivedPacketsTotal
Total number of received packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1319
-
UINT64 adapterCanceledPacketsTotal
Total number of canceled transmitted packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1452
-
UINT64 handleReceivedPacketsDirect
The total number of packets which could be directly delivered to user space memory.
Definition: brawcap_types_shared.h:1363
-
UINT64 handleReceivedPacketsQueued
The total number of packets which was queued to the handles driver queue.
Definition: brawcap_types_shared.h:1358
-
UINT64 handleDroppedPacketsToLong
The total number of packets which was dropped for the handle their length exceeds the handles configu...
Definition: brawcap_types_shared.h:1384
-
UINT64 driverCompletedPacketsHandles
Completed packets to transmit from the bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1500
-
UINT64 adapterCompletedBytesTotal
Total number of (completed) transmitted bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1445
-
UINT16 size
Should be set to the size of the structure depending on it´s type and revision. You should use the BR...
Definition: brawcap_types_shared.h:1256
-
UINT64 driverInitiatedPacketsStack
Initiated packets to transmit from upper network stack detected by bRAWcap driver on the correspondin...
Definition: brawcap_types_shared.h:1463
-
UINT64 driverInitiatedPacketsTotal
Total number of initiated packets to transmit by the bRAWcap driver on the corresponding adapter.
Definition: brawcap_types_shared.h:1457
-
UINT64 adapterCompletedPacketsTotal
Total number of (completed) transmitted packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1438
-
UINT64 handleCanceledPacketsTotal
Total number of canceled packets to transmit for the handle.
Definition: brawcap_types_shared.h:1510
-
BYTE type
Indicates which type of stats it is.
Definition: brawcap_types_shared.h:1245
-
UINT64 handleDroppedPacketsQueue
The total number of packets which was dropped for the handle because of resources (driver queue overr...
Definition: brawcap_types_shared.h:1378
-
UINT64 driverCanceledPacketsTotal
Total number of canceled packets to transmit by the bRAWcap driver on the corresponding adapter.
Definition: brawcap_types_shared.h:1473
-
UINT32 adapterValid
Bitfield indicating which counters provided by the underlying network adapter driver are valid.
Definition: brawcap_types_shared.h:1312
-
UINT64 handleReceivedPacketsTotal
The total number of received packets by the given bRAWcap handle.
Definition: brawcap_types_shared.h:1348
-
UINT64 driverCanceledPacketsHandles
Canceled packets to transmit from bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1484
-
brawcap_stats_header_t header
Header for receive statistics. This has to be always initialized by the user after creation before us...
Definition: brawcap_types_shared.h:1308
-
UINT64 handleInitiatedPacketsTotal
Total number of initiated packets to transmit for the handle.
Definition: brawcap_types_shared.h:1505
-
UINT64 driverIndicatedPacketsTotal
The total number of indicated packets to the upper network stack by bRAWcap on the corresponding adap...
Definition: brawcap_types_shared.h:1338
-
UINT64 driverCanceledPacketsStack
Canceled packets to transmit from the upper network stack detected by bRAWcap driver on the correspon...
Definition: brawcap_types_shared.h:1479
-
UINT64 adapterReceivedBytesTotal
Total number of received bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1326
-
UINT64 handleReceivedBytesTotal
The total number of received bytes by the given bRAWcap handle.
Definition: brawcap_types_shared.h:1368
-
UINT64 driverCompletedPacketsTotal
Total number of completed transmitted packets detected by bRAWcap driver on the corresponding adapter...
Definition: brawcap_types_shared.h:1489
-
brawcap_stats_rx_revision_t
List of all available receive statistic revisions.
Definition: brawcap_types_shared.h:1278
-
brawcap_stats_tx_revision_t
List of all available transmit statistic revisions.
Definition: brawcap_types_shared.h:1396
-
brawcap_stats_type_t
List of all available statistic types.
Definition: brawcap_types_shared.h:1263
-
@ BRAWCAP_STATS_RX_REVISION_1
Revision 1 for receive stats.
Definition: brawcap_types_shared.h:1282
-
@ BRAWCAP_STATS_TX_REVISION_1
Revision 1 for transmit stats.
Definition: brawcap_types_shared.h:1400
-
@ BRAWCAP_STATS_TYPE_RX
Type for receive stats.
Definition: brawcap_types_shared.h:1267
-
@ BRAWCAP_STATS_TYPE_TX
Type for transmit stats.
Definition: brawcap_types_shared.h:1271
-
Header describing given bRAWcap stats structure.
Definition: brawcap_types_shared.h:1241
-
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
-
The bRAWcap transmit statistics.
Definition: brawcap_types_shared.h:1421
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
@ BRAWCAP_STATUS_INFO_NOT_ATTACHED
Indicates that the given object is not attached.
Definition: brawcap_types_shared.h:312
-
@ BRAWCAP_STATUS_ERROR_IN_USE
Indicates that operation failed because the provided object is still in use.
Definition: brawcap_types_shared.h:207
-
@ BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE
bRAWcap is not activated (on a specific adapter).
Definition: brawcap_types_shared.h:237
-
@ BRAWCAP_STATUS_ERROR_FAILED
Detected a - not further specified - failure.
Definition: brawcap_types_shared.h:163
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_ERROR_INVALID_PARAM
At least one parameter content is invalid.
Definition: brawcap_types_shared.h:186
-
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
-
@ BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED
Communication with the driver failed.
Definition: brawcap_types_shared.h:229
-
@ BRAWCAP_STATUS_WARNING_LIMIT_REACHED
Indicates that a bRAWcap limitation is reached.
Definition: brawcap_types_shared.h:273
-
@ BRAWCAP_STATUS_ERROR_NOT_FOUND
Given parameter not found.
Definition: brawcap_types_shared.h:201
-
@ BRAWCAP_STATUS_INFO_ALREADY_REGISTERED
Indicates that the given object was already registered.
Definition: brawcap_types_shared.h:326
-
@ BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE
At least one parameter is out of bounds.
Definition: brawcap_types_shared.h:193
-
@ BRAWCAP_STATUS_WARNING_NO_UPLINK
Indicates that there is currently no uplink on the given adapter.
Definition: brawcap_types_shared.h:294
-
@ BRAWCAP_STATUS_INFO_TIMEOUT
Indicates that a function returned because of a timeout.
Definition: brawcap_types_shared.h:339
-
@ BRAWCAP_STATUS_ERROR_INVALID_POINTER
At least one specified pointer parameter was invalid.
Definition: brawcap_types_shared.h:179
-
@ BRAWCAP_STATUS_INFO_NOT_REGISTERED
Indicates that the given object is not registered.
Definition: brawcap_types_shared.h:319
-
@ BRAWCAP_STATUS_WARNING_PENDING
Will be returned if another operation for the same resource is pending.
Definition: brawcap_types_shared.h:266
-
@ BRAWCAP_STATUS_ERROR_BEYOND_MTU
The packet size is beyond adapter MTU.
Definition: brawcap_types_shared.h:215
-
@ BRAWCAP_STATUS_WARNING_CANCELED
Indicates that a operation was canceled.
Definition: brawcap_types_shared.h:281
-
@ BRAWCAP_STATUS_INFO_NOT_RUNNING
No operation running.
Definition: brawcap_types_shared.h:305
-
@ BRAWCAP_STATUS_ERROR_NOT_AVAILABLE
Function is not available.
Definition: brawcap_types_shared.h:172
-
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
-
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
-
@ BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED
Indicates that not all of the specified content/payload was processed.
Definition: brawcap_types_shared.h:288
-
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
-
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
-
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
-
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
-
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC
A high precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:586
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE
A hardware timestamp created by the network adapter hardware/firmware.
Definition: brawcap_types_shared.h:602
-
@ BRAWCAP_TIMESTAMP_MODE_SOFTWARE
A software timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:590
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM
A system timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:594
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE
A software timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:598
-
@ BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
No timestamp.
Definition: brawcap_types_shared.h:578
-
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
A low precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:582
-
UINT16 minor
Minor version.
Definition: brawcap_types_shared.h:407
-
UINT16 major
Major version.
Definition: brawcap_types_shared.h:416
-
UINT16 patch
Patch version.
Definition: brawcap_types_shared.h:399
-
UINT16 build
Build version.
Definition: brawcap_types_shared.h:390
-
UINT64 complete
Definition: brawcap_types_shared.h:428
-
brawcap_version_fragments_t fragments
Definition: brawcap_types_shared.h:427
-
Struct containing the separated version parts.
Definition: brawcap_types_shared.h:381
-
bRAWcap version.
Definition: brawcap_types_shared.h:426
+
UINT32 brawcap_queue_size_t
The number of packets which can be (temporary) buffered by the bRAWcap driver queue.
Definition: brawcap_types_shared.h:94
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
@ BRAWCAP_STATUS_INFO_NOT_ATTACHED
Indicates that the given object is not attached.
Definition: brawcap_types_shared.h:312
+
@ BRAWCAP_STATUS_ERROR_IN_USE
Indicates that operation failed because the provided object is still in use.
Definition: brawcap_types_shared.h:207
+
@ BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE
bRAWcap is not activated (on a specific adapter).
Definition: brawcap_types_shared.h:237
+
@ BRAWCAP_STATUS_ERROR_FAILED
Detected a - not further specified - failure.
Definition: brawcap_types_shared.h:163
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_ERROR_INVALID_PARAM
At least one parameter content is invalid.
Definition: brawcap_types_shared.h:186
+
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
+
@ BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED
Communication with the driver failed.
Definition: brawcap_types_shared.h:229
+
@ BRAWCAP_STATUS_WARNING_LIMIT_REACHED
Indicates that a bRAWcap limitation is reached.
Definition: brawcap_types_shared.h:273
+
@ BRAWCAP_STATUS_ERROR_NOT_FOUND
Given parameter not found.
Definition: brawcap_types_shared.h:201
+
@ BRAWCAP_STATUS_INFO_ALREADY_REGISTERED
Indicates that the given object was already registered.
Definition: brawcap_types_shared.h:326
+
@ BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE
At least one parameter is out of bounds.
Definition: brawcap_types_shared.h:193
+
@ BRAWCAP_STATUS_WARNING_NO_UPLINK
Indicates that there is currently no uplink on the given adapter.
Definition: brawcap_types_shared.h:294
+
@ BRAWCAP_STATUS_INFO_TIMEOUT
Indicates that a function returned because of a timeout.
Definition: brawcap_types_shared.h:339
+
@ BRAWCAP_STATUS_ERROR_INVALID_POINTER
At least one specified pointer parameter was invalid.
Definition: brawcap_types_shared.h:179
+
@ BRAWCAP_STATUS_INFO_NOT_REGISTERED
Indicates that the given object is not registered.
Definition: brawcap_types_shared.h:319
+
@ BRAWCAP_STATUS_WARNING_PENDING
Will be returned if another operation for the same resource is pending.
Definition: brawcap_types_shared.h:266
+
@ BRAWCAP_STATUS_ERROR_BEYOND_MTU
The packet size is beyond adapter MTU.
Definition: brawcap_types_shared.h:215
+
@ BRAWCAP_STATUS_WARNING_CANCELED
Indicates that a operation was canceled.
Definition: brawcap_types_shared.h:281
+
@ BRAWCAP_STATUS_INFO_NOT_RUNNING
No operation running.
Definition: brawcap_types_shared.h:305
+
@ BRAWCAP_STATUS_ERROR_NOT_AVAILABLE
Function is not available.
Definition: brawcap_types_shared.h:172
+
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
+
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
+
@ BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED
Indicates that not all of the specified content/payload was processed.
Definition: brawcap_types_shared.h:288
+
Struct containing the separated version parts.
Definition: brawcap_types_shared.h:381
+
bRAWcap version.
Definition: brawcap_types_shared.h:426
+
UINT16 minor
Minor version.
Definition: brawcap_types_shared.h:407
+
UINT16 major
Major version.
Definition: brawcap_types_shared.h:416
+
UINT16 patch
Patch version.
Definition: brawcap_types_shared.h:399
+
UINT16 build
Build version.
Definition: brawcap_types_shared.h:390
+
UINT64 complete
Definition: brawcap_types_shared.h:428
+
brawcap_version_fragments_t fragments
Definition: brawcap_types_shared.h:427
+
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
+
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
+
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
+
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
+
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC
A high precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:586
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE
A hardware timestamp created by the network adapter hardware/firmware.
Definition: brawcap_types_shared.h:602
+
@ BRAWCAP_TIMESTAMP_MODE_SOFTWARE
A software timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:590
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM
A system timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:594
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE
A software timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:598
+
@ BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
No timestamp.
Definition: brawcap_types_shared.h:578
+
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
A low precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:582
+
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
+
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
+
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
+
UINT32 brawcap_buffer_packet_count_t
Type for handling the number of packets which can be stored in a packet buffer.
Definition: brawcap_types_shared.h:734
+
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
+
brawcap_rx_mode_t
List of receive modes.
Definition: brawcap_types_shared.h:1053
+
UINT32 brawcap_rx_min_packets_t
Type for handling the minimum amount of packets to copy before a bRAWcap receive will return....
Definition: brawcap_types_shared.h:1047
+
UINT16 brawcap_rx_timeout_t
Type for handling receive timeouts in number of milliseconds. The timeout specifies the maximum block...
Definition: brawcap_types_shared.h:1037
+
brawcap_rx_direction_t
List of supported receive directions.
Definition: brawcap_types_shared.h:1074
+
@ BRAWCAP_RX_MODE_LIVE
Received packets are stored in a user created bRAWcap packet (buffer) and provided to the calling app...
Definition: brawcap_types_shared.h:1058
+
@ BRAWCAP_RX_MODE_DUMP
Received packets are directly written to disk.
Definition: brawcap_types_shared.h:1064
+
@ BRAWCAP_RX_DIRECTION_UNKNOWN
Stops to receive packets of any direction.
Definition: brawcap_types_shared.h:1078
+
@ BRAWCAP_RX_DIRECTION_IN
Only received packets by the network adapter will be received.
Definition: brawcap_types_shared.h:1082
+
@ BRAWCAP_RX_DIRECTION_OUT
Only transmitted packets by bRAWcap or upper network stack drivers will be received....
Definition: brawcap_types_shared.h:1091
+
@ BRAWCAP_RX_DIRECTION_BOTH
Both transmitted packets by bRAWcap or upper network stack drivers and received packets from the unde...
Definition: brawcap_types_shared.h:1096
+
A single BPF pseudo-instruction.
Definition: brawcap_types_shared.h:947
+
A BPF pseudo-assembly program.
Definition: brawcap_types_shared.h:961
+
UCHAR jt
Definition: brawcap_types_shared.h:949
+
UINT32 k
Definition: brawcap_types_shared.h:951
+
UCHAR jf
Definition: brawcap_types_shared.h:950
+
UINT bf_len
Definition: brawcap_types_shared.h:962
+
struct bpf_insn * bf_insns
Definition: brawcap_types_shared.h:963
+
USHORT code
Definition: brawcap_types_shared.h:948
+
#define BRAWCAP_FILTER_BYTE_MAX_LENGTH
The maximum supported filter byte mask length in bytes.
Definition: brawcap_types_shared.h:891
+
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
+
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
+
brawcap_filter_type_t
List of filter types.
Definition: brawcap_types_shared.h:927
+
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
+
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
+
@ BRAWCAP_FILTER_TYPE_BPF
A Berkley Packet Filter.
Definition: brawcap_types_shared.h:935
+
@ BRAWCAP_FILTER_TYPE_BYTE_MASK
A bRAWcap byte filter.
Definition: brawcap_types_shared.h:931
+
Header describing given bRAWcap stats structure.
Definition: brawcap_types_shared.h:1241
+
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
+
The bRAWcap transmit statistics.
Definition: brawcap_types_shared.h:1421
+
UINT64 driverInitiatedPacketsHandles
Initiated packets to transmit from bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1468
+
UINT64 handleDroppedPacketsTotal
The total number of packets which was dropped for the handle (sum of all reasons).
Definition: brawcap_types_shared.h:1373
+
UINT64 driverCompletedPacketsStack
Completed packets to transmit from the upper network stack detected by bRAWcap driver on the correspo...
Definition: brawcap_types_shared.h:1495
+
UINT64 driverReceivedPacketsTotal
The total number of received packets by bRAWcap on the corresponding adapter.
Definition: brawcap_types_shared.h:1343
+
UINT64 handleReceivedPacketsMatched
The total number of packets which have matched the given bRAWcap handle filter.
Definition: brawcap_types_shared.h:1353
+
UINT64 handleCompletedPacketsTotal
Total number of completed transmitted packets for the handle.
Definition: brawcap_types_shared.h:1515
+
BYTE revision
Indicates the revision of the stats.
Definition: brawcap_types_shared.h:1251
+
UINT64 adapterDroppedPacketsTotal
Total number of received bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1333
+
UINT64 adapterReceivedPacketsTotal
Total number of received packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1319
+
UINT64 adapterCanceledPacketsTotal
Total number of canceled transmitted packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1452
+
UINT64 handleReceivedPacketsDirect
The total number of packets which could be directly delivered to user space memory.
Definition: brawcap_types_shared.h:1363
+
UINT64 handleReceivedPacketsQueued
The total number of packets which was queued to the handles driver queue.
Definition: brawcap_types_shared.h:1358
+
UINT64 handleDroppedPacketsToLong
The total number of packets which was dropped for the handle their length exceeds the handles configu...
Definition: brawcap_types_shared.h:1384
+
UINT64 driverCompletedPacketsHandles
Completed packets to transmit from the bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1500
+
UINT64 adapterCompletedBytesTotal
Total number of (completed) transmitted bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1445
+
UINT16 size
Should be set to the size of the structure depending on it´s type and revision. You should use the BR...
Definition: brawcap_types_shared.h:1256
+
UINT64 driverInitiatedPacketsStack
Initiated packets to transmit from upper network stack detected by bRAWcap driver on the correspondin...
Definition: brawcap_types_shared.h:1463
+
UINT64 driverInitiatedPacketsTotal
Total number of initiated packets to transmit by the bRAWcap driver on the corresponding adapter.
Definition: brawcap_types_shared.h:1457
+
UINT64 adapterCompletedPacketsTotal
Total number of (completed) transmitted packets by the underlying network adapter.
Definition: brawcap_types_shared.h:1438
+
UINT64 handleCanceledPacketsTotal
Total number of canceled packets to transmit for the handle.
Definition: brawcap_types_shared.h:1510
+
BYTE type
Indicates which type of stats it is.
Definition: brawcap_types_shared.h:1245
+
UINT64 handleDroppedPacketsQueue
The total number of packets which was dropped for the handle because of resources (driver queue overr...
Definition: brawcap_types_shared.h:1378
+
UINT64 driverCanceledPacketsTotal
Total number of canceled packets to transmit by the bRAWcap driver on the corresponding adapter.
Definition: brawcap_types_shared.h:1473
+
UINT32 adapterValid
Bitfield indicating which counters provided by the underlying network adapter driver are valid.
Definition: brawcap_types_shared.h:1312
+
UINT64 handleReceivedPacketsTotal
The total number of received packets by the given bRAWcap handle.
Definition: brawcap_types_shared.h:1348
+
UINT64 driverCanceledPacketsHandles
Canceled packets to transmit from bRAWcap driver itself on the corresponding adapter.
Definition: brawcap_types_shared.h:1484
+
brawcap_stats_header_t header
Header for receive statistics. This has to be always initialized by the user after creation before us...
Definition: brawcap_types_shared.h:1308
+
UINT64 handleInitiatedPacketsTotal
Total number of initiated packets to transmit for the handle.
Definition: brawcap_types_shared.h:1505
+
UINT64 driverIndicatedPacketsTotal
The total number of indicated packets to the upper network stack by bRAWcap on the corresponding adap...
Definition: brawcap_types_shared.h:1338
+
UINT64 driverCanceledPacketsStack
Canceled packets to transmit from the upper network stack detected by bRAWcap driver on the correspon...
Definition: brawcap_types_shared.h:1479
+
UINT64 adapterReceivedBytesTotal
Total number of received bytes by the underlying network adapter.
Definition: brawcap_types_shared.h:1326
+
UINT64 handleReceivedBytesTotal
The total number of received bytes by the given bRAWcap handle.
Definition: brawcap_types_shared.h:1368
+
UINT64 driverCompletedPacketsTotal
Total number of completed transmitted packets detected by bRAWcap driver on the corresponding adapter...
Definition: brawcap_types_shared.h:1489
+
brawcap_stats_rx_revision_t
List of all available receive statistic revisions.
Definition: brawcap_types_shared.h:1278
+
brawcap_stats_tx_revision_t
List of all available transmit statistic revisions.
Definition: brawcap_types_shared.h:1396
+
brawcap_stats_type_t
List of all available statistic types.
Definition: brawcap_types_shared.h:1263
+
@ BRAWCAP_STATS_RX_REVISION_1
Revision 1 for receive stats.
Definition: brawcap_types_shared.h:1282
+
@ BRAWCAP_STATS_TX_REVISION_1
Revision 1 for transmit stats.
Definition: brawcap_types_shared.h:1400
+
@ BRAWCAP_STATS_TYPE_RX
Type for receive stats.
Definition: brawcap_types_shared.h:1267
+
@ BRAWCAP_STATS_TYPE_TX
Type for transmit stats.
Definition: brawcap_types_shared.h:1271
diff --git a/brawcap__types__um_8h.html b/a00041.html similarity index 54% rename from brawcap__types__um_8h.html rename to a00041.html index 00c9819..4ac9832 100644 --- a/brawcap__types__um_8h.html +++ b/a00041.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -120,18 +120,18 @@

bRAWcap API - User mode types. More...

-
#include "brawcap_types_shared.h"
+ -

Go to the source code of this file.

+

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...
 
union  brawcap_adapter_ipv4_t
 IPv4 address. More...
 
union  brawcap_adapter_ipv6_t
 IPv6 address. More...
 
@@ -143,153 +143,155 @@ #define  - + - +

Macros

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
#define BRAWCAP_ADAPTER_NAME_LENGTH   40
 The max supported length for an adapter name.
 
#define BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX   2
#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
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]
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]
typedef char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
 Fixed size array containing a adapter name.
 
typedef UINT64 brawcap_adapter_mtu_t
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)
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)
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_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.
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.
 
- - + - - + - - + - - + - - + - - + - - +

Enumerations

enum  brawcap_log_level_t {
-  BRAWCAP_LOG_LEVEL_DEBUG = 0x01 +
enum  brawcap_log_level_t {
+  BRAWCAP_LOG_LEVEL_DEBUG = 0x01 ,
-  BRAWCAP_LOG_LEVEL_VERBOSE = 0x02 +  BRAWCAP_LOG_LEVEL_VERBOSE = 0x02 ,
-  BRAWCAP_LOG_LEVEL_NOTICE = 0x04 +  BRAWCAP_LOG_LEVEL_NOTICE = 0x04 ,
-  BRAWCAP_LOG_LEVEL_WARNING = 0x08 +  BRAWCAP_LOG_LEVEL_WARNING = 0x08 ,
-  BRAWCAP_LOG_LEVEL_ERROR = 0x10 +  BRAWCAP_LOG_LEVEL_ERROR = 0x10
}
 List of bRAWcap log levels. More...
 List of bRAWcap log levels. More...
 
enum  brawcap_log_type_t {
-  BRAWCAP_LOG_TYPE_GENERIC = 0x00 +
enum  brawcap_log_type_t {
+  BRAWCAP_LOG_TYPE_GENERIC = 0x01 ,
-  BRAWCAP_LOG_TYPE_ADAPTER = 0x01 +  BRAWCAP_LOG_TYPE_ADAPTER = 0x02 ,
-  BRAWCAP_LOG_TYPE_RECEIVE = 0x02 +  BRAWCAP_LOG_TYPE_RECEIVE = 0x04 ,
-  BRAWCAP_LOG_TYPE_TRANSMIT = 0x04 +  BRAWCAP_LOG_TYPE_TRANSMIT = 0x08 ,
-  BRAWCAP_LOG_TYPE_LICENSE = 0x08 +  BRAWCAP_LOG_TYPE_LICENSE = 0x10 +,
+  BRAWCAP_LOG_TYPE_ALL = 0xFFFF
}
 List of bRAWcap log types. More...
 List of bRAWcap log types. More...
 
enum  brawcap_adapter_speed_t {
-  BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL +
enum  brawcap_adapter_speed_t {
+  BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL ,
-  BRAWCAP_ADAPTER_SPEED_10M = 10ULL +  BRAWCAP_ADAPTER_SPEED_10M = 10ULL ,
-  BRAWCAP_ADAPTER_SPEED_100M = 100ULL +  BRAWCAP_ADAPTER_SPEED_100M = 100ULL ,
-  BRAWCAP_ADAPTER_SPEED_1G = 1000ULL +  BRAWCAP_ADAPTER_SPEED_1G = 1000ULL ,
-  BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL +  BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL ,
-  BRAWCAP_ADAPTER_SPEED_5G = 5000ULL +  BRAWCAP_ADAPTER_SPEED_5G = 5000ULL ,
-  BRAWCAP_ADAPTER_SPEED_10G = 10000ULL +  BRAWCAP_ADAPTER_SPEED_10G = 10000ULL ,
-  BRAWCAP_ADAPTER_SPEED_25G = 25000ULL +  BRAWCAP_ADAPTER_SPEED_25G = 25000ULL ,
-  BRAWCAP_ADAPTER_SPEED_40G = 40000ULL +  BRAWCAP_ADAPTER_SPEED_40G = 40000ULL ,
-  BRAWCAP_ADAPTER_SPEED_50G = 50000ULL +  BRAWCAP_ADAPTER_SPEED_50G = 50000ULL ,
-  BRAWCAP_ADAPTER_SPEED_100G = 100000ULL +  BRAWCAP_ADAPTER_SPEED_100G = 100000ULL
}
 List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed. More...
 List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed. More...
 
enum  brawcap_adapter_connection_state_t {
-  BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0 +
enum  brawcap_adapter_connection_state_t {
+  BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_CONNECTION_UP = 1 +  BRAWCAP_ADAPTER_CONNECTION_UP = 1 ,
-  BRAWCAP_ADAPTER_CONNECTION_DOWN = 2 +  BRAWCAP_ADAPTER_CONNECTION_DOWN = 2
}
 List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected). More...
 List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected). More...
 
enum  brawcap_adapter_operation_state_t {
-  BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0 +
enum  brawcap_adapter_operation_state_t {
+  BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_OPERATION_UP = 1 +  BRAWCAP_ADAPTER_OPERATION_UP = 1 ,
-  BRAWCAP_ADAPTER_OPERATION_DOWN = 2 +  BRAWCAP_ADAPTER_OPERATION_DOWN = 2 ,
-  BRAWCAP_ADAPTER_OPERATION_TESTING = 3 +  BRAWCAP_ADAPTER_OPERATION_TESTING = 3
}
 List of adapter operation states. Values indicating the current adapter operation state (adapter driver status). More...
 List of adapter operation states. Values indicating the current adapter operation state (adapter driver status). More...
 
enum  brawcap_adapter_notify_reason_t {
-  BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN = 0 +
enum  brawcap_adapter_notify_reason_t {
+  BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_ADD = 1 +  BRAWCAP_ADAPTER_NOTIFY_REASON_ADD = 1 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE = 2 +  BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE = 2 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE = 3 +  BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE = 3
}
 List of reasons for adapter change notifications. This values indicate why a adapter change notification is received. More...
 List of reasons for adapter change notifications. This values indicate why a adapter change notification is received. More...
 
enum  brawcap_adapter_properties_t {
-  BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001 +
enum  brawcap_adapter_properties_t {
+  BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001 ,
-  BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002 +  BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002 ,
-  BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004 +  BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004 ,
-  BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008 +  BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008 ,
-  BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010 +  BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010 ,
-  BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020 +  BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020 ,
-  BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040 +  BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040 ,
-  BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080 +  BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080
}
 List of adapter properties. They are used to identify adapter change notifications with a property change reason. More...
 List of adapter properties. They are used to identify adapter change notifications with a property change reason. More...
 

Detailed Description

diff --git a/a00041_source.html b/a00041_source.html new file mode 100644 index 0000000..184bafe --- /dev/null +++ b/a00041_source.html @@ -0,0 +1,702 @@ + + + + + + + + +bRAWcap: brawcap_types_um.h Source File + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
bRAWcap 1.0.1 +
+
b-plus Technologies - Ethernet Performance Transmitter Receiver
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
brawcap_types_um.h
+
+
+Go to the documentation of this file.
1/**
+
2 * @file brawcap_types_um.h
+
3 *
+
4 * @brief bRAWcap API - User mode types.
+
5 *
+
6 * The file includes all (data)types and defines used for bRAWcap (user space only).
+
7 *
+
8 * @copyright
+
9 * <b> © 2021 - b-plus technologies GmbH. All rights reserved!</b>
+
10 *
+
11 * All rights exclusively reserved for b-plus GmbH, unless expressly otherwise agreed.
+
12 *
+
13 * Redistribution in source or any other form, with or without modification, is not permitted.
+
14 *
+
15 *
+
16 * You may use this code under the according license terms of b-plus. Please contact b-plus at services@b-plus.com
+
17 * to get the appropriate terms and conditions.
+
18 */
+
19#ifndef BRAWCAP_TYPES_UM_H
+
20#define BRAWCAP_TYPES_UM_H
+
21
+ +
23
+
24/**************************************************** LIB ************************************************************/
+
25#if 1
+
26/**
+
27 * @defgroup brawcap_lib Importing
+
28 * @brief Defines required for automatic/dynamic bRAWcap API function importing.
+
29 * @{
+
30 */
+
31
+
32// You should never define _BRAWCAP_EXPORT when including bRAWcap.
+
33#ifdef _BRAWCAP_EXPORT
+
34 /**
+
35 * @internal
+
36 * @brief Dynamic/automatic function export when compiling bRAWcap itself.
+
37 * @warning Only required when building the bRAWcap library.
+
38 * Should never be defined if you include bRAWcap.
+
39 */
+
40 #define _BRAWCAP_API_FUNC(returnType) __declspec(dllexport) returnType __cdecl
+
41#else
+
42 /**
+
43 * @brief Dynamic/automatic function import for loading/including.
+
44 */
+
45 #define _BRAWCAP_API_FUNC(returnType) __declspec(dllimport) returnType __cdecl
+
46#endif
+
47
+
48/**@}*/
+
49#endif
+
50
+
51/************************************************ LOGGING ************************************************************/
+
52#if 1
+
53/**
+
54 * @defgroup brawcap_logging Logging
+
55 * @brief Types and functions for handling/modifying the bRAWcap logging.
+
56 *
+
57 * This module provides some functions for configuring the bRAWcap logging behavior.
+
58 * The bRAWcap logger supports different log levels and types, which allows to configure the logging for specific
+
59 * types independent to each other.
+
60 * Increasing the log level may help during development of the user application which shall use bRAWcap.
+
61 *
+
62 * @note If you think there is a problem with bRAWcap, please enable detailed logging,
+
63 * run your application until the problem occurs and then send the created bRAWcap log files to b-plus.
+
64 *
+
65 * @attention For release builds log levels such as verbose shall be avoided, because they can lead to performance
+
66 * degradation.
+
67 * @{
+
68 */
+
69
+
70/**
+
71 * @brief List of bRAWcap log levels.
+
72 *
+
73 * The log levels allows to (de)activate additional log entries.
+
74 * This can be especially useful during development, to get a more detailed log from bRAWcap.
+
75 */
+
76typedef enum _brawcap_log_level
+
77{
+
78 /**
+
79 * @brief Debug log level is for debugging bRAWcap itself only.
+
80 * Therefore it can only be enabled if the application is registered with higher privilege.
+
81 *
+
82 * @note Default: Deactivated
+
83 */
+ +
85 /**
+
86 * @brief Verbose log level will include many informative loggings.
+
87 * Those loggings gives more info why some API calls may fail.
+
88 * This will especially contain those cases in which the caller has provided invalid parameters.
+
89 * It should be activated only for development, testing or error research.
+
90 *
+
91 * @note Default: Deactivated
+
92 */
+ +
94 /**
+
95 * @brief Notice log level will include some loggings which gives information of the current bRAWcap state.
+
96 * This may be disabled to decrease logging to a minimum.
+
97 *
+
98 * @note Default: Activated
+
99 */
+ +
101 /**
+
102 * @brief Warning log level will include loggings for unexpected states.
+
103 * This level should never be disabled.
+
104 *
+
105 * @note Default: Activated
+
106 */
+ +
108 /**
+
109 * @brief Error log level will include loggings if something went completely wrong and bRAWcap could not solve
+
110 * the issue.
+
111 * Those loggings should never appear, if so bRAWcap may be in a invalid state.
+
112 * If loggings contain such a logentry please try to reproduce it again with all log levels enabled
+
113 * and send the logfile (with a short description of how to reproduce it) to b-plus.
+
114 * This should really never be disabled.
+
115 *
+
116 * @note Default: Activated
+
117 */
+ + +
120
+
121/**
+
122 * @brief List of bRAWcap log types.
+
123 *
+
124 * The log types allows to adjust log levels for each type independent.
+
125 * To distinguish between different types each logentry will be prefixed with it´s type, this increases the readability
+
126 * of the logfile.
+
127 */
+
128typedef enum _brawcap_log_type
+
129{
+
130 /**
+
131 * @brief Generic loggings will be used for everything which has no specific type.
+
132 */
+ +
134 /**
+
135 * @brief Adapter loggings will be used for anything which relates to the local adapter handling.
+
136 */
+ +
138 /**
+
139 * @brief Receive loggings will be used for anything which relates to receiving.
+
140 */
+ +
142 /**
+
143 * @brief Transmit loggings will be used for anything which relates to transmitting.
+
144 */
+ +
146 /**
+
147 * @brief License loggings will be used for anything which relates to licensing.
+
148 */
+ +
150
+
151 BRAWCAP_LOG_TYPE_ALL = 0xFFFF
+ +
153
+
154/**@}*/
+
155#endif
+
156
+
157/************************************************ GENERIC ************************************************************/
+
158#if 1
+
159/**
+
160 * @addtogroup brawcap_generics
+
161 * @{
+
162 */
+
163
+
164/**
+
165 * @brief A bRAWcap handle.
+
166 *
+
167 * It can be @ref brawcap_open "created/opened" and @ref brawcap_close "deleted/closed".
+
168 * In general every function which communicates with the bRAWcap driver requires a open bRAWcap handle.
+
169 *
+
170 * @attention The number of bRAWcap handles per adapter is limited to @ref BRAWCAP_HANDLES_PER_ADAPTER_MAX.
+
171 * If this limit is reached each additional open on that adapter will fail.
+
172 */
+
173typedef struct _brawcap_handle brawcap_handle_t;
+
174
+
175/**@}*/
+
176#endif
+
177
+
178/*********************************************** TIMESTAMP ***********************************************************/
+
179#if 1
+
180/**
+
181 * @addtogroup brawcap_timestamp
+
182 * @{
+
183 */
+
184
+
185/**@}*/
+
186#endif
+
187
+
188/************************************************ PACKET *************************************************************/
+
189#if 1
+
190/**
+
191 * @addtogroup brawcap_packet
+
192 * @{
+
193 */
+
194
+
195/**@}*/
+
196#endif
+
197
+
198/************************************************* BUFFER *************************************************************/
+
199#if 1
+
200/**
+
201 * @addtogroup brawcap_buffer
+
202 * @{
+
203 */
+
204
+
205/********************************************* BUFFER ITERATOR ********************************************************/
+
206#if 1
+
207/**
+
208 * @addtogroup brawcap_buffer_iterator
+
209 * @{
+
210 */
+
211
+
212/**@}*/
+
213#endif
+
214
+
215/**@}*/
+
216#endif
+
217
+
218/************************************************** ADAPTER **********************************************************/
+
219#if 1
+
220/**
+
221 * @addtogroup brawcap_adapter
+
222 * @{
+
223 */
+
224
+
225/**
+
226 * @brief Required number of bytes for describing a MAC address.
+
227 * The defined length does not containing any delimiters, it represents the number of MAC address digits.
+
228 */
+
229#define BRAWCAP_ADAPTER_MAC_LENGTH 6
+
230
+
231/**
+
232 * @brief The max supported length for an adapter name.
+
233 *
+
234 * @note On Windows a adapter name always corresponds to it´s GUID.
+
235 * Those GUIDs have a fixed length.
+
236 */
+
237#define BRAWCAP_ADAPTER_NAME_LENGTH 40
+
238
+
239/**
+
240 * @brief Type used for counting the available/supported adapters on a machine.
+
241 */
+ +
243
+
244/**
+
245 * @brief Fixed size array describing a MAC address.
+
246 *
+
247 * The array only contains the MAC address digits without any delimiters.
+
248 */
+ +
250
+
251/**
+
252 * @brief Fixed size array containing a adapter name.
+
253 *
+
254 * @note On Windows a adapter name corresponds always to it´s GUID.
+
255 * Textual GUIDs always have the format "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}".
+
256 */
+ +
258
+
259/**
+
260 * @brief IPv4 address.
+
261 */
+
262typedef union _brawcap_adapter_ipv4
+
263{
+
264 UINT8 bytes[4]; /*!< IPv4 address as byte array. */
+
265 UINT16 words[2]; /*!< IPv4 address as word array (each element has two Bytes). */
+
266 UINT32 addr; /*!< IPv4 address as single integer value. */
+ +
268
+
269/**
+
270 * @brief IPv6 address.
+
271 */
+
272typedef union _brawcap_adapter_ipv6
+
273{
+
274 UINT8 bytes[16]; /*!< IPv6 address as byte array. */
+
275 UINT16 words[8]; /*!< IPv6 address as word array (each element has two Bytes). */
+
276 UINT64 qwords[2]; /*!< IPv6 address as large word array (each element has eight Bytes). */
+ +
278
+
279/**
+
280 * @brief List of bRAWcap adapter speeds.
+
281 * Values indicating the current adapter uplink speed.
+
282 *
+
283 * @note The speed should be always equal for rx and tx,
+
284 * but both can be requested independent of each other.
+
285 */
+
286typedef enum _brawcap_adapter_speed
+
287{
+
288 BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL, /*!< Speed unknown */
+
289 BRAWCAP_ADAPTER_SPEED_10M = 10ULL, /*!< 10 MBit/s */
+
290 BRAWCAP_ADAPTER_SPEED_100M = 100ULL, /*!< 100 MBit/s */
+
291 BRAWCAP_ADAPTER_SPEED_1G = 1000ULL, /*!< 1 GBit/s */
+
292 BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL, /*!< 2,5 GBit/s */
+
293 BRAWCAP_ADAPTER_SPEED_5G = 5000ULL, /*!< 5 GBit/s */
+
294 BRAWCAP_ADAPTER_SPEED_10G = 10000ULL, /*!< 10 GBit/s*/
+
295 BRAWCAP_ADAPTER_SPEED_25G = 25000ULL, /*!< 25 GBit/s */
+
296 BRAWCAP_ADAPTER_SPEED_40G = 40000ULL, /*!< 40 GBit/s */
+
297 BRAWCAP_ADAPTER_SPEED_50G = 50000ULL, /*!< 50 GBit/s */
+
298 BRAWCAP_ADAPTER_SPEED_100G = 100000ULL /*!< 100 GBit/s */
+ +
300
+
301/**
+
302 * @brief List of adapter connection states.
+
303 * Values indicating the current adapter connection state (uplink/cable connected).
+
304 */
+
305typedef enum _brawcap_adapter_connection_state
+
306{
+
307 BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0, /*!< Connection state unknown. */
+
308 BRAWCAP_ADAPTER_CONNECTION_UP = 1, /*!< Connection is up (uplink/cable connected). */
+
309 BRAWCAP_ADAPTER_CONNECTION_DOWN = 2 /*!< Connection is down (cable not connected). */
+ +
311
+
312/**
+
313 * @brief List of adapter operation states.
+
314 * Values indicating the current adapter operation state (adapter driver status).
+
315 */
+
316typedef enum _brawcap_adapter_operation_state
+
317{
+
318 BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0, /*!< Operation state unknown. */
+
319 BRAWCAP_ADAPTER_OPERATION_UP = 1, /*!< Adapter is running (driver activated). */
+
320 BRAWCAP_ADAPTER_OPERATION_DOWN = 2, /*!< Adapter is down/disabled (driver deactivated). */
+
321 BRAWCAP_ADAPTER_OPERATION_TESTING = 3 /*!< Adapter is in probing state. */
+ +
323
+
324/**
+
325 * @brief Type for handling the adapter maximum transmission unit (MTU).
+
326 *
+
327 * It describes the maximum bytes per packet which can be received/transmitted on the adapter.
+
328 * Typical values are 1500 bytes for default sized Ethernet and 9000 bytes for jumbo frames.
+
329 *
+
330 * @note In general the MTU does not contain the Ethernet header (14 Bytes).
+
331 * If something like 1514/9014 is displayed by the adapter driver it contains the Ethernet header.
+
332 * If VLAN tagging is activated, VLAN packets require 4 additional bytes for each VLAN tag.
+
333 * There is also a 4 Byte FCS - defined by Ethernet - added to each packet (done by the network adapter).
+
334 * For example a full sized Jumbo Packet with one VLAN Tag can have:
+
335 * 14 Bytes Ethernet header + 4 Bytes VLAN Tag + 9000 Bytes Payload + 4 Bytes FCS = 9022 Bytes.
+
336 */
+ +
338
+
339/**
+
340 * @brief List of reasons for adapter change notifications.
+
341 * This values indicate why a adapter change notification is received.
+
342 */
+
343typedef enum _brawcap_adapter_notify_reason
+
344{
+
345 /**
+
346 * @brief The notification reason is unknown.
+
347 */
+ +
349 /**
+
350 * @brief A new bRAWcap adapter was detected.
+
351 * E.g. due to enabling bRAWcap driver on an adapter where it was disabled before.
+
352 */
+ +
354 /**
+
355 * @brief A bRAWcap adapter was removed.
+
356 * E.g. due to disabling bRAWcap driver on an adapter where it was enabled before.
+
357 */
+ +
359 /**
+
360 * @brief A adapter property has changed.
+
361 * This can have several reasons, for a list of all properties see @ref brawcap_adapter_properties_t.
+
362 */
+ + +
365
+
366/**
+
367 * @brief List of adapter properties.
+
368 * They are used to identify adapter change notifications with a property change reason.
+
369 *
+
370 * @note The property values allow to store several properties in a single bitfield.
+
371 * This makes it possible to indicate several property changes with only one notification.
+
372 */
+
373typedef enum _brawcap_adapter_properties
+
374{
+
375 BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001, /*!< Adapter friendly name changed. */
+
376 BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002, /*!< Adapter receive speed changed. */
+
377 BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004, /*!< Adapter transmit speed changed. */
+
378 BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008, /*!< Adapter max transmission unit changed. */
+
379 BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010, /*!< Adapter operation state changed. */
+
380 BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020, /*!< Adapter connection state changed. */
+
381 BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040, /*!< Adapter IPv4 address changed. */
+
382 BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080 /*!< Adapter IPv6 address changed. */
+ +
384
+
385/**
+
386 * @brief The general callback for adapter change notifications.
+
387 * It will be called each time a available and supported adapter change is detected.
+
388 *
+
389 * @attention Each application can only register for this callback once.
+
390 *
+
391 * @param[in] name The adapter name on which the change happened.
+
392 *
+
393 * @param[in] reason The reason/type of change (see @ref brawcap_adapter_notify_reason_t).
+
394 *
+
395 * @param[in] properties A bit field with the properties that have changed (see @ref brawcap_adapter_properties_t).
+
396 *
+
397 * @param[in] pUser Pointer to a user defined context.
+
398 * It allows access to user specific data within the callback.
+
399 */
+ +
401 const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void* pUser);
+
402
+
403/**
+
404 * @brief The per handle callback for adapter change notifications.
+
405 * It will be called each time a change for the handle underlying adapter (and only for this adapter) is detected.
+
406 *
+
407 * @attention Each handle can register for this callback once.
+
408 *
+
409 * @param[in] pHandle The handle for which the adapter change notification was registered.
+
410 *
+
411 * @param[in] reason The reason/type of change (see @ref brawcap_adapter_notify_reason_t).
+
412 *
+
413 * @param[in] properties A bit field with the properties that have changed (see @ref brawcap_adapter_properties_t).
+
414 *
+
415 * @param[in] pUser Pointer to a user defined context.
+
416 * It allows access to user specific data within the callback.
+
417 */
+ +
419 const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void* pUser);
+
420
+
421/**@}*/
+
422#endif
+
423
+
424/************************************************** RECEIVE **********************************************************/
+
425#if 1
+
426/**
+
427 * @addtogroup brawcap_receive
+
428 * @{
+
429 */
+
430
+
431/********************************************** RECEIVE FILTER *******************************************************/
+
432#if 1
+
433/**
+
434 * @addtogroup brawcap_filter
+
435 * @{
+
436 */
+
437
+
438/**@}*/
+
439#endif
+
440
+
441/**
+
442 * @brief Max number of supported packet (receive) buffers per bRAWcap handle.
+
443 *
+
444 * Limits the number of buffers which can be attached to a single handle with @ref brawcap_rx_buffer_attach.
+
445 */
+
446#define BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX 2
+
447
+
448/**
+
449 * @brief Receive callback which is called each time a receive has finished.
+
450 * Receiving can be started with @ref brawcap_rx_start and has to be stopped with @ref brawcap_rx_stop.
+
451 * Before anything can be received it is necessary to attach packet buffers to the bRAWcap handle.
+
452 * This can be done by creating new bRAWcap buffers (@ref brawcap_buffer_create) and attach it with
+
453 * @ref brawcap_rx_buffer_attach.
+
454 *
+
455 * @note If a handle has multiple buffers attached, the callback may be called in parallel (by different threads).
+
456 *
+
457 * @warning Executing to long in the callback can lead to a bottleneck in reception!
+
458 * It is recommended that the driver always has at least one (free) buffer were it can store the packets to.
+
459 *
+
460 * @param[in] pHandle Handle on which the receive returned.
+
461 *
+
462 * @param[in] status The overall receive status see @ref brawcap_status_t for possible return values.
+
463 *
+
464 * @param[in] pBuffer Pointer to the buffer which has finished receiving.
+
465 * It can be used to access all packets in the buffer and allows to retrieve information
+
466 * for each received packet (e.g. payload, length, timestamp, ...).
+
467 *
+
468 * @param[in] pUser Pointer to a user defined context.
+
469 * It allows access to user specific data within the callback.
+
470 */
+
471typedef void (*brawcap_rx_callback_t)(brawcap_handle_t* const pHandle, const brawcap_status_t status,
+
472 brawcap_buffer_t* const pBuffer, void* pUser);
+
473
+
474/**@}*/
+
475#endif
+
476
+
477/************************************************* TRANSMIT **********************************************************/
+
478#if 1
+
479/**
+
480 * @addtogroup brawcap_transmit
+
481 * @{
+
482 */
+
483
+
484/**
+
485 * @brief Transmit callback which is called each time a transmission initiated with @ref brawcap_tx_buffer_send has
+
486 * finished.
+
487 *
+
488 * @note Before any buffer can be transmitted the tranmission has to be started with @ref brawcap_tx_start and
+
489 * stopped with @ref brawcap_tx_stop.
+
490 *
+
491 * @param[in] pHandle Handle on which the transmission has finished.
+
492 *
+
493 * @param[in] status The overall transmission status see @ref brawcap_status_t for possible return values.
+
494 *
+
495 * @param[in] pBuffer Pointer to the buffer which has finished transmission (initiated with
+
496 * @ref brawcap_tx_buffer_send). It can be used to access all packets in the buffer - after transmission - and allows
+
497 * to retrieve information about each packet (e.g. (transmission) status, timestamp, ...).
+
498 *
+
499 * @param[in] pUser Pointer to a user defined context (allows access to user specific data within the callback).
+
500 */
+
501typedef void (*brawcap_tx_callback_t)(brawcap_handle_t* const pHandle, const brawcap_status_t status,
+
502 brawcap_buffer_t* const pBuffer, void* pUser);
+
503
+
504/**@}*/
+
505#endif
+
506
+
507/*************************************************** STATS ***********************************************************/
+
508#if 1
+
509/**
+
510 * @addtogroup brawcap_stats
+
511 * @{
+
512 */
+
513
+
514/**@}*/
+
515#endif
+
516
+
517#endif // BRAWCAP_TYPES_UM_H
+
bRAWcap API - Shared types.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
+
IPv4 address.
Definition: brawcap_types_um.h:263
+
IPv6 address.
Definition: brawcap_types_um.h:273
+
UINT32 addr
Definition: brawcap_types_um.h:266
+
#define BRAWCAP_ADAPTER_NAME_LENGTH
The max supported length for an adapter name.
Definition: brawcap_types_um.h:237
+
brawcap_adapter_properties_t
List of adapter properties. They are used to identify adapter change notifications with a property ch...
Definition: brawcap_types_um.h:374
+
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 th...
Definition: brawcap_types_um.h:418
+
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:249
+
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:306
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
brawcap_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:287
+
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 su...
Definition: brawcap_types_um.h:400
+
brawcap_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:317
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
#define BRAWCAP_ADAPTER_MAC_LENGTH
Required number of bytes for describing a MAC address. The defined length does not containing any del...
Definition: brawcap_types_um.h:229
+
brawcap_adapter_notify_reason_t
List of reasons for adapter change notifications. This values indicate why a adapter change notificat...
Definition: brawcap_types_um.h:344
+
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:337
+
@ BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE
Definition: brawcap_types_um.h:380
+
@ BRAWCAP_ADAPTER_PROPERTY_IPV6
Definition: brawcap_types_um.h:382
+
@ BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE
Definition: brawcap_types_um.h:379
+
@ BRAWCAP_ADAPTER_PROPERTY_RX_SPEED
Definition: brawcap_types_um.h:376
+
@ BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME
Definition: brawcap_types_um.h:375
+
@ BRAWCAP_ADAPTER_PROPERTY_IPV4
Definition: brawcap_types_um.h:381
+
@ BRAWCAP_ADAPTER_PROPERTY_TX_SPEED
Definition: brawcap_types_um.h:377
+
@ BRAWCAP_ADAPTER_PROPERTY_MTU
Definition: brawcap_types_um.h:378
+
@ BRAWCAP_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:308
+
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:307
+
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:309
+
@ BRAWCAP_ADAPTER_SPEED_5G
Definition: brawcap_types_um.h:293
+
@ BRAWCAP_ADAPTER_SPEED_100G
Definition: brawcap_types_um.h:298
+
@ BRAWCAP_ADAPTER_SPEED_2_5G
Definition: brawcap_types_um.h:292
+
@ BRAWCAP_ADAPTER_SPEED_10G
Definition: brawcap_types_um.h:294
+
@ BRAWCAP_ADAPTER_SPEED_100M
Definition: brawcap_types_um.h:290
+
@ BRAWCAP_ADAPTER_SPEED_40G
Definition: brawcap_types_um.h:296
+
@ BRAWCAP_ADAPTER_SPEED_10M
Definition: brawcap_types_um.h:289
+
@ BRAWCAP_ADAPTER_SPEED_25G
Definition: brawcap_types_um.h:295
+
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:288
+
@ BRAWCAP_ADAPTER_SPEED_50G
Definition: brawcap_types_um.h:297
+
@ BRAWCAP_ADAPTER_SPEED_1G
Definition: brawcap_types_um.h:291
+
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:320
+
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:318
+
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:321
+
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:319
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE
A adapter property has changed. This can have several reasons, for a list of all properties see brawc...
Definition: brawcap_types_um.h:363
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_ADD
A new bRAWcap adapter was detected. E.g. due to enabling bRAWcap driver on an adapter where it was di...
Definition: brawcap_types_um.h:353
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE
A bRAWcap adapter was removed. E.g. due to disabling bRAWcap driver on an adapter where it was enable...
Definition: brawcap_types_um.h:358
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN
The notification reason is unknown.
Definition: brawcap_types_um.h:348
+
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 braw...
Definition: brawcap_types_um.h:471
+
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 ...
Definition: brawcap_types_um.h:501
+
brawcap_log_type_t
List of bRAWcap log types.
Definition: brawcap_types_um.h:129
+
brawcap_log_level_t
List of bRAWcap log levels.
Definition: brawcap_types_um.h:77
+
@ BRAWCAP_LOG_TYPE_GENERIC
Generic loggings will be used for everything which has no specific type.
Definition: brawcap_types_um.h:133
+
@ BRAWCAP_LOG_TYPE_LICENSE
License loggings will be used for anything which relates to licensing.
Definition: brawcap_types_um.h:149
+
@ BRAWCAP_LOG_TYPE_TRANSMIT
Transmit loggings will be used for anything which relates to transmitting.
Definition: brawcap_types_um.h:145
+
@ BRAWCAP_LOG_TYPE_ADAPTER
Adapter loggings will be used for anything which relates to the local adapter handling.
Definition: brawcap_types_um.h:137
+
@ BRAWCAP_LOG_TYPE_RECEIVE
Receive loggings will be used for anything which relates to receiving.
Definition: brawcap_types_um.h:141
+
@ BRAWCAP_LOG_LEVEL_WARNING
Warning log level will include loggings for unexpected states. This level should never be disabled.
Definition: brawcap_types_um.h:107
+
@ BRAWCAP_LOG_LEVEL_ERROR
Error log level will include loggings if something went completely wrong and bRAWcap could not solve ...
Definition: brawcap_types_um.h:118
+
@ BRAWCAP_LOG_LEVEL_DEBUG
Debug log level is for debugging bRAWcap itself only. Therefore it can only be enabled if the applica...
Definition: brawcap_types_um.h:84
+
@ BRAWCAP_LOG_LEVEL_VERBOSE
Verbose log level will include many informative loggings. Those loggings gives more info why some API...
Definition: brawcap_types_um.h:93
+
@ BRAWCAP_LOG_LEVEL_NOTICE
Notice log level will include some loggings which gives information of the current bRAWcap state....
Definition: brawcap_types_um.h:100
+
+ + + + + + diff --git a/group__brawcap__generics.html b/a00047.html similarity index 63% rename from group__brawcap__generics.html rename to a00047.html index 78e2d7e..d02bc91 100644 --- a/group__brawcap__generics.html +++ b/a00047.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -118,33 +118,33 @@ - +

Macros

#define BRAWCAP_HANDLES_PER_ADAPTER_MAX   5
#define BRAWCAP_HANDLES_PER_ADAPTER_MAX   5
 Specifies the maximum supported bRAWcap handles per adapter.
 
- + - +

Typedefs

typedef UINT32 brawcap_queue_size_t
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
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)
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)
brawcap_status_t brawcap_close (brawcap_handle_t *pHandle)
 Closes the specified bRAWcap handle.
 

Detailed Description

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.

+

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:

    -
  1. Handle Opener
  2. +
  3. Handle Opener

Macro Definition Documentation

@@ -159,10 +159,10 @@

-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

Specifies the maximum supported bRAWcap handles per adapter.

-
Attention
If this number of handles is reached (for a specific adapter) each additional open will fail.
+
Attention
If this number of handles is reached (for a specific adapter) each additional open will fail.

@@ -174,17 +174,17 @@

- +
typedef UINT32 brawcap_queue_size_ttypedef UINT32 brawcap_queue_size_t

-

#include <brawcap_types_shared.h>

+

#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:

Note
Each bRAWcap handle has it´s own driver queue. Therefore the total memory consumption by the driver depends on the number of adapters and handles to each adapter, and also on how large the driver queue is specified.
Attention
Larger driver queues can minimize packet drops due to more resources. Especially in cases where the user application requires longer than expected to pick up (call receive) on the handle. But it has to be said that large queues shouldn´t be required in optimized configurations and that they can consume a lot of memory if they are not configured with care.
@@ -198,16 +198,16 @@

- +
typedef struct _brawcap_handle brawcap_handle_ttypedef struct _brawcap_handle brawcap_handle_t

-

#include <brawcap_types_um.h>

+

#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.

-
Attention
The number of bRAWcap handles per adapter is limited to BRAWCAP_HANDLES_PER_ADAPTER_MAX. If this limit is reached each additional open on that adapter will fail.
+

It can be created/opened and deleted/closed. In general every function which communicates with the bRAWcap driver requires a open bRAWcap handle.

+
Attention
The number of bRAWcap handles per adapter is limited to BRAWCAP_HANDLES_PER_ADAPTER_MAX. If this limit is reached each additional open on that adapter will fail.
@@ -219,15 +219,15 @@

- + - + - + @@ -238,13 +238,13 @@

-

#include <brawcap.h>

+

#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.

+

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.

Note
On Windows a adapter name is always represented by a GUID.
-bRAWcap supports multiple handles to the same adapter. But the total number of open handles on the same adapter is limited to BRAWCAP_HANDLES_PER_ADAPTER_MAX.
+bRAWcap supports multiple handles to the same adapter. But the total number of open handles on the same adapter is limited to BRAWCAP_HANDLES_PER_ADAPTER_MAX.
Warning
Opening multiple handles to the same adapter, with the same receive filter leads to redundancy and performance degradation and therefore should be avoided, if possible.
Parameters

brawcap_status_t brawcap_open brawcap_status_t brawcap_open (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_handle_t **const brawcap_handle_t **const  pHandle 
@@ -257,20 +257,20 @@

- + - + - + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_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_NOT_AVAILABLE bRAWcap driver is not running on specified adapter.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -282,16 +282,16 @@

- + - +
brawcap_status_t brawcap_close brawcap_status_t brawcap_close (brawcap_handle_tbrawcap_handle_t pHandle)

-

#include <brawcap.h>

+

#include <brawcap.h>

Closes the specified bRAWcap handle.

The user application should not use the specified handle anymore, after calling this function.

@@ -306,14 +306,14 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. -BRAWCAP_STATUS_ERROR_FAILED A system error occurred. +BRAWCAP_STATUS_ERROR_FAILED A system error occurred. -
Examples
03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.

diff --git a/group__brawcap__status.html b/a00048.html similarity index 73% rename from group__brawcap__status.html rename to a00048.html index 4cb42bb..980cae4 100644 --- a/group__brawcap__status.html +++ b/a00048.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -137,72 +137,72 @@ - - +

Enumerations

enum  brawcap_status_t {
-  BRAWCAP_STATUS_SUCCESS = 0 +
enum  brawcap_status_t {
+  BRAWCAP_STATUS_SUCCESS = 0 ,
-  BRAWCAP_STATUS_ERROR_FAILED = -1 +  BRAWCAP_STATUS_ERROR_FAILED = -1 ,
-  BRAWCAP_STATUS_ERROR_NOT_AVAILABLE = -2 +  BRAWCAP_STATUS_ERROR_NOT_AVAILABLE = -2 ,
-  BRAWCAP_STATUS_ERROR_INVALID_POINTER = -3 +  BRAWCAP_STATUS_ERROR_INVALID_POINTER = -3 ,
-  BRAWCAP_STATUS_ERROR_INVALID_PARAM = -4 +  BRAWCAP_STATUS_ERROR_INVALID_PARAM = -4 ,
-  BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE = -5 +  BRAWCAP_STATUS_ERROR_PARAM_OUT_OF_RANGE = -5 ,
-  BRAWCAP_STATUS_ERROR_NOT_FOUND = -6 +  BRAWCAP_STATUS_ERROR_NOT_FOUND = -6 ,
-  BRAWCAP_STATUS_ERROR_IN_USE = -7 +  BRAWCAP_STATUS_ERROR_IN_USE = -7 ,
-  BRAWCAP_STATUS_ERROR_BEYOND_MTU = -8 +  BRAWCAP_STATUS_ERROR_BEYOND_MTU = -8 ,
-  BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED = -9 +  BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED = -9 ,
-  BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE = -10 +  BRAWCAP_STATUS_ERROR_DRIVER_NOT_AVAILABLE = -10 ,
-  BRAWCAP_STATUS_ERROR_OVERRUN = -11 +  BRAWCAP_STATUS_ERROR_OVERRUN = -11 ,
-  BRAWCAP_STATUS_WARNING_DEMO_MODE = 1 +  BRAWCAP_STATUS_WARNING_DEMO_MODE = 1 ,
-  BRAWCAP_STATUS_WARNING_PENDING = 2 +  BRAWCAP_STATUS_WARNING_PENDING = 2 ,
-  BRAWCAP_STATUS_WARNING_LIMIT_REACHED = 3 +  BRAWCAP_STATUS_WARNING_LIMIT_REACHED = 3 ,
-  BRAWCAP_STATUS_WARNING_CANCELED = 4 +  BRAWCAP_STATUS_WARNING_CANCELED = 4 ,
-  BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED = 5 +  BRAWCAP_STATUS_WARNING_NOT_ALL_PROCESSED = 5 ,
-  BRAWCAP_STATUS_WARNING_NO_UPLINK = 6 +  BRAWCAP_STATUS_WARNING_NO_UPLINK = 6 ,
-  BRAWCAP_STATUS_INFO_NOT_RUNNING = 2000 +  BRAWCAP_STATUS_INFO_NOT_RUNNING = 2000 ,
-  BRAWCAP_STATUS_INFO_NOT_ATTACHED = 2001 +  BRAWCAP_STATUS_INFO_NOT_ATTACHED = 2001 ,
-  BRAWCAP_STATUS_INFO_NOT_REGISTERED = 2002 +  BRAWCAP_STATUS_INFO_NOT_REGISTERED = 2002 ,
-  BRAWCAP_STATUS_INFO_ALREADY_REGISTERED = 2003 +  BRAWCAP_STATUS_INFO_ALREADY_REGISTERED = 2003 ,
-  BRAWCAP_STATUS_INFO_NO_DATA = 2004 +  BRAWCAP_STATUS_INFO_NO_DATA = 2004 ,
-  BRAWCAP_STATUS_INFO_TIMEOUT = 2005 +  BRAWCAP_STATUS_INFO_TIMEOUT = 2005
}
 bRAWcap status/return codes. More...
 bRAWcap status/return codes. More...
 
- +

Functions

brawcap_status_t brawcap_last_status ()
brawcap_status_t brawcap_last_status ()
 Reads the last status appeared in bRAWcap, for the calling thread.
 

Detailed Description

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 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()).

+

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()).

Enumeration Type Documentation

◆ brawcap_status_t

@@ -211,19 +211,19 @@

- +
enum brawcap_status_tenum brawcap_status_t

-

#include <brawcap_types_shared.h>

+

#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:

@@ -117,33 +117,33 @@
Enumerator
BRAWCAP_STATUS_SUCCESS 

Executed successfully, with no additional information.

@@ -275,7 +275,7 @@

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.

+

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.

@@ -319,7 +319,7 @@

- + @@ -327,22 +327,22 @@

-

#include <brawcap.h>

+

#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 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.

-
Note
If yet, no other status than BRAWCAP_STATUS_SUCCESS occurred for the calling thread, BRAWCAP_STATUS_SUCCESS will be returned.
+
Note
If yet, no other status than BRAWCAP_STATUS_SUCCESS occurred for the calling thread, BRAWCAP_STATUS_SUCCESS will be returned.
Returns

brawcap_status_t brawcap_last_status brawcap_status_t brawcap_last_status ( )
- + - +
Status Description
BRAWCAP_STATUS_SUCCESS If no other status than success happened for the calling thread.
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.
Any of brawcap_status_t Please see return of last called function for detailed info.
-
Examples
03_generic_handle_opener.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
03_generic_handle_opener.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
diff --git a/group__brawcap__version.html b/a00049.html similarity index 69% rename from group__brawcap__version.html rename to a00049.html index 7ed021d..2d7756a 100644 --- a/group__brawcap__version.html +++ b/a00049.html @@ -56,7 +56,7 @@

-
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
- - - - - - + + + + + +

Data Structures

struct  brawcap_version_fragments_t
 Struct containing the separated version parts. More...
 
union  brawcap_version_t
 bRAWcap version. More...
 
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)
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)
brawcap_status_t brawcap_version_driver (brawcap_handle_t *const pHandle, brawcap_version_t *const pVersion)
 Reads current version of loaded bRAWcap driver.
 

Detailed Description

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.

+

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.

Attention
In general both versions shall be equal. This means it is not allowed to deploy copys of the bRAWcap library with any application. Instead always the bRAWcap library from system path shall be used (which will be deployed by the bRAWcap setup). This avoids communication issues between the driver and the library. If there are any issues with driver communication, please check that the driver and library version matches.

List of examples:

    -
  1. Version Comparator
  2. +
  3. Version Comparator

Data Structure Documentation

- -

◆ brawcap_version_fragments_t

+ +

◆ brawcap_version_fragments_t

@@ -188,8 +188,8 @@

-

◆ brawcap_version_t

+ +

◆ brawcap_version_t

@@ -201,12 +201,12 @@

@@ -270,15 +270,15 @@

- + - + - + @@ -289,7 +289,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads current version of loaded bRAWcap driver.

Note
The driver version is the same for each adapter. Therefore, it doesn´t matter which handle/adapter is used to read the driver version.
@@ -304,14 +304,14 @@

- + - + - +
brawcap_status_t brawcap_version_driver brawcap_status_t brawcap_version_driver (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_version_t *const brawcap_version_t *const  pVersion 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
04_version_comparator.c.
+
Examples
04_version_comparator.c.

diff --git a/group__brawcap__timestamp.html b/a00050.html similarity index 67% rename from group__brawcap__timestamp.html rename to a00050.html index 37601a8..a5ab9d6 100644 --- a/group__brawcap__timestamp.html +++ b/a00050.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -121,29 +121,29 @@ Macros

#define BRAWCAP_TIMESTAMP_MODE_SYSL_AVAILABLE(_capabilities)   (_capabilities & 0x01) - Checks if timestamp mode system low precision is supported.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ Checks if timestamp mode adapter hardware is supported.
  -#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN   0 +#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN   0  If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved.
  @@ -169,71 +169,71 @@ - + - + - +

Typedefs

typedef UINT32 brawcap_timestamp_capabilities_t
typedef UINT32 brawcap_timestamp_capabilities_t
 Type used for indicating the supported timestamp modes.
 
typedef UINT32 brawcap_timestamp_resolution_ns_t
typedef UINT32 brawcap_timestamp_resolution_ns_t
 Represents the timestamp resolution in nanoseconds.
 
typedef struct _brawcap_timestamp brawcap_timestamp_t
typedef struct _brawcap_timestamp brawcap_timestamp_t
 bRAWcap timestamp object.
 
- - +

Enumerations

enum  brawcap_timestamp_mode_t {
-  BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP = 0x00 +
enum  brawcap_timestamp_mode_t {
+  BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP = 0x00 ,
-  BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC = 0x01 +  BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC = 0x01 ,
-  BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC = 0x02 +  BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC = 0x02 ,
-  BRAWCAP_TIMESTAMP_MODE_SOFTWARE = 0x04 +  BRAWCAP_TIMESTAMP_MODE_SOFTWARE = 0x04 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM = 0x08 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM = 0x08 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE = 0x10 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE = 0x10 ,
-  BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE = 0x20 +  BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE = 0x20
}
 List of different timestamp modes. More...
 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)
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)
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)
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)
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)
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)
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)
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)
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.
 

Detailed Description

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.

+

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.

Attention
The user application shall never store a timestamp, instead it should always request it from a packet and only use it as long as the packet itself is valid.

List of examples:

    -
  1. Receive Timestamp Inspector
  2. -
  3. Simple Packet Receiver
  4. +
  5. Receive Timestamp Inspector
  6. +
  7. Simple Packet Receiver

Macro Definition Documentation

@@ -248,11 +248,11 @@

-

#include <brawcap_types_shared.h>

+

#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.

-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.

@@ -265,12 +265,12 @@

- +
typedef UINT32 brawcap_timestamp_capabilities_ttypedef UINT32 brawcap_timestamp_capabilities_t

-

#include <brawcap_types_shared.h>

+

#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.

@@ -303,15 +303,15 @@

- +
typedef struct _brawcap_timestamp brawcap_timestamp_ttypedef struct _brawcap_timestamp brawcap_timestamp_t

-

#include <brawcap_types_shared.h>

+

#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.

+

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.

@@ -323,12 +323,12 @@

- +
enum brawcap_timestamp_mode_tenum brawcap_timestamp_mode_t

@@ -443,15 +443,15 @@

- + - + - + @@ -462,10 +462,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the timestamp resolution of the specified timestamp.

-
Note
If the resolution is unknown it will be set to zero (BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN)
+
Note
If the resolution is unknown it will be set to zero (BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN)
Parameters

brawcap_status_t brawcap_timestamp_resolution_ns_get brawcap_status_t brawcap_timestamp_resolution_ns_get (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
brawcap_timestamp_resolution_ns_t *const brawcap_timestamp_resolution_ns_t *const  pResolution_ns 
@@ -477,12 +477,12 @@

- + - +
[in]pTimestampThe timestamp to read from.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.

@@ -494,9 +494,9 @@

- + - + @@ -519,7 +519,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the timestamp value in seconds and nanoseconds.

The values are based on 00:00 01.01.1970.

@@ -536,12 +536,12 @@

- + - +
brawcap_status_t brawcap_timestamp_value_ns_get brawcap_status_t brawcap_timestamp_value_ns_get (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -553,9 +553,9 @@

- + - + @@ -578,7 +578,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the timestamp value in seconds and nanoseconds.

The values has to be based on 00:00 01.01.1970.

@@ -594,11 +594,11 @@

- + - + - +
brawcap_status_t brawcap_timestamp_value_ns_set brawcap_status_t brawcap_timestamp_value_ns_set (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_ERROR_PARAM_OUT_OF_RANGE Nanosecond value to high (only fraction of second).
@@ -611,9 +611,9 @@

- + - + @@ -636,7 +636,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the timestamp value in seconds and microseconds.

The values are based on 00:00 01.01.1970.

@@ -653,12 +653,12 @@

- + - +
brawcap_status_t brawcap_timestamp_value_us_get brawcap_status_t brawcap_timestamp_value_us_get (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.

@@ -670,9 +670,9 @@

- + - + @@ -695,7 +695,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the timestamp value in seconds and microseconds.

The values has to be based on 00:00 01.01.1970.

@@ -711,11 +711,11 @@

- + - + - +
brawcap_status_t brawcap_timestamp_value_us_set brawcap_status_t brawcap_timestamp_value_us_set (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_ERROR_PARAM_OUT_OF_RANGE Nanosecond value to high (only fraction of second).
@@ -728,9 +728,9 @@

- + - + @@ -753,7 +753,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the timestamp value in seconds and milliseconds.

The values are based on 00:00 01.01.1970.

@@ -770,12 +770,12 @@

- + - +
brawcap_status_t brawcap_timestamp_value_ms_get brawcap_status_t brawcap_timestamp_value_ms_get (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.

@@ -787,9 +787,9 @@

- + - + @@ -812,7 +812,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the timestamp value in seconds and milliseconds.

The values has to be based on 00:00 01.01.1970.

@@ -828,11 +828,11 @@

- + - + - +
brawcap_status_t brawcap_timestamp_value_ms_set brawcap_status_t brawcap_timestamp_value_ms_set (brawcap_timestamp_t *const brawcap_timestamp_t *const  pTimestamp,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_ERROR_PARAM_OUT_OF_RANGE Nanosecond value to high (only fraction of second).
diff --git a/group__brawcap__packet.html b/a00051.html similarity index 58% rename from group__brawcap__packet.html rename to a00051.html index 5ea278b..5dad786 100644 --- a/group__brawcap__packet.html +++ b/a00051.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -118,61 +118,61 @@ - + - +

Macros

#define BRAWCAP_PACKET_SIZE_MAX   9018
#define BRAWCAP_PACKET_SIZE_MAX   9018
 The maximum supported (byte) size for a single packet payload.
 
#define BRAWCAP_PACKET_SIZE_MIN   14
#define BRAWCAP_PACKET_SIZE_MIN   14
 The minimum required (byte) size for a single packet payload.
 
- + - +

Typedefs

typedef UINT16 brawcap_packet_size_t
typedef UINT16 brawcap_packet_size_t
 Type for handling the number of payload bytes per packet.
 
typedef struct _brawcap_packet brawcap_packet_t
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)
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)
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)
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_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_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_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)
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)
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)
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.
 

Detailed Description

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.

-
Note
It is also possible to use "buffered" packets. Those packets must not be created and freed on their one. Instead they are part of a packet buffer. To access buffered packets use brawcap_buffer_at_index to get a packet on a specific position of the buffer or brawcap_buffer_iterator_eval on a packet buffer iterator. The second one is especially useful while iterating the buffer.
+

To create a packet use brawcap_packet_create. If a packet is not required anymore it shall be deleted with brawcap_packet_free.

+
Note
It is also possible to use "buffered" packets. Those packets must not be created and freed on their one. Instead they are part of a packet buffer. To access buffered packets use brawcap_buffer_at_index to get a packet on a specific position of the buffer or brawcap_buffer_iterator_eval on a packet buffer iterator. The second one is especially useful while iterating the buffer.
Attention
The user application shall never store buffered packets separately. Instead it should always request packets directly from the packet buffer and only use them as long as the packet buffer itself is valid.

List of examples:

    -
  1. Simple Packet Receiver
  2. -
  3. Buffered Receiver
  4. -
  5. Receive Timestamp Inspector
  6. +
  7. Simple Packet Receiver
  8. +
  9. Buffered Receiver
  10. +
  11. Receive Timestamp Inspector

Macro Definition Documentation

@@ -187,11 +187,11 @@

-

#include <brawcap_types_shared.h>

+

#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).

-
Examples
05_receive_simple_packet_receiver.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -208,7 +208,7 @@

-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

The minimum required (byte) size for a single packet payload.

This corresponds to Ethernet header size.

@@ -224,15 +224,15 @@

- +
typedef UINT16 brawcap_packet_size_ttypedef UINT16 brawcap_packet_size_t

-

#include <brawcap_types_shared.h>

+

#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.

+

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.

@@ -243,15 +243,15 @@

- +
typedef struct _brawcap_packet brawcap_packet_ttypedef struct _brawcap_packet brawcap_packet_t

-

#include <brawcap_types_shared.h>

+

#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.

+

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.

@@ -263,15 +263,15 @@

- + - + - + @@ -282,11 +282,11 @@

-

#include <brawcap.h>

+

#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.

+

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.

Parameters

brawcap_status_t brawcap_packet_create brawcap_status_t brawcap_packet_create (brawcap_packet_t **const brawcap_packet_t **const  pPacket,
const brawcap_packet_size_t const brawcap_packet_size_t  maxSize 
@@ -298,16 +298,16 @@

- + - + - + - +
[out]pPacketWill contain the new created packet, afterwards.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_ERROR_FAILED System error occurred (e.g. out of memory).
-
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -319,16 +319,16 @@

- + - +
brawcap_status_t brawcap_packet_free brawcap_status_t brawcap_packet_free (brawcap_packet_tbrawcap_packet_t pPacket)

-

#include <brawcap.h>

+

#include <brawcap.h>

Frees the specified packet. When this function is called the specified packet becomes invalid and it´s memory is released.

Warning
Freeing a packet is not thread safe and the user is responsible for synchronization.
@@ -342,12 +342,12 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. -
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -359,15 +359,15 @@

- + - + - + @@ -378,7 +378,7 @@

-

#include <brawcap.h>

+

#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.

Parameters
@@ -392,9 +392,9 @@

- + - +
brawcap_status_t brawcap_packet_status_get brawcap_status_t brawcap_packet_status_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_status_t *const brawcap_status_t *const  pStatus 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -407,15 +407,15 @@

- + - + - + @@ -426,14 +426,14 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

-

Reads out the timestamp object for the specified packet.

+

Reads out the timestamp object for the specified packet.

Attention
The timestamp is part of the packet itself. Therefore the returned timestamp is only valid as long as the packet itself is valid. The user application shall not store the timestamp object separately and only used it as long as the packet is valid.
Parameters

brawcap_status_t brawcap_packet_timestamp_get brawcap_status_t brawcap_packet_timestamp_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_timestamp_t **const brawcap_timestamp_t **const  pTimestamp 
- +
[in]pPacketThe packet to read from.
[out]pTimestampWill contain the timestamp object of the packet, afterwards. This object can be used by the Timestamp module.
[out]pTimestampWill contain the timestamp object of the packet, afterwards. This object can be used by the Timestamp module.
@@ -441,12 +441,12 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. -
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -458,15 +458,15 @@

- + - + - + @@ -477,9 +477,9 @@

-

#include <brawcap.h>

+

#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.

+

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.

Parameters

brawcap_status_t brawcap_packet_length_on_wire_get brawcap_status_t brawcap_packet_length_on_wire_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pLengthOnWire 
@@ -491,12 +491,12 @@

- + - +
[in]pPacketThe packet to read from.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
05_receive_simple_packet_receiver.c.
+
Examples
05_receive_simple_packet_receiver.c.

@@ -508,15 +508,15 @@

- + - + - + @@ -527,9 +527,9 @@

-

#include <brawcap.h>

+

#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).

+

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).

Parameters

brawcap_status_t brawcap_packet_payload_max_size_get brawcap_status_t brawcap_packet_payload_max_size_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pMaxPayloadSize 
@@ -541,9 +541,9 @@

- + - +
[in]pPacketThe packet to read from.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -556,15 +556,15 @@

- + - + - + @@ -575,7 +575,7 @@

-

#include <brawcap.h>

+

#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.

Parameters
@@ -589,12 +589,12 @@

- + - +
brawcap_status_t brawcap_packet_payload_size_get brawcap_status_t brawcap_packet_payload_size_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pLength 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.

@@ -606,9 +606,9 @@

- + - + @@ -620,7 +620,7 @@

- + @@ -631,7 +631,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the payload of the specified packet.

The function returns a pointer to the beginning of the packet payload.

@@ -649,12 +649,12 @@

- + - +
brawcap_status_t brawcap_packet_payload_get brawcap_status_t brawcap_packet_payload_get (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pLength 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
05_receive_simple_packet_receiver.c.
+
Examples
05_receive_simple_packet_receiver.c.

@@ -666,9 +666,9 @@

- + - + @@ -680,7 +680,7 @@

- + @@ -691,10 +691,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the packet payload of the specified packet.

-
Note
It is not allowed to set a larger payload than the max byte payload size (specified during packet creation or buffer creation). If a larger payload is specified the function will fail and return an error.
+
Note
It is not allowed to set a larger payload than the max byte payload size (specified during packet creation or buffer creation). If a larger payload is specified the function will fail and return an error.
Parameters

brawcap_status_t brawcap_packet_payload_set brawcap_status_t brawcap_packet_payload_set (brawcap_packet_t *const brawcap_packet_t *const  pPacket,
const brawcap_packet_size_t const brawcap_packet_size_t  length 
@@ -707,11 +707,11 @@

- + - + - +
[in]pPacketThe packet to be modified.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_STATUS_ERROR_PARAM_OUT_OF_RANGE The specified payload size exceeds the packet max payload size.
diff --git a/group__brawcap__buffer.html b/a00052.html similarity index 54% rename from group__brawcap__buffer.html rename to a00052.html index ffc8441..cae513d 100644 --- a/group__brawcap__buffer.html +++ b/a00052.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -119,8 +119,8 @@ - - + +

Modules

 Packet Buffer Iterator
 bRAWcap packet buffer iterators.
 Packet Buffer Iterator
 bRAWcap packet buffer iterators.
 

@@ -136,65 +136,65 @@

- + - +

Typedefs

typedef UINT32 brawcap_buffer_packet_count_t
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
 

Detailed Description

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.

+

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

    -
  • Receiving: To use a buffer for receiving on a bRAWcap handle it has to be attached to it. If it shall not be used anymore for receiving it should be detached.
  • -
  • Transmitting: For transmitting a packet buffer, fill up the buffer with packets and than send it on a handle. This will place the buffer into the transmission queue of the specified handle.
  • +
  • Receiving: To use a buffer for receiving on a bRAWcap handle it has to be attached to it. If it shall not be used anymore for receiving it should be detached.
  • +
  • Transmitting: For transmitting a packet buffer, fill up the buffer with packets and than send it on a handle. This will place the buffer into the transmission queue of the specified handle.
Attention
The packet buffer will be locked down after attaching/sending to a specific handle. This means that it cannot be accessed by user application as long as it is pending for transmission or attached for receiving. If the user application tries to access a locked buffer a error will be returned by the specific packet buffer function.

A packet buffer can be accessed if:

List of examples:

    -
  1. Buffered Receiver
  2. +
  3. Buffered Receiver

Typedef Documentation

@@ -204,15 +204,15 @@

- +
typedef UINT32 brawcap_buffer_packet_count_ttypedef UINT32 brawcap_buffer_packet_count_t

-

#include <brawcap_types_shared.h>

+

#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.

+

The total amount of packets per packet buffer has to be between BRAWCAP_BUFFER_PACKETS_MIN - BRAWCAP_BUFFER_PACKETS_MAX.

@@ -223,15 +223,15 @@

- +
typedef struct _brawcap_buffer brawcap_buffer_ttypedef struct _brawcap_buffer brawcap_buffer_t

-

#include <brawcap_types_shared.h>

+

#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.

+

The packet buffer object has to be used for each packet buffer module function. Packet buffers can be created and freed.

@@ -243,21 +243,21 @@

- + - + - + - + @@ -268,19 +268,19 @@

-

#include <brawcap.h>

+

#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.

+

If a buffer is not required anymore it shall be freed.

Parameters

brawcap_status_t brawcap_buffer_create brawcap_status_t brawcap_buffer_create (brawcap_buffer_t **const brawcap_buffer_t **const  pBuffer,
const brawcap_packet_size_t const brawcap_packet_size_t  maxPacketPayloadSize,
const brawcap_buffer_packet_count_t const brawcap_buffer_packet_count_t  numPackets 
- - + +
[out]pBufferWill contain the new created packet buffer, afterwards.
[in]maxPacketPayloadSizeSpecifies 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]numPacketsSpecifies 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.
[in]maxPacketPayloadSizeSpecifies 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]numPacketsSpecifies 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.
@@ -288,16 +288,16 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_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_ERROR_FAILED System error occurred (e.g. out of memory). -
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.

@@ -309,16 +309,16 @@

- + - +
brawcap_status_t brawcap_buffer_free brawcap_status_t brawcap_buffer_free (brawcap_buffer_tbrawcap_buffer_t pBuffer)

-

#include <brawcap.h>

+

#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.

Warning
Freeing a buffer is not thread safe and the user is responsible for synchronization.
@@ -332,14 +332,14 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_IN_USE Buffer is still in use/pending (receive/transmit). -
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.

@@ -351,16 +351,16 @@

- + - +
brawcap_status_t brawcap_buffer_clear brawcap_status_t brawcap_buffer_clear (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer)

-

#include <brawcap.h>

+

#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.

@@ -375,11 +375,11 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_IN_USE Buffer is still in use/pending (receive/transmit). @@ -392,15 +392,15 @@

- + - + - + @@ -411,7 +411,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Adds the specified packet at the end of the specified packet buffer.

Parameters
@@ -425,15 +425,15 @@

- + - + - + - + - +
brawcap_status_t brawcap_buffer_add_back brawcap_status_t brawcap_buffer_add_back (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
const brawcap_packet_t *const const brawcap_packet_t *const  pPacket 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_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_PARAM_OUT_OF_RANGE The packet payload length is to long for the buffer.
@@ -446,15 +446,15 @@

- + - + - + @@ -465,7 +465,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Adds the specified packet at the front of the specified packet buffer.

Parameters
@@ -479,15 +479,15 @@

- + - + - + - + - +
brawcap_status_t brawcap_buffer_add_front brawcap_status_t brawcap_buffer_add_front (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
const brawcap_packet_t *const const brawcap_packet_t *const  pPacket 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_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_PARAM_OUT_OF_RANGE The packet payload length is to long for the buffer.
@@ -500,21 +500,21 @@

- + - + - + - + @@ -525,7 +525,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Inserts the specified packet at index/position into the specified packet buffer.

Parameters
@@ -540,17 +540,17 @@

- + - + - + - + - + - +
brawcap_status_t brawcap_buffer_add_at_index brawcap_status_t brawcap_buffer_add_at_index (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
const brawcap_packet_t *const const brawcap_packet_t *const  pPacket,
const brawcap_buffer_packet_count_t const brawcap_buffer_packet_count_t  index 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_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_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_ERROR_INVALID_PARAM The given index is invalid (exceeds buffer).
@@ -563,21 +563,21 @@

- + - + - + - + @@ -588,7 +588,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out a buffered packet at the index of the specified packet buffer.

Parameters
@@ -603,13 +603,13 @@

- + - + - + - +
brawcap_status_t brawcap_buffer_at_index brawcap_status_t brawcap_buffer_at_index (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
const brawcap_buffer_packet_count_t const brawcap_buffer_packet_count_t  index,
brawcap_packet_t **const brawcap_packet_t **const  pPacket 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_IN_USE Buffer is still in use/pending (receive/transmit).
BRAWCAP_STATUS_ERROR_INVALID_PARAM The given index is invalid (exceeds buffer).
BRAWCAP_STATUS_ERROR_INVALID_PARAM The given index is invalid (exceeds buffer).
@@ -622,15 +622,15 @@

- + - + - + @@ -641,7 +641,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the first buffered packet of the specified packet buffer.

Parameters
@@ -655,11 +655,11 @@

- + - + - +
brawcap_status_t brawcap_buffer_front brawcap_status_t brawcap_buffer_front (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
brawcap_packet_t **const brawcap_packet_t **const  pPacket 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_IN_USE Buffer is still in use/pending (receive/transmit).
@@ -672,15 +672,15 @@

- + - + - + @@ -691,7 +691,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the last buffered packet of the specified packet buffer.

Parameters
@@ -705,11 +705,11 @@

- + - + - +
brawcap_status_t brawcap_buffer_back brawcap_status_t brawcap_buffer_back (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
brawcap_packet_t **const brawcap_packet_t **const  pPacket 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_IN_USE Buffer is still in use/pending (receive/transmit).
@@ -722,15 +722,15 @@

- + - + - + @@ -741,7 +741,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the number of currently buffered packets in the specified packet buffer.

Parameters
@@ -755,11 +755,11 @@

- + - + - +
brawcap_status_t brawcap_buffer_count brawcap_status_t brawcap_buffer_count (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
brawcap_buffer_packet_count_t *const brawcap_buffer_packet_count_t *const  pPacketCount 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_IN_USE Buffer is still in use/pending (receive/transmit).
@@ -772,15 +772,15 @@

- + - + - + @@ -791,7 +791,7 @@

-

#include <brawcap.h>

+

#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.

Parameters
@@ -805,11 +805,11 @@

- + - + - +
brawcap_status_t brawcap_buffer_capacity brawcap_status_t brawcap_buffer_capacity (brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
brawcap_buffer_packet_count_t *const brawcap_buffer_packet_count_t *const  pPacketCapacity 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_IN_USE Buffer is still in use/pending (receive/transmit).
diff --git a/group__brawcap__buffer__iterator.html b/a00053.html similarity index 62% rename from group__brawcap__buffer__iterator.html rename to a00053.html index da937d3..608bcd3 100644 --- a/group__brawcap__buffer__iterator.html +++ b/a00053.html @@ -56,7 +56,7 @@ Logo -
@@ -117,35 +117,35 @@ - +

Typedefs

typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
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)
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)
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)
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)
brawcap_status_t brawcap_buffer_iterator_prev (brawcap_buffer_iterator_t *const pIterator)
 Decreases the iterator to the previous buffered packet.
 
brawcap_packet_tbrawcap_buffer_iterator_eval (brawcap_buffer_iterator_t *const pIterator)
brawcap_packet_tbrawcap_buffer_iterator_eval (brawcap_buffer_iterator_t *const pIterator)
 Returns the buffered packet for the specified iterator.
 

Detailed Description

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.

+

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.

Note
Iterators should only be used as long as the packet buffer for which it was created is still available.
Attention
Packet buffer iterators are not synchronized. This means that if the packet buffer for which the iterator was created is modified meanwhile, the iterator is not updated.

List of examples:

    -
  1. Buffered Receiver
  2. +
  3. Buffered Receiver

Typedef Documentation

@@ -155,15 +155,15 @@

- +
typedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_ttypedef struct _brawcap_buffer_iterator brawcap_buffer_iterator_t

-

#include <brawcap_types_shared.h>

+

#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.

+

The packet buffer object has to be used for each packet buffer iterator module function. Packet buffer iterators can be created and freed.

@@ -175,21 +175,21 @@

- + - + - + - + @@ -200,15 +200,15 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Creates a new iterator for the specified buffer.

-

If a iterator is not required anymore it shall be freed.

+

If a iterator is not required anymore it shall be freed.

Parameters

brawcap_status_t brawcap_buffer_iterator_create brawcap_status_t brawcap_buffer_iterator_create (brawcap_buffer_iterator_t **const brawcap_buffer_iterator_t **const  pIterator,
brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
brawcap_buffer_packet_count_t brawcap_buffer_packet_count_t  startPosition 
- +
[out]pIteratorWill contain the new created iterator.
[in]pBufferThe buffer for which to create the iterator.
[in]startPositionThe 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.
[in]startPositionThe 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.
@@ -216,18 +216,18 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_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_INVALID_PARAM Start position exceeds number of buffered packets. -BRAWCAP_STATUS_ERROR_FAILED System error occurred (e.g. out of memory). +BRAWCAP_STATUS_ERROR_FAILED System error occurred (e.g. out of memory). -
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.

@@ -239,16 +239,16 @@

- + - +
brawcap_status_t brawcap_buffer_iterator_free brawcap_status_t brawcap_buffer_iterator_free (brawcap_buffer_iterator_t *const brawcap_buffer_iterator_t *const  pIterator)

-

#include <brawcap.h>

+

#include <brawcap.h>

Frees the specified iterator. When this function is called the specified iterator becomes invalid and it´s memory will be released.

Warning
Freeing a iterator is not thread safe and the user is responsible for synchronization.
@@ -262,12 +262,12 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. -
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.

@@ -279,16 +279,16 @@

- + - +
brawcap_status_t brawcap_buffer_iterator_next brawcap_status_t brawcap_buffer_iterator_next (brawcap_buffer_iterator_t *const brawcap_buffer_iterator_t *const  pIterator)

-

#include <brawcap.h>

+

#include <brawcap.h>

Increments the iterator to the next buffered packet.

Parameters
@@ -301,12 +301,12 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.

-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
@@ -318,16 +318,16 @@

- + - +
brawcap_status_t brawcap_buffer_iterator_prev brawcap_status_t brawcap_buffer_iterator_prev (brawcap_buffer_iterator_t *const brawcap_buffer_iterator_t *const  pIterator)

-

#include <brawcap.h>

+

#include <brawcap.h>

Returns the buffered packet for the specified iterator.

Parameters
@@ -377,12 +377,12 @@

Pointer Description -brawcap_packet_t On success a valid bRAWcap packet object pointer. +brawcap_packet_t On success a valid bRAWcap packet object pointer. NULL Invalid iterator (e.g. beyond the last or first packet).

-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
diff --git a/group__brawcap__adapter.html b/a00054.html similarity index 54% rename from group__brawcap__adapter.html rename to a00054.html index cc2cb76..0b7bdcf 100644 --- a/group__brawcap__adapter.html +++ b/a00054.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -120,12 +120,12 @@ - - - - - - + + + + + +

Data Structures

union  brawcap_adapter_ipv4_t
 IPv4 address. More...
 
union  brawcap_adapter_ipv6_t
 IPv6 address. More...
 
union  brawcap_adapter_ipv4_t
 IPv4 address. More...
 
union  brawcap_adapter_ipv6_t
 IPv6 address. More...
 
@@ -133,7 +133,7 @@ #define  - +

Macros

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
#define BRAWCAP_ADAPTER_NAME_LENGTH   40
 The max supported length for an adapter name.
 
@@ -143,189 +143,189 @@ 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]
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]
typedef char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
 Fixed size array containing a adapter name.
 
typedef UINT64 brawcap_adapter_mtu_t
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)
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)
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.
 
- - + - - + - - + - - + - - +

Enumerations

enum  brawcap_adapter_speed_t {
-  BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL +
enum  brawcap_adapter_speed_t {
+  BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL ,
-  BRAWCAP_ADAPTER_SPEED_10M = 10ULL +  BRAWCAP_ADAPTER_SPEED_10M = 10ULL ,
-  BRAWCAP_ADAPTER_SPEED_100M = 100ULL +  BRAWCAP_ADAPTER_SPEED_100M = 100ULL ,
-  BRAWCAP_ADAPTER_SPEED_1G = 1000ULL +  BRAWCAP_ADAPTER_SPEED_1G = 1000ULL ,
-  BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL +  BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL ,
-  BRAWCAP_ADAPTER_SPEED_5G = 5000ULL +  BRAWCAP_ADAPTER_SPEED_5G = 5000ULL ,
-  BRAWCAP_ADAPTER_SPEED_10G = 10000ULL +  BRAWCAP_ADAPTER_SPEED_10G = 10000ULL ,
-  BRAWCAP_ADAPTER_SPEED_25G = 25000ULL +  BRAWCAP_ADAPTER_SPEED_25G = 25000ULL ,
-  BRAWCAP_ADAPTER_SPEED_40G = 40000ULL +  BRAWCAP_ADAPTER_SPEED_40G = 40000ULL ,
-  BRAWCAP_ADAPTER_SPEED_50G = 50000ULL +  BRAWCAP_ADAPTER_SPEED_50G = 50000ULL ,
-  BRAWCAP_ADAPTER_SPEED_100G = 100000ULL +  BRAWCAP_ADAPTER_SPEED_100G = 100000ULL
}
 List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed. More...
 List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed. More...
 
enum  brawcap_adapter_connection_state_t {
-  BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0 +
enum  brawcap_adapter_connection_state_t {
+  BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_CONNECTION_UP = 1 +  BRAWCAP_ADAPTER_CONNECTION_UP = 1 ,
-  BRAWCAP_ADAPTER_CONNECTION_DOWN = 2 +  BRAWCAP_ADAPTER_CONNECTION_DOWN = 2
}
 List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected). More...
 List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected). More...
 
enum  brawcap_adapter_operation_state_t {
-  BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0 +
enum  brawcap_adapter_operation_state_t {
+  BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_OPERATION_UP = 1 +  BRAWCAP_ADAPTER_OPERATION_UP = 1 ,
-  BRAWCAP_ADAPTER_OPERATION_DOWN = 2 +  BRAWCAP_ADAPTER_OPERATION_DOWN = 2 ,
-  BRAWCAP_ADAPTER_OPERATION_TESTING = 3 +  BRAWCAP_ADAPTER_OPERATION_TESTING = 3
}
 List of adapter operation states. Values indicating the current adapter operation state (adapter driver status). More...
 List of adapter operation states. Values indicating the current adapter operation state (adapter driver status). More...
 
enum  brawcap_adapter_notify_reason_t {
-  BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN = 0 +
enum  brawcap_adapter_notify_reason_t {
+  BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN = 0 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_ADD = 1 +  BRAWCAP_ADAPTER_NOTIFY_REASON_ADD = 1 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE = 2 +  BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE = 2 ,
-  BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE = 3 +  BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE = 3
}
 List of reasons for adapter change notifications. This values indicate why a adapter change notification is received. More...
 List of reasons for adapter change notifications. This values indicate why a adapter change notification is received. More...
 
enum  brawcap_adapter_properties_t {
-  BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001 +
enum  brawcap_adapter_properties_t {
+  BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001 ,
-  BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002 +  BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002 ,
-  BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004 +  BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004 ,
-  BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008 +  BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008 ,
-  BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010 +  BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010 ,
-  BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020 +  BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020 ,
-  BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040 +  BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040 ,
-  BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080 +  BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080
}
 List of adapter properties. They are used to identify adapter change notifications with a property change reason. More...
 List of adapter properties. They are used to identify adapter change notifications with a property change reason. More...
 
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Functions

brawcap_status_t brawcap_adapter_list_update ()
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)
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)
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)
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 ()
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
 
@@ -335,12 +335,12 @@

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:

    -
  1. Adapter Property Reader
  2. -
  3. Adapter Change Notifier
  4. +
  5. Adapter Property Reader
  6. +
  7. Adapter Change Notifier

Data Structure Documentation

- -

◆ brawcap_adapter_ipv4_t

+ +

◆ brawcap_adapter_ipv4_t

@@ -351,7 +351,7 @@

@@ -380,8 +380,8 @@

-

◆ brawcap_adapter_ipv6_t

+ +

◆ brawcap_adapter_ipv6_t

Data Fields
@@ -434,7 +434,7 @@

-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

The max supported length for an adapter name.

Note
On Windows a adapter name always corresponds to it´s GUID. Those GUIDs have a fixed length.
@@ -449,16 +449,16 @@

Data Fields
- +
typedef UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]typedef UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]

-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

Fixed size array describing a MAC address.

The array only contains the MAC address digits without any delimiters.

-
Examples
01_adapter_property_reader.c.
+
Examples
01_adapter_property_reader.c.
@@ -470,16 +470,16 @@

- +
typedef char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]typedef char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]

@@ -491,12 +491,12 @@

- +
typedef UINT64 brawcap_adapter_mtu_ttypedef UINT64 brawcap_adapter_mtu_t

-

#include <brawcap_types_um.h>

+

#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.

Attention
Each application can only register for this callback once.
Parameters
- - + +
[in]nameThe adapter name on which the change happened.
[in]reasonThe reason/type of change (see brawcap_adapter_notify_reason_t).
[in]propertiesA bit field with the properties that have changed (see brawcap_adapter_properties_t).
[in]reasonThe reason/type of change (see brawcap_adapter_notify_reason_t).
[in]propertiesA bit field with the properties that have changed (see brawcap_adapter_properties_t).
[in]pUserPointer to a user defined context. It allows access to user specific data within the callback.
-
Examples
02_adapter_change_notifier.c.
+
Examples
02_adapter_change_notifier.c.
@@ -541,20 +541,20 @@

- +
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)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>

+

#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.

Attention
Each handle can register for this callback once.
Parameters
- - + +
[in]pHandleThe handle for which the adapter change notification was registered.
[in]reasonThe reason/type of change (see brawcap_adapter_notify_reason_t).
[in]propertiesA bit field with the properties that have changed (see brawcap_adapter_properties_t).
[in]reasonThe reason/type of change (see brawcap_adapter_notify_reason_t).
[in]propertiesA bit field with the properties that have changed (see brawcap_adapter_properties_t).
[in]pUserPointer to a user defined context. It allows access to user specific data within the callback.
@@ -570,12 +570,12 @@

- +
enum brawcap_adapter_speed_tenum brawcap_adapter_speed_t

-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.

Note
The speed should be always equal for rx and tx, but both can be requested independent of each other.
@@ -613,12 +613,12 @@

- +
enum brawcap_adapter_connection_state_tenum brawcap_adapter_connection_state_t

-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

List of adapter connection states. Values indicating the current adapter connection state (uplink/cable connected).

@@ -639,12 +639,12 @@

- +
enum brawcap_adapter_operation_state_tenum brawcap_adapter_operation_state_t
-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

List of adapter operation states. Values indicating the current adapter operation state (adapter driver status).

@@ -667,12 +667,12 @@

- +
enum brawcap_adapter_notify_reason_tenum brawcap_adapter_notify_reason_t
-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

List of reasons for adapter change notifications. This values indicate why a adapter change notification is received.

@@ -682,7 +682,7 @@

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.

+
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.

@@ -695,12 +695,12 @@

- +
enum brawcap_adapter_properties_tenum brawcap_adapter_properties_t

-

#include <brawcap_types_um.h>

+

#include <brawcap_types_um.h>

List of adapter properties. They are used to identify adapter change notifications with a property change reason.

Note
The property values allow to store several properties in a single bitfield. This makes it possible to indicate several property changes with only one notification.
@@ -733,7 +733,7 @@

- + @@ -741,19 +741,19 @@

-

#include <brawcap.h>

+

#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.

-
Note
The list will be initialized when calling the first bRAWcap function and not update automatically after that. To update the list later on use this function. A alternative to detect new/removed adapters is registering for change notifications.
-
Attention
The adapter list is not thread safe. Therefore parallel calls to this function, brawcap_adapter_list_count and brawcap_adapter_list_at should be avoided or at least synchronized. If the list is changed by this function and another thread is currently retrieving information from the list it may lead to undefined behavior or even a crash if the number of entries is reduced.
+
Note
The list will be initialized when calling the first bRAWcap function and not update automatically after that. To update the list later on use this function. A alternative to detect new/removed adapters is registering for change notifications.
+
Attention
The adapter list is not thread safe. Therefore parallel calls to this function, brawcap_adapter_list_count and brawcap_adapter_list_at should be avoided or at least synchronized. If the list is changed by this function and another thread is currently retrieving information from the list it may lead to undefined behavior or even a crash if the number of entries is reduced.
Returns

brawcap_status_t brawcap_adapter_list_update brawcap_status_t brawcap_adapter_list_update ( )
- +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
-
Examples
01_adapter_property_reader.c.
+
Examples
01_adapter_property_reader.c.

@@ -765,19 +765,19 @@

- + - +
brawcap_status_t brawcap_adapter_list_count brawcap_status_t brawcap_adapter_list_count (brawcap_adapter_count_t *const brawcap_adapter_count_t *const  pCount)

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current number of supported adapters in the adapter list.

-
Note
The count is only updated after a call to brawcap_adapter_list_update.
+
Note
The count is only updated after a call to brawcap_adapter_list_update.
Attention
Updating the list and retrieving information from it is not thread safe. Therefore accessing it from different threads shall be avoided or synchronized.
Parameters
@@ -789,12 +789,12 @@

- + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
01_adapter_property_reader.c, 03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
01_adapter_property_reader.c, 03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
@@ -806,15 +806,15 @@

- + - + - + @@ -825,10 +825,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the adapter name of the adapter at the adapter list index.

-
Note
The adapter list is only updated after a call to brawcap_adapter_list_update.
+
Note
The adapter list is only updated after a call to brawcap_adapter_list_update.
Attention
Updating the list and retrieving information from it is not thread safe. Therefore accessing it from different threads shall be avoided or synchronized.
Parameters

brawcap_status_t brawcap_adapter_list_at brawcap_status_t brawcap_adapter_list_at (const brawcap_adapter_count_t const brawcap_adapter_count_t  index,
brawcap_adapter_name_t brawcap_adapter_name_t  name 
@@ -841,14 +841,14 @@

- + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_ERROR_PARAM_OUT_OF_RANGE Specified index exceeds adapter list length.
-
Examples
01_adapter_property_reader.c, 03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
01_adapter_property_reader.c, 03_generic_handle_opener.c, 04_version_comparator.c, 05_receive_simple_packet_receiver.c, 06_filter_firewall.c, 07_receive_buffered_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -860,9 +860,9 @@

- + - + @@ -879,7 +879,7 @@

-

#include <brawcap.h>

+

#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.

@@ -898,16 +898,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_notify_register brawcap_status_t brawcap_adapter_notify_register (brawcap_adapter_notify_callback_t const brawcap_adapter_notify_callback_t const  callback,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_INFO_ALREADY_REGISTERED Calling process has already registered for this notification.
-
Examples
02_adapter_change_notifier.c.
+
Examples
02_adapter_change_notifier.c.

@@ -919,7 +919,7 @@

- + @@ -927,21 +927,21 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Unregisters the calling process from receiving adapter change notifications.

Returns

brawcap_status_t brawcap_adapter_notify_unregister brawcap_status_t brawcap_adapter_notify_unregister ( )
- + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE Not available in demo mode (no license).
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_INFO_NOT_REGISTERED Calling process was not registered for this notification.
-
Examples
02_adapter_change_notifier.c.
+
Examples
02_adapter_change_notifier.c.
@@ -953,15 +953,15 @@

- + - + - + @@ -978,10 +978,10 @@

-

#include <brawcap.h>

+

#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.

+

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.

Attention
Blocking for long periods within the callback function can lead to incorrect behavior and should be avoided. If you need to process a lot on adapter changes it is recommended to do the processing in another thread rather than directly within the callback.
Note
Calls to the registered callback function are serialized. This means that the callback can not be called in parallel and one call has to be finished before another one is received.
@@ -997,13 +997,13 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_notify_handle_register brawcap_status_t brawcap_adapter_notify_handle_register (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_notify_handle_callback_t const brawcap_adapter_notify_handle_callback_t const  callback,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_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_INFO_ALREADY_REGISTERED Specified handle has already registered for this notification.

@@ -1016,16 +1016,16 @@

- + - +
brawcap_status_t brawcap_adapter_notify_handle_unregister brawcap_status_t brawcap_adapter_notify_handle_unregister (brawcap_handle_t *const brawcap_handle_t *const  pHandle)
-

#include <brawcap.h>

+

#include <brawcap.h>

Unregisters the specified handle from receiving adapter change notifications.

Parameters
@@ -1038,13 +1038,13 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_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_INFO_NOT_REGISTERED Specified handle was not registered for this notification.

@@ -1057,15 +1057,15 @@

- + - + - + @@ -1076,7 +1076,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the adapter name of the specified adapter.

Parameters
@@ -1090,9 +1090,9 @@

- + - +
brawcap_status_t brawcap_adapter_name_by_handle brawcap_status_t brawcap_adapter_name_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_name_t brawcap_adapter_name_t  name 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -1105,9 +1105,9 @@

- + - + @@ -1130,14 +1130,14 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set adapter friendly name for the specified adapter.

Parameters

brawcap_status_t brawcap_adapter_friendly_name brawcap_status_t brawcap_adapter_friendly_name (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
- - + +
[in]nameName of the adapter.
[out]friendlyNamePointer 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]pLengthLength 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.
[out]friendlyNamePointer 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]pLengthLength 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.
@@ -1145,18 +1145,18 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_AVAILABLE Not available in demo mode (no license). -BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available. +BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available. -BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. +BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. -
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.

@@ -1168,9 +1168,9 @@

- + - + @@ -1193,14 +1193,14 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set friendly name of the specified adapter.

Parameters

brawcap_status_t brawcap_adapter_friendly_name_by_handle brawcap_status_t brawcap_adapter_friendly_name_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
- - + +
[in]pHandleThe bRAWcap handle to read from.
[out]friendlyNamePointer 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]pLengthLength 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.
[out]friendlyNamePointer 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]pLengthLength 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.
@@ -1208,13 +1208,13 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_AVAILABLE Not available in demo mode (no license). -BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. +BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. @@ -1227,9 +1227,9 @@

- + - + @@ -1252,15 +1252,15 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the description of the specified adapter.

Note
Adapter descriptions are set depending on the loaded network adapter driver. This means it will not change as long as the network driver is not changed.
Parameters

brawcap_status_t brawcap_adapter_description brawcap_status_t brawcap_adapter_description (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
- - + +
[in]nameName of the adapter.
[out]descriptionPointer 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]pLengthLength 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.
[out]descriptionPointer 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]pLengthLength 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.
@@ -1268,18 +1268,18 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_AVAILABLE Not available in demo mode (no license). -BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available. +BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available. -BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. +BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. -
Examples
01_adapter_property_reader.c.
+
Examples
01_adapter_property_reader.c.
@@ -1291,9 +1291,9 @@

- + - + @@ -1316,15 +1316,15 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the description of a network adapter based on the specified adapter.

Note
Adapter descriptions are set depending on the loaded network adapter driver. This means it will not change as long as the network driver is not changed.
Parameters

brawcap_status_t brawcap_adapter_description_by_handle brawcap_status_t brawcap_adapter_description_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
- - + +
[in]pHandleThe bRAWcap handle to read from.
[out]descriptionPointer 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]pLengthLength 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.
[out]descriptionPointer 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]pLengthLength 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.

@@ -1332,13 +1332,13 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_AVAILABLE Not available in demo mode (no license). -BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. +BRAWCAP_STATUS_ERROR_OVERRUN Given buffer length was to short. @@ -1351,15 +1351,15 @@

- + - + - + @@ -1370,7 +1370,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set IPv4 address of the specified adapter.

Parameters
@@ -1384,16 +1384,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_ipv4 brawcap_status_t brawcap_adapter_ipv4 (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_ipv4_t *const brawcap_adapter_ipv4_t *const  pIpv4 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -1405,15 +1405,15 @@

- + - + - + @@ -1424,7 +1424,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set IPv4 address of the specified adapter.

Parameters
@@ -1438,11 +1438,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_ipv4_by_handle brawcap_status_t brawcap_adapter_ipv4_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_ipv4_t *const brawcap_adapter_ipv4_t *const  pIpv4 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1455,15 +1455,15 @@

- + - + - + @@ -1474,7 +1474,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set IPv6 address of the specified adapter.

Parameters
@@ -1488,16 +1488,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_ipv6 brawcap_status_t brawcap_adapter_ipv6 (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_ipv6_t *const brawcap_adapter_ipv6_t *const  pIpv6 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -1509,15 +1509,15 @@

- + - + - + @@ -1528,7 +1528,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently set IPv6 address of the specified adapter.

Parameters
@@ -1542,11 +1542,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_ipv6_by_handle brawcap_status_t brawcap_adapter_ipv6_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_ipv6_t *const brawcap_adapter_ipv6_t *const  pIpv6 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1559,15 +1559,15 @@

- + - + - + @@ -1578,7 +1578,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the MAC address of the specified adapter.

Parameters
@@ -1592,16 +1592,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_mac brawcap_status_t brawcap_adapter_mac (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_mac_t brawcap_adapter_mac_t  mac 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c.
+
Examples
01_adapter_property_reader.c.
@@ -1613,15 +1613,15 @@

- + - + - + @@ -1632,7 +1632,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the MAC address of the specified adapter.

Parameters
@@ -1646,11 +1646,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_mac_by_handle brawcap_status_t brawcap_adapter_mac_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_mac_t brawcap_adapter_mac_t  mac 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1663,15 +1663,15 @@

- + - + - + @@ -1682,7 +1682,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current receive speed of the specified adapter.

Parameters
@@ -1696,16 +1696,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_speed_rx brawcap_status_t brawcap_adapter_speed_rx (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_speed_t *const brawcap_adapter_speed_t *const  pSpeed 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -1717,15 +1717,15 @@

- + - + - + @@ -1736,7 +1736,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current receive speed of the specified adapter.

Parameters
@@ -1750,11 +1750,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_speed_rx_by_handle brawcap_status_t brawcap_adapter_speed_rx_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_speed_t *const brawcap_adapter_speed_t *const  pSpeed 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1767,15 +1767,15 @@

- + - + - + @@ -1786,7 +1786,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current transmit speed of the specified adapter.

Parameters
@@ -1800,16 +1800,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_speed_tx brawcap_status_t brawcap_adapter_speed_tx (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_speed_t *const brawcap_adapter_speed_t *const  pSpeed 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -1821,15 +1821,15 @@

- + - + - + @@ -1840,7 +1840,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current transmit speed of the specified adapter.

Parameters
@@ -1854,11 +1854,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_speed_tx_by_handle brawcap_status_t brawcap_adapter_speed_tx_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_speed_t *const brawcap_adapter_speed_t *const  pSpeed 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1871,15 +1871,15 @@

- + - + - + @@ -1890,7 +1890,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current connection state of the specified adapter.

Parameters
@@ -1904,16 +1904,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_connection brawcap_status_t brawcap_adapter_connection (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_connection_state_t *const brawcap_adapter_connection_state_t *const  pConnection 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -1925,15 +1925,15 @@

- + - + - + @@ -1944,7 +1944,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current connection state of the specified adapter.

Parameters
@@ -1958,11 +1958,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_connection_by_handle brawcap_status_t brawcap_adapter_connection_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_connection_state_t *const brawcap_adapter_connection_state_t *const  pConnection 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -1975,15 +1975,15 @@

- + - + - + @@ -1994,7 +1994,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current operation state of the specified adapter.

Parameters
@@ -2008,16 +2008,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_operation brawcap_status_t brawcap_adapter_operation (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_operation_state_t *const brawcap_adapter_operation_state_t *const  pOperation 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -2029,15 +2029,15 @@

- + - + - + @@ -2048,7 +2048,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current operation state of the specified adapter.

Parameters
@@ -2062,11 +2062,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_operation_by_handle brawcap_status_t brawcap_adapter_operation_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_operation_state_t *const brawcap_adapter_operation_state_t *const  pOperation 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

@@ -2079,15 +2079,15 @@

- + - + - + @@ -2098,7 +2098,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the configured MTU of the specified adapter.

Parameters
@@ -2112,16 +2112,16 @@

- + - + - + - +
brawcap_status_t brawcap_adapter_mtu brawcap_status_t brawcap_adapter_mtu (const brawcap_adapter_name_t const brawcap_adapter_name_t  name,
brawcap_adapter_mtu_t *const brawcap_adapter_mtu_t *const  pMtu 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
BRAWCAP_STATUS_ERROR_NOT_FOUND Adapter name not found/not available.
-
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
+
Examples
01_adapter_property_reader.c, and 02_adapter_change_notifier.c.
@@ -2133,15 +2133,15 @@

- + - + - + @@ -2152,7 +2152,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the configured MTU of the specified adapter.

Parameters
@@ -2166,11 +2166,11 @@

- + - + - +
brawcap_status_t brawcap_adapter_mtu_by_handle brawcap_status_t brawcap_adapter_mtu_by_handle (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_adapter_mtu_t *const brawcap_adapter_mtu_t *const  pMtu 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_AVAILABLE Not available in demo mode (no license).

diff --git a/group__brawcap__receive.html b/a00055.html similarity index 56% rename from group__brawcap__receive.html rename to a00055.html index 558ef0a..a26f07b 100644 --- a/group__brawcap__receive.html +++ b/a00055.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -120,13 +120,13 @@ - - + +

Modules

 Receive Filter
 Types and functions for operating with bRAWcap receive filters.
 Receive Filter
 Types and functions for operating with bRAWcap receive filters.
 
- + +#define  +#define  - +

Macros

#define BRAWCAP_RX_COPY_PACKETS_DEFAULT   0
#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.
 
@@ -134,7 +134,7 @@
 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
BRAWCAP_RX_TIMESTAMP_MODE_DEFAULT   BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
 Default receive timestamp mode which will be used.
 
@@ -154,123 +154,123 @@
 Maximum size (in number of packets) supported for driver receive queues.
 
-#define BRAWCAP_RX_DIRECTION_DEFAULT   BRAWCAP_RX_DIRECTION_BOTH
BRAWCAP_RX_DIRECTION_DEFAULT   BRAWCAP_RX_DIRECTION_BOTH
 Default receive direction which will be used.
 
#define BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX   2
#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
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
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.
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 +
enum  brawcap_rx_mode_t {
+  BRAWCAP_RX_MODE_LIVE = 1 ,
-  BRAWCAP_RX_MODE_DUMP = 2 +  BRAWCAP_RX_MODE_DUMP = 2
}
 List of receive modes. More...
 List of receive modes. More...
 
enum  brawcap_rx_direction_t {
-  BRAWCAP_RX_DIRECTION_UNKNOWN = 0x00 +
enum  brawcap_rx_direction_t {
+  BRAWCAP_RX_DIRECTION_UNKNOWN = 0x00 ,
-  BRAWCAP_RX_DIRECTION_IN = 0x01 +  BRAWCAP_RX_DIRECTION_IN = 0x01 ,
-  BRAWCAP_RX_DIRECTION_OUT = 0x02 +  BRAWCAP_RX_DIRECTION_OUT = 0x02 ,
-  BRAWCAP_RX_DIRECTION_BOTH = 0x03 +  BRAWCAP_RX_DIRECTION_BOTH = 0x03
}
 List of supported receive directions. More...
 List of supported receive directions. More...
 
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Functions

brawcap_status_t brawcap_rx_packet (brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
 

Detailed Description

Types and functions for bRAWcap receiving.

List of examples:

    -
  1. Simple Packet Receiver
  2. -
  3. Buffered Receiver
  4. -
  5. Timestamp Inspector
  6. +
  7. Simple Packet Receiver
  8. +
  9. Buffered Receiver
  10. +
  11. Timestamp Inspector

Macro Definition Documentation

@@ -285,7 +285,7 @@

-

#include <brawcap_types_shared.h>

+

#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.

Note
bRAWcap waits at least up to 10 times the configured timeout before finally returning if the minimum number of packets has not yet been received.
@@ -305,10 +305,10 @@

-

#include <brawcap_types_um.h>

+

#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.

+

Limits the number of buffers which can be attached to a single handle with brawcap_rx_buffer_attach.

@@ -320,17 +320,17 @@

- +
typedef UINT16 brawcap_rx_timeout_ttypedef UINT16 brawcap_rx_timeout_t
-

#include <brawcap_types_shared.h>

+

#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.

Attention
A receive timeout value of zero corresponds to an infinite wait. This means that bRAWcap receive will only return if
@@ -343,15 +343,15 @@

- +
typedef UINT32 brawcap_rx_min_packets_ttypedef UINT32 brawcap_rx_min_packets_t

-

#include <brawcap_types_shared.h>

+

#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.

-
Note
This setting is only used with looped receive (brawcap_rx_start) and has no impact on single packet reception (brawcap_rx_packet).
+
Note
This setting is only used with looped receive (brawcap_rx_start) and has no impact on single packet reception (brawcap_rx_packet).
@@ -362,20 +362,20 @@

- +
typedef void(* brawcap_rx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser)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>

+

#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.

+

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.

Note
If a handle has multiple buffers attached, the callback may be called in parallel (by different threads).
Warning
Executing to long in the callback can lead to a bottleneck in reception! It is recommended that the driver always has at least one (free) buffer were it can store the packets to.
Parameters
- +
[in]pHandleHandle on which the receive returned.
[in]statusThe overall receive status see brawcap_status_t for possible return values.
[in]statusThe overall receive status see brawcap_status_t for possible return values.
[in]pBufferPointer 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]pUserPointer to a user defined context. It allows access to user specific data within the callback.
@@ -392,12 +392,12 @@

- +
enum brawcap_rx_mode_tenum brawcap_rx_mode_t

-

#include <brawcap_types_shared.h>

+

#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.

@@ -448,15 +448,15 @@

- + - + - + @@ -467,10 +467,10 @@

-

#include <brawcap.h>

+

#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.

+

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.

Note
Parallel receives per handle are not allowed. This means that if there is any other receive pending on the handle each further initiated receive will fail until the pending operation has finished.
Parameters

brawcap_status_t brawcap_rx_packet brawcap_status_t brawcap_rx_packet (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_packet_t *const brawcap_packet_t *const  pPacket 
@@ -483,22 +483,22 @@

- + - + - + - + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_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_WARNING_DEMO_MODE Running in demo mode (no license).
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
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_INFO_NO_DATA Returned without any data received (due to timeout).
-
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.
+
Examples
05_receive_simple_packet_receiver.c, and 08_receive_timestamp_inspector.c.

@@ -510,15 +510,15 @@

- + - + - + @@ -541,20 +541,20 @@

-

#include <brawcap.h>

+

#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.

+

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.

Note
Due to the focus on optimized throughput with minimal CPU load bRAWcap does not fill up the packets in the buffer with the same sequence they were received by the adapter. Here we want to give some additional information on the topic of "packet sequence/timestamp":
  • First of all it should be known that the receive sequence may not be equal to the sending sequence. Due to several senders or some network managers in between (switches and so on...). For any protocols which require a ordered packet stream, there will be at least one field in the packet payload which allows to sort the packets on the receiver side. This is a "higher" layer topic and not part of bRAWcap.
  • -
  • With the bRAWcap supported timestamp mechanisms it is possible to sort the received packets corresponding to their receive timestamps. But keep in mind that only the BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE guarantees that the receive timestamps really match the received packet sequence on the adapter. To use the named timestamp mechanism, the underlying network adapter must support it. Any other timestamp is generated by software. Windows is not a realtime operation system, and therefore due to multithreading, scheduling (...) it could happen that some packets are processed before other packets which was received earlier. Especially the Windows network stack feature called "receive side scaling" can also increase the issue of incorrect packet sequences.
  • +
  • With the bRAWcap supported timestamp mechanisms it is possible to sort the received packets corresponding to their receive timestamps. But keep in mind that only the BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE guarantees that the receive timestamps really match the received packet sequence on the adapter. To use the named timestamp mechanism, the underlying network adapter must support it. Any other timestamp is generated by software. Windows is not a realtime operation system, and therefore due to multithreading, scheduling (...) it could happen that some packets are processed before other packets which was received earlier. Especially the Windows network stack feature called "receive side scaling" can also increase the issue of incorrect packet sequences.
Invariant
The user parameter allows access to user defined context. The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating the context in the callback before accessing it.
-
Attention
After starting receive brawcap_rx_packet can not be used until you stop the receive with brawcap_rx_stop, because parallel receives are not allowed.
+
Attention
After starting receive brawcap_rx_packet can not be used until you stop the receive with brawcap_rx_stop, because parallel receives are not allowed.
Parameters

brawcap_status_t brawcap_rx_start brawcap_status_t brawcap_rx_start (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_rx_callback_t const brawcap_rx_callback_t const  callback,
@@ -568,14 +568,14 @@

- + - + - +
[in]pHandlebRAWcap handle to receive from.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_WARNING_PENDING Another receive is pending or reception is already started.
-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
@@ -587,16 +587,16 @@

- + - +
brawcap_status_t brawcap_rx_stop brawcap_status_t brawcap_rx_stop (brawcap_handle_t *const brawcap_handle_t *const  pHandle)
-

#include <brawcap.h>

+

#include <brawcap.h>

Stops the internal receive loop.

Parameters
@@ -609,14 +609,14 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_INFO_NOT_RUNNING There was no receive running.

-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
@@ -628,15 +628,15 @@

- + - + - + @@ -647,12 +647,12 @@

-

#include <brawcap.h>

+

#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).

+

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:

Note
A buffer can be attached only once and is than locked down by the handle it is attached to. This means that it has to be detached before it can be used again for another handle.
@@ -667,16 +667,16 @@

- + - + - + - +
brawcap_status_t brawcap_rx_buffer_attach brawcap_status_t brawcap_rx_buffer_attach (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_WARNING_LIMIT_REACHED Limitation of buffer per handle reached (BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX)

-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
@@ -688,15 +688,15 @@

- + - + - + @@ -707,10 +707,10 @@

-

#include <brawcap.h>

+

#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.

+

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.

Parameters

brawcap_status_t brawcap_rx_buffer_detach brawcap_status_t brawcap_rx_buffer_detach (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer 
@@ -722,14 +722,14 @@

- + - + - +
[in]pHandlebRAWcap handle from which the buffer is to be detached.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_INFO_NOT_ATTACHED The buffer was not attached.

-
Examples
07_receive_buffered_receiver.c.
+
Examples
07_receive_buffered_receiver.c.
@@ -741,15 +741,15 @@

- + - + - + @@ -760,14 +760,14 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the receive direction for the specified handle.

Possible directions are:

Parameters

brawcap_status_t brawcap_rx_direction_set brawcap_status_t brawcap_rx_direction_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_rx_direction_t const brawcap_rx_direction_t  direction 
@@ -780,11 +780,11 @@

- + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.

@@ -797,15 +797,15 @@

- + - + - + @@ -816,7 +816,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured receive direction of the specified handle.

Parameters
@@ -830,9 +830,9 @@

- + - +
brawcap_status_t brawcap_rx_direction_get brawcap_status_t brawcap_rx_direction_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_rx_direction_t *const brawcap_rx_direction_t *const  pDirection 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
@@ -845,15 +845,15 @@

- + - + - + @@ -864,10 +864,10 @@

-

#include <brawcap.h>

+

#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.

+

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.

Invariant
If high receive rates should be reached (and many packets coming in), a high value is preferred. Otherwise if low latency is required the best effort would be to set this value to zero.
Note
Independent from this value the receive will at least return if it pends for 10 times the configured receive timeout. This avoid infinite blocking (infinite blocking is only the possible if the receive timeout is zero). If this value is set to zero it will always return after the first receive timeout. And if the given buffer becomes filled up before the timeout is reached it will return when the buffer is full.
Parameters
@@ -881,11 +881,11 @@

- + - + - +
brawcap_status_t brawcap_rx_min_packets_set brawcap_status_t brawcap_rx_min_packets_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_rx_min_packets_t const brawcap_rx_min_packets_t  minPackets 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -898,15 +898,15 @@

- + - + - + @@ -917,7 +917,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured number of packets to receive for the specified handle.

Parameters
@@ -931,9 +931,9 @@

- + - +
brawcap_status_t brawcap_rx_min_packets_get brawcap_status_t brawcap_rx_min_packets_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_rx_min_packets_t *const brawcap_rx_min_packets_t *const  pMinPackets 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
@@ -946,15 +946,15 @@

- + - + - + @@ -965,11 +965,11 @@

-

#include <brawcap.h>

+

#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".

-
Note
Default timeout value is BRAWCAP_RX_TIMEOUT_MS_DEFAULT. And the max supported timeout is BRAWCAP_RX_TIMEOUT_MS_MAX.
+

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".

+
Note
Default timeout value is BRAWCAP_RX_TIMEOUT_MS_DEFAULT. And the max supported timeout is BRAWCAP_RX_TIMEOUT_MS_MAX.
Attention
Be careful in using infinite timeouts. It could lead to a endless blocking behaviour. For example if there are no packets received which meet your configured filter on the underlying adapter.
Parameters

brawcap_status_t brawcap_rx_timeout_set brawcap_status_t brawcap_rx_timeout_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_rx_timeout_t const brawcap_rx_timeout_t  timeout_ms 
@@ -982,13 +982,13 @@

- + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -1001,15 +1001,15 @@

- + - + - + @@ -1020,7 +1020,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured receive timeout for the specified handle.

Parameters
@@ -1034,9 +1034,9 @@

- + - +
brawcap_status_t brawcap_rx_timeout_get brawcap_status_t brawcap_rx_timeout_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_rx_timeout_t *const brawcap_rx_timeout_t *const  pTimeout_ms 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
@@ -1049,15 +1049,15 @@

- + - + - + @@ -1068,10 +1068,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the specified filter to the specified handle.

-

For more information on filters see brawcap_filter_t.

+

For more information on filters see brawcap_filter_t.

Note
Each handle can have exactly one filter applied. If several filters shall be applied to the same adapter, it is required to open several bRAWcap handles to the same adapter.
Parameters

brawcap_status_t brawcap_rx_filter_set brawcap_status_t brawcap_rx_filter_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_filter_t *const const brawcap_filter_t *const  pFilter 
@@ -1084,16 +1084,16 @@

- + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE Specified filter type is not available.
BRAWCAP_STATUS_ERROR_NOT_AVAILABLE Specified filter type is not available.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -1105,15 +1105,15 @@

- + - + - + @@ -1124,7 +1124,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured filter for the specified handle.

Parameters
@@ -1138,9 +1138,9 @@

- + - +
brawcap_status_t brawcap_rx_filter_get brawcap_status_t brawcap_rx_filter_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_filter_t *const brawcap_filter_t *const  pFilter 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.

@@ -1153,9 +1153,9 @@

- + - + @@ -1172,7 +1172,7 @@

-

#include <brawcap.h>

+

#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.

@@ -1189,11 +1189,11 @@

- + - + - +
brawcap_status_t brawcap_rx_promiscuous_mode_set brawcap_status_t brawcap_rx_promiscuous_mode_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -1206,9 +1206,9 @@

- + - + @@ -1231,7 +1231,7 @@

-

#include <brawcap.h>

+

#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.

@@ -1247,11 +1247,11 @@

- + - + - +
brawcap_status_t brawcap_rx_promiscuous_mode_get brawcap_status_t brawcap_rx_promiscuous_mode_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -1264,15 +1264,15 @@

- + - + - + @@ -1283,7 +1283,7 @@

-

#include <brawcap.h>

+

#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".

@@ -1298,14 +1298,14 @@

- + - + - +
brawcap_status_t brawcap_rx_timestamp_capabilities brawcap_status_t brawcap_rx_timestamp_capabilities (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_timestamp_capabilities_t *const brawcap_timestamp_capabilities_t *const  pCapabilities 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.
@@ -1317,15 +1317,15 @@

- + - + - + @@ -1336,7 +1336,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured receive time stamping mode for the specified handle.

Parameters
@@ -1350,9 +1350,9 @@

- + - +
brawcap_status_t brawcap_rx_timestamp_mode_get brawcap_status_t brawcap_rx_timestamp_mode_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_timestamp_mode_t *const brawcap_timestamp_mode_t *const  pMode 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.

@@ -1365,15 +1365,15 @@

- + - + - + @@ -1384,10 +1384,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Configures the used receive time stamping mode for the specified handle.

-
Note
Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported before setting it. To check if a timestamp mode is available use brawcap_rx_timestamp_capabilities.
+
Note
Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported before setting it. To check if a timestamp mode is available use brawcap_rx_timestamp_capabilities.
Parameters

brawcap_status_t brawcap_rx_timestamp_mode_set brawcap_status_t brawcap_rx_timestamp_mode_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_timestamp_mode_t const brawcap_timestamp_mode_t  mode 
@@ -1399,16 +1399,16 @@

- + - + - + - +
[in]pHandlebRAWcap handle to be configured.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_NOT_AVAILABLE Specified timestamp mode not available.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
08_receive_timestamp_inspector.c.
+
Examples
08_receive_timestamp_inspector.c.
@@ -1420,9 +1420,9 @@

- + - + @@ -1439,7 +1439,7 @@

-

#include <brawcap.h>

+

#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.

@@ -1454,11 +1454,11 @@

- + - + - +
brawcap_status_t brawcap_rx_vlan_tagging_set brawcap_status_t brawcap_rx_vlan_tagging_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.

@@ -1471,9 +1471,9 @@

- + - + @@ -1490,7 +1490,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the configured VLAN tagging state for the specified handle.

Parameters
@@ -1504,9 +1504,9 @@

- + - +
brawcap_status_t brawcap_rx_vlan_tagging_get brawcap_status_t brawcap_rx_vlan_tagging_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
@@ -1519,15 +1519,15 @@

- + - + - + @@ -1538,15 +1538,15 @@

-

#include <brawcap.h>

+

#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.

Note
The default queue size is
-
See also
BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets). And its max limitation is
+
See also
BRAWCAP_RX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets). And its max limitation is
-BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
+BRAWCAP_RX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
Attention
Reducing the queue size during runtime may result in packet loss. This may be the case if there are more packets stored in the queue than the new size can accommodate.
Parameters

brawcap_status_t brawcap_rx_driver_queue_size_set brawcap_status_t brawcap_rx_driver_queue_size_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_queue_size_t const brawcap_queue_size_t  size 
@@ -1559,16 +1559,16 @@

- + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -1580,15 +1580,15 @@

- + - + - + @@ -1599,7 +1599,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured driver receive queue size for the specified handle.

Parameters
@@ -1613,9 +1613,9 @@

- + - +
brawcap_status_t brawcap_rx_driver_queue_size_get brawcap_status_t brawcap_rx_driver_queue_size_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_queue_size_t *const brawcap_queue_size_t *const  pSize 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.

diff --git a/group__brawcap__filter.html b/a00056.html similarity index 58% rename from group__brawcap__filter.html rename to a00056.html index 37efd84..9a46dee 100644 --- a/group__brawcap__filter.html +++ b/a00056.html @@ -56,7 +56,7 @@ Logo - -
Receive Filter
+
Receive Filter
@@ -120,12 +120,12 @@ - - - - - - + + + + + +

Data Structures

struct  brawcap_bpf_insn_t
 A single BPF pseudo-instruction. More...
 
struct  brawcap_bpf_program_t
 A BPF pseudo-assembly program. More...
 
struct  brawcap_bpf_insn_t
 A single BPF pseudo-instruction. More...
 
struct  brawcap_bpf_program_t
 A BPF pseudo-assembly program. More...
 
@@ -136,81 +136,81 @@

Macros

- + - + +typedef brawcap_packet_size_t  - +

Typedefs

typedef UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
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]
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
brawcap_filter_byte_length_t
 Type for specifying the byte filter length.
 
typedef struct _brawcap_filter brawcap_filter_t
typedef struct _brawcap_filter brawcap_filter_t
 bRAWcap filter object.
 
- - +

Enumerations

enum  brawcap_filter_type_t {
-  BRAWCAP_FILTER_TYPE_BYTE_MASK = 0 +
enum  brawcap_filter_type_t {
+  BRAWCAP_FILTER_TYPE_BYTE_MASK = 0 ,
-  BRAWCAP_FILTER_TYPE_BPF = 1 +  BRAWCAP_FILTER_TYPE_BPF = 1
}
 List of filter types. More...
 List of filter types. More...
 
- + - + - + - + - + - + - + - + - + - + - + - +

Functions

brawcap_status_t brawcap_filter_create (brawcap_filter_t **const pFilter, const brawcap_filter_type_t type)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
 

Detailed Description

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.

+

To create a new filter use brawcap_filter_create. If a filter is not required anymore it shall be deleted with brawcap_filter_free.

Note
Applying filters to handles:
Each bRAWcap handle has it´s own filter instance. Therefore after applying the filter to a bRAWcap handle the filter may be reused to apply the same (or a different) filter to another handle or freed if not required anymore.

List of examples:

    -
  1. Firewall
  2. +
  3. Firewall

Data Structure Documentation

- -

◆ bpf_insn

+ +

◆ bpf_insn

@@ -256,8 +256,8 @@

◆&

- -

◆ bpf_program

+ +

◆ bpf_program

-

#include <brawcap_types_shared.h>

+

#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.

Note
It is not necessary to set all bytes. If the used filter does not require the complete mask length. bRAWcap evaluates only the bytes up to the specified filter length.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -340,15 +340,15 @@

- +
typedef struct _brawcap_filter brawcap_filter_ttypedef struct _brawcap_filter brawcap_filter_t

-

#include <brawcap_types_shared.h>

+

#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.

+

The filter object can be accessed with the bRAWcap filter functions. Filters can be created and freed.

@@ -360,12 +360,12 @@

- +
enum brawcap_filter_type_tenum brawcap_filter_type_t
-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

List of filter types.

Note
Currently only the byte filter is supported. A BPF (Berkley Packet Filter) filter, which is equivalent to the one which libpcap uses, may be added in the future.
@@ -386,15 +386,15 @@

- + - + - + @@ -405,12 +405,12 @@

-

#include <brawcap.h>

+

#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.

-
Note
Currently only the BRAWCAP_FILTER_TYPE_BYTE_MASK filter type is supported. Support for BRAWCAP_FILTER_TYPE_BPF may be added later on.
+

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.

+
Note
Currently only the BRAWCAP_FILTER_TYPE_BYTE_MASK filter type is supported. Support for BRAWCAP_FILTER_TYPE_BPF may be added later on.
Parameters

brawcap_status_t brawcap_filter_create brawcap_status_t brawcap_filter_create (brawcap_filter_t **const brawcap_filter_t **const  pFilter,
const brawcap_filter_type_t const brawcap_filter_type_t  type 
@@ -422,16 +422,16 @@

- + - + - + - +
[in]pFilterWill contain the new created filter.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_NOT_AVAILABLE Specified filter type is not supported.
BRAWCAP_STATUS_ERROR_FAILED System error occurred (e.g. out of memory).
BRAWCAP_STATUS_ERROR_FAILED System error occurred (e.g. out of memory).
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.

@@ -443,16 +443,16 @@

- + - +
brawcap_status_t brawcap_filter_free brawcap_status_t brawcap_filter_free (brawcap_filter_tbrawcap_filter_t pFilter)
-

#include <brawcap.h>

+

#include <brawcap.h>

Frees the specified filter. When this function is called the given filter becomes invalid and it´s memory will be released.

Warning
Freeing a filter is not thread safe and the user is responsible for synchronization.
@@ -466,12 +466,12 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. -
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.

@@ -483,15 +483,15 @@

- + - + - + @@ -502,7 +502,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the type for the specified filter.

Parameters
@@ -516,9 +516,9 @@

- + - +
brawcap_status_t brawcap_filter_type_get brawcap_status_t brawcap_filter_type_get (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
brawcap_filter_type_t *const brawcap_filter_type_t *const  pType 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -531,33 +531,33 @@

- + - + - + - + - + - + @@ -568,15 +568,15 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the filter parameters for the specified filter.

-
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
+
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
Parameters

brawcap_status_t brawcap_filter_mask_set brawcap_status_t brawcap_filter_mask_set (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
const brawcap_filter_byte_length_t const brawcap_filter_byte_length_t  offset,
const brawcap_filter_byte_length_t const brawcap_filter_byte_length_t  length,
const brawcap_filter_mask_array_t const brawcap_filter_mask_array_t  mask,
const brawcap_filter_ignore_bits_array_t const brawcap_filter_ignore_bits_array_t  ignoreBits 
- +
[in]pFilterThe filter to be modified.
[in]offsetByte offset of the filter. This value specifies at which packet byte offset the first filter byte shall be applied.
[in]lengthByte length of the filter. Specifies the number of bytes used by the filter. This value is limited to BRAWCAP_FILTER_BYTE_MAX_LENGTH.
[in]lengthByte length of the filter. Specifies the number of bytes used by the filter. This value is limited to BRAWCAP_FILTER_BYTE_MAX_LENGTH.
[in]maskThe 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]ignoreBitsA 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.
@@ -586,16 +586,16 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid. +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_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_ERROR_PARAM_OUT_OF_RANGE Specified offset+length exceeds BRAWCAP_FILTER_BYTE_MAX_LENGTH. -
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -607,33 +607,33 @@

- + - + - + - + - + - + @@ -644,7 +644,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the filter mask parameters for the specified filter.

Parameters
@@ -661,11 +661,11 @@

- + - + - +
brawcap_status_t brawcap_filter_mask_get brawcap_status_t brawcap_filter_mask_get (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
brawcap_filter_byte_length_t *const brawcap_filter_byte_length_t *const  pOffset,
brawcap_filter_byte_length_t *const brawcap_filter_byte_length_t *const  pLength,
brawcap_filter_mask_array_t *const brawcap_filter_mask_array_t *const  pMask,
brawcap_filter_ignore_bits_array_t *const brawcap_filter_ignore_bits_array_t *const  pIgnoreBits 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_INVALID_PARAM Specified filter is not of type BRAWCAP_FILTER_TYPE_BYTE_MASK.

@@ -678,19 +678,19 @@

- + - +
brawcap_status_t brawcap_filter_activate brawcap_status_t brawcap_filter_activate (brawcap_filter_t *const brawcap_filter_t *const  pFilter)
-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the specified filter to active.

-
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
+
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
Parameters
@@ -701,12 +701,12 @@

- + - +
[in]pFilterThe filter to be modified.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -718,19 +718,19 @@

- + - +
brawcap_status_t brawcap_filter_deactivate brawcap_status_t brawcap_filter_deactivate (brawcap_filter_t *const brawcap_filter_t *const  pFilter)
-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the specified filter to inactive.

-
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
+
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
Parameters
@@ -741,9 +741,9 @@

- + - +
[in]pFilterThe filter to be modified.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -756,9 +756,9 @@

- + - + @@ -775,7 +775,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current activation state of the specified filter.

Parameters
@@ -789,9 +789,9 @@

- + - +
brawcap_status_t brawcap_filter_is_activated brawcap_status_t brawcap_filter_is_activated (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -804,21 +804,21 @@

- + - + - + - + @@ -829,10 +829,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Sets the bytes to capture of the specified filter.

-
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
+
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
Parameters

brawcap_status_t brawcap_filter_bytes_to_capture_set brawcap_status_t brawcap_filter_bytes_to_capture_set (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
const brawcap_packet_size_t const brawcap_packet_size_t  offset,
const brawcap_packet_size_t const brawcap_packet_size_t  length 
@@ -845,11 +845,11 @@

- + - + - +
[in]pFilterThe filter to be modified.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_ERROR_PARAM_OUT_OF_RANGE Specified offset+length exceeds BRAWCAP_PACKET_SIZE_MAX.
@@ -862,21 +862,21 @@

- + - + - + - + @@ -887,7 +887,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the configured bytes to capture of the specified filter.

Parameters
@@ -902,9 +902,9 @@

- + - +
brawcap_status_t brawcap_filter_bytes_to_capture_get brawcap_status_t brawcap_filter_bytes_to_capture_get (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pOffset,
brawcap_packet_size_t *const brawcap_packet_size_t *const  pLength 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
@@ -917,9 +917,9 @@

- + - + @@ -936,10 +936,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Specifies if packets which matched the specified filter should be indicated to the network stack.

-
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
+
Note
Changes will only effect after applying the modified filter to a handle with brawcap_rx_filter_set.
Parameters

brawcap_status_t brawcap_filter_indicate_set brawcap_status_t brawcap_filter_indicate_set (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
@@ -951,12 +951,12 @@

- + - +
[in]pFilterThe filter to be modified.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.

@@ -968,9 +968,9 @@

- + - + @@ -987,7 +987,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the current network stack indication state of the specified filter.

Parameters
@@ -1001,9 +1001,9 @@

- + - +
brawcap_status_t brawcap_filter_indicate_get brawcap_status_t brawcap_filter_indicate_get (brawcap_filter_t *const brawcap_filter_t *const  pFilter,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
diff --git a/group__brawcap__transmit.html b/a00057.html similarity index 56% rename from group__brawcap__transmit.html rename to a00057.html index 5fa3383..c84c3fd 100644 --- a/group__brawcap__transmit.html +++ b/a00057.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -131,43 +131,43 @@  Maximum size in number of packets supported for driver transmit queues.
 
-#define BRAWCAP_TX_TIMESTAMP_MODE_DEFAULT   BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP +#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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
 
@@ -181,20 +181,20 @@

- +
typedef void(* brawcap_tx_callback_t) (brawcap_handle_t *const pHandle, const brawcap_status_t status, brawcap_buffer_t *const pBuffer, void *pUser)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>

+

#include <brawcap_types_um.h>

-

Transmit callback which is called each time a transmission initiated with brawcap_tx_buffer_send has finished.

-
Note
Before any buffer can be transmitted the tranmission has to be started with brawcap_tx_start and stopped with brawcap_tx_stop.
+

Transmit callback which is called each time a transmission initiated with brawcap_tx_buffer_send has finished.

+
Note
Before any buffer can be transmitted the tranmission has to be started with brawcap_tx_start and stopped with brawcap_tx_stop.
Parameters
- - + +
[in]pHandleHandle on which the transmission has finished.
[in]statusThe overall transmission status see brawcap_status_t for possible return values.
[in]pBufferPointer 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]statusThe overall transmission status see brawcap_status_t for possible return values.
[in]pBufferPointer 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]pUserPointer to a user defined context (allows access to user specific data within the callback).
@@ -210,15 +210,15 @@

- + - + - + @@ -229,13 +229,13 @@

-

#include <brawcap.h>

+

#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.

+

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.

+

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.

Parameters

brawcap_status_t brawcap_tx_packet brawcap_status_t brawcap_tx_packet (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_packet_t *const brawcap_packet_t *const  pPacket 
@@ -247,17 +247,17 @@

- + - + - + - + - + - +
[in]pHandlebRAWcap handle to transmit on.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_WARNING_DEMO_MODE Running in demo mode (no license).
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
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_WARNING_NOT_ALL_PROCESSED The transmission failed (or payload was not fully transmitted).

@@ -270,15 +270,15 @@

- + - + - + @@ -295,18 +295,18 @@

-

#include <brawcap.h>

+

#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.

+

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.

+

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).

-
Note
The buffers are transmitted in the same order they have been added by the user application with brawcap_tx_buffer_send.
+
Note
The buffers are transmitted in the same order they have been added by the user application with brawcap_tx_buffer_send.
Invariant
The user parameter allows access to user defined context. The given pointer is not used and validated by bRAWcap. Therefore the user is responsible for validating the context in the callback before accessing it.
-
Attention
After starting transmission, brawcap_tx_packet can not be used - on this handle - until tranmission is stopped with brawcap_tx_stop, because parallel transmissions are not allowed
+
Attention
After starting transmission, brawcap_tx_packet can not be used - on this handle - until tranmission is stopped with brawcap_tx_stop, because parallel transmissions are not allowed
Parameters

brawcap_status_t brawcap_tx_start brawcap_status_t brawcap_tx_start (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_tx_callback_t const brawcap_tx_callback_t const  callback,
@@ -319,11 +319,11 @@

- + - + - +
[in]pHandlebRAWcap handle to transmit on.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_WARNING_PENDING Another transmit is pending or transmission is already started.
@@ -336,16 +336,16 @@

- + - +
brawcap_status_t brawcap_tx_stop brawcap_status_t brawcap_tx_stop (brawcap_handle_t *const brawcap_handle_t *const  pHandle)

-

#include <brawcap.h>

+

#include <brawcap.h>

Stops the internal transmit loop.

Parameters
@@ -358,11 +358,11 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid. +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_INFO_NOT_RUNNING There was no transmission running.

@@ -375,15 +375,15 @@

- + - + - + @@ -400,10 +400,10 @@

-

#include <brawcap.h>

+

#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).

+

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.

Attention
For synchronized transmission it is necessary to sort the packets in the buffer by rising timestamp. Furthermore, it is currently not supported to specify a "start time" when the first packet should be transmitted. Therefore if you want to start transmission depending on the first packet timestamp you should wait until the time is reached and after this initiate the transmission by calling this function. The driver itself only evaluates the time gaps between each packet in the buffer.
Note
Packet buffers are transmitted in the same order they was pushed to the handle.
@@ -420,11 +420,11 @@

- + - + - +
brawcap_status_t brawcap_tx_buffer_send brawcap_status_t brawcap_tx_buffer_send (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_buffer_t *const brawcap_buffer_t *const  pBuffer,
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_ERROR_IN_USE The buffer is already in use / locked down by another operation.
@@ -437,15 +437,15 @@

- + - + - + @@ -456,15 +456,15 @@

-

#include <brawcap.h>

+

#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.

Note
The default queue size is
-
See also
BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets). And its max limitation is
+
See also
BRAWCAP_TX_DRIVER_QUEUE_SIZE_DEFAULT (in number of packets). And its max limitation is
-BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
+BRAWCAP_TX_DRIVER_QUEUE_SIZE_MAX (in number of packets).
Attention
Reducing the queue size during runtime may result in packet transmission cancellation. This may be the case if there are more packets pending for transmission than the new size can accommodate.
Parameters

brawcap_status_t brawcap_tx_driver_queue_size_set brawcap_status_t brawcap_tx_driver_queue_size_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_queue_size_t const brawcap_queue_size_t  size 
@@ -477,13 +477,13 @@

- + - + - + - +
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -496,15 +496,15 @@

- + - + - + @@ -515,7 +515,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured driver transmit queue size for the specified handle.

Parameters
@@ -529,9 +529,9 @@

- + - +
brawcap_status_t brawcap_tx_driver_queue_size_get brawcap_status_t brawcap_tx_driver_queue_size_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_queue_size_t *const brawcap_queue_size_t *const  pSize 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
@@ -544,15 +544,15 @@

- + - + - + @@ -563,7 +563,7 @@

-

#include <brawcap.h>

+

#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".

@@ -578,11 +578,11 @@

- + - + - +
brawcap_status_t brawcap_tx_timestamp_capabilities brawcap_status_t brawcap_tx_timestamp_capabilities (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_timestamp_capabilities_t *const brawcap_timestamp_capabilities_t *const  pCapabilities 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -595,15 +595,15 @@

- + - + - + @@ -614,10 +614,10 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Configures the used transmit time stamping mode for the specified handle.

-
Note
Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported before setting it. To check if a timestamp mode is available use brawcap_tx_timestamp_capabilities.
+
Note
Only available timestamp modes are accepted. It is recommended to check if a timestamp mode is supported before setting it. To check if a timestamp mode is available use brawcap_tx_timestamp_capabilities.
Parameters

brawcap_status_t brawcap_tx_timestamp_mode_set brawcap_status_t brawcap_tx_timestamp_mode_set (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
const brawcap_timestamp_mode_t const brawcap_timestamp_mode_t  mode 
@@ -629,13 +629,13 @@

- + - + - + - +
[in]pHandlebRAWcap handle to be configured.
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_NOT_AVAILABLE Specified timestamp mode not available.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
BRAWCAP_STATUS_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
@@ -648,15 +648,15 @@

- + - + - + @@ -667,7 +667,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the currently configured transmit time stamping mode for the specified handle.

Parameters
@@ -681,9 +681,9 @@

- + - +
brawcap_status_t brawcap_tx_timestamp_mode_get brawcap_status_t brawcap_tx_timestamp_mode_get (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_timestamp_mode_t *const brawcap_timestamp_mode_t *const  pMode 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
diff --git a/group__brawcap__stats.html b/a00058.html similarity index 69% rename from group__brawcap__stats.html rename to a00058.html index 6d99da0..a176f6a 100644 --- a/group__brawcap__stats.html +++ b/a00058.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -119,84 +119,84 @@ - - - - - - - - - + + + + + + + + +

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...
 
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...
 
- + - + - + - + - + - + +#define  +#define 

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.
 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.
 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.
 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.
 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.
 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.
 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)
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)
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 +
enum  brawcap_stats_type_t {
+  BRAWCAP_STATS_TYPE_RX = 1 ,
-  BRAWCAP_STATS_TYPE_TX = 2 +  BRAWCAP_STATS_TYPE_TX = 2
}
 List of all available statistic types. More...
 List of all available statistic types. More...
 
enum  brawcap_stats_rx_revision_t { BRAWCAP_STATS_RX_REVISION_1 = 1 +
enum  brawcap_stats_rx_revision_t { BRAWCAP_STATS_RX_REVISION_1 = 1 }
 List of all available receive statistic revisions. More...
 List of all available receive statistic revisions. More...
 
enum  brawcap_stats_tx_revision_t { BRAWCAP_STATS_TX_REVISION_1 = 1 +
enum  brawcap_stats_tx_revision_t { BRAWCAP_STATS_TX_REVISION_1 = 1 }
 List of all available transmit statistic revisions. More...
 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)
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)
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.
 

Detailed Description

Types and functions for bRAWcap statistics.


Data Structure Documentation

- -

◆ brawcap_stats_header_t

+ +

◆ brawcap_stats_header_t

@@ -233,8 +233,8 @@

-

◆ brawcap_stats_rx_t

+ +

◆ brawcap_stats_rx_t

@@ -246,20 +246,20 @@

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:

+brawcap_stats_header_t @@ -365,8 +365,8 @@

-

◆ brawcap_stats_tx_t

+ +

◆ brawcap_stats_tx_t

@@ -378,18 +378,18 @@

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:

Data Fields
-brawcap_stats_header_t header @@ -275,21 +275,21 @@

adapterReceivedPacketsTotal

-Total number of received packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of received packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_RECEIVED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64 adapterReceivedBytesTotal -Total number of received bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of received bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_RECEIVED_BYTES_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64 adapterDroppedPacketsTotal -Total number of received bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of received bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64
+brawcap_stats_header_t @@ -523,12 +523,12 @@

Data Fields
-brawcap_stats_header_t header @@ -405,21 +405,21 @@

adapterCompletedPacketsTotal

-Total number of (completed) transmitted packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of (completed) transmitted packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_COMPLETED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64 adapterCompletedBytesTotal -Total number of (completed) transmitted bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of (completed) transmitted bytes by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_COMPLETED_BYTES_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64 adapterCanceledPacketsTotal -Total number of canceled transmitted packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
+Total number of canceled transmitted packets by the underlying network adapter.
Note
You should check if the network adapter supports this counter with BRAWCAP_STATS_TX_ADAPTER_CANCELED_PACKETS_TOTAL_VALID. If the counter is not supported it will be always zero.
UINT64
- +
enum brawcap_stats_type_tenum brawcap_stats_type_t

-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

List of all available statistic types.

@@ -547,12 +547,12 @@

- +
enum brawcap_stats_rx_revision_tenum brawcap_stats_rx_revision_t
-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

List of all available receive statistic revisions.

@@ -569,12 +569,12 @@

- +
enum brawcap_stats_tx_revision_tenum brawcap_stats_tx_revision_t
-

#include <brawcap_types_shared.h>

+

#include <brawcap_types_shared.h>

List of all available transmit statistic revisions.

@@ -592,15 +592,15 @@

- + - + - + @@ -611,7 +611,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the available receive statistic counters for the specified handle.

Parameters
@@ -625,18 +625,18 @@

- + - + - + - + - +
brawcap_status_t brawcap_stats_rx brawcap_status_t brawcap_stats_rx (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_stats_rx_t *const brawcap_stats_rx_t *const  pStats 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_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_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
-
Examples
06_filter_firewall.c.
+
Examples
06_filter_firewall.c.
@@ -648,15 +648,15 @@

- + - + - + @@ -667,7 +667,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads out the available transmit statistic counters for the specified handle.

Parameters
@@ -681,15 +681,15 @@

- + - + - + - + - +
brawcap_status_t brawcap_stats_tx brawcap_status_t brawcap_stats_tx (brawcap_handle_t *const brawcap_handle_t *const  pHandle,
brawcap_stats_tx_t *const brawcap_stats_tx_t *const  pStats 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the given pointer parameters was invalid.
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_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_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_ERROR_DRIVER_IO_FAILED Communicating with bRAWcap driver failed.
diff --git a/group__brawcap__lib.html b/a00059.html similarity index 99% rename from group__brawcap__lib.html rename to a00059.html index 51a4271..b8fd686 100644 --- a/group__brawcap__lib.html +++ b/a00059.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
diff --git a/group__brawcap__logging.html b/a00060.html similarity index 61% rename from group__brawcap__logging.html rename to a00060.html index 9985815..1856bd6 100644 --- a/group__brawcap__logging.html +++ b/a00060.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -117,41 +117,46 @@ - - + - - +

Enumerations

enum  brawcap_log_level_t {
-  BRAWCAP_LOG_LEVEL_DEBUG = 0x01 +
enum  brawcap_log_level_t {
+  BRAWCAP_LOG_LEVEL_DEBUG = 0x01 ,
-  BRAWCAP_LOG_LEVEL_VERBOSE = 0x02 +  BRAWCAP_LOG_LEVEL_VERBOSE = 0x02 ,
-  BRAWCAP_LOG_LEVEL_NOTICE = 0x04 +  BRAWCAP_LOG_LEVEL_NOTICE = 0x04 ,
-  BRAWCAP_LOG_LEVEL_WARNING = 0x08 +  BRAWCAP_LOG_LEVEL_WARNING = 0x08 ,
-  BRAWCAP_LOG_LEVEL_ERROR = 0x10 +  BRAWCAP_LOG_LEVEL_ERROR = 0x10
}
 List of bRAWcap log levels. More...
 List of bRAWcap log levels. More...
 
enum  brawcap_log_type_t {
-  BRAWCAP_LOG_TYPE_GENERIC = 0x00 +
enum  brawcap_log_type_t {
+  BRAWCAP_LOG_TYPE_GENERIC = 0x01 ,
-  BRAWCAP_LOG_TYPE_ADAPTER = 0x01 +  BRAWCAP_LOG_TYPE_ADAPTER = 0x02 ,
-  BRAWCAP_LOG_TYPE_RECEIVE = 0x02 +  BRAWCAP_LOG_TYPE_RECEIVE = 0x04 ,
-  BRAWCAP_LOG_TYPE_TRANSMIT = 0x04 +  BRAWCAP_LOG_TYPE_TRANSMIT = 0x08 ,
-  BRAWCAP_LOG_TYPE_LICENSE = 0x08 +  BRAWCAP_LOG_TYPE_LICENSE = 0x10 +,
+  BRAWCAP_LOG_TYPE_ALL = 0xFFFF
}
 List of bRAWcap log types. More...
 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(s) for the given log type(s) to the specified log level(s).
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_level_get (const brawcap_log_type_t type, brawcap_log_level_t *const pLevel)
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.
 
@@ -168,12 +173,12 @@

- +
enum brawcap_log_level_tenum brawcap_log_level_t

-

#include <brawcap_types_um.h>

+

#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.

@@ -204,12 +209,12 @@

- +
enum brawcap_log_type_tenum brawcap_log_type_t

+ +

#include <brawcap.h>

+ +

Sets the current log level for the given log type to the specified log level.

+
Parameters
+ + + + +
[in]typeLog type for which to configure the log level.
[in]levelThe log level to be applied.
[in]pKeyKey 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.
+
+
+
Returns
+ + + + + + + + +
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_log_levels_set()

+ +
+
+ + + - + - + @@ -261,14 +323,14 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

-

Sets the current log level(s) for the given log type(s) to the specified log level(s).

+

Sets the current log levels for the given log types to the specified log levels.

Parameters

brawcap_status_t brawcap_log_levels_set (const brawcap_log_type_t const UINT32  type,
const brawcap_log_level_t const UINT32  level,
- - - + + +
[in]typeLog type(s) 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]levelThe log level to be applied. Value has to be interpreted as bitfield. This allows to (de)activate several levels with only one call.
[in]pKeyKey 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.
[in]typeLog 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]levelThe log levels to be applied. Value has to be interpreted as bitfield. This allows to (de)activate several levels with only one call.
[in]pKeyKey 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.
@@ -276,11 +338,11 @@

Status Description -BRAWCAP_STATUS_SUCCESS Success. +BRAWCAP_STATUS_SUCCESS Success. -BRAWCAP_STATUS_ERROR_NOT_AVAILABLE Attempted to enable debug logging with wrong key. +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_ERROR_INVALID_PARAM None of the specified log types is available. @@ -293,15 +355,15 @@

- + - + - + @@ -312,7 +374,7 @@

-

#include <brawcap.h>

+

#include <brawcap.h>

Reads the level(s) for the given log type.

Parameters
@@ -326,11 +388,11 @@

- + - + - +
brawcap_status_t brawcap_log_level_get brawcap_status_t brawcap_log_level_get (const brawcap_log_type_t const brawcap_log_type_t  type,
brawcap_log_level_t *const brawcap_log_level_t *const  pLevel 
Status Description
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_SUCCESS Success.
BRAWCAP_STATUS_ERROR_INVALID_POINTER At least one of the pointer parameters was invalid.
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_STATUS_ERROR_INVALID_PARAM The specified log types is invalid.
diff --git a/03_generic_handle_opener_8c-example.html b/a00918.html similarity index 71% rename from 03_generic_handle_opener_8c-example.html rename to a00918.html index c4fcc0d..7137b45 100644 --- a/03_generic_handle_opener_8c-example.html +++ b/a00918.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,7 +108,7 @@
03_generic_handle_opener.c
-

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.

+

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.

1/**
2 * @file 03_generic_handle_opener.c
3 *
@@ -136,7 +136,7 @@
25 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
26 */
27// Include bRAWcap
-
28#include "libbrawcap.h"
+
28#include "libbrawcap.h"
29
30// C STD
31#include <stdlib.h> // for malloc & free
@@ -147,33 +147,33 @@
36 // Set console title
37 SetConsoleTitleA("bRAWcap Example - Handle Opener");
38
-
39 brawcap_handle_t** pHandleArray = 0;
-
40 brawcap_adapter_count_t numberAdapters = 0;
- +
39 brawcap_handle_t** pHandleArray = 0;
+
40 brawcap_adapter_count_t numberAdapters = 0;
+
42
43 do
44 {
45#if 1 // Get number of available adapters
-
46 status = brawcap_adapter_list_count(&numberAdapters);
-
47 if(!BRAWCAP_SUCCESS(status))
+
46 status = brawcap_adapter_list_count(&numberAdapters);
+
47 if(!BRAWCAP_SUCCESS(status))
48 break;
49#endif
50
51#if 1 // Allocate array for storing opened bRAWcap handles
-
52 pHandleArray = (brawcap_handle_t**) calloc(numberAdapters, sizeof(brawcap_handle_t*));
+
52 pHandleArray = (brawcap_handle_t**) calloc(numberAdapters, sizeof(brawcap_handle_t*));
53 memset(pHandleArray, 0, numberAdapters);
54#endif
55
56#if 1 // Get name for each available adapter and try to open a bRAWcap handle
57 for(int index = 0; index < numberAdapters; ++index)
58 {
-
59 brawcap_adapter_name_t name = { '\0'};
-
60 status = brawcap_adapter_list_at(index, name);
-
61 if(!BRAWCAP_SUCCESS(status))
+
59 brawcap_adapter_name_t name = { '\0'};
+
60 status = brawcap_adapter_list_at(index, name);
+
61 if(!BRAWCAP_SUCCESS(status))
62 break;
63
-
64 status = brawcap_open(name, &pHandleArray[index]);
-
65 if(!BRAWCAP_SUCCESS(status))
+
64 status = brawcap_open(name, &pHandleArray[index]);
+
65 if(!BRAWCAP_SUCCESS(status))
66 break;
67
68 printf("%02d. bRAWcap handle (%p) opened to %s.\n", index + 1, pHandleArray[index], name);
@@ -188,7 +188,7 @@
77 {
78 if (pHandleArray[index])
79 {
-
80 status = brawcap_close(pHandleArray[index]);
+
80 status = brawcap_close(pHandleArray[index]);
81 printf("%02d. bRAWcap handle (%p) closed.\n", index + 1, pHandleArray[index]);
82 }
83 }
@@ -199,27 +199,27 @@
88 // If anything unexpected was returned,
89 // request the status again and print it to console.
90#if 1
-
91 if(!BRAWCAP_SUCCESS(status))
+
91 if(!BRAWCAP_SUCCESS(status))
92 {
-
93 printf("Unexpected status occurred: %d", brawcap_last_status());
+
93 printf("Unexpected status occurred: %d", brawcap_last_status());
94 return -1;
95 }
96#endif
97
98 return 0;
99}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
bRAWcap main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
diff --git a/04_version_comparator_8c-example.html b/a00919.html similarity index 57% rename from 04_version_comparator_8c-example.html rename to a00919.html index a7ef82d..831fbac 100644 --- a/04_version_comparator_8c-example.html +++ b/a00919.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -136,7 +136,7 @@
25 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
26 */
27// Include bRAWcap
-
28#include "libbrawcap.h"
+
28#include "libbrawcap.h"
29
30// C STD
31#include <stdio.h> // for printf
@@ -146,76 +146,76 @@
35 // Set console title
36 SetConsoleTitleA("bRAWcap Example - Version Comparator");
37
- -
39 brawcap_adapter_count_t numberAdapters = 0;
-
40 brawcap_version_t apiVersion = {0};
-
41 brawcap_version_t driverVersion = {0};
+ +
39 brawcap_adapter_count_t numberAdapters = 0;
+
40 brawcap_version_t apiVersion = {0};
+
41 brawcap_version_t driverVersion = {0};
42
-
43 status = brawcap_version_api(&apiVersion);
-
44 if(!BRAWCAP_SUCCESS(status))
+
43 status = brawcap_version_api(&apiVersion);
+
44 if(!BRAWCAP_SUCCESS(status))
45 printf("Unexpected status (%d) while reading API(/library) version.\n", status);
46 else
-
47 printf("Loaded library/API version is: %u.%u.%u.%u\n", apiVersion.fragments.major, apiVersion.fragments.minor,
-
48 apiVersion.fragments.patch, apiVersion.fragments.build);
+
47 printf("Loaded library/API version is: %u.%u.%u.%u\n", apiVersion.fragments.major, apiVersion.fragments.minor,
+
48 apiVersion.fragments.patch, apiVersion.fragments.build);
49
-
50 status = brawcap_adapter_list_count(&numberAdapters);
-
51 if(!BRAWCAP_SUCCESS(status))
+
50 status = brawcap_adapter_list_count(&numberAdapters);
+
51 if(!BRAWCAP_SUCCESS(status))
52 printf("Unexpected status (%d) while reading number of available adapters.\n", status);
53 else if(!numberAdapters)
54 printf("No adapter available to read driver version.\n");
55 else
56 {
-
57 brawcap_adapter_name_t name = { '\0' };
-
58 status = brawcap_adapter_list_at(0, name);
-
59 if(!BRAWCAP_SUCCESS(status))
+
57 brawcap_adapter_name_t name = { '\0' };
+
58 status = brawcap_adapter_list_at(0, name);
+
59 if(!BRAWCAP_SUCCESS(status))
60 printf("Unexpected status (%d) while reading adapter name.", status);
61 else
62 {
-
63 brawcap_handle_t* handle = 0;
-
64 status = brawcap_open(name, &handle);
-
65 if(!BRAWCAP_SUCCESS(status))
+
63 brawcap_handle_t* handle = 0;
+
64 status = brawcap_open(name, &handle);
+
65 if(!BRAWCAP_SUCCESS(status))
66 printf("Unexpected status (%d) while handle opening.", status);
67 else
68 {
-
69 status = brawcap_version_driver(handle, &driverVersion);
-
70 if(!BRAWCAP_SUCCESS(status))
+
69 status = brawcap_version_driver(handle, &driverVersion);
+
70 if(!BRAWCAP_SUCCESS(status))
71 printf("Unexpected status (%d) while reading driver version.\n", status);
72 else
73 {
-
74 printf("Loaded driver version is: %u.%u.%u.%u\n", driverVersion.fragments.major,
-
75 driverVersion.fragments.minor, driverVersion.fragments.patch, driverVersion.fragments.build);
+
74 printf("Loaded driver version is: %u.%u.%u.%u\n", driverVersion.fragments.major,
+
75 driverVersion.fragments.minor, driverVersion.fragments.patch, driverVersion.fragments.build);
76
-
77 if(driverVersion.complete == apiVersion.complete)
+
77 if(driverVersion.complete == apiVersion.complete)
78 printf("Driver and API version MATCH. :-)\n");
79 else
80 printf("Driver and API version does NOT MATCH. :-(\n");
81 }
-
82 brawcap_close(handle);
+
82 brawcap_close(handle);
83 }
84 }
85 }
86 return 0;
87}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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 status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
UINT16 minor
Minor version.
Definition: brawcap_types_shared.h:407
-
UINT16 major
Major version.
Definition: brawcap_types_shared.h:416
-
UINT16 patch
Patch version.
Definition: brawcap_types_shared.h:399
-
UINT16 build
Build version.
Definition: brawcap_types_shared.h:390
-
UINT64 complete
Definition: brawcap_types_shared.h:428
-
brawcap_version_fragments_t fragments
Definition: brawcap_types_shared.h:427
-
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 version.
Definition: brawcap_types_shared.h:426
-
bRAWcap main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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 status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
bRAWcap version.
Definition: brawcap_types_shared.h:426
+
UINT16 minor
Minor version.
Definition: brawcap_types_shared.h:407
+
UINT16 major
Major version.
Definition: brawcap_types_shared.h:416
+
UINT16 patch
Patch version.
Definition: brawcap_types_shared.h:399
+
UINT16 build
Build version.
Definition: brawcap_types_shared.h:390
+
UINT64 complete
Definition: brawcap_types_shared.h:428
+
brawcap_version_fragments_t fragments
Definition: brawcap_types_shared.h:427
+
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_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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242

diff --git a/01_adapter_property_reader_8c-example.html b/a00920.html similarity index 56% rename from 01_adapter_property_reader_8c-example.html rename to a00920.html index fae912c..6663cbd 100644 --- a/01_adapter_property_reader_8c-example.html +++ b/a00920.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -139,7 +139,7 @@
27 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
28 */
29// Include bRAWcap
-
30#include "libbrawcap.h"
+
30#include "libbrawcap.h"
31
32// C STD
33#include <stdlib.h> // for malloc & free
@@ -150,7 +150,7 @@
38 // Set console title
39 SetConsoleTitleA("bRAWcap Example - Adapter Property Reader");
40
- +
42
43 // Encapsulate all in a single loop.
44 // This allow breaking execution if something unexpected happens.
@@ -158,14 +158,14 @@
46 {
47#if 1 // Update list of available adapters
48 // NOTE: The list is initialized during loading/initializing bRAWcap.
- -
50 if(!BRAWCAP_SUCCESS(status))
+ +
50 if(!BRAWCAP_SUCCESS(status))
51 break;
52#endif
53#if 1 // Get number of currently available adapters
-
54 brawcap_adapter_count_t adapterCount = 0;
-
55 status = brawcap_adapter_list_count(&adapterCount);
-
56 if(!BRAWCAP_SUCCESS(status))
+
54 brawcap_adapter_count_t adapterCount = 0;
+
55 status = brawcap_adapter_list_count(&adapterCount);
+
56 if(!BRAWCAP_SUCCESS(status))
57 break;
58#endif
59#if 1 // Now loop through each entry of the list.
@@ -173,25 +173,25 @@
61 for(unsigned int index = 0; index < adapterCount; ++index)
62 {
63#if 1 // Get adapter name from list
-
64 brawcap_adapter_name_t name = {'\0'};
-
65 status = brawcap_adapter_list_at(index, name);
-
66 if(!BRAWCAP_SUCCESS(status))
+
64 brawcap_adapter_name_t name = {'\0'};
+
65 status = brawcap_adapter_list_at(index, name);
+
66 if(!BRAWCAP_SUCCESS(status))
67 break;
68 printf("%02u. Adapter - Name: %s ", index + 1, name);
69#endif
70#if 1 // Resolve adapter friendly name by using it´s name
71 UINT32 friendlyNameLength = 0;
72 char* friendlyName = NULL;
-
73 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
+
73 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
74 // We expect this return value because our buffer is not yet initialized (zero).
75 // If we use the function like this, it will inform us of the required this by setting friendlyNameLength.
- +
77 {
78 // friendlyNameLength is set to the required length, so lets use it to create the buffer
79 friendlyName = malloc(friendlyNameLength);
80 // Now call the function again with a valid buffer
-
81 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
-
82 if(!BRAWCAP_SUCCESS(status))
+
81 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
+
82 if(!BRAWCAP_SUCCESS(status))
83 break;
84 }
85 else
@@ -201,15 +201,15 @@
89#if 1 // Resolve adapter description by using it´s name
90 UINT32 descriptionLength = 0;
91 char* description = NULL;
-
92 status = brawcap_adapter_description(name, description, &descriptionLength);
+
92 status = brawcap_adapter_description(name, description, &descriptionLength);
93 // Here we have the same handling like we had for the friendly name...
- +
95 {
96 // friendlyNameLength is set to the required length, so lets use it to create the buffer
97 description = malloc(descriptionLength);
98 // Now call the function again with a valid buffer
-
99 status = brawcap_adapter_description(name, description, &descriptionLength);
-
100 if(!BRAWCAP_SUCCESS(status))
+
99 status = brawcap_adapter_description(name, description, &descriptionLength);
+
100 if(!BRAWCAP_SUCCESS(status))
101 break;
102 }
103 else
@@ -217,70 +217,70 @@
105 printf("Description: %s ", description);
106#endif
107#if 1 // Resolve adapter MAC address by using it´s name
-
108 brawcap_adapter_mac_t mac = {0};
-
109 status = brawcap_adapter_mac(name, mac);
-
110 if (!BRAWCAP_SUCCESS(status))
+
108 brawcap_adapter_mac_t mac = {0};
+
109 status = brawcap_adapter_mac(name, mac);
+
110 if (!BRAWCAP_SUCCESS(status))
111 break;
112 printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X ", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
113#endif
114#if 1 // Resolve adapter operation state by using it´s name
- -
116 status = brawcap_adapter_operation(name, &operationState);
-
117 if(!BRAWCAP_SUCCESS(status))
+ +
116 status = brawcap_adapter_operation(name, &operationState);
+
117 if(!BRAWCAP_SUCCESS(status))
118 break;
119 switch (operationState)
120 {
-
121 case BRAWCAP_ADAPTER_OPERATION_UNKNOWN: printf("Operation: %s ", "Unknown"); break;
-
122 case BRAWCAP_ADAPTER_OPERATION_DOWN: printf("Operation: %s ", "Down"); break;
-
123 case BRAWCAP_ADAPTER_OPERATION_TESTING: printf("Operation: %s ", "Testing"); break;
-
124 case BRAWCAP_ADAPTER_OPERATION_UP: printf("Operation: %s ", "Up"); break;
+
121 case BRAWCAP_ADAPTER_OPERATION_UNKNOWN: printf("Operation: %s ", "Unknown"); break;
+
122 case BRAWCAP_ADAPTER_OPERATION_DOWN: printf("Operation: %s ", "Down"); break;
+
123 case BRAWCAP_ADAPTER_OPERATION_TESTING: printf("Operation: %s ", "Testing"); break;
+
124 case BRAWCAP_ADAPTER_OPERATION_UP: printf("Operation: %s ", "Up"); break;
125 }
126#endif
127#if 1 // Resolve adapter connection state by using it´s name
- -
129 status = brawcap_adapter_connection(name, &connectionState);
-
130 if(!BRAWCAP_SUCCESS(status))
+ +
129 status = brawcap_adapter_connection(name, &connectionState);
+
130 if(!BRAWCAP_SUCCESS(status))
131 break;
132 switch (connectionState)
133 {
-
134 case BRAWCAP_ADAPTER_CONNECTION_UNKNOWN: printf("Connection: %s ", "Unknown"); break;
-
135 case BRAWCAP_ADAPTER_CONNECTION_DOWN: printf("Connection: %s ", "Down"); break;
-
136 case BRAWCAP_ADAPTER_CONNECTION_UP: printf("Connection: %s ", "Up"); break;
+
134 case BRAWCAP_ADAPTER_CONNECTION_UNKNOWN: printf("Connection: %s ", "Unknown"); break;
+
135 case BRAWCAP_ADAPTER_CONNECTION_DOWN: printf("Connection: %s ", "Down"); break;
+
136 case BRAWCAP_ADAPTER_CONNECTION_UP: printf("Connection: %s ", "Up"); break;
137 }
138#endif
139#if 1 // Resolve adapter IPv4 address by using it´s name
-
140 brawcap_adapter_ipv4_t ipv4 = {0};
-
141 status = brawcap_adapter_ipv4(name, &ipv4);
-
142 if(!BRAWCAP_SUCCESS(status))
+
140 brawcap_adapter_ipv4_t ipv4 = {0};
+
141 status = brawcap_adapter_ipv4(name, &ipv4);
+
142 if(!BRAWCAP_SUCCESS(status))
143 break;
-
144 printf("IPv4: %u.%u.%u.%u ", ipv4.bytes[0], ipv4.bytes[1], ipv4.bytes[2], ipv4.bytes[3]);
+
144 printf("IPv4: %u.%u.%u.%u ", ipv4.bytes[0], ipv4.bytes[1], ipv4.bytes[2], ipv4.bytes[3]);
145#endif
146#if 1 // Resolve adapter IPv6 address by using it´s name
-
147 brawcap_adapter_ipv6_t ipv6 = {0};
-
148 status = brawcap_adapter_ipv6(name, &ipv6);
-
149 if(!BRAWCAP_SUCCESS(status))
+
147 brawcap_adapter_ipv6_t ipv6 = {0};
+
148 status = brawcap_adapter_ipv6(name, &ipv6);
+
149 if(!BRAWCAP_SUCCESS(status))
150 break;
-
151 printf("IPv6: %x:%x:%x:%x:%x:%x:%x:%x ", ipv6.words[0], ipv6.words[1], ipv6.words[2], ipv6.words[3],
-
152 ipv6.words[4], ipv6.words[5], ipv6.words[6], ipv6.words[7]);
+
151 printf("IPv6: %x:%x:%x:%x:%x:%x:%x:%x ", ipv6.words[0], ipv6.words[1], ipv6.words[2], ipv6.words[3],
+
152 ipv6.words[4], ipv6.words[5], ipv6.words[6], ipv6.words[7]);
153#endif
154#if 1 // Resolve adapter max transmission unit (MTU) size by using it´s name
-
155 brawcap_adapter_mtu_t mtu = 0;
-
156 status = brawcap_adapter_mtu(name, &mtu);
-
157 if(!BRAWCAP_SUCCESS(status))
+
155 brawcap_adapter_mtu_t mtu = 0;
+
156 status = brawcap_adapter_mtu(name, &mtu);
+
157 if(!BRAWCAP_SUCCESS(status))
158 break;
159 printf("MTU: %llu ", mtu);
160#endif
161#if 1 // Resolve adapter receive speed (uplink speed) by using it´s name
- -
163 status = brawcap_adapter_speed_rx(name, &rxSpeed);
-
164 if(!BRAWCAP_SUCCESS(status))
+ +
163 status = brawcap_adapter_speed_rx(name, &rxSpeed);
+
164 if(!BRAWCAP_SUCCESS(status))
165 break;
166 printf("RX Speed: %d MBit/s ", rxSpeed);
167#endif
168#if 1 // Resolve adapter transmit speed (uplink speed) by using it´s name
- -
170 status = brawcap_adapter_speed_tx(name, &txSpeed);
-
171 if(!BRAWCAP_SUCCESS(status))
+ +
170 status = brawcap_adapter_speed_tx(name, &txSpeed);
+
171 if(!BRAWCAP_SUCCESS(status))
172 break;
173 printf("TX Speed: %d MBit/s\n\n", txSpeed);
174#endif
@@ -299,50 +299,50 @@
187
188 // We do not handle anything unexpected...
189 // Instead just print the last unexpected status to console and leave.
-
190 if(!BRAWCAP_SUCCESS(status))
+
190 if(!BRAWCAP_SUCCESS(status))
191 {
192 printf("Unexpected status returned: %d\n", status);
193 return -1;
194 }
195 return 0;
196}
-
UINT8 bytes[4]
Definition: brawcap_types_um.h:262
-
UINT16 words[8]
Definition: brawcap_types_um.h:273
-
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_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_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_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_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_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_description(const brawcap_adapter_name_t name, char *const description, UINT32 *const pLength)
Reads out the description of the specified adapter.
-
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:247
-
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:304
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:285
-
brawcap_status_t brawcap_adapter_list_update()
Updates the list of supported adapters. This function searches the current machine for supported adap...
-
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_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:315
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
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.
-
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:335
-
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_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:306
-
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:305
-
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:307
-
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:286
-
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:318
-
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:316
-
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:319
-
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:317
-
IPv4 address.
Definition: brawcap_types_um.h:261
-
IPv6 address.
Definition: brawcap_types_um.h:271
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
-
bRAWcap main header.
+
bRAWcap main header.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
+
IPv4 address.
Definition: brawcap_types_um.h:263
+
IPv6 address.
Definition: brawcap_types_um.h:273
+
UINT8 bytes[4]
Definition: brawcap_types_um.h:264
+
UINT16 words[8]
Definition: brawcap_types_um.h:275
+
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_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_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_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_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_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_description(const brawcap_adapter_name_t name, char *const description, UINT32 *const pLength)
Reads out the description of the specified adapter.
+
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:249
+
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:306
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:287
+
brawcap_status_t brawcap_adapter_list_update()
Updates the list of supported adapters. This function searches the current machine for supported adap...
+
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_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:317
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
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.
+
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:337
+
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_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:308
+
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:307
+
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:309
+
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:288
+
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:320
+
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:318
+
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:321
+
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:319
diff --git a/02_adapter_change_notifier_8c-example.html b/a00921.html similarity index 55% rename from 02_adapter_change_notifier_8c-example.html rename to a00921.html index a47e03b..12d2b7d 100644 --- a/02_adapter_change_notifier_8c-example.html +++ b/a00921.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -139,7 +139,7 @@
27 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
28 */
29// Include bRAWcap
-
30#include "libbrawcap.h"
+
30#include "libbrawcap.h"
31
32// C STD
33#include <stdlib.h> // for malloc & free
@@ -158,14 +158,14 @@
46 }
47}
48
-
49void change_notification_callback(const brawcap_adapter_name_t name, const brawcap_adapter_notify_reason_t reason,
+
49void change_notification_callback(const brawcap_adapter_name_t name, const brawcap_adapter_notify_reason_t reason,
50 const UINT32 properties, void* pUser)
51{
52 // We have entered a user context which points to a notification counter.
53 // To use it we should first of all check if it is valid and if so cast it to the correct type.
54 if(pUser)
55 {
- +
57 int* pNotifyCounter = (int*) pUser;
58 ++(*pNotifyCounter);
59
@@ -175,11 +175,11 @@
63 // In this case it will be "null" instead.
64 char* friendlyName = 0;
65 UINT32 friendlyNameLength = 0;
-
66 if(brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength) == BRAWCAP_STATUS_ERROR_OVERRUN)
+
66 if(brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength) == BRAWCAP_STATUS_ERROR_OVERRUN)
67 {
68 friendlyName = malloc(friendlyNameLength);
-
69 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
-
70 if(status != BRAWCAP_STATUS_SUCCESS)
+
69 status = brawcap_adapter_friendly_name(name, friendlyName, &friendlyNameLength);
+
70 if(status != BRAWCAP_STATUS_SUCCESS)
71 {
72 printf("Could not resolve adapter friendly name (unexpected status: %d)\n", status);
73 free(friendlyName);
@@ -192,96 +192,96 @@
80 switch (reason)
81 {
82#if 1 // The given reason is unknown
- +
84 default:
85 printf("Unknown notification reason.");
86 break;
87#endif
88#if 1 // The specified adapter was added
- +
90 printf("%s (%s) added\n", friendlyName, name);
91 break;
92#endif
93#if 1 // The specified adapter was removed
- +
95 printf("%s (%s) removed\n", friendlyName, name);
96 break;
97#endif
98#if 1 // At least one property of the specified adapter has changed.
- +
100#if 1 // Connection state has changed
- +
102 {
- -
104 brawcap_adapter_connection(name, &connectionState);
+ +
104 brawcap_adapter_connection(name, &connectionState);
105 printf("%s (%s) new connection state: ", friendlyName, name);
106 switch (connectionState)
107 {
-
108 case BRAWCAP_ADAPTER_CONNECTION_UNKNOWN: printf("%s\n", "Unknown"); break;
-
109 case BRAWCAP_ADAPTER_CONNECTION_DOWN: printf("%s\n", "Down"); break;
-
110 case BRAWCAP_ADAPTER_CONNECTION_UP: printf("%s\n", "Up"); break;
+
108 case BRAWCAP_ADAPTER_CONNECTION_UNKNOWN: printf("%s\n", "Unknown"); break;
+
109 case BRAWCAP_ADAPTER_CONNECTION_DOWN: printf("%s\n", "Down"); break;
+
110 case BRAWCAP_ADAPTER_CONNECTION_UP: printf("%s\n", "Up"); break;
111 }
112 }
113#endif
114#if 1 // Friendly name has changed
- +
116 printf("%s new friendly name: %s\n", name, friendlyName);
117#endif
118#if 1 // IPv4 has changed
-
119 if(properties & BRAWCAP_ADAPTER_PROPERTY_IPV4)
+
119 if(properties & BRAWCAP_ADAPTER_PROPERTY_IPV4)
120 {
-
121 brawcap_adapter_ipv4_t ipv4 = {0};
-
122 brawcap_adapter_ipv4(name, &ipv4);
+
121 brawcap_adapter_ipv4_t ipv4 = {0};
+
122 brawcap_adapter_ipv4(name, &ipv4);
123 printf("%s (%s) new IPv4: %u.%u.%u.%u\n", friendlyName, name,
-
124 ipv4.bytes[0], ipv4.bytes[1], ipv4.bytes[2], ipv4.bytes[3]);
+
124 ipv4.bytes[0], ipv4.bytes[1], ipv4.bytes[2], ipv4.bytes[3]);
125 }
126#endif
127#if 1 // IPv6 has changed
-
128 if(properties & BRAWCAP_ADAPTER_PROPERTY_IPV6)
+
128 if(properties & BRAWCAP_ADAPTER_PROPERTY_IPV6)
129 {
-
130 brawcap_adapter_ipv6_t ipv6 = {0};
-
131 brawcap_adapter_ipv6(name, &ipv6);
+
130 brawcap_adapter_ipv6_t ipv6 = {0};
+
131 brawcap_adapter_ipv6(name, &ipv6);
132 printf("%s (%s) new IPv6: %x:%x:%x:%x:%x:%x:%x:%x\n", friendlyName, name,
-
133 ipv6.words[0], ipv6.words[1], ipv6.words[2], ipv6.words[3],
-
134 ipv6.words[4], ipv6.words[5], ipv6.words[6], ipv6.words[7]);
+
133 ipv6.words[0], ipv6.words[1], ipv6.words[2], ipv6.words[3],
+
134 ipv6.words[4], ipv6.words[5], ipv6.words[6], ipv6.words[7]);
135 }
136#endif
137#if 1 // Max transmission unit has changed
-
138 if(properties & BRAWCAP_ADAPTER_PROPERTY_MTU)
+
138 if(properties & BRAWCAP_ADAPTER_PROPERTY_MTU)
139 {
-
140 brawcap_adapter_mtu_t mtu = 0;
-
141 brawcap_adapter_mtu(name, &mtu);
+
140 brawcap_adapter_mtu_t mtu = 0;
+
141 brawcap_adapter_mtu(name, &mtu);
142 printf("%s (%s) new max transmission unit: %llu\n", friendlyName, name, mtu);
143 }
144#endif
145#if 1 // Operation state has changed
- +
147 {
- -
149 brawcap_adapter_operation(name, &operationState);
+ +
149 brawcap_adapter_operation(name, &operationState);
150 printf("%s (%s) new operation state: ", friendlyName, name);
151 switch (operationState)
152 {
-
153 case BRAWCAP_ADAPTER_OPERATION_UNKNOWN: printf("%s\n", "Unknown"); break;
-
154 case BRAWCAP_ADAPTER_OPERATION_DOWN: printf("%s\n", "Down"); break;
-
155 case BRAWCAP_ADAPTER_OPERATION_TESTING: printf("%s\n", "Testing"); break;
-
156 case BRAWCAP_ADAPTER_OPERATION_UP: printf("%s\n", "Up"); break;
+
153 case BRAWCAP_ADAPTER_OPERATION_UNKNOWN: printf("%s\n", "Unknown"); break;
+
154 case BRAWCAP_ADAPTER_OPERATION_DOWN: printf("%s\n", "Down"); break;
+
155 case BRAWCAP_ADAPTER_OPERATION_TESTING: printf("%s\n", "Testing"); break;
+
156 case BRAWCAP_ADAPTER_OPERATION_UP: printf("%s\n", "Up"); break;
157 }
158 }
159#endif
160#if 1 // Receive speed has changed
-
161 if(properties & BRAWCAP_ADAPTER_PROPERTY_RX_SPEED)
+
161 if(properties & BRAWCAP_ADAPTER_PROPERTY_RX_SPEED)
162 {
- -
164 brawcap_adapter_speed_rx(name, &speed);
+ +
164 brawcap_adapter_speed_rx(name, &speed);
165 printf("%s (%s) new receive (uplink) speed: %u MBit/s\n", friendlyName, name, speed);
166 }
167#endif
168#if 1 // Transmit speed has changed
-
169 if(properties & BRAWCAP_ADAPTER_PROPERTY_TX_SPEED)
+
169 if(properties & BRAWCAP_ADAPTER_PROPERTY_TX_SPEED)
170 {
- -
172 brawcap_adapter_speed_tx(name, &speed);
+ +
172 brawcap_adapter_speed_tx(name, &speed);
173 printf("%s (%s) new transmit (uplink) speed: %u MBit/s\n", friendlyName, name, speed);
174 }
175#endif
@@ -305,16 +305,16 @@
193 int runtime_sec = 0;
194 ParseArgs(argc, argv, &exec_time);
195
- +
197
198 // This variable will be entered during registration, to make it available from inside the callback.
199 // ATTENTION: You are responsible for checking the pointer inside your callback, before accessing it.
200 int notifyCounter = 0;
201
202 // Register our process for bRAWcap adapter change notifications
-
203 brawcap_adapter_notify_callback_t callback = change_notification_callback;
-
204 status = brawcap_adapter_notify_register(callback, &notifyCounter);
-
205 if(!BRAWCAP_SUCCESS(status))
+
203 brawcap_adapter_notify_callback_t callback = change_notification_callback;
+
204 status = brawcap_adapter_notify_register(callback, &notifyCounter);
+
205 if(!BRAWCAP_SUCCESS(status))
206 {
207 printf("Registration for adapter change notification failed (Status: %d). Will stop now...", status);
208 return -1;
@@ -330,8 +330,8 @@
218 // Unregister bRAWcap adapter change notifications before exiting.
219 // NOTE: bRAWcap would automatically unregister on unloading.
220 // Therefore unregistering on exiting isn´t required...
- -
222 if(!BRAWCAP_SUCCESS(status))
+ +
222 if(!BRAWCAP_SUCCESS(status))
223 {
224 printf("Unregistration for adapter change noTification failed (Status: %d). Will stop now...", status);
225 return -1;
@@ -339,52 +339,52 @@
227
228 return 0;
229}
-
UINT8 bytes[4]
Definition: brawcap_types_um.h:262
-
UINT16 words[8]
Definition: brawcap_types_um.h:273
-
brawcap_status_t brawcap_adapter_notify_unregister()
Unregisters the calling process from receiving adapter change notifications.
-
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_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_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_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_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:304
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:285
-
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 su...
Definition: brawcap_types_um.h:398
-
brawcap_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:315
-
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_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_adapter_notify_reason_t
List of reasons for adapter change notifications. This values indicate why a adapter change notificat...
Definition: brawcap_types_um.h:342
-
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:335
-
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_ADAPTER_PROPERTY_CONNECTION_STATE
Definition: brawcap_types_um.h:378
-
@ BRAWCAP_ADAPTER_PROPERTY_IPV6
Definition: brawcap_types_um.h:380
-
@ BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE
Definition: brawcap_types_um.h:377
-
@ BRAWCAP_ADAPTER_PROPERTY_RX_SPEED
Definition: brawcap_types_um.h:374
-
@ BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME
Definition: brawcap_types_um.h:373
-
@ BRAWCAP_ADAPTER_PROPERTY_IPV4
Definition: brawcap_types_um.h:379
-
@ BRAWCAP_ADAPTER_PROPERTY_TX_SPEED
Definition: brawcap_types_um.h:375
-
@ BRAWCAP_ADAPTER_PROPERTY_MTU
Definition: brawcap_types_um.h:376
-
@ BRAWCAP_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:306
-
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:305
-
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:307
-
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:286
-
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:318
-
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:316
-
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:319
-
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:317
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE
A adapter property has changed. This can have several reasons, for a list of all properties see brawc...
Definition: brawcap_types_um.h:361
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_ADD
A new bRAWcap adapter was detected. E.g. due to enabling bRAWcap driver on an adapter where it was di...
Definition: brawcap_types_um.h:351
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE
A bRAWcap adapter was removed. E.g. due to disabling bRAWcap driver on an adapter where it was enable...
Definition: brawcap_types_um.h:356
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN
The notification reason is unknown.
Definition: brawcap_types_um.h:346
-
IPv4 address.
Definition: brawcap_types_um.h:261
-
IPv6 address.
Definition: brawcap_types_um.h:271
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
-
bRAWcap main header.
+
bRAWcap main header.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_ERROR_OVERRUN
A buffer overrun was detected.
Definition: brawcap_types_shared.h:245
+
IPv4 address.
Definition: brawcap_types_um.h:263
+
IPv6 address.
Definition: brawcap_types_um.h:273
+
UINT8 bytes[4]
Definition: brawcap_types_um.h:264
+
UINT16 words[8]
Definition: brawcap_types_um.h:275
+
brawcap_status_t brawcap_adapter_notify_unregister()
Unregisters the calling process from receiving adapter change notifications.
+
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_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_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_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_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:306
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
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_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_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:287
+
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 su...
Definition: brawcap_types_um.h:400
+
brawcap_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:317
+
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_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_adapter_notify_reason_t
List of reasons for adapter change notifications. This values indicate why a adapter change notificat...
Definition: brawcap_types_um.h:344
+
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:337
+
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_ADAPTER_PROPERTY_CONNECTION_STATE
Definition: brawcap_types_um.h:380
+
@ BRAWCAP_ADAPTER_PROPERTY_IPV6
Definition: brawcap_types_um.h:382
+
@ BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE
Definition: brawcap_types_um.h:379
+
@ BRAWCAP_ADAPTER_PROPERTY_RX_SPEED
Definition: brawcap_types_um.h:376
+
@ BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME
Definition: brawcap_types_um.h:375
+
@ BRAWCAP_ADAPTER_PROPERTY_IPV4
Definition: brawcap_types_um.h:381
+
@ BRAWCAP_ADAPTER_PROPERTY_TX_SPEED
Definition: brawcap_types_um.h:377
+
@ BRAWCAP_ADAPTER_PROPERTY_MTU
Definition: brawcap_types_um.h:378
+
@ BRAWCAP_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:308
+
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:307
+
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:309
+
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:288
+
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:320
+
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:318
+
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:321
+
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:319
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE
A adapter property has changed. This can have several reasons, for a list of all properties see brawc...
Definition: brawcap_types_um.h:363
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_ADD
A new bRAWcap adapter was detected. E.g. due to enabling bRAWcap driver on an adapter where it was di...
Definition: brawcap_types_um.h:353
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE
A bRAWcap adapter was removed. E.g. due to disabling bRAWcap driver on an adapter where it was enable...
Definition: brawcap_types_um.h:358
+
@ BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN
The notification reason is unknown.
Definition: brawcap_types_um.h:348

diff --git a/05_receive_simple_packet_receiver_8c-example.html b/a00922.html similarity index 67% rename from 05_receive_simple_packet_receiver_8c-example.html rename to a00922.html index f89ff4a..a67d915 100644 --- a/05_receive_simple_packet_receiver_8c-example.html +++ b/a00922.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -137,7 +137,7 @@
26 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
27 */
28// Include bRAWcap
-
29#include "libbrawcap.h"
+
29#include "libbrawcap.h"
30
31// C STD
32#include <stdio.h> // for printf
@@ -153,14 +153,14 @@
42 unsigned long long packetCounter = 0;
43
44 // Here we will store the status of any bRAWcap function
- +
46
47 // Here we store the number of available bRAWcap adapters
-
48 brawcap_adapter_count_t numberAdapters = 0;
+
48 brawcap_adapter_count_t numberAdapters = 0;
49 // This will contain our bRAWcap handle to the adapter we want to receive from
-
50 brawcap_handle_t* pHandle = 0;
+
50 brawcap_handle_t* pHandle = 0;
51 // Our local packet for storing received data
-
52 brawcap_packet_t* pPacket = 0;
+
52 brawcap_packet_t* pPacket = 0;
53
54 do
55 {
@@ -168,7 +168,7 @@
57 // --> This function can only fail if we did something wrong.
58 // But we are sure that we did everything right...
59 // therefore we do not check it�s status.
-
60 brawcap_adapter_list_count(&numberAdapters);
+
60 brawcap_adapter_list_count(&numberAdapters);
61
62 // No adapters... nothing do receive from... lets exit ...
63 if (!numberAdapters)
@@ -180,18 +180,18 @@
69 // Get the name of the first adapter.
70 // To not overload the example with complex stuff,
71 // we always go for the first available adapter.
-
72 brawcap_adapter_name_t name = { '\0' };
- +
72 brawcap_adapter_name_t name = { '\0' };
+
74 {
-
75 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
+
75 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
76 retVal = -1;
77 break;
78 }
79
80 // Open a handle to the adapter by using the retrieved name.
-
81 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
+
81 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
82 {
-
83 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
+
83 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
84 retVal = -1;
85 break;
86 }
@@ -199,17 +199,17 @@
88 // Create a packet object
89 // For simplicity and to make sure that we get all packets,
90 // we set the payload size to the max supported value.
- +
92 {
-
93 printf("[ERROR] Unexpected status while creating packet: %d", brawcap_last_status());
+
93 printf("[ERROR] Unexpected status while creating packet: %d", brawcap_last_status());
94 retVal = -1;
95 break;
96 }
97
98 // Some local variables to buffer the packet data, later on.
-
99 brawcap_packet_size_t captureLength = 0;
-
100 brawcap_packet_size_t lengthOnWire = 0;
-
101 brawcap_timestamp_t* pTimestamp = 0;
+
99 brawcap_packet_size_t captureLength = 0;
+
100 brawcap_packet_size_t lengthOnWire = 0;
+
101 brawcap_timestamp_t* pTimestamp = 0;
102 UINT64 timestamp_sec = 0;
103 UINT32 timestamp_ns = 0;
104 const char* pPayload = 0;
@@ -218,10 +218,10 @@
107 while(1)
108 {
109 // Now lets see if we have received a packet...
-
110 status = brawcap_rx_packet(pHandle, pPacket);
+
110 status = brawcap_rx_packet(pHandle, pPacket);
111
112 // Seems like we had success and got some packet data to look at. :-)
-
113 if(BRAWCAP_SUCCESS(status))
+
113 if(BRAWCAP_SUCCESS(status))
114 {
115 // Check if we made it out of the demo limitation... :-D
116 // ... notify the user and go ahead with receiving.
@@ -234,10 +234,10 @@
123 // --> The bRAWcap functions below can only fail if we did something wrong.
124 // But we are sure that we did everything right...
125 // therefore we do not check their status.
-
126 brawcap_packet_length_on_wire_get(pPacket, &lengthOnWire);
-
127 brawcap_packet_payload_get(pPacket, &pPayload, &captureLength);
-
128 brawcap_packet_timestamp_get(pPacket, &pTimestamp);
-
129 brawcap_timestamp_value_ns_get(pTimestamp, &timestamp_sec, &timestamp_ns);
+
126 brawcap_packet_length_on_wire_get(pPacket, &lengthOnWire);
+
127 brawcap_packet_payload_get(pPacket, &pPayload, &captureLength);
+
128 brawcap_packet_timestamp_get(pPacket, &pTimestamp);
+
129 brawcap_timestamp_value_ns_get(pTimestamp, &timestamp_sec, &timestamp_ns);
130
131 // Show the user what we received
132 printf("%llu. Packet:\n", ++packetCounter);
@@ -257,12 +257,12 @@
146 }
147 // Hm... we got a very silent connection...
148 // ... lets try again...
-
149 else if (status == BRAWCAP_STATUS_INFO_NO_DATA)
+
149 else if (status == BRAWCAP_STATUS_INFO_NO_DATA)
150 continue;
151 // Sad but we do not have a bRAWcap license for this feature... yet. :-(
152 // Notify our user about this sad information and
153 // wait some time to check if we are allowed to receive again...
-
154 else if (status == BRAWCAP_STATUS_WARNING_DEMO_MODE)
+
154 else if (status == BRAWCAP_STATUS_WARNING_DEMO_MODE)
155 {
156 if (!demoModeLogged)
157 {
@@ -275,7 +275,7 @@
164 // Better stop now if we do not know how to handle it.
165 else
166 {
-
167 printf("[ERROR] Unexpected status while receiving packet: %d", brawcap_last_status());
+
167 printf("[ERROR] Unexpected status while receiving packet: %d", brawcap_last_status());
168 retVal = -1;
169 break;
170 }
@@ -288,37 +288,37 @@
177 // But we are sure that we did everything right...
178 // therefore we do not check their status.
179 if (pPacket)
-
180 brawcap_packet_free(pPacket);
+
180 brawcap_packet_free(pPacket);
181 if (pHandle)
-
182 brawcap_close(pHandle);
+
182 brawcap_close(pHandle);
183
184 return retVal;
185}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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.
-
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
-
brawcap_status_t brawcap_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
-
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
-
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
-
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_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 pa...
-
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
-
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
-
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
-
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
-
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 main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
+
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
+
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
+
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.
+
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
+
brawcap_status_t brawcap_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
+
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
+
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
+
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_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 pa...
+
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
+
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
brawcap_status_t brawcap_rx_packet(brawcap_handle_t *const pHandle, brawcap_packet_t *const pPacket)
Receives a single packet from the specified handle.

diff --git a/07_receive_buffered_receiver_8c-example.html b/a00923.html similarity index 64% rename from 07_receive_buffered_receiver_8c-example.html rename to a00923.html index a75474d..1204ebb 100644 --- a/07_receive_buffered_receiver_8c-example.html +++ b/a00923.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -139,7 +139,7 @@
28 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
29 */
30// Include bRAWcap
-
31#include "libbrawcap.h"
+
31#include "libbrawcap.h"
32
33// C STD
34#include <stdio.h> // for printf
@@ -171,11 +171,11 @@
60 }
61}
62
-
63void receiveCallback(brawcap_handle_t* const pHandle, const brawcap_status_t status, brawcap_buffer_t* const pBuffer,
+
63void receiveCallback(brawcap_handle_t* const pHandle, const brawcap_status_t status, brawcap_buffer_t* const pBuffer,
64 void* pUser)
65{
66 example_context_t* pContext = (example_context_t*) pUser;
- +
68 {
69 if(!pContext->demoLogged)
70 {
@@ -183,33 +183,33 @@
72 pContext->demoLogged = 1;
73 }
74 }
-
75 else if(status == BRAWCAP_STATUS_SUCCESS)
+
75 else if(status == BRAWCAP_STATUS_SUCCESS)
76 {
77 if(pContext->demoLogged)
78 {
79 printf("[NOTICE] DEMO MODE: Limitation period elapsed, receiving is available again.\n");
80 pContext->demoLogged = 0;
81 }
-
82 brawcap_buffer_iterator_t* pIterator = 0;
-
83 brawcap_buffer_iterator_create(&pIterator, pBuffer, 0);
+
82 brawcap_buffer_iterator_t* pIterator = 0;
+
83 brawcap_buffer_iterator_create(&pIterator, pBuffer, 0);
84
-
85 brawcap_packet_t* pPacket = 0;
-
86 brawcap_packet_size_t packetSize = 0;
+
85 brawcap_packet_t* pPacket = 0;
+
86 brawcap_packet_size_t packetSize = 0;
87
88 do
89 {
-
90 pPacket = brawcap_buffer_iterator_eval(pIterator);
+
90 pPacket = brawcap_buffer_iterator_eval(pIterator);
91 if(!pPacket)
92 break;
93
-
94 brawcap_packet_payload_size_get(pPacket, &packetSize);
+
94 brawcap_packet_payload_size_get(pPacket, &packetSize);
95 pContext->counters.bytes += packetSize;
96 ++pContext->counters.packets;
97
- +
99 } while (1);
100
- +
102
103 printf("[NOTICE] Received new packets [Total Packets: %llu / Total Bytes: %llu].\n",
104 pContext->counters.packets, pContext->counters.bytes);
@@ -230,15 +230,15 @@
119 example_context_t context = {0};
120
121 // Here we will store the status of any bRAWcap function
- +
123
124 // Here we store the number of available bRAWcap adapters
-
125 brawcap_adapter_count_t numberAdapters = 0;
+
125 brawcap_adapter_count_t numberAdapters = 0;
126 // This will contain our bRAWcap handle to the adapter we want to receive from
-
127 brawcap_handle_t* pHandle = 0;
+
127 brawcap_handle_t* pHandle = 0;
128 // Our local packet buffers for storing received data
-
129 brawcap_buffer_t* pPacketBuffer1 = 0;
-
130 brawcap_buffer_t* pPacketBuffer2 = 0;
+
129 brawcap_buffer_t* pPacketBuffer1 = 0;
+
130 brawcap_buffer_t* pPacketBuffer2 = 0;
131
132 do
133 {
@@ -246,7 +246,7 @@
135 // --> This function can only fail if we did something wrong.
136 // But we are sure that we did everything right...
137 // therefore we do not check it�s status.
-
138 brawcap_adapter_list_count(&numberAdapters);
+
138 brawcap_adapter_list_count(&numberAdapters);
139
140 // No adapters... nothing do receive from... lets exit ...
141 if (!numberAdapters)
@@ -258,18 +258,18 @@
147 // Get the name of the first adapter.
148 // To not overload the example with complex stuff,
149 // we always go for the first available adapter.
-
150 brawcap_adapter_name_t name = { '\0' };
- +
150 brawcap_adapter_name_t name = { '\0' };
+
152 {
-
153 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
+
153 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
154 retVal = -1;
155 break;
156 }
157
158 // Open a handle to the adapter by using the retrieved name.
-
159 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
+
159 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
160 {
-
161 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
+
161 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
162 retVal = -1;
163 break;
164 }
@@ -277,25 +277,25 @@
166 // Create the packet buffers
167 // For simplicity and to make sure that we get all packets,
168 // we set the packet payload size to the max supported value.
- +
170 {
-
171 printf("[ERROR] Unexpected status while creating packet buffer: %d", brawcap_last_status());
+
171 printf("[ERROR] Unexpected status while creating packet buffer: %d", brawcap_last_status());
172 retVal = -1;
173 break;
174 }
- +
176 {
-
177 printf("[ERROR] Unexpected status while creating packet buffer: %d", brawcap_last_status());
+
177 printf("[ERROR] Unexpected status while creating packet buffer: %d", brawcap_last_status());
178 retVal = -1;
179 break;
180 }
181
182 // Attach the created packet buffers to the handle for reception
-
183 brawcap_rx_buffer_attach(pHandle, pPacketBuffer1);
-
184 brawcap_rx_buffer_attach(pHandle, pPacketBuffer2);
+
183 brawcap_rx_buffer_attach(pHandle, pPacketBuffer1);
+
184 brawcap_rx_buffer_attach(pHandle, pPacketBuffer2);
185
186 // Now start the the bRAWcap reception on the handle
-
187 brawcap_rx_start(pHandle, receiveCallback, &context, 0);
+
187 brawcap_rx_start(pHandle, receiveCallback, &context, 0);
188
189 // After starting the reception our main thread has finished it´s work.
190 // Everything else will be done from inside the receive callback until we should stop receiving.
@@ -304,9 +304,9 @@
193 Sleep(1000);
194 } while (++runtime_sec < exec_time);
195
-
196 brawcap_rx_stop(pHandle);
-
197 brawcap_rx_buffer_detach(pHandle, pPacketBuffer2);
-
198 brawcap_rx_buffer_detach(pHandle, pPacketBuffer1);
+
196 brawcap_rx_stop(pHandle);
+
197 brawcap_rx_buffer_detach(pHandle, pPacketBuffer2);
+
198 brawcap_rx_buffer_detach(pHandle, pPacketBuffer1);
199 }while(0);
200
201 // We do not want to produce any memory leaks...
@@ -315,43 +315,43 @@
204 // But we are sure that we did everything right...
205 // therefore we do not check their status.
206 if (pPacketBuffer1)
-
207 brawcap_buffer_free(pPacketBuffer1);
+
207 brawcap_buffer_free(pPacketBuffer1);
208 if(pPacketBuffer2)
-
209 brawcap_buffer_free(pPacketBuffer2);
+
209 brawcap_buffer_free(pPacketBuffer2);
210 if (pHandle)
-
211 brawcap_close(pHandle);
+
211 brawcap_close(pHandle);
212
213 return retVal;
214}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
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...
-
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
-
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_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_next(brawcap_buffer_iterator_t *const pIterator)
Increments the iterator to the next buffered packet.
-
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
-
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 i...
-
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.
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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.
-
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
-
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 ...
-
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
-
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
-
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_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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
-
bRAWcap main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
+
UINT16 brawcap_packet_size_t
Type for handling the number of payload bytes per packet.
Definition: brawcap_types_shared.h:670
+
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 ...
+
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
+
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
+
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
+
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 i...
+
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_iterator_free(brawcap_buffer_iterator_t *const pIterator)
Frees the specified iterator. When this function is called the specified iterator becomes invalid and...
+
struct _brawcap_buffer_iterator brawcap_buffer_iterator_t
bRAWcap packet buffer iterator object.
Definition: brawcap_types_shared.h:770
+
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_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_next(brawcap_buffer_iterator_t *const pIterator)
Increments the iterator to the next buffered packet.
+
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
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_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.
diff --git a/08_receive_timestamp_inspector_8c-example.html b/a00924.html similarity index 62% rename from 08_receive_timestamp_inspector_8c-example.html rename to a00924.html index e72b166..e8ac1ca 100644 --- a/08_receive_timestamp_inspector_8c-example.html +++ b/a00924.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -138,7 +138,7 @@
27 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
28 */
29// Include bRAWcap
-
30#include "libbrawcap.h"
+
30#include "libbrawcap.h"
31
32// C STD
33#include <stdio.h> // for printf
@@ -161,26 +161,26 @@
50 * - us: Microseconds
51 * - ms: Miliseconds
52 */
-
53void ParseArgs(int argc, char** argv, brawcap_timestamp_mode_t* pMode, int* pAccuracy)
+
53void ParseArgs(int argc, char** argv, brawcap_timestamp_mode_t* pMode, int* pAccuracy)
54{
55 for(int index = 0; index < argc; ++index)
56 {
57 if(!memcmp(argv[index], "-m", 2))
58 {
59 if(!strcmp(argv[index + 1], "No"))
- +
61 else if(!strcmp(argv[index + 1], "DriverSysLow"))
- +
63 else if(!strcmp(argv[index + 1], "DriverSysHigh"))
- +
65 else if(!strcmp(argv[index + 1], "DriverSw"))
- +
67 else if(!strcmp(argv[index + 1], "AdapterSys"))
- +
69 else if(!strcmp(argv[index + 1], "AdapterSw"))
- +
71 else if(!strcmp(argv[index + 1], "AdapterHw"))
- +
73 else
74 printf("[WARNING] Unknown timestamp mode - will use default mode.\n");
75 }
@@ -210,17 +210,17 @@
99 int accuracy = 1;
100
101 // Set the default timestamp mode to system low precision
- +
103
104 // Here we will store the status of any bRAWcap function
- +
106
107 // Here we store the number of available bRAWcap adapters
-
108 brawcap_adapter_count_t numberAdapters = 0;
+
108 brawcap_adapter_count_t numberAdapters = 0;
109 // This will contain our bRAWcap handle to the adapter we want to receive from
-
110 brawcap_handle_t* pHandle = 0;
+
110 brawcap_handle_t* pHandle = 0;
111 // Our local packet for storing received data
-
112 brawcap_packet_t* pPacket = 0;
+
112 brawcap_packet_t* pPacket = 0;
113
114 // Parse command line argument for selected timestamp mode
115 ParseArgs(argc, argv, &timestampMode, &accuracy);
@@ -231,7 +231,7 @@
120 // --> This function can only fail if we did something wrong.
121 // But we are sure that we did everything right...
122 // therefore we do not check it�s status.
-
123 brawcap_adapter_list_count(&numberAdapters);
+
123 brawcap_adapter_list_count(&numberAdapters);
124
125 // No adapters... nothing do receive from... lets exit ...
126 if (!numberAdapters)
@@ -243,27 +243,27 @@
132 // Get the name of the first adapter.
133 // To not overload the example with complex stuff,
134 // we always go for the first available adapter.
-
135 brawcap_adapter_name_t name = { '\0' };
- +
135 brawcap_adapter_name_t name = { '\0' };
+
137 {
-
138 printf("[ERROR] Unexpected status while retrieving adapter name: %d\n", brawcap_last_status());
+
138 printf("[ERROR] Unexpected status while retrieving adapter name: %d\n", brawcap_last_status());
139 retVal = -1;
140 break;
141 }
142
143 // Open a handle to the adapter by using the retrieved name.
-
144 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
+
144 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
145 {
-
146 printf("[ERROR] Unexpected status while opening handle: %d\n", brawcap_last_status());
+
146 printf("[ERROR] Unexpected status while opening handle: %d\n", brawcap_last_status());
147 retVal = -1;
148 break;
149 }
150
151 // Lets see what timestamp modes we have on the specified adapter
-
152 brawcap_timestamp_capabilities_t timestampCapabilities;
-
153 if(!BRAWCAP_SUCCESS(brawcap_rx_timestamp_capabilities(pHandle, &timestampCapabilities)))
+
152 brawcap_timestamp_capabilities_t timestampCapabilities;
+
153 if(!BRAWCAP_SUCCESS(brawcap_rx_timestamp_capabilities(pHandle, &timestampCapabilities)))
154 {
-
155 printf("[ERROR] Unexpected status while retrieving timestamp capabilities: %d\n", brawcap_last_status());
+
155 printf("[ERROR] Unexpected status while retrieving timestamp capabilities: %d\n", brawcap_last_status());
156 retVal = -1;
157 break;
158 }
@@ -271,9 +271,9 @@
160 // Print available adapter timestamp capabilities to console before we start reading packets
161 // We only check for adapter modes explicitly because all other modes are always available.
162 printf("ADAPTER TIMESTAMP CAPABILITIES: \n");
-
163 printf(" - System: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM ? "yes" : "no");
-
164 printf(" - Software: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE ? "yes" : "no");
-
165 printf(" - Hardware: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE ? "yes" : "no");
+
163 printf(" - System: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM ? "yes" : "no");
+
164 printf(" - Software: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE ? "yes" : "no");
+
165 printf(" - Hardware: %s\n", timestampCapabilities & BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE ? "yes" : "no");
166 printf("\n");
167
168 // Check if configured timestamp mode is available... if not exit now...
@@ -285,9 +285,9 @@
174 }
175
176 // Apply the configured timestamp mode to the previously opened handle.
-
177 if(!BRAWCAP_SUCCESS(brawcap_rx_timestamp_mode_set(pHandle, timestampMode)))
+
177 if(!BRAWCAP_SUCCESS(brawcap_rx_timestamp_mode_set(pHandle, timestampMode)))
178 {
-
179 printf("[ERROR] Unexpected status while applying configured timestamp mode: %d\n", brawcap_last_status());
+
179 printf("[ERROR] Unexpected status while applying configured timestamp mode: %d\n", brawcap_last_status());
180 retVal = -1;
181 break;
182 }
@@ -295,17 +295,17 @@
184 // Create a packet object
185 // For simplicity and to make sure that we get all packets,
186 // we set the payload size to the max supported value.
- +
188 {
-
189 printf("[ERROR] Unexpected status while creating packet: %d\n", brawcap_last_status());
+
189 printf("[ERROR] Unexpected status while creating packet: %d\n", brawcap_last_status());
190 retVal = -1;
191 break;
192 }
193
194 // Some local variables to buffer the timestamp info, later on.
-
195 brawcap_timestamp_t* pTimestamp = 0;
- - +
195 brawcap_timestamp_t* pTimestamp = 0;
+ +
198 UINT64 sec = 0;
199 UINT32 ns = 0;
200
@@ -313,10 +313,10 @@
202 while(1)
203 {
204 // Now lets see if we have received a packet...
-
205 status = brawcap_rx_packet(pHandle, pPacket);
+
205 status = brawcap_rx_packet(pHandle, pPacket);
206
207 // Seems like we had success and got some packet data to look at. :-)
-
208 if(BRAWCAP_SUCCESS(status))
+
208 if(BRAWCAP_SUCCESS(status))
209 {
210 // Check if we made it out of the demo limitation... :-D
211 // ... notify the user and go ahead with receiving.
@@ -329,21 +329,21 @@
218 // --> The bRAWcap functions below can only fail if we did something wrong.
219 // But we are sure that we did everything right...
220 // therefore we do not check their status.
-
221 brawcap_packet_timestamp_get(pPacket, &pTimestamp);
-
222 brawcap_timestamp_mode_get(pTimestamp, &source);
-
223 brawcap_timestamp_resolution_ns_get(pTimestamp, &resolution);
+
221 brawcap_packet_timestamp_get(pPacket, &pTimestamp);
+
222 brawcap_timestamp_mode_get(pTimestamp, &source);
+
223 brawcap_timestamp_resolution_ns_get(pTimestamp, &resolution);
224 switch(accuracy)
225 {
226 case 1:
-
227 brawcap_timestamp_value_ns_get(pTimestamp, &sec, &ns);
+
227 brawcap_timestamp_value_ns_get(pTimestamp, &sec, &ns);
228 break;
229 case 2:
-
230 brawcap_timestamp_value_us_get(pTimestamp, &sec, &ns);
- +
230 brawcap_timestamp_value_us_get(pTimestamp, &sec, &ns);
+
232 break;
233 case 3:
-
234 brawcap_timestamp_value_ms_get(pTimestamp, &sec, &ns);
- +
234 brawcap_timestamp_value_ms_get(pTimestamp, &sec, &ns);
+
236 break;
237 }
238 struct tm *tmp = gmtime((time_t*)&sec);
@@ -353,16 +353,16 @@
242 printf(" - Source/Mode: ");
243 switch(source)
244 {
-
245 case BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP: printf("No Timestamp\n"); break;
-
246 case BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC: printf("Driver System Low Precision\n"); break;
-
247 case BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC: printf("Driver System High Precision\n"); break;
-
248 case BRAWCAP_TIMESTAMP_MODE_SOFTWARE: printf("Driver Software (QPC)\n"); break;
-
249 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM: printf("Adapter System\n"); break;
-
250 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE: printf("Adapter Software (QPC)\n"); break;
-
251 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE: printf("Adapter Hardware\n"); break;
+
245 case BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP: printf("No Timestamp\n"); break;
+
246 case BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC: printf("Driver System Low Precision\n"); break;
+
247 case BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC: printf("Driver System High Precision\n"); break;
+
248 case BRAWCAP_TIMESTAMP_MODE_SOFTWARE: printf("Driver Software (QPC)\n"); break;
+
249 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM: printf("Adapter System\n"); break;
+
250 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE: printf("Adapter Software (QPC)\n"); break;
+
251 case BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE: printf("Adapter Hardware\n"); break;
252 }
253 printf(" - Resolution: ");
- +
255 ? printf("%09u ns\n", resolution)
256 : printf(" UNKNOWN\n");
257 printf(" - Timestamp: %llu %09u ns (<=> %02u.%02u.%04u %02u:%02u:%02u.%09u)\n\n", sec, ns,
@@ -371,12 +371,12 @@
260 }
261 // Hm... we got a very silent connection...
262 // ... lets try again...
-
263 else if (status == BRAWCAP_STATUS_INFO_NO_DATA)
+
263 else if (status == BRAWCAP_STATUS_INFO_NO_DATA)
264 continue;
265 // Sad but we do not have a bRAWcap license for this feature... yet. :-(
266 // Notify our user about this sad information and
267 // wait some time to check if we are allowed to receive again...
-
268 else if (status == BRAWCAP_STATUS_WARNING_DEMO_MODE)
+
268 else if (status == BRAWCAP_STATUS_WARNING_DEMO_MODE)
269 {
270 if (!demoModeLogged)
271 {
@@ -389,7 +389,7 @@
278 // Better stop now if we do not know how to handle it.
279 else
280 {
-
281 printf("[ERROR] Unexpected status while receiving packet: %d\n", brawcap_last_status());
+
281 printf("[ERROR] Unexpected status while receiving packet: %d\n", brawcap_last_status());
282 retVal = -1;
283 break;
284 }
@@ -402,53 +402,53 @@
291 // But we are sure that we did everything right...
292 // therefore we do not check their status.
293 if (pPacket)
-
294 brawcap_packet_free(pPacket);
+
294 brawcap_packet_free(pPacket);
295 if (pHandle)
-
296 brawcap_close(pHandle);
+
296 brawcap_close(pHandle);
297
298 return retVal;
299}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
-
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
-
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
-
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
-
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_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_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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
-
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
-
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
-
#define BRAWCAP_TIMESTAMP_NS_PER_MS
Number of nanoseconds per millisecond.
Definition: brawcap_types_shared.h:516
-
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_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_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.
-
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
-
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.
-
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
-
#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN
If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved.
Definition: brawcap_types_shared.h:491
-
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
-
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.
-
#define BRAWCAP_TIMESTAMP_NS_PER_US
Number of nanoseconds per microsecond.
Definition: brawcap_types_shared.h:511
-
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC
A high precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:586
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE
A hardware timestamp created by the network adapter hardware/firmware.
Definition: brawcap_types_shared.h:602
-
@ BRAWCAP_TIMESTAMP_MODE_SOFTWARE
A software timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:590
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM
A system timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:594
-
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE
A software timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:598
-
@ BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
No timestamp.
Definition: brawcap_types_shared.h:578
-
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
A low precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:582
-
bRAWcap main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
@ BRAWCAP_STATUS_INFO_NO_DATA
Indicates that a function returns without any data.
Definition: brawcap_types_shared.h:333
+
@ BRAWCAP_STATUS_WARNING_DEMO_MODE
The operation was not executed due to demo mode limitations.
Definition: brawcap_types_shared.h:256
+
UINT32 brawcap_timestamp_capabilities_t
Type used for indicating the supported timestamp modes.
Definition: brawcap_types_shared.h:524
+
#define BRAWCAP_TIMESTAMP_NS_PER_MS
Number of nanoseconds per millisecond.
Definition: brawcap_types_shared.h:516
+
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_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_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.
+
struct _brawcap_timestamp brawcap_timestamp_t
bRAWcap timestamp object.
Definition: brawcap_types_shared.h:612
+
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.
+
UINT32 brawcap_timestamp_resolution_ns_t
Represents the timestamp resolution in nanoseconds.
Definition: brawcap_types_shared.h:533
+
#define BRAWCAP_TIMESTAMP_RESOLUTION_UNKNOWN
If a timestamp resolution is set to this value, it´s resolution is unknown - could not be resolved.
Definition: brawcap_types_shared.h:491
+
brawcap_timestamp_mode_t
List of different timestamp modes.
Definition: brawcap_types_shared.h:574
+
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.
+
#define BRAWCAP_TIMESTAMP_NS_PER_US
Number of nanoseconds per microsecond.
Definition: brawcap_types_shared.h:511
+
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_HIGHPREC
A high precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:586
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_HARDWARE
A hardware timestamp created by the network adapter hardware/firmware.
Definition: brawcap_types_shared.h:602
+
@ BRAWCAP_TIMESTAMP_MODE_SOFTWARE
A software timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:590
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SYSTEM
A system timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:594
+
@ BRAWCAP_TIMESTAMP_MODE_ADAPTER_SOFTWARE
A software timestamp created by the network adapter driver.
Definition: brawcap_types_shared.h:598
+
@ BRAWCAP_TIMESTAMP_MODE_NO_TIMESTAMP
No timestamp.
Definition: brawcap_types_shared.h:578
+
@ BRAWCAP_TIMESTAMP_MODE_SYSTEM_LOWPREC
A low precision system timestamp created by bRAWcap driver.
Definition: brawcap_types_shared.h:582
+
brawcap_status_t brawcap_packet_create(brawcap_packet_t **const pPacket, const brawcap_packet_size_t maxSize)
Creates a new packet.
+
struct _brawcap_packet brawcap_packet_t
bRAWcap packet object.
Definition: brawcap_types_shared.h:679
+
#define BRAWCAP_PACKET_SIZE_MAX
The maximum supported (byte) size for a single packet payload.
Definition: brawcap_types_shared.h:649
+
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_free(brawcap_packet_t *pPacket)
Frees the specified packet. When this function is called the specified packet becomes invalid and it´...
+
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
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_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_set(brawcap_handle_t *const pHandle, const brawcap_timestamp_mode_t mode)
Configures the used receive time stamping mode for the specified handle.
diff --git a/06_filter_firewall_8c-example.html b/a00925.html similarity index 63% rename from 06_filter_firewall_8c-example.html rename to a00925.html index 45abf43..b5f51d1 100644 --- a/06_filter_firewall_8c-example.html +++ b/a00925.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -136,7 +136,7 @@
25 * Please contact b-plus at services@b-plus.com to get the appropriate terms and conditions.
26 */
27// Include bRAWcap
-
28#include "libbrawcap.h"
+
28#include "libbrawcap.h"
29
30// C STD
31#include <stdlib.h> // for strtol
@@ -173,14 +173,14 @@
62 ParseArgs(argc, argv, &exec_time);
63
64 // Here we will store the status of any bRAWcap function
- +
66
67 // Here we store the number of available bRAWcap adapters
-
68 brawcap_adapter_count_t numberAdapters = 0;
+
68 brawcap_adapter_count_t numberAdapters = 0;
69 // This will contain our bRAWcap handle to the adapter we want to receive from
-
70 brawcap_handle_t* pHandle = 0;
+
70 brawcap_handle_t* pHandle = 0;
71 // Our local filter to configure which packets should be dropped
-
72 brawcap_filter_t* pFilter = 0;
+
72 brawcap_filter_t* pFilter = 0;
73
74 do
75 {
@@ -188,7 +188,7 @@
77 // --> This function can only fail if we did something wrong.
78 // But we are sure that we did everything right...
79 // therefore we do not check it´s status.
-
80 brawcap_adapter_list_count(&numberAdapters);
+
80 brawcap_adapter_list_count(&numberAdapters);
81
82 // No adapters... nothing do receive from... lets exit ...
83 if (!numberAdapters)
@@ -200,27 +200,27 @@
89 // Get the name of the first adapter.
90 // To not overload the example with complex stuff,
91 // we always go for the first available adapter.
-
92 brawcap_adapter_name_t name = { '\0' };
- +
92 brawcap_adapter_name_t name = { '\0' };
+
94 {
-
95 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
+
95 printf("[ERROR] Unexpected status while retrieving adapter name: %d", brawcap_last_status());
96 retVal = -1;
97 break;
98 }
99
100 // Create a filter object where to store our filter settings
- +
102 {
-
103 printf("[ERROR] Unexpected status while creating the filter: %d", brawcap_last_status());
+
103 printf("[ERROR] Unexpected status while creating the filter: %d", brawcap_last_status());
104 retVal = -1;
105 break;
106 }
107
108 // Local filter attributes
-
109 brawcap_filter_byte_length_t filterOffset = 0;
-
110 brawcap_filter_byte_length_t filterLength = 0;
-
111 brawcap_filter_mask_array_t filterMask = { 0 };
-
112 brawcap_filter_ignore_bits_array_t filterBitMask = { 0 };
+
109 brawcap_filter_byte_length_t filterOffset = 0;
+
110 brawcap_filter_byte_length_t filterLength = 0;
+
111 brawcap_filter_mask_array_t filterMask = { 0 };
+
112 brawcap_filter_ignore_bits_array_t filterBitMask = { 0 };
113
114 /* Lets specify our (byte) filter.
115 *
@@ -254,27 +254,27 @@
143 memset(&filterBitMask[1], 0xFF, 12);
144
145 // Now set our filter attributes to the previous created filter.
-
146 brawcap_filter_mask_set(pFilter, filterOffset, filterLength, filterMask, filterBitMask);
+
146 brawcap_filter_mask_set(pFilter, filterOffset, filterLength, filterMask, filterBitMask);
147
148 // Because we want to discard matched packets - do not forward to network stack -
149 // we set the filter indication to false
-
150 brawcap_filter_indicate_set(pFilter, 0);
+
150 brawcap_filter_indicate_set(pFilter, 0);
151
152 // Set the filter to active
- +
154
155 // Open a handle to the adapter by using the retrieved name.
-
156 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
+
156 if (!BRAWCAP_SUCCESS(brawcap_open(name, &pHandle)))
157 {
-
158 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
+
158 printf("[ERROR] Unexpected status while opening handle: %d", brawcap_last_status());
159 retVal = -1;
160 break;
161 }
162
163 // Now lets apply the filter to our opened handle
-
164 if(!BRAWCAP_SUCCESS(brawcap_rx_filter_set(pHandle, pFilter)))
+
164 if(!BRAWCAP_SUCCESS(brawcap_rx_filter_set(pHandle, pFilter)))
165 {
-
166 printf("[ERROR] Unexpected status while applying the filter: %d", brawcap_last_status());
+
166 printf("[ERROR] Unexpected status while applying the filter: %d", brawcap_last_status());
167 retVal = -1;
168 break;
169 }
@@ -282,18 +282,18 @@
171 // Because we do not want to process the packets somehow and just filter them.
172 // we can also reduce the drivers receive queue size for this handle to zero.
173 // With this setting the driver doesn´t even try to buffer those packets.
- +
175 {
-
176 printf("[ERROR] Unexpected status while reducing driver queue size: %d", brawcap_last_status());
+
176 printf("[ERROR] Unexpected status while reducing driver queue size: %d", brawcap_last_status());
177 retVal = -1;
178 break;
179 }
180
181 // Local receive stats for some user feedback
-
182 brawcap_stats_rx_t rxStats;
- - - +
182 brawcap_stats_rx_t rxStats;
+ + +
186
187 // After applying the filter we would have finished here...
188 // Because we do not want to receive the filtered packets and only drop them.
@@ -302,8 +302,8 @@
191 {
192 // To give the user some feedback request the statistic counters from bRAWcap and
193 // print how many packets have been blocked by our "firewall" since applying it.
-
194 if (!BRAWCAP_SUCCESS(brawcap_stats_rx(pHandle, &rxStats)))
-
195 printf("[ERROR] Unexpected status while requesting receive stats: %d", brawcap_last_status());
+
194 if (!BRAWCAP_SUCCESS(brawcap_stats_rx(pHandle, &rxStats)))
+
195 printf("[ERROR] Unexpected status while requesting receive stats: %d", brawcap_last_status());
196 else
197 {
198 time_t curTime = time(0);
@@ -312,7 +312,7 @@
201 // We could also use the rxStats.handleDroppedPacketsQueue here.
202 // Both values should be equal as long as we do not process any of the matched packet
203 // by calling a bRAWcap receive function.
-
204 printf("%s Number of blocked packets: %llu\n", strTime, rxStats.handleReceivedPacketsMatched);
+
204 printf("%s Number of blocked packets: %llu\n", strTime, rxStats.handleReceivedPacketsMatched);
205 }
206
207 Sleep(1000);
@@ -325,46 +325,46 @@
214 // But we are sure that we did everything right...
215 // therefore we do not check their status.
216 if (pHandle)
-
217 brawcap_close(pHandle);
+
217 brawcap_close(pHandle);
218 if(pFilter)
-
219 brawcap_filter_free(pFilter);
+
219 brawcap_filter_free(pFilter);
220
221 return retVal;
222}
-
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
-
brawcap_status_t brawcap_filter_create(brawcap_filter_t **const pFilter, const brawcap_filter_type_t type)
Creates a new filter.
-
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
-
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
-
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_free(brawcap_filter_t *pFilter)
Frees the specified filter. When this function is called the given filter becomes invalid and it´s me...
-
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
-
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_activate(brawcap_filter_t *const pFilter)
Sets the specified filter to active.
-
@ BRAWCAP_FILTER_TYPE_BYTE_MASK
A bRAWcap byte filter.
Definition: brawcap_types_shared.h:931
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
-
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_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_filter_set(brawcap_handle_t *const pHandle, const brawcap_filter_t *const pFilter)
Sets the specified filter to the specified handle.
-
UINT64 handleReceivedPacketsMatched
The total number of packets which have matched the given bRAWcap handle filter.
Definition: brawcap_types_shared.h:1353
-
BYTE revision
Indicates the revision of the stats.
Definition: brawcap_types_shared.h:1251
-
UINT16 size
Should be set to the size of the structure depending on it´s type and revision. You should use the BR...
Definition: brawcap_types_shared.h:1256
-
BYTE type
Indicates which type of stats it is.
Definition: brawcap_types_shared.h:1245
-
brawcap_stats_header_t header
Header for receive statistics. This has to be always initialized by the user after creation before us...
Definition: brawcap_types_shared.h:1308
-
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.
-
#define BRAWCAP_STATS_RX_SIZEOF_REVISION_1
Returns the size of receive statistics revision 1.
Definition: brawcap_types_shared.h:1390
-
@ BRAWCAP_STATS_RX_REVISION_1
Revision 1 for receive stats.
Definition: brawcap_types_shared.h:1282
-
@ BRAWCAP_STATS_TYPE_RX
Type for receive stats.
Definition: brawcap_types_shared.h:1267
-
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
-
brawcap_status_t brawcap_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
-
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
-
bRAWcap main header.
+
bRAWcap main header.
+
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:173
+
brawcap_status_t brawcap_close(brawcap_handle_t *pHandle)
Closes the specified bRAWcap handle.
+
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_last_status()
Reads the last status appeared in bRAWcap, for the calling thread.
+
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
+
#define BRAWCAP_SUCCESS(status)
Checks if the returned status indicates a success with no additional info.
Definition: brawcap_types_shared.h:122
+
@ BRAWCAP_STATUS_SUCCESS
Definition: brawcap_types_shared.h:152
+
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_list_count(brawcap_adapter_count_t *const pCount)
Reads out the current number of supported adapters in the adapter list.
+
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:257
+
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:242
+
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_filter_set(brawcap_handle_t *const pHandle, const brawcap_filter_t *const pFilter)
Sets the specified filter to the specified handle.
+
UINT8 brawcap_filter_mask_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a filter byte mask.
Definition: brawcap_types_shared.h:900
+
brawcap_status_t brawcap_filter_create(brawcap_filter_t **const pFilter, const brawcap_filter_type_t type)
Creates a new filter.
+
struct _brawcap_filter brawcap_filter_t
bRAWcap filter object.
Definition: brawcap_types_shared.h:973
+
UINT8 brawcap_filter_ignore_bits_array_t[BRAWCAP_FILTER_BYTE_MAX_LENGTH]
Fixed size array for storing a byte wise bitfield.
Definition: brawcap_types_shared.h:912
+
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_free(brawcap_filter_t *pFilter)
Frees the specified filter. When this function is called the given filter becomes invalid and it´s me...
+
brawcap_packet_size_t brawcap_filter_byte_length_t
Type for specifying the byte filter length.
Definition: brawcap_types_shared.h:917
+
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_activate(brawcap_filter_t *const pFilter)
Sets the specified filter to active.
+
@ BRAWCAP_FILTER_TYPE_BYTE_MASK
A bRAWcap byte filter.
Definition: brawcap_types_shared.h:931
+
The bRAWcap receive statistics.
Definition: brawcap_types_shared.h:1303
+
UINT64 handleReceivedPacketsMatched
The total number of packets which have matched the given bRAWcap handle filter.
Definition: brawcap_types_shared.h:1353
+
BYTE revision
Indicates the revision of the stats.
Definition: brawcap_types_shared.h:1251
+
UINT16 size
Should be set to the size of the structure depending on it´s type and revision. You should use the BR...
Definition: brawcap_types_shared.h:1256
+
BYTE type
Indicates which type of stats it is.
Definition: brawcap_types_shared.h:1245
+
brawcap_stats_header_t header
Header for receive statistics. This has to be always initialized by the user after creation before us...
Definition: brawcap_types_shared.h:1308
+
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.
+
#define BRAWCAP_STATS_RX_SIZEOF_REVISION_1
Returns the size of receive statistics revision 1.
Definition: brawcap_types_shared.h:1390
+
@ BRAWCAP_STATS_RX_REVISION_1
Revision 1 for receive stats.
Definition: brawcap_types_shared.h:1282
+
@ BRAWCAP_STATS_TYPE_RX
Type for receive stats.
Definition: brawcap_types_shared.h:1267

diff --git a/annotated.html b/annotated.html index b51a34c..cad18cd 100644 --- a/annotated.html +++ b/annotated.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -110,15 +110,15 @@
Here are the data structures with brief descriptions:
- - - - - - - - - + + + + + + + + +
 Cbrawcap_adapter_ipv4_tIPv4 address
 Cbrawcap_adapter_ipv6_tIPv6 address
 Cbrawcap_bpf_insn_tA single BPF pseudo-instruction
 Cbrawcap_bpf_program_tA BPF pseudo-assembly program
 Cbrawcap_stats_header_tHeader describing given bRAWcap stats structure
 Cbrawcap_stats_rx_tThe bRAWcap receive statistics
 Cbrawcap_stats_tx_tThe bRAWcap transmit statistics
 Cbrawcap_version_fragments_tStruct containing the separated version parts
 Cbrawcap_version_tBRAWcap version
 Cbrawcap_adapter_ipv4_tIPv4 address
 Cbrawcap_adapter_ipv6_tIPv6 address
 Cbrawcap_bpf_insn_tA single BPF pseudo-instruction
 Cbrawcap_bpf_program_tA BPF pseudo-assembly program
 Cbrawcap_stats_header_tHeader describing given bRAWcap stats structure
 Cbrawcap_stats_rx_tThe bRAWcap receive statistics
 Cbrawcap_stats_tx_tThe bRAWcap transmit statistics
 Cbrawcap_version_fragments_tStruct containing the separated version parts
 Cbrawcap_version_tBRAWcap version
diff --git a/brawcap_8h.html b/brawcap_8h.html deleted file mode 100644 index f811f70..0000000 --- a/brawcap_8h.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - - - -bRAWcap: brawcap.h File Reference - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
bRAWcap 1.0.0 -
-
b-plus Technologies - Ethernet Performance Transmitter Receiver
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
brawcap.h File Reference
-
-
- -

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(s) for the given log type(s) to the specified log level(s).
 
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_tbrawcap_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.
 
-

Detailed Description

-

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.

-
- - - - - - diff --git a/brawcap__types__um_8h_source.html b/brawcap__types__um_8h_source.html deleted file mode 100644 index 614aca2..0000000 --- a/brawcap__types__um_8h_source.html +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - - - -bRAWcap: brawcap_types_um.h Source File - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
bRAWcap 1.0.0 -
-
b-plus Technologies - Ethernet Performance Transmitter Receiver
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
brawcap_types_um.h
-
-
-Go to the documentation of this file.
1/**
-
2 * @file brawcap_types_um.h
-
3 *
-
4 * @brief bRAWcap API - User mode types.
-
5 *
-
6 * The file includes all (data)types and defines used for bRAWcap (user space only).
-
7 *
-
8 * @copyright
-
9 * <b> © 2021 - b-plus technologies GmbH. All rights reserved!</b>
-
10 *
-
11 * All rights exclusively reserved for b-plus GmbH, unless expressly otherwise agreed.
-
12 *
-
13 * Redistribution in source or any other form, with or without modification, is not permitted.
-
14 *
-
15 *
-
16 * You may use this code under the according license terms of b-plus. Please contact b-plus at services@b-plus.com
-
17 * to get the appropriate terms and conditions.
-
18 */
-
19#ifndef BRAWCAP_TYPES_UM_H
-
20#define BRAWCAP_TYPES_UM_H
-
21
- -
23
-
24/**************************************************** LIB ************************************************************/
-
25#if 1
-
26/**
-
27 * @defgroup brawcap_lib Importing
-
28 * @brief Defines required for automatic/dynamic bRAWcap API function importing.
-
29 * @{
-
30 */
-
31
-
32// You should never define _BRAWCAP_EXPORT when including bRAWcap.
-
33#ifdef _BRAWCAP_EXPORT
-
34 /**
-
35 * @internal
-
36 * @brief Dynamic/automatic function export when compiling bRAWcap itself.
-
37 * @warning Only required when building the bRAWcap library.
-
38 * Should never be defined if you include bRAWcap.
-
39 */
-
40 #define _BRAWCAP_API_FUNC(returnType) __declspec(dllexport) returnType __cdecl
-
41#else
-
42 /**
-
43 * @brief Dynamic/automatic function import for loading/including.
-
44 */
-
45 #define _BRAWCAP_API_FUNC(returnType) __declspec(dllimport) returnType __cdecl
-
46#endif
-
47
-
48/**@}*/
-
49#endif
-
50
-
51/************************************************ LOGGING ************************************************************/
-
52#if 1
-
53/**
-
54 * @defgroup brawcap_logging Logging
-
55 * @brief Types and functions for handling/modifying the bRAWcap logging.
-
56 *
-
57 * This module provides some functions for configuring the bRAWcap logging behavior.
-
58 * The bRAWcap logger supports different log levels and types, which allows to configure the logging for specific
-
59 * types independent to each other.
-
60 * Increasing the log level may help during development of the user application which shall use bRAWcap.
-
61 *
-
62 * @note If you think there is a problem with bRAWcap, please enable detailed logging,
-
63 * run your application until the problem occurs and then send the created bRAWcap log files to b-plus.
-
64 *
-
65 * @attention For release builds log levels such as verbose shall be avoided, because they can lead to performance
-
66 * degradation.
-
67 * @{
-
68 */
-
69
-
70/**
-
71 * @brief List of bRAWcap log levels.
-
72 *
-
73 * The log levels allows to (de)activate additional log entries.
-
74 * This can be especially useful during development, to get a more detailed log from bRAWcap.
-
75 */
-
76typedef enum _brawcap_log_level
-
77{
-
78 /**
-
79 * @brief Debug log level is for debugging bRAWcap itself only.
-
80 * Therefore it can only be enabled if the application is registered with higher privilege.
-
81 *
-
82 * @note Default: Deactivated
-
83 */
- -
85 /**
-
86 * @brief Verbose log level will include many informative loggings.
-
87 * Those loggings gives more info why some API calls may fail.
-
88 * This will especially contain those cases in which the caller has provided invalid parameters.
-
89 * It should be activated only for development, testing or error research.
-
90 *
-
91 * @note Default: Deactivated
-
92 */
- -
94 /**
-
95 * @brief Notice log level will include some loggings which gives information of the current bRAWcap state.
-
96 * This may be disabled to decrease logging to a minimum.
-
97 *
-
98 * @note Default: Activated
-
99 */
- -
101 /**
-
102 * @brief Warning log level will include loggings for unexpected states.
-
103 * This level should never be disabled.
-
104 *
-
105 * @note Default: Activated
-
106 */
- -
108 /**
-
109 * @brief Error log level will include loggings if something went completely wrong and bRAWcap could not solve
-
110 * the issue.
-
111 * Those loggings should never appear, if so bRAWcap may be in a invalid state.
-
112 * If loggings contain such a logentry please try to reproduce it again with all log levels enabled
-
113 * and send the logfile (with a short description of how to reproduce it) to b-plus.
-
114 * This should really never be disabled.
-
115 *
-
116 * @note Default: Activated
-
117 */
- - -
120
-
121/**
-
122 * @brief List of bRAWcap log types.
-
123 *
-
124 * The log types allows to adjust log levels for each type independent.
-
125 * To distinguish between different types each logentry will be prefixed with it´s type, this increases the readability
-
126 * of the logfile.
-
127 */
-
128typedef enum _brawcap_log_type
-
129{
-
130 /**
-
131 * @brief Generic loggings will be used for everything which has no specific type.
-
132 */
- -
134 /**
-
135 * @brief Adapter loggings will be used for anything which relates to the local adapter handling.
-
136 */
- -
138 /**
-
139 * @brief Receive loggings will be used for anything which relates to receiving.
-
140 */
- -
142 /**
-
143 * @brief Transmit loggings will be used for anything which relates to transmitting.
-
144 */
- -
146 /**
-
147 * @brief License loggings will be used for anything which relates to licensing.
-
148 */
- - -
151
-
152/**@}*/
-
153#endif
-
154
-
155/************************************************ GENERIC ************************************************************/
-
156#if 1
-
157/**
-
158 * @addtogroup brawcap_generics
-
159 * @{
-
160 */
-
161
-
162/**
-
163 * @brief A bRAWcap handle.
-
164 *
-
165 * It can be @ref brawcap_open "created/opened" and @ref brawcap_close "deleted/closed".
-
166 * In general every function which communicates with the bRAWcap driver requires a open bRAWcap handle.
-
167 *
-
168 * @attention The number of bRAWcap handles per adapter is limited to @ref BRAWCAP_HANDLES_PER_ADAPTER_MAX.
-
169 * If this limit is reached each additional open on that adapter will fail.
-
170 */
-
171typedef struct _brawcap_handle brawcap_handle_t;
-
172
-
173/**@}*/
-
174#endif
-
175
-
176/*********************************************** TIMESTAMP ***********************************************************/
-
177#if 1
-
178/**
-
179 * @addtogroup brawcap_timestamp
-
180 * @{
-
181 */
-
182
-
183/**@}*/
-
184#endif
-
185
-
186/************************************************ PACKET *************************************************************/
-
187#if 1
-
188/**
-
189 * @addtogroup brawcap_packet
-
190 * @{
-
191 */
-
192
-
193/**@}*/
-
194#endif
-
195
-
196/************************************************* BUFFER *************************************************************/
-
197#if 1
-
198/**
-
199 * @addtogroup brawcap_buffer
-
200 * @{
-
201 */
-
202
-
203/********************************************* BUFFER ITERATOR ********************************************************/
-
204#if 1
-
205/**
-
206 * @addtogroup brawcap_buffer_iterator
-
207 * @{
-
208 */
-
209
-
210/**@}*/
-
211#endif
-
212
-
213/**@}*/
-
214#endif
-
215
-
216/************************************************** ADAPTER **********************************************************/
-
217#if 1
-
218/**
-
219 * @addtogroup brawcap_adapter
-
220 * @{
-
221 */
-
222
-
223/**
-
224 * @brief Required number of bytes for describing a MAC address.
-
225 * The defined length does not containing any delimiters, it represents the number of MAC address digits.
-
226 */
-
227#define BRAWCAP_ADAPTER_MAC_LENGTH 6
-
228
-
229/**
-
230 * @brief The max supported length for an adapter name.
-
231 *
-
232 * @note On Windows a adapter name always corresponds to it´s GUID.
-
233 * Those GUIDs have a fixed length.
-
234 */
-
235#define BRAWCAP_ADAPTER_NAME_LENGTH 40
-
236
-
237/**
-
238 * @brief Type used for counting the available/supported adapters on a machine.
-
239 */
- -
241
-
242/**
-
243 * @brief Fixed size array describing a MAC address.
-
244 *
-
245 * The array only contains the MAC address digits without any delimiters.
-
246 */
- -
248
-
249/**
-
250 * @brief Fixed size array containing a adapter name.
-
251 *
-
252 * @note On Windows a adapter name corresponds always to it´s GUID.
-
253 * Textual GUIDs always have the format "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}".
-
254 */
- -
256
-
257/**
-
258 * @brief IPv4 address.
-
259 */
-
260typedef union _brawcap_adapter_ipv4
-
261{
-
262 UINT8 bytes[4]; /*!< IPv4 address as byte array. */
-
263 UINT16 words[2]; /*!< IPv4 address as word array (each element has two Bytes). */
-
264 UINT32 addr; /*!< IPv4 address as single integer value. */
- -
266
-
267/**
-
268 * @brief IPv6 address.
-
269 */
-
270typedef union _brawcap_adapter_ipv6
-
271{
-
272 UINT8 bytes[16]; /*!< IPv6 address as byte array. */
-
273 UINT16 words[8]; /*!< IPv6 address as word array (each element has two Bytes). */
-
274 UINT64 qwords[2]; /*!< IPv6 address as large word array (each element has eight Bytes). */
- -
276
-
277/**
-
278 * @brief List of bRAWcap adapter speeds.
-
279 * Values indicating the current adapter uplink speed.
-
280 *
-
281 * @note The speed should be always equal for rx and tx,
-
282 * but both can be requested independent of each other.
-
283 */
-
284typedef enum _brawcap_adapter_speed
-
285{
-
286 BRAWCAP_ADAPTER_SPEED_UNKNOWN = 0ULL, /*!< Speed unknown */
-
287 BRAWCAP_ADAPTER_SPEED_10M = 10ULL, /*!< 10 MBit/s */
-
288 BRAWCAP_ADAPTER_SPEED_100M = 100ULL, /*!< 100 MBit/s */
-
289 BRAWCAP_ADAPTER_SPEED_1G = 1000ULL, /*!< 1 GBit/s */
-
290 BRAWCAP_ADAPTER_SPEED_2_5G = 2500ULL, /*!< 2,5 GBit/s */
-
291 BRAWCAP_ADAPTER_SPEED_5G = 5000ULL, /*!< 5 GBit/s */
-
292 BRAWCAP_ADAPTER_SPEED_10G = 10000ULL, /*!< 10 GBit/s*/
-
293 BRAWCAP_ADAPTER_SPEED_25G = 25000ULL, /*!< 25 GBit/s */
-
294 BRAWCAP_ADAPTER_SPEED_40G = 40000ULL, /*!< 40 GBit/s */
-
295 BRAWCAP_ADAPTER_SPEED_50G = 50000ULL, /*!< 50 GBit/s */
-
296 BRAWCAP_ADAPTER_SPEED_100G = 100000ULL /*!< 100 GBit/s */
- -
298
-
299/**
-
300 * @brief List of adapter connection states.
-
301 * Values indicating the current adapter connection state (uplink/cable connected).
-
302 */
-
303typedef enum _brawcap_adapter_connection_state
-
304{
-
305 BRAWCAP_ADAPTER_CONNECTION_UNKNOWN = 0, /*!< Connection state unknown. */
-
306 BRAWCAP_ADAPTER_CONNECTION_UP = 1, /*!< Connection is up (uplink/cable connected). */
-
307 BRAWCAP_ADAPTER_CONNECTION_DOWN = 2 /*!< Connection is down (cable not connected). */
- -
309
-
310/**
-
311 * @brief List of adapter operation states.
-
312 * Values indicating the current adapter operation state (adapter driver status).
-
313 */
-
314typedef enum _brawcap_adapter_operation_state
-
315{
-
316 BRAWCAP_ADAPTER_OPERATION_UNKNOWN = 0, /*!< Operation state unknown. */
-
317 BRAWCAP_ADAPTER_OPERATION_UP = 1, /*!< Adapter is running (driver activated). */
-
318 BRAWCAP_ADAPTER_OPERATION_DOWN = 2, /*!< Adapter is down/disabled (driver deactivated). */
-
319 BRAWCAP_ADAPTER_OPERATION_TESTING = 3 /*!< Adapter is in probing state. */
- -
321
-
322/**
-
323 * @brief Type for handling the adapter maximum transmission unit (MTU).
-
324 *
-
325 * It describes the maximum bytes per packet which can be received/transmitted on the adapter.
-
326 * Typical values are 1500 bytes for default sized Ethernet and 9000 bytes for jumbo frames.
-
327 *
-
328 * @note In general the MTU does not contain the Ethernet header (14 Bytes).
-
329 * If something like 1514/9014 is displayed by the adapter driver it contains the Ethernet header.
-
330 * If VLAN tagging is activated, VLAN packets require 4 additional bytes for each VLAN tag.
-
331 * There is also a 4 Byte FCS - defined by Ethernet - added to each packet (done by the network adapter).
-
332 * For example a full sized Jumbo Packet with one VLAN Tag can have:
-
333 * 14 Bytes Ethernet header + 4 Bytes VLAN Tag + 9000 Bytes Payload + 4 Bytes FCS = 9022 Bytes.
-
334 */
- -
336
-
337/**
-
338 * @brief List of reasons for adapter change notifications.
-
339 * This values indicate why a adapter change notification is received.
-
340 */
-
341typedef enum _brawcap_adapter_notify_reason
-
342{
-
343 /**
-
344 * @brief The notification reason is unknown.
-
345 */
- -
347 /**
-
348 * @brief A new bRAWcap adapter was detected.
-
349 * E.g. due to enabling bRAWcap driver on an adapter where it was disabled before.
-
350 */
- -
352 /**
-
353 * @brief A bRAWcap adapter was removed.
-
354 * E.g. due to disabling bRAWcap driver on an adapter where it was enabled before.
-
355 */
- -
357 /**
-
358 * @brief A adapter property has changed.
-
359 * This can have several reasons, for a list of all properties see @ref brawcap_adapter_properties_t.
-
360 */
- - -
363
-
364/**
-
365 * @brief List of adapter properties.
-
366 * They are used to identify adapter change notifications with a property change reason.
-
367 *
-
368 * @note The property values allow to store several properties in a single bitfield.
-
369 * This makes it possible to indicate several property changes with only one notification.
-
370 */
-
371typedef enum _brawcap_adapter_properties
-
372{
-
373 BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME = 0x0001, /*!< Adapter friendly name changed. */
-
374 BRAWCAP_ADAPTER_PROPERTY_RX_SPEED = 0x0002, /*!< Adapter receive speed changed. */
-
375 BRAWCAP_ADAPTER_PROPERTY_TX_SPEED = 0x0004, /*!< Adapter transmit speed changed. */
-
376 BRAWCAP_ADAPTER_PROPERTY_MTU = 0x0008, /*!< Adapter max transmission unit changed. */
-
377 BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE = 0x0010, /*!< Adapter operation state changed. */
-
378 BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE = 0x0020, /*!< Adapter connection state changed. */
-
379 BRAWCAP_ADAPTER_PROPERTY_IPV4 = 0x0040, /*!< Adapter IPv4 address changed. */
-
380 BRAWCAP_ADAPTER_PROPERTY_IPV6 = 0x0080 /*!< Adapter IPv6 address changed. */
- -
382
-
383/**
-
384 * @brief The general callback for adapter change notifications.
-
385 * It will be called each time a available and supported adapter change is detected.
-
386 *
-
387 * @attention Each application can only register for this callback once.
-
388 *
-
389 * @param[in] name The adapter name on which the change happened.
-
390 *
-
391 * @param[in] reason The reason/type of change (see @ref brawcap_adapter_notify_reason_t).
-
392 *
-
393 * @param[in] properties A bit field with the properties that have changed (see @ref brawcap_adapter_properties_t).
-
394 *
-
395 * @param[in] pUser Pointer to a user defined context.
-
396 * It allows access to user specific data within the callback.
-
397 */
- -
399 const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void* pUser);
-
400
-
401/**
-
402 * @brief The per handle callback for adapter change notifications.
-
403 * It will be called each time a change for the handle underlying adapter (and only for this adapter) is detected.
-
404 *
-
405 * @attention Each handle can register for this callback once.
-
406 *
-
407 * @param[in] pHandle The handle for which the adapter change notification was registered.
-
408 *
-
409 * @param[in] reason The reason/type of change (see @ref brawcap_adapter_notify_reason_t).
-
410 *
-
411 * @param[in] properties A bit field with the properties that have changed (see @ref brawcap_adapter_properties_t).
-
412 *
-
413 * @param[in] pUser Pointer to a user defined context.
-
414 * It allows access to user specific data within the callback.
-
415 */
- -
417 const brawcap_adapter_notify_reason_t reason, const UINT32 properties, void* pUser);
-
418
-
419/**@}*/
-
420#endif
-
421
-
422/************************************************** RECEIVE **********************************************************/
-
423#if 1
-
424/**
-
425 * @addtogroup brawcap_receive
-
426 * @{
-
427 */
-
428
-
429/********************************************** RECEIVE FILTER *******************************************************/
-
430#if 1
-
431/**
-
432 * @addtogroup brawcap_filter
-
433 * @{
-
434 */
-
435
-
436/**@}*/
-
437#endif
-
438
-
439/**
-
440 * @brief Max number of supported packet (receive) buffers per bRAWcap handle.
-
441 *
-
442 * Limits the number of buffers which can be attached to a single handle with @ref brawcap_rx_buffer_attach.
-
443 */
-
444#define BRAWCAP_RX_BUFFERS_PER_HANDLE_MAX 2
-
445
-
446/**
-
447 * @brief Receive callback which is called each time a receive has finished.
-
448 * Receiving can be started with @ref brawcap_rx_start and has to be stopped with @ref brawcap_rx_stop.
-
449 * Before anything can be received it is necessary to attach packet buffers to the bRAWcap handle.
-
450 * This can be done by creating new bRAWcap buffers (@ref brawcap_buffer_create) and attach it with
-
451 * @ref brawcap_rx_buffer_attach.
-
452 *
-
453 * @note If a handle has multiple buffers attached, the callback may be called in parallel (by different threads).
-
454 *
-
455 * @warning Executing to long in the callback can lead to a bottleneck in reception!
-
456 * It is recommended that the driver always has at least one (free) buffer were it can store the packets to.
-
457 *
-
458 * @param[in] pHandle Handle on which the receive returned.
-
459 *
-
460 * @param[in] status The overall receive status see @ref brawcap_status_t for possible return values.
-
461 *
-
462 * @param[in] pBuffer Pointer to the buffer which has finished receiving.
-
463 * It can be used to access all packets in the buffer and allows to retrieve information
-
464 * for each received packet (e.g. payload, length, timestamp, ...).
-
465 *
-
466 * @param[in] pUser Pointer to a user defined context.
-
467 * It allows access to user specific data within the callback.
-
468 */
-
469typedef void (*brawcap_rx_callback_t)(brawcap_handle_t* const pHandle, const brawcap_status_t status,
-
470 brawcap_buffer_t* const pBuffer, void* pUser);
-
471
-
472/**@}*/
-
473#endif
-
474
-
475/************************************************* TRANSMIT **********************************************************/
-
476#if 1
-
477/**
-
478 * @addtogroup brawcap_transmit
-
479 * @{
-
480 */
-
481
-
482/**
-
483 * @brief Transmit callback which is called each time a transmission initiated with @ref brawcap_tx_buffer_send has
-
484 * finished.
-
485 *
-
486 * @note Before any buffer can be transmitted the tranmission has to be started with @ref brawcap_tx_start and
-
487 * stopped with @ref brawcap_tx_stop.
-
488 *
-
489 * @param[in] pHandle Handle on which the transmission has finished.
-
490 *
-
491 * @param[in] status The overall transmission status see @ref brawcap_status_t for possible return values.
-
492 *
-
493 * @param[in] pBuffer Pointer to the buffer which has finished transmission (initiated with
-
494 * @ref brawcap_tx_buffer_send). It can be used to access all packets in the buffer - after transmission - and allows
-
495 * to retrieve information about each packet (e.g. (transmission) status, timestamp, ...).
-
496 *
-
497 * @param[in] pUser Pointer to a user defined context (allows access to user specific data within the callback).
-
498 */
-
499typedef void (*brawcap_tx_callback_t)(brawcap_handle_t* const pHandle, const brawcap_status_t status,
-
500 brawcap_buffer_t* const pBuffer, void* pUser);
-
501
-
502/**@}*/
-
503#endif
-
504
-
505/*************************************************** STATS ***********************************************************/
-
506#if 1
-
507/**
-
508 * @addtogroup brawcap_stats
-
509 * @{
-
510 */
-
511
-
512/**@}*/
-
513#endif
-
514
-
515#endif // BRAWCAP_TYPES_UM_H
-
bRAWcap API - Shared types.
-
UINT32 addr
Definition: brawcap_types_um.h:264
-
#define BRAWCAP_ADAPTER_NAME_LENGTH
The max supported length for an adapter name.
Definition: brawcap_types_um.h:235
-
brawcap_adapter_properties_t
List of adapter properties. They are used to identify adapter change notifications with a property ch...
Definition: brawcap_types_um.h:372
-
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 th...
Definition: brawcap_types_um.h:416
-
UINT8 brawcap_adapter_mac_t[BRAWCAP_ADAPTER_MAC_LENGTH]
Fixed size array describing a MAC address.
Definition: brawcap_types_um.h:247
-
brawcap_adapter_connection_state_t
List of adapter connection states. Values indicating the current adapter connection state (uplink/cab...
Definition: brawcap_types_um.h:304
-
char brawcap_adapter_name_t[BRAWCAP_ADAPTER_NAME_LENGTH]
Fixed size array containing a adapter name.
Definition: brawcap_types_um.h:255
-
brawcap_adapter_speed_t
List of bRAWcap adapter speeds. Values indicating the current adapter uplink speed.
Definition: brawcap_types_um.h:285
-
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 su...
Definition: brawcap_types_um.h:398
-
brawcap_adapter_operation_state_t
List of adapter operation states. Values indicating the current adapter operation state (adapter driv...
Definition: brawcap_types_um.h:315
-
UINT8 brawcap_adapter_count_t
Type used for counting the available/supported adapters on a machine.
Definition: brawcap_types_um.h:240
-
#define BRAWCAP_ADAPTER_MAC_LENGTH
Required number of bytes for describing a MAC address. The defined length does not containing any del...
Definition: brawcap_types_um.h:227
-
brawcap_adapter_notify_reason_t
List of reasons for adapter change notifications. This values indicate why a adapter change notificat...
Definition: brawcap_types_um.h:342
-
UINT64 brawcap_adapter_mtu_t
Type for handling the adapter maximum transmission unit (MTU).
Definition: brawcap_types_um.h:335
-
@ BRAWCAP_ADAPTER_PROPERTY_CONNECTION_STATE
Definition: brawcap_types_um.h:378
-
@ BRAWCAP_ADAPTER_PROPERTY_IPV6
Definition: brawcap_types_um.h:380
-
@ BRAWCAP_ADAPTER_PROPERTY_OPERATION_STATE
Definition: brawcap_types_um.h:377
-
@ BRAWCAP_ADAPTER_PROPERTY_RX_SPEED
Definition: brawcap_types_um.h:374
-
@ BRAWCAP_ADAPTER_PROPERTY_FRIENDLY_NAME
Definition: brawcap_types_um.h:373
-
@ BRAWCAP_ADAPTER_PROPERTY_IPV4
Definition: brawcap_types_um.h:379
-
@ BRAWCAP_ADAPTER_PROPERTY_TX_SPEED
Definition: brawcap_types_um.h:375
-
@ BRAWCAP_ADAPTER_PROPERTY_MTU
Definition: brawcap_types_um.h:376
-
@ BRAWCAP_ADAPTER_CONNECTION_UP
Definition: brawcap_types_um.h:306
-
@ BRAWCAP_ADAPTER_CONNECTION_UNKNOWN
Definition: brawcap_types_um.h:305
-
@ BRAWCAP_ADAPTER_CONNECTION_DOWN
Definition: brawcap_types_um.h:307
-
@ BRAWCAP_ADAPTER_SPEED_5G
Definition: brawcap_types_um.h:291
-
@ BRAWCAP_ADAPTER_SPEED_100G
Definition: brawcap_types_um.h:296
-
@ BRAWCAP_ADAPTER_SPEED_2_5G
Definition: brawcap_types_um.h:290
-
@ BRAWCAP_ADAPTER_SPEED_10G
Definition: brawcap_types_um.h:292
-
@ BRAWCAP_ADAPTER_SPEED_100M
Definition: brawcap_types_um.h:288
-
@ BRAWCAP_ADAPTER_SPEED_40G
Definition: brawcap_types_um.h:294
-
@ BRAWCAP_ADAPTER_SPEED_10M
Definition: brawcap_types_um.h:287
-
@ BRAWCAP_ADAPTER_SPEED_25G
Definition: brawcap_types_um.h:293
-
@ BRAWCAP_ADAPTER_SPEED_UNKNOWN
Definition: brawcap_types_um.h:286
-
@ BRAWCAP_ADAPTER_SPEED_50G
Definition: brawcap_types_um.h:295
-
@ BRAWCAP_ADAPTER_SPEED_1G
Definition: brawcap_types_um.h:289
-
@ BRAWCAP_ADAPTER_OPERATION_DOWN
Definition: brawcap_types_um.h:318
-
@ BRAWCAP_ADAPTER_OPERATION_UNKNOWN
Definition: brawcap_types_um.h:316
-
@ BRAWCAP_ADAPTER_OPERATION_TESTING
Definition: brawcap_types_um.h:319
-
@ BRAWCAP_ADAPTER_OPERATION_UP
Definition: brawcap_types_um.h:317
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_PROPERTY_CHANGE
A adapter property has changed. This can have several reasons, for a list of all properties see brawc...
Definition: brawcap_types_um.h:361
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_ADD
A new bRAWcap adapter was detected. E.g. due to enabling bRAWcap driver on an adapter where it was di...
Definition: brawcap_types_um.h:351
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_REMOVE
A bRAWcap adapter was removed. E.g. due to disabling bRAWcap driver on an adapter where it was enable...
Definition: brawcap_types_um.h:356
-
@ BRAWCAP_ADAPTER_NOTIFY_REASON_UNKNOWN
The notification reason is unknown.
Definition: brawcap_types_um.h:346
-
IPv4 address.
Definition: brawcap_types_um.h:261
-
IPv6 address.
Definition: brawcap_types_um.h:271
-
struct _brawcap_buffer brawcap_buffer_t
bRAWcap packet buffer object.
Definition: brawcap_types_shared.h:742
-
struct _brawcap_handle brawcap_handle_t
A bRAWcap handle.
Definition: brawcap_types_um.h:171
-
brawcap_log_type_t
List of bRAWcap log types.
Definition: brawcap_types_um.h:129
-
brawcap_log_level_t
List of bRAWcap log levels.
Definition: brawcap_types_um.h:77
-
@ BRAWCAP_LOG_TYPE_GENERIC
Generic loggings will be used for everything which has no specific type.
Definition: brawcap_types_um.h:133
-
@ BRAWCAP_LOG_TYPE_LICENSE
License loggings will be used for anything which relates to licensing.
Definition: brawcap_types_um.h:149
-
@ BRAWCAP_LOG_TYPE_TRANSMIT
Transmit loggings will be used for anything which relates to transmitting.
Definition: brawcap_types_um.h:145
-
@ BRAWCAP_LOG_TYPE_ADAPTER
Adapter loggings will be used for anything which relates to the local adapter handling.
Definition: brawcap_types_um.h:137
-
@ BRAWCAP_LOG_TYPE_RECEIVE
Receive loggings will be used for anything which relates to receiving.
Definition: brawcap_types_um.h:141
-
@ BRAWCAP_LOG_LEVEL_WARNING
Warning log level will include loggings for unexpected states. This level should never be disabled.
Definition: brawcap_types_um.h:107
-
@ BRAWCAP_LOG_LEVEL_ERROR
Error log level will include loggings if something went completely wrong and bRAWcap could not solve ...
Definition: brawcap_types_um.h:118
-
@ BRAWCAP_LOG_LEVEL_DEBUG
Debug log level is for debugging bRAWcap itself only. Therefore it can only be enabled if the applica...
Definition: brawcap_types_um.h:84
-
@ BRAWCAP_LOG_LEVEL_VERBOSE
Verbose log level will include many informative loggings. Those loggings gives more info why some API...
Definition: brawcap_types_um.h:93
-
@ BRAWCAP_LOG_LEVEL_NOTICE
Notice log level will include some loggings which gives information of the current bRAWcap state....
Definition: brawcap_types_um.h:100
-
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 braw...
Definition: brawcap_types_um.h:469
-
brawcap_status_t
bRAWcap status/return codes.
Definition: brawcap_types_shared.h:150
-
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 ...
Definition: brawcap_types_um.h:499
-
- - - - - - diff --git a/classes.html b/classes.html index 14e3902..5d724ed 100644 --- a/classes.html +++ b/classes.html @@ -56,7 +56,7 @@ Logo - diff --git a/dir_7b89567e327017dae4de490a86c928ab.html b/dir_7b89567e327017dae4de490a86c928ab.html index 0357460..2b79ab3 100644 --- a/dir_7b89567e327017dae4de490a86c928ab.html +++ b/dir_7b89567e327017dae4de490a86c928ab.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,14 +115,14 @@ - - + + - - + + - - + +

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.
 
diff --git a/dir_d28a4824dc47e487b107a5db32ef43c4.html b/dir_d28a4824dc47e487b107a5db32ef43c4.html index f2b78c6..7504e5b 100644 --- a/dir_d28a4824dc47e487b107a5db32ef43c4.html +++ b/dir_d28a4824dc47e487b107a5db32ef43c4.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -115,35 +115,35 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +

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:
 
diff --git a/examples.html b/examples.html index 8020d21..4802ed7 100644 --- a/examples.html +++ b/examples.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -109,14 +109,14 @@
diff --git a/files.html b/files.html index 7af4b44..763c93e 100644 --- a/files.html +++ b/files.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -111,21 +111,21 @@
Here is a list of all documented files with brief descriptions:
[detail level 12]
- - - + + + - - - - - - - - - - - + + + + + + + + + + +
  brawcap
 brawcap.hBRAWcap API - Functions
 brawcap_types_shared.hBRAWcap API - Shared types
 brawcap_types_um.hBRAWcap API - User mode types
 brawcap.hBRAWcap API - Functions
 brawcap_types_shared.hBRAWcap API - Shared types
 brawcap_types_um.hBRAWcap API - User mode types
  examples
 01_adapter_property_reader.cBRAWcap Example - Demonstrates the usage of the adapter handling module
 02_adapter_change_notifier.cBRAWcap Example - Demonstrates the usage of the adapter handling module
 03_generic_handle_opener.cBRAWcap Example - Demonstrates the usage of the generic bRAWcap functions
 04_version_comparator.cBRAWcap Example - Demonstrates how to use the bRAWcap version
 05_receive_simple_packet_receiver.cBRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets
 06_filter_firewall.cBRAWcap Example - Demonstrates how to throw away specific received packets
 07_receive_buffered_receiver.cBRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers
 08_receive_timestamp_inspector.cBRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes
 09_transmit_simple_packet_transmitter.cBRAWcap Example - TODO:
 10_transmit_buffered_transmitter.cBRAWcap Example - TODO:
 libbrawcap.hBRAWcap main header
 01_adapter_property_reader.cBRAWcap Example - Demonstrates the usage of the adapter handling module
 02_adapter_change_notifier.cBRAWcap Example - Demonstrates the usage of the adapter handling module
 03_generic_handle_opener.cBRAWcap Example - Demonstrates the usage of the generic bRAWcap functions
 04_version_comparator.cBRAWcap Example - Demonstrates how to use the bRAWcap version
 05_receive_simple_packet_receiver.cBRAWcap Example - Demonstrates how to use bRAWcap to receive separated packets
 06_filter_firewall.cBRAWcap Example - Demonstrates how to throw away specific received packets
 07_receive_buffered_receiver.cBRAWcap Example - Demonstrates how to use bRAWcap to receive packets with packet buffers
 08_receive_timestamp_inspector.cBRAWcap Example - Demonstrates how to use bRAWcap to use different receive timestamp modes
 09_transmit_simple_packet_transmitter.cBRAWcap Example - TODO:
 10_transmit_buffered_transmitter.cBRAWcap Example - TODO:
 libbrawcap.hBRAWcap main header
diff --git a/functions.html b/functions.html index 989b27a..a0a6499 100644 --- a/functions.html +++ b/functions.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,111 +108,111 @@
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- a -

- b -

- c -

- d -

- f -

- h -

- j -

- k -

- m -

- p -

- q -

- r -

- s -

- t -

- w -

diff --git a/functions_vars.html b/functions_vars.html index 8b729c7..3902613 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,111 +108,111 @@  

- a -

- b -

- c -

- d -

- f -

- h -

- j -

- k -

- m -

- p -

- q -

- r -

- s -

- t -

- w -

diff --git a/globals.html b/globals.html index 436f256..37ba0ef 100644 --- a/globals.html +++ b/globals.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,7 +108,7 @@
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- _ -

diff --git a/globals_b.html b/globals_b.html index 50d1e53..c8c2b33 100644 --- a/globals_b.html +++ b/globals_b.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,286 +108,287 @@
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- b -

diff --git a/globals_defs.html b/globals_defs.html index 4a4d4be..fe3ca35 100644 --- a/globals_defs.html +++ b/globals_defs.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,56 +108,56 @@  

- _ -

- b -

diff --git a/globals_enum.html b/globals_enum.html index 7665ce6..e083b32 100644 --- a/globals_enum.html +++ b/globals_enum.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -106,21 +106,21 @@
 
diff --git a/globals_eval.html b/globals_eval.html index 4275a88..ab2e6bc 100644 --- a/globals_eval.html +++ b/globals_eval.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,89 +108,89 @@  

- b -

diff --git a/globals_func.html b/globals_func.html index 426ca24..952de1d 100644 --- a/globals_func.html +++ b/globals_func.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,119 +108,120 @@  

- b -

diff --git a/globals_type.html b/globals_type.html index ac44451..3c80569 100644 --- a/globals_type.html +++ b/globals_type.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -106,30 +106,30 @@
 
diff --git a/index.html b/index.html index faa0d20..bd793f5 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ Logo -
bRAWcap 1.0.0 +
bRAWcap 1.0.1
b-plus Technologies - Ethernet Performance Transmitter Receiver
@@ -108,12 +108,12 @@
Main Page
-

+

bRAWcap

Manual
-Version 1.0.0
-Date 22.11.2023
+Version 1.0.1
+Date 2024-11-12

b-plus technologies GmbH
Ulrichsberger Str. 17
@@ -124,21 +124,9 @@ www.b-plus.com


Legal Notice
-

Copyright © 2023 b-plus technologies GmbH
- All contents in this document, in particular texts and graphics, are protected by copyright (all rights reserved).
- Duplication (copy, print or any other form) as well as electronic distribution of this document is only permitted within statutory provisions or the written permission of b-plus technologies GmbH.
- b-plus technologies GmbH reserves the right to change technical data without prior notice.
- Names of products, companies, brands and so forth which are mentioned in this document are trademarks or registered trademarks of their respective owners.
- The general terms and conditions as well as the provisions of the license agreements apply.
- See general terms and conditions for more information.
- This document has been created with due care.
- b-plus technologies GmbH is not liable for damages which results directly or indirectly from errors, omissions or discrepancies between the product and the document.


+

Copyright © 2024 b-plus technologies GmbH All contents in this document, in particular texts and graphics, are protected by copyright (all rights reserved). Duplication (copy, print or any other form) as well as electronic distribution of this document is only permitted within statutory provisions or the written permission of b-plus technologies GmbH. b-plus technologies GmbH reserves the right to change technical data without prior notice. Names of products, companies, brands and so forth which are mentioned in this document are trademarks or registered trademarks of their respective owners. The general terms and conditions as well as the provisions of the license agreements apply. See general terms and conditions for more information. This document has been created with due care. b-plus technologies GmbH is not liable for damages which results directly or indirectly from errors, omissions or discrepancies between the product and the document.


Software Copyright
-

2022 - 2023, b-plus technologies GmbH. All rights reserved!
- 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 © 2024 b-plus technologies GmbH. All rights reserved! This software, including all code, text, and graphics, is the property of b-plus technologies GmbH or its licensors and is protected by international copyright laws. Unauthorized use, reproduction, or distribution of this software or any portion of it may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law. For general terms and Conditions for Software please go to General Terms & Conditions on our Website b-plus.com and download it there: general terms and conditions

Contents

@@ -329,15 +321,15 @@

-CAUTION (yellow):
Instructions that, if ignored, could result in a crash by incorrect operation of the software.
+CAUTION (yellow):
Instructions that, if ignored, could result in a injury, failure or crash.
-ATTENTION (blue):
Instructions that, if ignored, could result in malfunction of the software or parts thereof..
+ATTENTION (blue):
Instructions that, if ignored, could result in malfunction.
-NOTE (grey):
This symbol refers to a note which can clarify a detail or expand on something mentioned. It provides context and more detail..
+NOTE (grey):
This symbol refers to a note which can clarify a detail or expand on something mentioned. It provides additional context and more details.
@@ -677,12 +669,12 @@

The API documentation is grouped into different modules. Each module is describing a specific part of the API.

5.3.2. Including

-

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:

5.3.3. Linking

@@ -703,26 +695,308 @@

7. Third-Party Legal Notice

    -
  • Driver
      -
    • [none]
    • -
    -
  • -
  • Library
      -
    • [none]
    • -
    -
  • -
  • Demo +
  • Driver
    + [none]
  • +
  • Library
    + [none]
  • +
  • Demo +

    cxxopts +

    +
    Copyright (c) 2014 Jarryd Beck
    +
    +
    Permission is hereby granted, free of charge, to any person obtaining a copy
    +
    of this software and associated documentation files (the "Software"), to deal
    +
    in the Software without restriction, including without limitation the rights
    +
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +
    copies of the Software, and to permit persons to whom the Software is
    +
    furnished to do so, subject to the following conditions:
    +
    +
    The above copyright notice and this permission notice shall be included in
    +
    all copies or substantial portions of the Software.
    +
    +
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +
    THE SOFTWARE.
    +

    +

    +

    +

    +

    PDCursesMod +

    +
    The core package is in the public domain, but small portions of PDCursesMod are subject to copyright under various
    +
    licenses. Each directory contains a README file, with a section titled "Distribution Status" which describes the
    +
    status of the files in that directory.
    +
    +
    If you use PDCursesMod in an application, an acknowledgement would be appreciated, but is not mandatory.
    +
    If you make corrections or enhancements to PDCursesMod, please forward them to the current maintainer
    +
    for the benefit of other users.
    +
    +
    This software is provided AS IS with NO WARRANTY whatsoever.
    +

    +

    +

  • -
  • Setup
      -
    • NSIS - zlib/libpng License
    • -
    +
  • Setup +

    NSIS +

    +
    Copyright
    +
    Copyright (C) 1999-2023 Contributors
    +
    +
    More detailed copyright information can be found in the individual source code files.
    +
    +
    Applicable licenses
    +
    All NSIS source code, plug-ins, documentation, examples, header files and graphics,
    +
    with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
    +
    The zlib compression module for NSIS is licensed under the zlib/libpng license.
    +
    The bzip2 compression module for NSIS is licensed under the bzip2 license.
    +
    The lzma compression module for NSIS is licensed under the Common Public License version 1.0.
    +
    zlib/libpng license
    +
    This software is provided 'as-is', without any express or implied warranty.
    +
    In no event will the authors be held liable for any damages arising from the use of this software.
    +
    +
    Permission is granted to anyone to use this software for any purpose, including commercial applications,
    +
    and to alter it and redistribute it freely, subject to the following restrictions:
    +
    +
    The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
    +
    If you use this software in a product, an acknowledgment in the product documentation would be appreciated
    +
    but is not required.
    +
    Altered source versions must be plainly marked as such, and must not be misrepresented as being the original
    +
    software.
    +
    This notice may not be removed or altered from any source distribution.
    +
    bzip2 license
    +
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that
    +
    the following conditions are met:
    +
    +
    Redistributions of source code must retain the above copyright notice, this list of conditions and
    +
    the following disclaimer.
    +
    The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
    +
    If you use this software in a product, an acknowledgment in the product documentation would be appreciated
    +
    but is not required.
    +
    Altered source versions must be plainly marked as such, and must not be misrepresented as being the original
    +
    software.
    +
    The name of the author may not be used to endorse or promote products derived from this software without specific
    +
    prior written permission.
    +
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
    +
    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    +
    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    +
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    +
    OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    +
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    +
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    +
    Julian Seward, Cambridge, UK.
    +
    +
    jseward@acm.org
    +
    +
    Common Public License version 1.0
    +
    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT").
    +
    ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
    +
    +
    1. DEFINITIONS
    +
    +
    "Contribution" means:
    +
    +
    a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
    +
    b) in the case of each subsequent Contributor:
    +
    +
    i) changes to the Program, and
    +
    +
    ii) additions to the Program;
    +
    +
    where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
    +
    A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
    +
    acting on such Contributor's behalf. Contributions do not include additions to the Program which:
    +
    (i) are separate modules of software distributed in conjunction with the Program under their own license agreement,
    +
    and (ii) are not derivative works of the Program.
    +
    +
    "Contributor" means any person or entity that distributes the Program.
    +
    +
    "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or
    +
    sale of its Contribution alone or when combined with the Program.
    +
    +
    "Program" means the Contributions distributed in accordance with this Agreement.
    +
    +
    "Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
    +
    +
    2. GRANT OF RIGHTS
    +
    +
    a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
    +
    royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform,
    +
    distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code
    +
    and object code form.
    +
    +
    b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
    +
    royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer
    +
    the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply
    +
    to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor,
    +
    such addition of the Contribution causes such combination to be covered by the Licensed Patents.
    +
    The patent license shall not apply to any other combinations which include the Contribution.
    +
    No hardware per se is licensed hereunder.
    +
    +
    c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein,
    +
    no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual
    +
    property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any
    +
    other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the
    +
    rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other
    +
    intellectual property rights needed, if any. For example, if a third party patent license is required to allow
    +
    Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing
    +
    the Program.
    +
    +
    d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any,
    +
    to grant the copyright license set forth in this Agreement.
    +
    +
    3. REQUIREMENTS
    +
    +
    A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
    +
    +
    a) it complies with the terms and conditions of this Agreement; and
    +
    +
    b) its license agreement:
    +
    +
    i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including
    +
    warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and
    +
    fitness for a particular purpose;
    +
    +
    ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect,
    +
    special, incidental and consequential damages, such as lost profits;
    +
    +
    iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and
    +
    not by any other party; and
    +
    +
    iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain
    +
    it in a reasonable manner on or through a medium customarily used for software exchange.
    +
    +
    When the Program is made available in source code form:
    +
    +
    a) it must be made available under this Agreement; and
    +
    +
    b) a copy of this Agreement must be included with each copy of the Program.
    +
    +
    Contributors may not remove or alter any copyright notices contained within the Program.
    +
    +
    Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably
    +
    allows subsequent Recipients to identify the originator of the Contribution.
    +
    +
    4. COMMERCIAL DISTRIBUTION
    +
    +
    Commercial distributors of software may accept certain responsibilities with respect to end users, business partners
    +
    and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who
    +
    includes the Program in a commercial product offering should do so in a manner which does not create potential
    +
    liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering,
    +
    such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor
    +
    ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims,
    +
    lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused
    +
    by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a
    +
    commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any
    +
    actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must:
    +
    a) promptly notify the Commercial Contributor in writing of such claim, and
    +
    b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and
    +
    any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own
    +
    expense.
    +
    +
    For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor
    +
    is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties
    +
    related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone.
    +
    Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to
    +
    those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a
    +
    result, the Commercial Contributor must pay those damages.
    +
    +
    5. NO WARRANTY
    +
    +
    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
    +
    CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
    +
    TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible
    +
    for determining the appropriateness of using and distributing the Program and assumes all risks associated with its
    +
    exercise of rights under this Agreement, including but not limited to the risks and costs of program errors,
    +
    compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or
    +
    interruption of operations.
    +
    +
    6. DISCLAIMER OF LIABILITY
    +
    +
    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
    +
    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
    +
    PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    +
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY
    +
    RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    +
    +
    7. GENERAL
    +
    +
    If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the
    +
    validity or enforceability of the remainder of the terms of this Agreement, and without further action by the
    +
    parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid
    +
    and enforceable.
    +
    +
    If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software
    +
    (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such
    +
    Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient
    +
    institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that
    +
    the Program itself (excluding combinations of the Program with other software or hardware) infringes such
    +
    Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
    +
    litigation is filed.
    +
    +
    All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or
    +
    conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of
    +
    such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and
    +
    distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement
    +
    and any licenses granted by Recipient relating to the Program shall continue and survive.
    +
    +
    Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the
    +
    Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right
    +
    to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement
    +
    Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the
    +
    responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement
    +
    will be given a distinguishing version number. The Program (including Contributions) may always be distributed
    +
    subject to the version of the Agreement under which it was received. In addition, after a new version of the
    +
    Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new
    +
    version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the
    +
    intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or
    +
    otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
    +
    +
    This Agreement is governed by the laws of the State of New York and the intellectual property laws of the
    +
    United States of America. No party to this Agreement will bring a legal action under this Agreement more than one
    +
    year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
    +
    +
    Special exception for LZMA compression module
    +
    Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to
    +
    statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for
    +
    NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications
    +
    or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the
    +
    Common Public License version 1.0.
    +

    +

    +

  • -
  • Doc +
  • Doc +

    doxygen-awesome-css +

    +
    MIT License
    +
    +
    Copyright (c) 2021 - 2023 jothepro
    +
    +
    Permission is hereby granted, free of charge, to any person obtaining a copy
    +
    of this software and associated documentation files (the "Software"), to deal
    +
    in the Software without restriction, including without limitation the rights
    +
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +
    copies of the Software, and to permit persons to whom the Software is
    +
    furnished to do so, subject to the following conditions:
    +
    +
    The above copyright notice and this permission notice shall be included in all
    +
    copies or substantial portions of the Software.
    +
    +
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    +
    SOFTWARE.
    +

    +

    +

@@ -782,7 +1056,7 @@

8.1.3. High CPU Load

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.

NOTE Filtering vs Supplying
If you set bRAWcap to only process a subpart of the packet, it is still possible to set the filter for the hole packet. For example if you do not want the header bytes to be part of the packet, you can still set a filter on those header bytes.
@@ -791,9 +1065,14 @@

8.2. Version History

Update history of bRAWcap and all of it´s components.

8.2.1. Version 0.1.0

@@ -1001,6 +1280,195 @@

  • Setup
  • +

    +8.2.4. Version 1.0.0

    +

    Release Date: 2024-02-01

    +
    +

    ‍Highlights

    +
      +
    • This is the first official version of our bRAWcap.
    • +
    • Stable reception and transmission.
    • +
    • API is now fixed and will be kept compatible by future minor/patch releases.
    • +
    +
    +
    +

    ‍Changes

    +
      +
    • Driver & Library
        +
      • Generic
          +
        • Improved driver IO controls to allow asynchronous calls (e.g. for requesting stats while transmitting/receiving).
        • +
        +
      • +
      • Receiving/Filtering
          +
        • Filters are now a submodule of receiving (because they are only applicable for reception).
        • +
        +
      • +
      • Monitoring/Statistics
          +
        • Checking for supported adapter stats is now possible via macro.
        • +
        +
      • +
      • Time Stamping
          +
        • Improved fallback time stamping behavior if selected mode is unavailable.
        • +
        +
      • +
      • Adapter
          +
        • 5G uplink speeds are known now - they was reported as "unknown" before.
        • +
        +
      • +
      +
    • +
    • Demo App
        +
      • Generic
          +
        • Improved command line parameter descriptions.
        • +
        • It is now possible to adjust display refresh rate with +/- during runtime.
        • +
        • Console output now signals, if demo is going to be stopped (stop pending).
        • +
        • Demo can be stopped now (gracefully and immediately) by using the ESC key.
        • +
        • For each mode the displayed adapter statistics will show if the corresponding counter is supported.
        • +
        • It is now possible to generate a log file for each used adapter containing the statistic counters (–log-stats).
        • +
        • Improved accuracy of displayed transmit/receive rates.
        • +
        +
      • +
      • Receive
          +
        • It is now possible to specify a receive filter via command line parameter (–filter)
        • +
        • Added column for adapter dropped packets.
        • +
        +
      • +
      • Transmit
          +
        • Added new parameter (–dummy-packet-dest-mac) which allows to specify a target Ethernet MAC for the generate dummy packet.
        • +
        +
      • +
      +
    • +
    • CPP Wrapper
        +
      • Initial release of bRAWcap C++ wrapper for the SDK contained C API (also available at GitHub).
      • +
      +
    • +
    • Setup
        +
      • Now supports german language
      • +
      +
    • +
    +
    +
    +

    ‍Bugfixes

    +
      +
    • Driver & Library
        +
      • Generic
          +
        • Could not apply no timestamp mode.
        • +
        +
      • +
      • Receiving/Transmitting
          +
        • Fixed possible crash when stopping process while transmission/reception is still active.
        • +
        +
      • +
      • Adapter
          +
        • brawcap_adapter_description_by_handle could crash if description pointer was invalid.
        • +
        • Changed internal Windows API call to support old Windows 10 versions (< 1709).
        • +
        +
      • +
      • Monitoring/Statistics
          +
        • Fixed macro BRAWCAP_STATS_RX_ADAPTER_DROPPED_PACKETS_TOTAL_VALID - syntax issue.
        • +
        • Driver now saves statistics of already closed handles and adds them to the total "driver" stats since driver start.
        • +
        +
      • +
      +
    • +
    • Demo App
        +
      • Generic
          +
        • Improved stop handling when demo is killed with CTRL+C (by resetting the original console attributes, e.g. font size...).
        • +
        +
      • +
      • Transmit
          +
        • Time gap for dummy frames was not used anymore if a transmission buffer was transmitted once.
        • +
        +
      • +
      +
    • +
    • Setup
        +
      • Added required VC re-distributable to installer, will be automatically installed if no supported version is already available.
      • +
      +
    • +
    +
    +
    +

    ‍Open Issues

    +
      +
    • Driver & Library
    • +
    • Demo App
    • +
    • Setup
    • +
    +
    +

    +8.2.5. Version 1.0.1

    +

    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]
      • +
      +
    • +
    +