]> andersk Git - gssapi-openssh.git/blame - openssh/bufaux.h
Import of OpenSSH 4.4p1
[gssapi-openssh.git] / openssh / bufaux.h
CommitLineData
9108f8d9 1/* $OpenBSD: bufaux.h,v 1.22 2006/03/25 22:22:42 djm Exp $ */
e9a17296 2
3c0ef626 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
3c0ef626 15#ifndef BUFAUX_H
16#define BUFAUX_H
17
18#include "buffer.h"
19#include <openssl/bn.h>
20
cdd66111 21void buffer_put_bignum(Buffer *, const BIGNUM *);
22void buffer_put_bignum2(Buffer *, const BIGNUM *);
e9a17296 23void buffer_get_bignum(Buffer *, BIGNUM *);
24void buffer_get_bignum2(Buffer *, BIGNUM *);
3c0ef626 25
700318f3 26u_short buffer_get_short(Buffer *);
27void buffer_put_short(Buffer *, u_short);
28
e9a17296 29u_int buffer_get_int(Buffer *);
3c0ef626 30void buffer_put_int(Buffer *, u_int);
31
3c0ef626 32u_int64_t buffer_get_int64(Buffer *);
33void buffer_put_int64(Buffer *, u_int64_t);
3c0ef626 34
35int buffer_get_char(Buffer *);
3c0ef626 36void buffer_put_char(Buffer *, int);
37
e9a17296 38void *buffer_get_string(Buffer *, u_int *);
3c0ef626 39void buffer_put_string(Buffer *, const void *, u_int);
40void buffer_put_cstring(Buffer *, const char *);
41
700318f3 42#define buffer_skip_string(b) \
dec6d9fe 43 do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0)
700318f3 44
996d5e62 45int buffer_put_bignum_ret(Buffer *, const BIGNUM *);
46int buffer_get_bignum_ret(Buffer *, BIGNUM *);
47int buffer_put_bignum2_ret(Buffer *, const BIGNUM *);
48int buffer_get_bignum2_ret(Buffer *, BIGNUM *);
49int buffer_get_short_ret(u_short *, Buffer *);
50int buffer_get_int_ret(u_int *, Buffer *);
51int buffer_get_int64_ret(u_int64_t *, Buffer *);
52void *buffer_get_string_ret(Buffer *, u_int *);
53int buffer_get_char_ret(char *, Buffer *);
54
3c0ef626 55#endif /* BUFAUX_H */
This page took 0.272606 seconds and 5 git commands to generate.