blob: d972a2fd6d95192636116c5156e893f572d2dc71 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef SETTINGS_H
2#define SETTINGS_H
3
4#include "headers.h"
5
6#include "socketHelper.h"
7
8// server/client mode
9typedef enum {
10 zMode_Unknown = 0,
11 zMode_Server,
12 zMode_Client
13} zMode_t;
14
15// tcp/udp type
16typedef enum {
17 zType_Unknown = 0,
18 zType_Tcp,
19 zType_Udp
20} sock_type_t;
21
22typedef struct {
23 int ip_type; // 0:ipv4, 1:ipv6
24
25 char address_str[64];
26 zping_sockaddr_t zping_sockaddr;
27
28 int pingcount;
29 int timeout;
30 int interval;
31
32 u_int16_t itemcount;// max item num, default is 10
33
34 u_int32_t size; // packet data size
35
36 int unstopped;
37 int delayoutput;
38 int lostoutput;
39
40 int maxwaitnum;
41 u_int16_t set_id;
42} zping_settings_t;
43
44#endif // SETTINGS_H