Microchip® Advanced Software Framework

winc1500/iperf_server_example/iperf.h File Reference

WINC1500 iperf.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include "socket/include/socket.h"

Data Structures

struct  app_status
 
struct  client_hdr
 
struct  server_hdr
 
struct  tstrIperfInit
 
struct  UDP_datagram
 

Macros

#define HEADER_VERSION1   0x80000000
 iPerf Settings More...
 
#define IPERF_BUFFER_SIZE   ((IPERF_RX_BUFFER_SIZE > IPERF_TX_BUFFER_SIZE) ? IPERF_RX_BUFFER_SIZE : IPERF_TX_BUFFER_SIZE)
 
#define IPERF_RX_BUFFER_SIZE   1600
 
#define IPERF_TX_BUFFER_SIZE   1400
 
#define IPERF_WIFI_M2M_SERVER_IP   0xFFFFFFFF
 
#define IPERF_WIFI_M2M_SERVER_PORT   (5001)
 
#define IPERF_WIFI_M2M_WLAN_AUTH   M2M_WIFI_SEC_WPA_PSK
 Security manner. More...
 
#define IPERF_WIFI_M2M_WLAN_PSK   "12345678"
 Password for Destination SSID. More...
 
#define IPERF_WIFI_M2M_WLAN_SSID   "DEMO_AP"
 Wi-Fi Settings. More...
 
#define RUN_NOW   0x00000001
 
#define TEST_STATE_TCP_RX   4
 
#define TEST_STATE_TCP_TX   3
 
#define TEST_STATE_UDP_RX   2
 
#define TEST_STATE_UDP_TX   1
 

Typedefs

typedef struct app_status app_status
 
typedef struct client_hdr client_hdr
 
typedef struct server_hdr server_hdr
 
typedef struct UDP_datagram UDP_datagram
 

Enumerations

enum  app_mode {
  MODE_UNDEF,
  MODE_INIT,
  MODE_INIT_DONE,
  MODE_START,
  MODE_RUN,
  MODE_WAIT,
  MODE_FINISHED,
  MODE_STOP,
  MODE_UNDEF,
  MODE_INIT,
  MODE_INIT_DONE,
  MODE_START,
  MODE_RUN,
  MODE_WAIT,
  MODE_FINISHED,
  MODE_STOP
}
 
enum  tenuNMI_IperfMode {
  MODE_TCP_CLIENT,
  MODE_TCP_SERVER,
  MODE_UDP_CLIENT,
  MODE_UDP_SERVER,
  MODE_TCP_CLIENT,
  MODE_TCP_SERVER,
  MODE_UDP_CLIENT,
  MODE_UDP_SERVER
}
 

Functions

NMI_API sint8 IperfCreate (tstrIperfInit *pstrIperfInit, bool bIsPaused)
 
NMI_API void IperfInit (void)
 
NMI_API void IperfPrintStats (SOCKET sock)
 
NMI_API sint8 IperfRemoteSocketClose (void)
 
NMI_API sint8 IperfSocketClose (SOCKET sock)
 
void IperfSocketEventHandler (SOCKET sock, uint8 u8Msg, void *pvMsg)
 
void IperfTCP_Client_SendTestPacket (void)
 
NMI_API void IperfUpdate (void)
 

Variables

struct sockaddr_in udp_client_addr
 

#define HEADER_VERSION1   0x80000000

iPerf Settings

Referenced by IperfSocketEventHandler().

Referenced by IperfInit().

#define IPERF_RX_BUFFER_SIZE   1600
#define IPERF_TX_BUFFER_SIZE   1400

Referenced by main().

#define IPERF_WIFI_M2M_SERVER_IP   0xFFFFFFFF
#define IPERF_WIFI_M2M_SERVER_PORT   (5001)

Referenced by main().

#define IPERF_WIFI_M2M_WLAN_AUTH   M2M_WIFI_SEC_WPA_PSK

Security manner.

Referenced by iperf_wifi_cb(), and main().

#define IPERF_WIFI_M2M_WLAN_PSK   "12345678"

Password for Destination SSID.

Referenced by iperf_wifi_cb(), and main().

#define IPERF_WIFI_M2M_WLAN_SSID   "DEMO_AP"

Wi-Fi Settings.

Destination SSID

Referenced by iperf_wifi_cb(), and main().

#define RUN_NOW   0x00000001

Referenced by IperfSocketEventHandler().

#define TEST_STATE_TCP_TX   3

typedef struct app_status app_status
typedef struct client_hdr client_hdr
typedef struct server_hdr server_hdr
typedef struct UDP_datagram UDP_datagram

enum app_mode
Enumerator
MODE_UNDEF 
MODE_INIT 
MODE_INIT_DONE 
MODE_START 
MODE_RUN 
MODE_WAIT 
MODE_FINISHED 
MODE_STOP 
MODE_UNDEF 
MODE_INIT 
MODE_INIT_DONE 
MODE_START 
MODE_RUN 
MODE_WAIT 
MODE_FINISHED 
MODE_STOP 
Enumerator
MODE_TCP_CLIENT 
MODE_TCP_SERVER 
MODE_UDP_CLIENT 
MODE_UDP_SERVER 
MODE_TCP_CLIENT 
MODE_TCP_SERVER 
MODE_UDP_CLIENT 
MODE_UDP_SERVER 

NMI_API sint8 IperfCreate ( tstrIperfInit pstrIperfInit,
bool  bIsPaused 
)
NMI_API void IperfInit ( void  )
NMI_API void IperfPrintStats ( SOCKET  sock)
NMI_API sint8 IperfRemoteSocketClose ( void  )
NMI_API sint8 IperfSocketClose ( SOCKET  sock)
void IperfSocketEventHandler ( SOCKET  sock,
uint8  u8Msg,
void *  pvMsg 
)
void IperfTCP_Client_SendTestPacket ( void  )
NMI_API void IperfUpdate ( void  )

struct sockaddr_in udp_client_addr

Referenced by IperfSocketEventHandler(), and main().