summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-06-20 21:11:06 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-06-20 21:11:06 +0200
commit4cfc8533743a766db0b2c8ae27b7bba312eb3ec0 (patch)
tree68c51ca4088b7ae8286d022843e0facd62885fe6 /include
parentfaea76e8bc626549f4d338a3bf22e466336264ca (diff)
conntrackd: add the name field to queues
This patch adds the name field to identify the queue by means of a string. This patch is used by the next one that introduces per-queue statistics. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/queue.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/queue.h b/include/queue.h
index 9213b3d..89b00a8 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -29,17 +29,21 @@ void queue_object_free(struct queue_object *obj);
struct evfd;
+#define QUEUE_NAMELEN 16
+
struct queue {
unsigned int max_elems;
unsigned int num_elems;
uint32_t flags;
struct list_head head;
struct evfd *evfd;
+ char name[QUEUE_NAMELEN];
};
#define QUEUE_F_EVFD (1U << 0)
-struct queue *queue_create(int max_objects, unsigned int flags);
+struct queue *queue_create(const char *name,
+ int max_objects, unsigned int flags);
void queue_destroy(struct queue *b);
unsigned int queue_len(const struct queue *b);
int queue_add(struct queue *b, struct queue_node *n);