+ if (syncState->stats)
+ {
+ processingData->stats->totRecvUDP++;
+ }
+
+ // If it's there, remove it and proceed with a receive event
+ g_hash_table_steal(processingData->pendingRecv[traceNum], skb);
+
+ inE->type= UDP;
+ inE->event.udpEvent= malloc(sizeof(UDPEvent));
+ inE->destroy= &destroyUDPEvent;
+ inE->event.udpEvent->direction= IN;
+ inE->event.udpEvent->datagramKey= malloc(sizeof(DatagramKey));
+ inE->event.udpEvent->datagramKey->saddr=
+ ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 1));
+ inE->event.udpEvent->datagramKey->daddr=
+ ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 2));
+ inE->event.udpEvent->unicast= ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 3)) == 0 ? false : true;
+ inE->event.udpEvent->datagramKey->ulen=
+ ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 4));
+ inE->event.udpEvent->datagramKey->source=
+ ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 5));
+ inE->event.udpEvent->datagramKey->dest=
+ ltt_event_get_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 6));
+ dataStart= ltt_event_get_long_unsigned(event,
+ lttv_trace_get_hook_field(traceHook, 7));
+ g_assert_cmpuint(sizeof(inE->event.udpEvent->datagramKey->dataKey),
+ ==, sizeof(guint64));
+ if (inE->event.udpEvent->datagramKey->ulen - 8 >=
+ sizeof(inE->event.udpEvent->datagramKey->dataKey))
+ {
+ memcpy(inE->event.udpEvent->datagramKey->dataKey, &dataStart,
+ sizeof(inE->event.udpEvent->datagramKey->dataKey));
+ }
+ else
+ {
+ memset(inE->event.udpEvent->datagramKey->dataKey, 0,
+ sizeof(inE->event.udpEvent->datagramKey->dataKey));
+ memcpy(inE->event.udpEvent->datagramKey->dataKey, &dataStart,
+ inE->event.udpEvent->datagramKey->ulen - 8);
+ }
+
+ syncState->matchingModule->matchEvent(syncState, inE);
+
+ g_debug("UDP input event %p for skb %p done\n", inE, skb);
+ }