diff options
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.75 2018/10/03 06:38:35 djm Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.79 2019/01/23 21:50:56 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <sys/time.h> | 18 | #include <sys/time.h> |
19 | #include <sys/types.h> | 19 | #include <sys/types.h> |
20 | #include <sys/socket.h> | ||
20 | 21 | ||
21 | /* Data structure for representing a forwarding request. */ | 22 | /* Data structure for representing a forwarding request. */ |
22 | struct Forward { | 23 | struct Forward { |
@@ -51,9 +52,12 @@ void set_nodelay(int); | |||
51 | int set_reuseaddr(int); | 52 | int set_reuseaddr(int); |
52 | char *get_rdomain(int); | 53 | char *get_rdomain(int); |
53 | int set_rdomain(int, const char *); | 54 | int set_rdomain(int, const char *); |
55 | int waitrfd(int, int *); | ||
56 | int timeout_connect(int, const struct sockaddr *, socklen_t, int *); | ||
54 | int a2port(const char *); | 57 | int a2port(const char *); |
55 | int a2tun(const char *, int *); | 58 | int a2tun(const char *, int *); |
56 | char *put_host_port(const char *, u_short); | 59 | char *put_host_port(const char *, u_short); |
60 | char *hpdelim2(char **, char *); | ||
57 | char *hpdelim(char **); | 61 | char *hpdelim(char **); |
58 | char *cleanhostname(char *); | 62 | char *cleanhostname(char *); |
59 | char *colon(char *); | 63 | char *colon(char *); |
@@ -78,6 +82,7 @@ int valid_env_name(const char *); | |||
78 | const char *atoi_err(const char *, int *); | 82 | const char *atoi_err(const char *, int *); |
79 | int parse_absolute_time(const char *, uint64_t *); | 83 | int parse_absolute_time(const char *, uint64_t *); |
80 | void format_absolute_time(uint64_t, char *, size_t); | 84 | void format_absolute_time(uint64_t, char *, size_t); |
85 | int path_absolute(const char *); | ||
81 | 86 | ||
82 | void sock_set_v6only(int); | 87 | void sock_set_v6only(int); |
83 | 88 | ||
@@ -134,7 +139,9 @@ void put_u32_le(void *, u_int32_t) | |||
134 | 139 | ||
135 | struct bwlimit { | 140 | struct bwlimit { |
136 | size_t buflen; | 141 | size_t buflen; |
137 | u_int64_t rate, thresh, lamt; | 142 | u_int64_t rate; /* desired rate in kbit/s */ |
143 | u_int64_t thresh; /* threshold after which we'll check timers */ | ||
144 | u_int64_t lamt; /* amount written in last timer interval */ | ||
138 | struct timeval bwstart, bwend; | 145 | struct timeval bwstart, bwend; |
139 | }; | 146 | }; |
140 | 147 | ||