From 3aa3890908a2fa24b7482ea1d0d8d03d15aab128 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Sat, 21 Jul 2012 21:39:15 +0200 Subject: struct packet is now in libglouglou, so remove it from here and #include --- glougloud/user.c | 50 ++------------------------------------------------ 1 file changed, 2 insertions(+), 48 deletions(-) (limited to 'glougloud/user.c') diff --git a/glougloud/user.c b/glougloud/user.c index 0f2ae9b..a23a5e1 100644 --- a/glougloud/user.c +++ b/glougloud/user.c @@ -22,6 +22,8 @@ #include #include +#include + #include "glougloud.h" #include "imsgev.h" @@ -36,7 +38,6 @@ #define CONN_TIMEOUT_ICMP 10 // XXX conf ? #define CONN_FREEIDS_COUNT 65536 /* 2^16 as long as freeids are u_int16_t */ #define CONNTIMER 5 // XXX conf ? -#define PACKET_VERSION 1 struct node { LIST_ENTRY(node) entry; @@ -95,53 +96,6 @@ struct capture { int ptruncated; }; -struct packet { - u_int8_t ver; - u_int8_t type; -/* XXX nicer way for _SIZE ... ? */ -#define PACKET_NEWCONN 0 -#define PACKET_NEWCONN_SIZE (2 + sizeof((struct packet *)0)->pdat.newconn) -#define PACKET_DELCONN 1 -#define PACKET_DELCONN_SIZE (2 + sizeof((struct packet *)0)->pdat.delconn) -#define PACKET_DATA 2 -#define PACKET_DATA_SIZE (2 + sizeof((struct packet *)0)->pdat.data) -#define PACKET_NAME 3 -#define PACKET_NAME_SIZE ((2 + sizeof((struct packet *)0)->pdat.name) - DNSNAME_MAX) - - union { - struct newconn { - u_int16_t id; - u_int32_t src; - u_int32_t dst; - u_int8_t proto; - u_int8_t size; - } newconn; - struct delconn { - u_int16_t id; - } delconn; - struct data { - u_int16_t connid; - u_int8_t size; - } data; - struct name { - u_int32_t addr; - u_int8_t len; - u_char fqdn[DNSNAME_MAX]; - } name; - } pdat; -#define newconn_id pdat.newconn.id -#define newconn_src pdat.newconn.src -#define newconn_dst pdat.newconn.dst -#define newconn_proto pdat.newconn.proto -#define newconn_size pdat.newconn.size -#define delconn_id pdat.delconn.id -#define data_connid pdat.data.connid -#define data_size pdat.data.size -#define name_addr pdat.name.addr -#define name_len pdat.name.len -#define name_fqdn pdat.name.fqdn -}; - struct phandler { pcap_handler f; int type; -- cgit v1.2.3-59-g8ed1b