#include <ltt/ltt.h>
+
+enum Direction
+{
+ OUT,
+ IN,
+};
+
+enum EventType
+{
+ TCP,
+ UDP,
+ TYPE_COUNT // This must be the last field
+};
+
// Stage 1 to 2: These structures are passed from processing to matching modules
// TCP events
typedef struct
uint8_t ack, rst, syn, fin;
} SegmentKey;
-enum Direction
-{
- OUT,
- IN,
-};
-
typedef struct
{
enum Direction direction;
typedef struct
{
uint32_t saddr, daddr;
+ uint16_t source, dest;
+ uint16_t ulen;
uint8_t dataKey[8];
} DatagramKey;
// specific event structures and functions could be in separate files and
// type could be an int
- enum {TCP, UDP} type;
+ enum EventType type;
// event could be a void*, this union is to avoid having to cast
union {
TCPEvent* tcpEvent;
guint ghfSegmentKeyHash(gconstpointer key);
gboolean gefSegmentKeyEqual(gconstpointer a, gconstpointer b);
+// DatagramKey-related functions
+guint ghfDatagramKeyHash(gconstpointer key);
+gboolean gefDatagramKeyEqual(gconstpointer a, gconstpointer b);
+void gdnDestroyDatagramKey(gpointer data);
+
// Event-related functions
void gdnDestroyEvent(gpointer data);
void destroyEvent(Event* const event);
void destroyTCPEvent(Event* const event);
void destroyUDPEvent(Event* const event);
+void gfDestroyEvent(gpointer data, gpointer user_data);
// Message-related functions
void printTCPSegment(const Message* const segment);
// Exchange-related functions
void destroyTCPExchange(Exchange* const exchange);
+
+// Broadcast-related functions
+void gdnDestroyBroadcast(gpointer data);
+void destroyBroadcast(Broadcast* const broadcast);
+
#endif