diff options
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.63 2017/08/18 05:48:04 djm Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.71 2018/03/12 00:52:01 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -48,13 +48,18 @@ char *strdelim(char **); | |||
48 | int set_nonblock(int); | 48 | int set_nonblock(int); |
49 | int unset_nonblock(int); | 49 | int unset_nonblock(int); |
50 | void set_nodelay(int); | 50 | void set_nodelay(int); |
51 | int set_reuseaddr(int); | ||
52 | char *get_rdomain(int); | ||
53 | int set_rdomain(int, const char *); | ||
51 | int a2port(const char *); | 54 | int a2port(const char *); |
52 | int a2tun(const char *, int *); | 55 | int a2tun(const char *, int *); |
53 | char *put_host_port(const char *, u_short); | 56 | char *put_host_port(const char *, u_short); |
54 | char *hpdelim(char **); | 57 | char *hpdelim(char **); |
55 | char *cleanhostname(char *); | 58 | char *cleanhostname(char *); |
56 | char *colon(char *); | 59 | char *colon(char *); |
60 | int parse_user_host_path(const char *, char **, char **, char **); | ||
57 | int parse_user_host_port(const char *, char **, char **, int *); | 61 | int parse_user_host_port(const char *, char **, char **, int *); |
62 | int parse_uri(const char *, const char *, char **, char **, int *, char **); | ||
58 | long convtime(const char *); | 63 | long convtime(const char *); |
59 | char *tilde_expand_filename(const char *, uid_t); | 64 | char *tilde_expand_filename(const char *, uid_t); |
60 | char *percent_expand(const char *, ...) __attribute__((__sentinel__)); | 65 | char *percent_expand(const char *, ...) __attribute__((__sentinel__)); |
@@ -62,10 +67,16 @@ char *tohex(const void *, size_t); | |||
62 | void sanitise_stdfd(void); | 67 | void sanitise_stdfd(void); |
63 | void ms_subtract_diff(struct timeval *, int *); | 68 | void ms_subtract_diff(struct timeval *, int *); |
64 | void ms_to_timeval(struct timeval *, int); | 69 | void ms_to_timeval(struct timeval *, int); |
70 | void monotime_ts(struct timespec *); | ||
71 | void monotime_tv(struct timeval *); | ||
65 | time_t monotime(void); | 72 | time_t monotime(void); |
66 | double monotime_double(void); | 73 | double monotime_double(void); |
67 | void lowercase(char *s); | 74 | void lowercase(char *s); |
68 | int unix_listener(const char *, int, int); | 75 | int unix_listener(const char *, int, int); |
76 | int valid_domain(char *, int, const char **); | ||
77 | const char *atoi_err(const char *, int *); | ||
78 | int parse_absolute_time(const char *, uint64_t *); | ||
79 | void format_absolute_time(uint64_t, char *, size_t); | ||
69 | 80 | ||
70 | void sock_set_v6only(int); | 81 | void sock_set_v6only(int); |
71 | 82 | ||
@@ -84,7 +95,7 @@ void replacearg(arglist *, u_int, char *, ...) | |||
84 | __attribute__((format(printf, 3, 4))); | 95 | __attribute__((format(printf, 3, 4))); |
85 | void freeargs(arglist *); | 96 | void freeargs(arglist *); |
86 | 97 | ||
87 | int tun_open(int, int); | 98 | int tun_open(int, int, char **); |
88 | 99 | ||
89 | /* Common definitions for ssh tunnel device forwarding */ | 100 | /* Common definitions for ssh tunnel device forwarding */ |
90 | #define SSH_TUNMODE_NO 0x00 | 101 | #define SSH_TUNMODE_NO 0x00 |
@@ -140,12 +151,6 @@ int argv_split(const char *, int *, char ***); | |||
140 | char *argv_assemble(int, char **argv); | 151 | char *argv_assemble(int, char **argv); |
141 | int exited_cleanly(pid_t, const char *, const char *, int); | 152 | int exited_cleanly(pid_t, const char *, const char *, int); |
142 | 153 | ||
143 | #define SSH_SUBPROCESS_STDOUT_DISCARD (1) /* Discard stdout */ | ||
144 | #define SSH_SUBPROCESS_STDOUT_CAPTURE (1<<1) /* Redirect stdout */ | ||
145 | #define SSH_SUBPROCESS_STDERR_DISCARD (1<<2) /* Discard stderr */ | ||
146 | pid_t subprocess(const char *, struct passwd *, | ||
147 | const char *, int, char **, FILE **, u_int flags); | ||
148 | |||
149 | struct stat; | 154 | struct stat; |
150 | int safe_path(const char *, struct stat *, const char *, uid_t, | 155 | int safe_path(const char *, struct stat *, const char *, uid_t, |
151 | char *, size_t); | 156 | char *, size_t); |