sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
lwiperf.h
Go to the documentation of this file.
1
6
7/*
8 * Copyright (c) 2014 Simon Goldschmidt
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright notice,
17 * this list of conditions and the following disclaimer in the documentation
18 * and/or other materials provided with the distribution.
19 * 3. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 * OF SUCH DAMAGE.
32 *
33 * This file is part of the lwIP TCP/IP stack.
34 *
35 * Author: Simon Goldschmidt
36 *
37 */
38#ifndef LWIP_HDR_APPS_LWIPERF_H
39#define LWIP_HDR_APPS_LWIPERF_H
40
41#include "lwip/opt.h"
42#include "lwip/ip_addr.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#define LWIPERF_TCP_PORT_DEFAULT 5001
49
66
77
90typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_type,
91 const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port,
92 u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec);
93
94void* lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port,
95 lwiperf_report_fn report_fn, void* report_arg);
96void* lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg);
97void* lwiperf_start_tcp_client(const ip_addr_t* remote_addr, u16_t remote_port,
98 enum lwiperf_client_type type,
99 lwiperf_report_fn report_fn, void* report_arg);
100void* lwiperf_start_tcp_client_default(const ip_addr_t* remote_addr,
101 lwiperf_report_fn report_fn, void* report_arg);
102
103void lwiperf_abort(void* lwiperf_session);
104
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* LWIP_HDR_APPS_LWIPERF_H */
void(*) lwiperf_report_fn(void *arg, enum lwiperf_report_type report_type, const ip_addr_t *local_addr, u16_t local_port, const ip_addr_t *remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec)
Definition lwiperf.h:90
lwiperf_client_type
Definition lwiperf.h:69
@ LWIPERF_DUAL
Definition lwiperf.h:73
@ LWIPERF_TRADEOFF
Definition lwiperf.h:75
@ LWIPERF_CLIENT
Definition lwiperf.h:71
lwiperf_report_type
Definition lwiperf.h:52
@ LWIPERF_TCP_ABORTED_LOCAL_TXERROR
Definition lwiperf.h:62
@ LWIPERF_TCP_DONE_CLIENT
Definition lwiperf.h:56
@ LWIPERF_TCP_DONE_SERVER
Definition lwiperf.h:54
@ LWIPERF_TCP_ABORTED_LOCAL
Definition lwiperf.h:58
@ LWIPERF_TCP_ABORTED_LOCAL_DATAERROR
Definition lwiperf.h:60
@ LWIPERF_TCP_ABORTED_REMOTE
Definition lwiperf.h:64