lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #ifndef SETTINGS_H |
| 2 | #define SETTINGS_H |
| 3 | |
| 4 | #include "headers.h" |
| 5 | |
| 6 | #include "socketHelper.h" |
| 7 | |
| 8 | // server/client mode |
| 9 | typedef enum { |
| 10 | zMode_Unknown = 0, |
| 11 | zMode_Server, |
| 12 | zMode_Client |
| 13 | } zMode_t; |
| 14 | |
| 15 | // tcp/udp type |
| 16 | typedef enum { |
| 17 | zType_Unknown = 0, |
| 18 | zType_Tcp, |
| 19 | zType_Udp |
| 20 | } sock_type_t; |
| 21 | |
| 22 | typedef 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 |