summaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.h')
-rw-r--r--buffer.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/buffer.h b/buffer.h
index f3c509dfa..5e9fc278d 100644
--- a/buffer.h
+++ b/buffer.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: buffer.h,v 1.7 2000/12/19 23:17:55 markus Exp $"); */ 14/* RCSID("$OpenBSD: buffer.h,v 1.8 2001/06/26 06:32:48 itojun Exp $"); */
15 15
16#ifndef BUFFER_H 16#ifndef BUFFER_H
17#define BUFFER_H 17#define BUFFER_H
@@ -23,44 +23,44 @@ typedef struct {
23 u_int end; /* Offset of last byte containing data. */ 23 u_int end; /* Offset of last byte containing data. */
24} Buffer; 24} Buffer;
25/* Initializes the buffer structure. */ 25/* Initializes the buffer structure. */
26void buffer_init(Buffer * buffer); 26void buffer_init(Buffer *);
27 27
28/* Frees any memory used for the buffer. */ 28/* Frees any memory used for the buffer. */
29void buffer_free(Buffer * buffer); 29void buffer_free(Buffer *);
30 30
31/* Clears any data from the buffer, making it empty. This does not actually 31/* Clears any data from the buffer, making it empty. This does not actually
32 zero the memory. */ 32 zero the memory. */
33void buffer_clear(Buffer * buffer); 33void buffer_clear(Buffer *);
34 34
35/* Appends data to the buffer, expanding it if necessary. */ 35/* Appends data to the buffer, expanding it if necessary. */
36void buffer_append(Buffer * buffer, const char *data, u_int len); 36void buffer_append(Buffer *, const char *, u_int);
37 37
38/* 38/*
39 * Appends space to the buffer, expanding the buffer if necessary. This does 39 * Appends space to the buffer, expanding the buffer if necessary. This does
40 * not actually copy the data into the buffer, but instead returns a pointer 40 * not actually copy the data into the buffer, but instead returns a pointer
41 * to the allocated region. 41 * to the allocated region.
42 */ 42 */
43void buffer_append_space(Buffer * buffer, char **datap, u_int len); 43void buffer_append_space(Buffer *, char **, u_int);
44 44
45/* Returns the number of bytes of data in the buffer. */ 45/* Returns the number of bytes of data in the buffer. */
46u_int buffer_len(Buffer * buffer); 46u_int buffer_len(Buffer *);
47 47
48/* Gets data from the beginning of the buffer. */ 48/* Gets data from the beginning of the buffer. */
49void buffer_get(Buffer * buffer, char *buf, u_int len); 49void buffer_get(Buffer *, char *, u_int);
50 50
51/* Consumes the given number of bytes from the beginning of the buffer. */ 51/* Consumes the given number of bytes from the beginning of the buffer. */
52void buffer_consume(Buffer * buffer, u_int bytes); 52void buffer_consume(Buffer *, u_int);
53 53
54/* Consumes the given number of bytes from the end of the buffer. */ 54/* Consumes the given number of bytes from the end of the buffer. */
55void buffer_consume_end(Buffer * buffer, u_int bytes); 55void buffer_consume_end(Buffer *, u_int);
56 56
57/* Returns a pointer to the first used byte in the buffer. */ 57/* Returns a pointer to the first used byte in the buffer. */
58char *buffer_ptr(Buffer * buffer); 58char *buffer_ptr(Buffer *);
59 59
60/* 60/*
61 * Dumps the contents of the buffer to stderr in hex. This intended for 61 * Dumps the contents of the buffer to stderr in hex. This intended for
62 * debugging purposes only. 62 * debugging purposes only.
63 */ 63 */
64void buffer_dump(Buffer * buffer); 64void buffer_dump(Buffer *);
65 65
66#endif /* BUFFER_H */ 66#endif /* BUFFER_H */