--- embedaddon/iperf/src/iperf_util.h 2016/10/18 13:28:18 1.1.1.1 +++ embedaddon/iperf/src/iperf_util.h 2021/03/17 00:36:46 1.1.1.2 @@ -1,5 +1,5 @@ /* - * iperf, Copyright (c) 2014, The Regents of the University of + * iperf, Copyright (c) 2014-2017, 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. @@ -27,9 +27,15 @@ #ifndef __IPERF_UTIL_H #define __IPERF_UTIL_H +#include "iperf_config.h" #include "cjson.h" #include +#include +int readentropy(void *out, size_t outsize); + +void fill_with_repeating_pattern(void *out, size_t outsize); + void make_cookie(char *); int is_closed(int); @@ -40,8 +46,6 @@ int timeval_equals(struct timeval *tv0, struct timeval 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); @@ -50,6 +54,14 @@ 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); +void iperf_dump_fdset(FILE *fp, const char *str, int nfds, fd_set *fds); + +#ifndef HAVE_DAEMON +extern int daemon(int nochdir, int noclose); +#endif /* HAVE_DAEMON */ + +#ifndef HAVE_GETLINE +ssize_t getline(char **buf, size_t *bufsiz, FILE *fp); +#endif /* HAVE_GETLINE */ #endif