projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generate graphs of synchronization accuracy
[lttv.git]
/
lttv
/
lttv
/
sync
/
data_structures.h
diff --git
a/lttv/lttv/sync/data_structures.h
b/lttv/lttv/sync/data_structures.h
index 082bbdf63416e6338ef8165189dc6a563130df51..0eab539387637beb7decc554c3fcd1f960160ee7 100644
(file)
--- a/
lttv/lttv/sync/data_structures.h
+++ b/
lttv/lttv/sync/data_structures.h
@@
-23,7
+23,19
@@
#include <stdbool.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
-#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
// Stage 1 to 2: These structures are passed from processing to matching modules
// TCP events
@@
-43,12
+55,6
@@
typedef struct
uint8_t ack, rst, syn, fin;
} SegmentKey;
uint8_t ack, rst, syn, fin;
} SegmentKey;
-enum Direction
-{
- OUT,
- IN,
-};
-
typedef struct
{
enum Direction direction;
typedef struct
{
enum Direction direction;
@@
-59,6
+65,8
@@
typedef struct
typedef struct
{
uint32_t saddr, daddr;
typedef struct
{
uint32_t saddr, daddr;
+ uint16_t source, dest;
+ uint16_t ulen;
uint8_t dataKey[8];
} DatagramKey;
uint8_t dataKey[8];
} DatagramKey;
@@
-69,20
+77,30
@@
typedef struct
bool unicast;
} UDPEvent;
bool unicast;
} UDPEvent;
+typedef struct
+{
+ uint32_t seconds;
+ uint32_t nanosec;
+} WallTime;
+
typedef struct _Event
{
unsigned long traceNum;
typedef struct _Event
{
unsigned long traceNum;
- uint64_t time;
+ // wallTime is corrected according to factors in trace struct, cpuTime
+ // is not
+ uint64_t cpuTime;
+ WallTime wallTime;
// specific event structures and functions could be in separate files and
// type could be an int
// 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;
UDPEvent* udpEvent;
} event;
// event could be a void*, this union is to avoid having to cast
union {
TCPEvent* tcpEvent;
UDPEvent* udpEvent;
} event;
+ void (*copy)(const struct _Event* const event, struct _Event** const newEvent);
void (*destroy)(struct _Event* const event);
} Event;
void (*destroy)(struct _Event* const event);
} Event;
@@
-97,11
+115,13
@@
typedef struct _Message
typedef struct
{
Message* message;
typedef struct
{
Message* message;
+ // Event* acks[]
GQueue* acks;
} Exchange;
typedef struct
{
GQueue* acks;
} Exchange;
typedef struct
{
+ // Event* events[]
GQueue* events;
} Broadcast;
GQueue* events;
} Broadcast;
@@
-125,11
+145,22
@@
void gdnConnectionKeyDestroy(gpointer data);
guint ghfSegmentKeyHash(gconstpointer key);
gboolean gefSegmentKeyEqual(gconstpointer a, gconstpointer b);
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);
// Event-related functions
void gdnDestroyEvent(gpointer data);
+void copyEvent(const Event* const event, Event** const newEvent);
+void copyTCPEvent(const Event* const event, Event** const newEvent);
+void copyUDPEvent(const Event* const event, Event** const newEvent);
void destroyEvent(Event* const event);
void destroyTCPEvent(Event* const event);
void destroyUDPEvent(Event* const event);
void destroyEvent(Event* const event);
void destroyTCPEvent(Event* const event);
void destroyUDPEvent(Event* const event);
+void gfDestroyEvent(gpointer data, gpointer user_data);
+double wallTimeSub(const WallTime const* tA, const WallTime const* tB);
+void gfAddEventToArray(gpointer data, gpointer user_data);
// Message-related functions
void printTCPSegment(const Message* const segment);
// Message-related functions
void printTCPSegment(const Message* const segment);
@@
-144,4
+175,9
@@
void destroyTCPSegment(Message* const segment);
// Exchange-related functions
void destroyTCPExchange(Exchange* const exchange);
// Exchange-related functions
void destroyTCPExchange(Exchange* const exchange);
+
+// Broadcast-related functions
+void gdnDestroyBroadcast(gpointer data);
+void destroyBroadcast(Broadcast* const broadcast);
+
#endif
#endif
This page took
0.023892 seconds
and
4
git commands to generate.