]> andersk Git - gssapi-openssh.git/blame - openssh/buffer.h
Import of OpenSSH 3.0.2p1
[gssapi-openssh.git] / openssh / buffer.h
CommitLineData
3c0ef626 1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Code for manipulating FIFO buffers.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
13
14/* RCSID("$OpenBSD: buffer.h,v 1.9 2001/06/26 17:27:23 markus Exp $"); */
15
16#ifndef BUFFER_H
17#define BUFFER_H
18
19typedef struct {
20 char *buf; /* Buffer for data. */
21 u_int alloc; /* Number of bytes allocated for data. */
22 u_int offset; /* Offset of first byte containing data. */
23 u_int end; /* Offset of last byte containing data. */
24} Buffer;
25
26void buffer_init(Buffer *);
27void buffer_clear(Buffer *);
28void buffer_free(Buffer *);
29
30u_int buffer_len(Buffer *);
31char *buffer_ptr(Buffer *);
32
33void buffer_append(Buffer *, const char *, u_int);
34void buffer_append_space(Buffer *, char **, u_int);
35
36void buffer_get(Buffer *, char *, u_int);
37
38void buffer_consume(Buffer *, u_int);
39void buffer_consume_end(Buffer *, u_int);
40
41void buffer_dump(Buffer *);
42
43#endif /* BUFFER_H */
This page took 0.05214 seconds and 5 git commands to generate.