Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oxd.sh/llms.txt

Use this file to discover all available pages before exploring further.

ox_accel_stats

Copy current traffic statistics into a caller-provided struct.
OxAccelError ox_accel_stats(OxAccel *ctx, AccelStats *out)

Parameters

ctx
OxAccel*
required
Active context.
out
AccelStats*
required
Pointer to a caller-allocated AccelStats struct.

Returns

ValueMeaning
OkStats copied successfully
InvalidParamNULL pointer

AccelStats struct

typedef struct {
    uint64_t packets_sent;
    uint64_t packets_recv;
    uint64_t bytes_sent;
    uint64_t bytes_recv;
} AccelStats;

Example

AccelStats stats;
ox_accel_stats(ctx, &stats);

printf("TX: %lu packets (%lu bytes)\n",
       stats.packets_sent, stats.bytes_sent);
printf("RX: %lu packets (%lu bytes)\n",
       stats.packets_recv, stats.bytes_recv);

ox_accel_version

Returns the SDK version string.
const char* ox_accel_version(void)

Returns

A null-terminated version string (e.g., "0.10.97"). The returned pointer is valid for the lifetime of the process.
Do not free the returned pointer. It points to a static string embedded in the library.

Example

printf("Accel SDK %s\n", ox_accel_version());