path: root/include/buffer.h
diff options
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/ </C=EU/ST=EU/CN=Pablo Neira Ayuso/>2007-07-09 19:11:53 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/ </C=EU/ST=EU/CN=Pablo Neira Ayuso/>2007-07-09 19:11:53 +0000
commit96084e1a1f2e0a49c961bbddb9fffd2e03bfae3f (patch)
treec078d88b157faa7c5ce76bc4591205756f09742b /include/buffer.h
parent4df0be6fbf6a47905e0edf11c13b49ea0eacee5b (diff)
- conntrack-tools requires libnetfilter_conntrack >= 0.0.81
- add len field to nethdr - implement buffered send/recv to batch messages - stop using netlink format for network messages: use similar TLV-based format - reduce synchronization messages size up to 60% - introduce periodic alive messages for sync-nack protocol - timeslice alarm implementation: remove alarm pthread, remove locking - simplify debugging functions: use nfct_snprintf instead - remove major use of libnfnetlink functions: use libnetfilter_conntrack API - deprecate conntrackd -F, use conntrack -F instead - major rework of the network infrastructure: much simple, less messy
Diffstat (limited to 'include/buffer.h')
1 files changed, 2 insertions, 3 deletions
diff --git a/include/buffer.h b/include/buffer.h
index 8d72dfb..cb42f51 100644
--- a/include/buffer.h
+++ b/include/buffer.h
@@ -4,13 +4,12 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include <pthread.h>
#include "linux_list.h"
struct buffer {
- pthread_mutex_t lock;
size_t max_size;
size_t cur_size;
+ unsigned int num_elems;
struct list_head head;
@@ -22,9 +21,9 @@ struct buffer_node {
struct buffer *buffer_create(size_t max_size);
void buffer_destroy(struct buffer *b);
+unsigned int buffer_len(struct buffer *b);
int buffer_add(struct buffer *b, const void *data, size_t size);
void buffer_del(struct buffer *b, void *data);
-void __buffer_del(struct buffer *b, void *data);
void buffer_iterate(struct buffer *b,
void *data,
int (*iterate)(void *data1, void *data2));