forked from fachkar/iperf3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iperf_util.h
38 lines (24 loc) · 921 Bytes
/
iperf_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Copyright (c) 2009-2011, 2014, The Regents of the University of California,
* through Lawrence Berkeley National Laboratory (subject to receipt of any
* required approvals from the U.S. Dept. of Energy). All rights reserved.
*
* This code is distributed under a BSD style license, see the LICENSE file
* for complete information.
*/
#ifndef __IPERF_UTIL_H
#define __IPERF_UTIL_H
#include "cjson.h"
#include <sys/select.h>
void make_cookie(char *);
int is_closed(int);
double timeval_to_double(struct timeval *tv);
int timeval_equals(struct timeval *tv0, struct timeval *tv1);
double timeval_diff(struct timeval *tv0, struct timeval *tv1);
int delay(int64_t ns);
void cpu_util(double pcpu[3]);
const char* get_system_info(void);
const char* get_optional_features(void);
cJSON* iperf_json_printf(const char *format, ...);
void iperf_dump_fdset(FILE *fp, char *str, int nfds, fd_set *fds);
#endif