netatalk: afp_tcp_analytics.h File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afp_tcp_analytics.h File Reference
`#include <stdint.h>`
`#include <sys/types.h>`
`#include "afpclient.h"`

Go to the source code of this file.

## Data Structures
struct | TcpMetrics
struct | TcpAnalyticsSession

## Enumerations
enum | TcpOutputFormat { TCP_OUTPUT_TEXT , TCP_OUTPUT_CSV }

## Functions
void | tcp_analytics_init (TcpAnalyticsSession *session, TcpOutputFormat format, int enable_session)
| Initialize TCP analytics session.
int | tcp_analytics_capture (CONN *conn, TcpMetrics *metrics)
| Capture TCP metrics from connection socket via getsockopt().
int | tcp_analytics_session_start (TcpAnalyticsSession *session, CONN *conn)
| Mark session start - capture "initial" metrics for size sweep mode.
int | tcp_analytics_test_start (TcpAnalyticsSession *session, CONN *conn, off_t file_size)
| Mark test start - capture "before" metrics.
int | tcp_analytics_test_end (TcpAnalyticsSession *session, CONN *conn)
| Mark test end - capture "after" metrics and print per-test comparison.
int | tcp_analytics_session_end (TcpAnalyticsSession *session, CONN *conn)
| Mark session end - capture "final" metrics and print session summary.

## Enumeration Type Documentation

## ◆ TcpOutputFormat

enum TcpOutputFormat

Enumerator
TCP_OUTPUT_TEXT |
TCP_OUTPUT_CSV |

## Function Documentation

## ◆ tcp_analytics_capture()

int tcp_analytics_capture | ( | CONN * | conn,
|  | TcpMetrics * | metrics )

Capture TCP metrics from connection socket via getsockopt().

Note
  Supports Linux, FreeBSD, NetBSD, OpenBSD (TCP_INFO), macOS (TCP_CONNECTION_INFO)

## ◆ tcp_analytics_init()

void tcp_analytics_init | ( | TcpAnalyticsSession * | session,
|  | TcpOutputFormat | format,
|  | int | enable_session )

Initialize TCP analytics session.

Note
  Must be called before any other tcp_analytics functions

## ◆ tcp_analytics_session_end()

int tcp_analytics_session_end | ( | TcpAnalyticsSession * | session,
|  | CONN * | conn )

Mark session end - capture "final" metrics and print session summary.

## ◆ tcp_analytics_session_start()

int tcp_analytics_session_start | ( | TcpAnalyticsSession * | session,
|  | CONN * | conn )

Mark session start - capture "initial" metrics for size sweep mode.

## ◆ tcp_analytics_test_end()

int tcp_analytics_test_end | ( | TcpAnalyticsSession * | session,
|  | CONN * | conn )

Mark test end - capture "after" metrics and print per-test comparison.

## ◆ tcp_analytics_test_start()

int tcp_analytics_test_start | ( | TcpAnalyticsSession * | session,
|  | CONN * | conn,
|  | off_t | file_size )

Mark test start - capture "before" metrics.