diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-06-11 08:45:09 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-06-11 08:45:09 +0000 |
commit | 90efcacba6378a4e29275cd6e9914d73d836a4a4 (patch) | |
tree | da032ba71582994f9e1f2ed7162ba14f152cb7d7 /buffer.h | |
parent | Added support for building and linking with (diff) | |
download | openvpn-90efcacba6378a4e29275cd6e9914d73d836a4a4.tar.xz |
Updated version to 2.1_rc7e.
Added client authentication and packet filtering capability
to management interface.
Extended packet filtering capability to work on both --dev tun
and --dev tap tunnels.
Updated valgrind-suppress file.
Made "Linux ip addr del failed" error nonfatal.
Amplified --client-cert-not-required warning.
Added #pragma pack to proto.h.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2991 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r-- | buffer.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -723,4 +723,38 @@ check_malloc_return (void *p) out_of_memory (); } +/* + * Manage lists of buffers + */ + +#ifdef ENABLE_BUFFER_LIST + +struct buffer_entry +{ + struct buffer buf; + struct buffer_entry *next; +}; + +struct buffer_list +{ + struct buffer_entry *head; /* next item to pop/peek */ + struct buffer_entry *tail; /* last item pushed */ + int size; /* current number of entries */ + int max_size; /* maximum size list should grow to */ +}; + +struct buffer_list *buffer_list_new (const int max_size); +void buffer_list_free (struct buffer_list *ol); + +bool buffer_list_defined (const struct buffer_list *ol); +void buffer_list_reset (struct buffer_list *ol); + +void buffer_list_push (struct buffer_list *ol, const unsigned char *str); +const struct buffer *buffer_list_peek (struct buffer_list *ol); +void buffer_list_advance (struct buffer_list *ol, int n); + +struct buffer_list *buffer_list_file (const char *fn, int max_line_len); + +#endif + #endif /* BUFFER_H */ |