aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/misc.h')
-rw-r--r--crypto/openssh/misc.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/crypto/openssh/misc.h b/crypto/openssh/misc.h
index f3c5a18c6249..791876c1e166 100644
--- a/crypto/openssh/misc.h
+++ b/crypto/openssh/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.112 2025/09/25 06:33:19 djm Exp $ */
+/* $OpenBSD: misc.h,v 1.116 2026/03/11 09:10:59 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -59,6 +59,8 @@ void skip_space(char **);
const char *strprefix(const char *, const char *, int);
char *strdelim(char **);
char *strdelimw(char **);
+void stringlist_append(char ***listp, const char *s);
+void stringlist_free(char **list);
int set_nonblock(int);
int unset_nonblock(int);
void set_nodelay(int);
@@ -79,7 +81,9 @@ char *colon(char *);
int parse_user_host_path(const char *, char **, char **, char **);
int parse_user_host_port(const char *, char **, char **, int *);
int parse_uri(const char *, const char *, char **, char **, int *, char **);
+double convtime_double(const char *);
int convtime(const char *);
+double convtime_double(const char *);
const char *fmt_timeframe(time_t t);
int tilde_expand(const char *, uid_t, char **);
char *tilde_expand_filename(const char *, uid_t);
@@ -114,6 +118,7 @@ void sock_set_v6only(int);
struct passwd *pwcopy(struct passwd *);
void pwfree(struct passwd *); /* NB. only use with pwcopy */
+
const char *ssh_gai_strerror(int);
typedef void privdrop_fn(struct passwd *);
@@ -155,34 +160,34 @@ int tun_open(int, int, char **);
#define PORT_STREAMLOCAL -2
/* Functions to extract or store big-endian words of various sizes */
-u_int64_t get_u64(const void *)
+uint64_t get_u64(const void *)
__attribute__((__bounded__( __minbytes__, 1, 8)));
-u_int32_t get_u32(const void *)
+uint32_t get_u32(const void *)
__attribute__((__bounded__( __minbytes__, 1, 4)));
-u_int16_t get_u16(const void *)
+uint16_t get_u16(const void *)
__attribute__((__bounded__( __minbytes__, 1, 2)));
-void put_u64(void *, u_int64_t)
+void put_u64(void *, uint64_t)
__attribute__((__bounded__( __minbytes__, 1, 8)));
-void put_u32(void *, u_int32_t)
+void put_u32(void *, uint32_t)
__attribute__((__bounded__( __minbytes__, 1, 4)));
-void put_u16(void *, u_int16_t)
+void put_u16(void *, uint16_t)
__attribute__((__bounded__( __minbytes__, 1, 2)));
/* Little-endian store/load, used by umac.c */
-u_int32_t get_u32_le(const void *)
+uint32_t get_u32_le(const void *)
__attribute__((__bounded__(__minbytes__, 1, 4)));
-void put_u32_le(void *, u_int32_t)
+void put_u32_le(void *, uint32_t)
__attribute__((__bounded__(__minbytes__, 1, 4)));
struct bwlimit {
size_t buflen;
- u_int64_t rate; /* desired rate in kbit/s */
- u_int64_t thresh; /* threshold after which we'll check timers */
- u_int64_t lamt; /* amount written in last timer interval */
+ uint64_t rate; /* desired rate in kbit/s */
+ uint64_t thresh; /* threshold after which we'll check timers */
+ uint64_t lamt; /* amount written in last timer interval */
struct timeval bwstart, bwend;
};
-void bandwidth_limit_init(struct bwlimit *, u_int64_t, size_t);
+void bandwidth_limit_init(struct bwlimit *, uint64_t, size_t);
void bandwidth_limit(struct bwlimit *, size_t);
int parse_ipqos(const char *);
@@ -265,4 +270,10 @@ int signal_is_crash(int);
/* On OpenBSD time_t is int64_t which is long long. */
/* #define SSH_TIME_T_MAX LLONG_MAX */
+#define FD_CLOSEONEXEC(x) do { \
+ if (fcntl(x, F_SETFD, FD_CLOEXEC) == -1) \
+ fatal_f("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", x, \
+ strerror(errno)); \
+} while (0)
+
#endif /* _MISC_H */