summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/misc.h b/misc.h
index d8759ab10..51943db90 100644
--- a/misc.h
+++ b/misc.h
@@ -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 **);
48int set_nonblock(int); 48int set_nonblock(int);
49int unset_nonblock(int); 49int unset_nonblock(int);
50void set_nodelay(int); 50void set_nodelay(int);
51int set_reuseaddr(int);
52char *get_rdomain(int);
53int set_rdomain(int, const char *);
51int a2port(const char *); 54int a2port(const char *);
52int a2tun(const char *, int *); 55int a2tun(const char *, int *);
53char *put_host_port(const char *, u_short); 56char *put_host_port(const char *, u_short);
54char *hpdelim(char **); 57char *hpdelim(char **);
55char *cleanhostname(char *); 58char *cleanhostname(char *);
56char *colon(char *); 59char *colon(char *);
60int parse_user_host_path(const char *, char **, char **, char **);
57int parse_user_host_port(const char *, char **, char **, int *); 61int parse_user_host_port(const char *, char **, char **, int *);
62int parse_uri(const char *, const char *, char **, char **, int *, char **);
58long convtime(const char *); 63long convtime(const char *);
59char *tilde_expand_filename(const char *, uid_t); 64char *tilde_expand_filename(const char *, uid_t);
60char *percent_expand(const char *, ...) __attribute__((__sentinel__)); 65char *percent_expand(const char *, ...) __attribute__((__sentinel__));
@@ -62,10 +67,16 @@ char *tohex(const void *, size_t);
62void sanitise_stdfd(void); 67void sanitise_stdfd(void);
63void ms_subtract_diff(struct timeval *, int *); 68void ms_subtract_diff(struct timeval *, int *);
64void ms_to_timeval(struct timeval *, int); 69void ms_to_timeval(struct timeval *, int);
70void monotime_ts(struct timespec *);
71void monotime_tv(struct timeval *);
65time_t monotime(void); 72time_t monotime(void);
66double monotime_double(void); 73double monotime_double(void);
67void lowercase(char *s); 74void lowercase(char *s);
68int unix_listener(const char *, int, int); 75int unix_listener(const char *, int, int);
76int valid_domain(char *, int, const char **);
77const char *atoi_err(const char *, int *);
78int parse_absolute_time(const char *, uint64_t *);
79void format_absolute_time(uint64_t, char *, size_t);
69 80
70void sock_set_v6only(int); 81void 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)));
85void freeargs(arglist *); 96void freeargs(arglist *);
86 97
87int tun_open(int, int); 98int 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 ***);
140char *argv_assemble(int, char **argv); 151char *argv_assemble(int, char **argv);
141int exited_cleanly(pid_t, const char *, const char *, int); 152int 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 */
146pid_t subprocess(const char *, struct passwd *,
147 const char *, int, char **, FILE **, u_int flags);
148
149struct stat; 154struct stat;
150int safe_path(const char *, struct stat *, const char *, uid_t, 155int safe_path(const char *, struct stat *, const char *, uid_t,
151 char *, size_t); 156 char *, size_t);