10 void UDP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer);
16 * \fn void TCP_Initialise()
17 * \brief Initialise the TCP Layer
21 IPv4_RegisterCallback(IP4PROT_UDP, UDP_GetPacket);
25 * \fn void UDP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer)
26 * \brief Handles a packet from the IP Layer
28 void UDP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer)
30 tUDPHeader *hdr = Buffer;
32 Log("[UDP ] hdr->SourcePort = %i", ntohs(hdr->SourcePort));
33 Log("[UDP ] hdr->DestPort = %i", ntohs(hdr->DestPort));
34 Log("[UDP ] hdr->Length = %i", ntohs(hdr->Length));
35 Log("[UDP ] hdr->Checksum = 0x%x", ntohs(hdr->Checksum));