X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fdata_structures.h;h=62a776a8847ba3f5fc8b81c368493ccbb147918f;hb=f10c27a850e57bf88bf1d4440eb450729782f409;hp=082bbdf63416e6338ef8165189dc6a563130df51;hpb=10341d26543c63ff318a4cf5cb163bccdc58b19d;p=lttv.git diff --git a/lttv/lttv/sync/data_structures.h b/lttv/lttv/sync/data_structures.h index 082bbdf6..62a776a8 100644 --- a/lttv/lttv/sync/data_structures.h +++ b/lttv/lttv/sync/data_structures.h @@ -25,6 +25,20 @@ #include + +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 @@ -43,12 +57,6 @@ typedef struct uint8_t ack, rst, syn, fin; } SegmentKey; -enum Direction -{ - OUT, - IN, -}; - typedef struct { enum Direction direction; @@ -59,6 +67,8 @@ typedef struct typedef struct { uint32_t saddr, daddr; + uint16_t source, dest; + uint16_t ulen; uint8_t dataKey[8]; } DatagramKey; @@ -76,7 +86,7 @@ typedef struct _Event // 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; @@ -125,11 +135,17 @@ void gdnConnectionKeyDestroy(gpointer data); 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); @@ -144,4 +160,9 @@ void destroyTCPSegment(Message* const segment); // Exchange-related functions void destroyTCPExchange(Exchange* const exchange); + +// Broadcast-related functions +void gdnDestroyBroadcast(gpointer data); +void destroyBroadcast(Broadcast* const broadcast); + #endif