]> andersk Git - openssh.git/blobdiff - misc.h
- jmc@cvs.openbsd.org 2006/07/18 07:56:28
[openssh.git] / misc.h
diff --git a/misc.h b/misc.h
index 0a1a09a68baab9d96f8f862c7366c28576f66a4d..139a62e05b4846e8761f63467a5c7aa050f1dde2 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: misc.h,v 1.29 2006/01/31 10:19:02 djm Exp $   */
+/* $OpenBSD: misc.h,v 1.33 2006/07/10 12:46:51 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * called by a name other than "ssh" or "Secure Shell".
  */
 
+#ifndef _MISC_H
+#define _MISC_H
+
+#include <sys/types.h>
+
+#include <pwd.h>
+
 /* misc.c */
 
 char   *chop(char *);
@@ -21,13 +28,14 @@ int  unset_nonblock(int);
 void    set_nodelay(int);
 int     a2port(const char *);
 int     a2tun(const char *, int *);
+char   *put_host_port(const char *, u_short);
 char   *hpdelim(char **);
 char   *cleanhostname(char *);
 char   *colon(char *);
 long    convtime(const char *);
 char   *tilde_expand_filename(const char *, uid_t);
 char   *percent_expand(const char *, ...) __attribute__((__sentinel__));
-char   *tohex(const u_char *, u_int);
+char   *tohex(const void *, size_t);
 void    sanitise_stdfd(void);
 
 struct passwd *pwcopy(struct passwd *);
@@ -67,3 +75,20 @@ int   tun_open(int, int);
 #define SSH_TUNID_ANY          0x7fffffff
 #define SSH_TUNID_ERR          (SSH_TUNID_ANY - 1)
 #define SSH_TUNID_MAX          (SSH_TUNID_ANY - 2)
+
+/* Functions to extract or store big-endian words of various sizes */
+u_int64_t      get_u64(const void *)
+    __attribute__((__bounded__( __minbytes__, 1, 8)));
+u_int32_t      get_u32(const void *)
+    __attribute__((__bounded__( __minbytes__, 1, 4)));
+u_int16_t      get_u16(const void *)
+    __attribute__((__bounded__( __minbytes__, 1, 2)));
+void           put_u64(void *, u_int64_t)
+    __attribute__((__bounded__( __minbytes__, 1, 8)));
+void           put_u32(void *, u_int32_t)
+    __attribute__((__bounded__( __minbytes__, 1, 4)));
+void           put_u16(void *, u_int16_t)
+    __attribute__((__bounded__( __minbytes__, 1, 2)));
+
+#endif /* _MISC_H */
+
This page took 0.201299 seconds and 4 git commands to generate.