Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
lwIP iPerf server implementation More...
Go to the source code of this file.
Typedefs | |
typedef struct _lwiperf_settings | lwiperf_settings_t |
This is the Iperf settings struct sent from the client. | |
typedef struct _lwiperf_state_tcp | lwiperf_state_tcp_t |
Connection handle for a TCP iperf session. | |
Functions | |
static err_t | lwiperf_tcp_poll (void *arg, struct tcp_pcb *tpcb) |
TCP poll callback, try to send more data. | |
static void | lwiperf_tcp_err (void *arg, err_t err) |
Error callback, iperf tcp session aborted. | |
static void | lwiperf_list_add (lwiperf_state_base_t *item) |
Add an iperf session to the 'active' list. | |
static void | lwiperf_list_remove (lwiperf_state_base_t *item) |
Remove an iperf session from the 'active' list. | |
static void | lwip_tcp_conn_report (lwiperf_state_tcp_t *conn, enum lwiperf_report_type report_type) |
Call the report function of an iperf tcp session. | |
static void | lwiperf_tcp_close (lwiperf_state_tcp_t *conn, enum lwiperf_report_type report_type) |
Close an iperf tcp session. | |
static err_t | lwiperf_tcp_client_send_more (lwiperf_state_tcp_t *conn) |
Try to send more data on an iperf tcp session. | |
static err_t | lwiperf_tcp_client_sent (void *arg, struct tcp_pcb *tpcb, u16_t len) |
TCP sent callback, try to send more data. | |
static err_t | lwiperf_tcp_client_connected (void *arg, struct tcp_pcb *tpcb, err_t err) |
TCP connected callback (active connection), send data now. | |
static err_t | lwiperf_tx_start (lwiperf_state_tcp_t *conn) |
Start TCP connection back to the client (either parallel or after the receive test has finished. | |
static err_t | lwiperf_tcp_recv (void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err) |
Receive data on an iperf tcp session. | |
static err_t | lwiperf_tcp_accept (void *arg, struct tcp_pcb *newpcb, err_t err) |
This is called when a new client connects for an iperf tcp session. | |
void * | lwiperf_start_tcp_server_default (lwiperf_report_fn report_fn, void *report_arg) |
Start a TCP iperf server on the default TCP port (5001) and listen for incoming connections from iperf clients. | |
void * | lwiperf_start_tcp_server (const ip_addr_t *local_addr, u16_t local_port, lwiperf_report_fn report_fn, void *report_arg) |
Start a TCP iperf server on a specific IP address and port and listen for incoming connections from iperf clients. | |
void | lwiperf_abort (void *lwiperf_session) |
Abort an iperf session (handle returned by lwiperf_start_tcp_server*()) | |
Variables | |
static lwiperf_state_base_t * | lwiperf_all_connections |
List of active iperf sessions. | |
static const u8_t | lwiperf_txbuf_const [1600] |
A const buffer to send from: we want to measure sending, not copying! |
Detailed Description
lwIP iPerf server implementation
Definition in file lwip_lwiperf.c.
Typedef Documentation
typedef struct _lwiperf_settings lwiperf_settings_t |
This is the Iperf settings struct sent from the client.
typedef struct _lwiperf_state_tcp lwiperf_state_tcp_t |
Connection handle for a TCP iperf session.
Function Documentation
static void lwip_tcp_conn_report | ( | lwiperf_state_tcp_t * | conn, |
enum lwiperf_report_type | report_type | ||
) | [static] |
Call the report function of an iperf tcp session.
Definition at line 201 of file lwip_lwiperf.c.
static void lwiperf_list_add | ( | lwiperf_state_base_t * | item ) | [static] |
Add an iperf session to the 'active' list.
Definition at line 168 of file lwip_lwiperf.c.
static void lwiperf_list_remove | ( | lwiperf_state_base_t * | item ) | [static] |
Remove an iperf session from the 'active' list.
Definition at line 179 of file lwip_lwiperf.c.
This is called when a new client connects for an iperf tcp session.
Definition at line 537 of file lwip_lwiperf.c.
TCP connected callback (active connection), send data now.
Definition at line 341 of file lwip_lwiperf.c.
static err_t lwiperf_tcp_client_send_more | ( | lwiperf_state_tcp_t * | conn ) | [static] |
Try to send more data on an iperf tcp session.
Definition at line 248 of file lwip_lwiperf.c.
TCP sent callback, try to send more data.
Definition at line 326 of file lwip_lwiperf.c.
static void lwiperf_tcp_close | ( | lwiperf_state_tcp_t * | conn, |
enum lwiperf_report_type | report_type | ||
) | [static] |
Close an iperf tcp session.
Definition at line 221 of file lwip_lwiperf.c.
static void lwiperf_tcp_err | ( | void * | arg, |
err_t | err | ||
) | [static] |
Error callback, iperf tcp session aborted.
Definition at line 509 of file lwip_lwiperf.c.
TCP poll callback, try to send more data.
Definition at line 518 of file lwip_lwiperf.c.
static err_t lwiperf_tcp_recv | ( | void * | arg, |
struct tcp_pcb * | tpcb, | ||
struct pbuf * | p, | ||
err_t | err | ||
) | [static] |
Receive data on an iperf tcp session.
Definition at line 406 of file lwip_lwiperf.c.
static err_t lwiperf_tx_start | ( | lwiperf_state_tcp_t * | conn ) | [static] |
Start TCP connection back to the client (either parallel or after the receive test has finished.
Definition at line 359 of file lwip_lwiperf.c.
Variable Documentation
lwiperf_state_base_t* lwiperf_all_connections [static] |
List of active iperf sessions.
Definition at line 118 of file lwip_lwiperf.c.
const u8_t lwiperf_txbuf_const[1600] [static] |
A const buffer to send from: we want to measure sending, not copying!
Definition at line 120 of file lwip_lwiperf.c.
Generated on Tue Jul 12 2022 12:22:31 by
