From 91d431dacd79d93d671ace690e2e9c7fbb0f2877 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Fri, 18 Jan 2008 13:09:49 +0000 Subject: Max Kellermann : Simplify logging infrastructure --- include/Makefile.am | 2 +- include/buffer.h | 22 ---------------------- include/conntrackd.h | 1 - include/log.h | 6 ++---- 4 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 include/buffer.h (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index ff8611f..e8e7f81 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,7 @@ noinst_HEADERS = alarm.h jhash.h slist.h cache.h linux_list.h \ sync.h conntrackd.h local.h us-conntrack.h \ - debug.h log.h hash.h mcast.h buffer.h conntrack.h \ + debug.h log.h hash.h mcast.h conntrack.h \ state_helper.h network.h ignore.h queue.h \ traffic_stats.h netlink.h diff --git a/include/buffer.h b/include/buffer.h deleted file mode 100644 index ab1ccd3..0000000 --- a/include/buffer.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _BUFFER_H_ -#define _BUFFER_H_ - -#include - -struct buffer { - unsigned char *data; - size_t size; - size_t cur_size; -}; - -struct buffer *buffer_create(size_t size); -void buffer_destroy(struct buffer *b); - -int buffer_add(struct buffer *b, void *data, size_t size); -void buffer_flush(struct buffer *b, - void (*cb)(void *buffer_data, - void *data), - void *data); -size_t buffer_size(const struct buffer *b); - -#endif diff --git a/include/conntrackd.h b/include/conntrackd.h index c16d3d7..b223a17 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -132,7 +132,6 @@ struct ct_sync_state { struct ct_stats_state { struct cache *cache; /* internal events cache (netlink) */ - struct buffer *buffer_log; }; union ct_state { diff --git a/include/log.h b/include/log.h index 64bf1ce..b258633 100644 --- a/include/log.h +++ b/include/log.h @@ -3,13 +3,11 @@ #include -struct buffer; struct nf_conntrack; int init_log(void); -void dlog(FILE *fd, int priority, const char *format, ...); -void dlog_buffered_ct(FILE *fd, struct buffer *b, struct nf_conntrack *ct); -void dlog_buffered_ct_flush(void *buffer_data, void *data); +void dlog(int priority, const char *format, ...); +void dlog_ct(struct nf_conntrack *ct); void close_log(void); #endif -- cgit v1.2.3