diff options
author | Colin Watson <cjwatson@debian.org> | 2007-06-12 11:03:36 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-06-12 11:03:36 +0000 |
commit | 086ea76990b1e6287c24b6db74adffd4605eb3b0 (patch) | |
tree | 4650093038f9f66b02823fb07f49d6a4becd1667 /bufaux.h | |
parent | 4ee72c71e31226c81743439fe1ed2b521b5ddb7e (diff) | |
parent | 3e2e0ac10674d77618c4c7339e18b83ced247492 (diff) |
Import OpenSSH 4.6p1.
Diffstat (limited to 'bufaux.h')
-rw-r--r-- | bufaux.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/bufaux.h b/bufaux.h new file mode 100644 index 000000000..f5efaed3e --- /dev/null +++ b/bufaux.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* $OpenBSD: bufaux.h,v 1.21 2005/03/10 22:01:05 deraadt Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | ||
5 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | ||
6 | * All rights reserved | ||
7 | * | ||
8 | * As far as I am concerned, the code I have written for this software | ||
9 | * can be used freely for any purpose. Any derived versions of this | ||
10 | * software must be clearly marked as such, and if the derived work is | ||
11 | * incompatible with the protocol description in the RFC file, it must be | ||
12 | * called by a name other than "ssh" or "Secure Shell". | ||
13 | */ | ||
14 | |||
15 | #ifndef BUFAUX_H | ||
16 | #define BUFAUX_H | ||
17 | |||
18 | #include "buffer.h" | ||
19 | #include <openssl/bn.h> | ||
20 | |||
21 | void buffer_put_bignum(Buffer *, const BIGNUM *); | ||
22 | void buffer_put_bignum2(Buffer *, const BIGNUM *); | ||
23 | void buffer_get_bignum(Buffer *, BIGNUM *); | ||
24 | void buffer_get_bignum2(Buffer *, BIGNUM *); | ||
25 | |||
26 | u_short buffer_get_short(Buffer *); | ||
27 | void buffer_put_short(Buffer *, u_short); | ||
28 | |||
29 | u_int buffer_get_int(Buffer *); | ||
30 | void buffer_put_int(Buffer *, u_int); | ||
31 | |||
32 | u_int64_t buffer_get_int64(Buffer *); | ||
33 | void buffer_put_int64(Buffer *, u_int64_t); | ||
34 | |||
35 | int buffer_get_char(Buffer *); | ||
36 | void buffer_put_char(Buffer *, int); | ||
37 | |||
38 | void *buffer_get_string(Buffer *, u_int *); | ||
39 | void buffer_put_string(Buffer *, const void *, u_int); | ||
40 | void buffer_put_cstring(Buffer *, const char *); | ||
41 | |||
42 | #define buffer_skip_string(b) \ | ||
43 | do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0) | ||
44 | |||
45 | int buffer_put_bignum_ret(Buffer *, const BIGNUM *); | ||
46 | int buffer_get_bignum_ret(Buffer *, BIGNUM *); | ||
47 | int buffer_put_bignum2_ret(Buffer *, const BIGNUM *); | ||
48 | int buffer_get_bignum2_ret(Buffer *, BIGNUM *); | ||
49 | int buffer_get_short_ret(u_short *, Buffer *); | ||
50 | int buffer_get_int_ret(u_int *, Buffer *); | ||
51 | int buffer_get_int64_ret(u_int64_t *, Buffer *); | ||
52 | void *buffer_get_string_ret(Buffer *, u_int *); | ||
53 | int buffer_get_char_ret(char *, Buffer *); | ||
54 | |||
55 | #endif /* BUFAUX_H */ | ||