#include <config.h>
#endif
-#include <linux/if_ether.h>
#include <math.h>
#include <netinet/in.h>
#include <stdarg.h>
#include "event_processing_lttng_standard.h"
+/* IPv4 Ethertype, taken from <linux/if_ether.h>, unlikely to change as it's
+ * defined by IANA: http://www.iana.org/assignments/ethernet-numbers
+ */
+#define ETH_P_IP 0x0800
+
// Functions common to all processing modules
static void initProcessingLTTVStandard(SyncState* const syncState, ...);
for(i= 0; i < syncState->traceNb; i++)
{
g_hash_table_insert(processingData->traceNumTable,
- processingData->traceSetContext->traces[i]->t, (gpointer) i);
+ processingData->traceSetContext->traces[i]->t,
+ GUINT_TO_POINTER(i));
}
processingData->pendingRecv= malloc(sizeof(GHashTable*) *
struct marker_info* info;
SyncState* syncState;
ProcessingDataLTTVStandard* processingData;
+ gpointer traceNumP;
traceHook= (LttvTraceHook*) hookData;
tfc= (LttvTracefileContext*) callData;
wTime.nanosec= time.tv_nsec;
g_assert(g_hash_table_lookup_extended(processingData->traceNumTable,
- trace, NULL, (gpointer*) &traceNum));
+ trace, NULL, &traceNumP));
+ traceNum= GPOINTER_TO_INT(traceNumP);
g_debug("Process event: time: %ld.%09ld trace: %ld (%p) name: %s ",
time.tv_sec, time.tv_nsec, traceNum, trace,
static void writeProcessingTraceTraceOptionsLTTVStandard(SyncState* const
syncState, const unsigned int i, const unsigned int j)
{
- ProcessingDataLTTVStandard* processingData;
- ProcessingGraphsLTTVStandard* traceI, * traceJ;
-
- processingData= (ProcessingDataLTTVStandard*) syncState->processingData;
-
- traceI= &processingData->graphs[i];
- traceJ= &processingData->graphs[j];
-
fprintf(syncState->graphsStream,
"set key inside right bottom\n"
"set xlabel \"Clock %1$u\"\n"
static void writeProcessingTraceTimeOptionsLTTVStandard(SyncState* const
syncState, const unsigned int i, const unsigned int j)
{
- ProcessingDataLTTVStandard* processingData;
- ProcessingGraphsLTTVStandard* traceI, * traceJ;
-
- processingData= (ProcessingDataLTTVStandard*) syncState->processingData;
-
- traceI= &processingData->graphs[i];
- traceJ= &processingData->graphs[j];
-
fprintf(syncState->graphsStream,
"set key inside right bottom\n"
"set xlabel \"Clock %1$u\"\n"