10 void ICMP_Initialise();
11 void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer);
17 * \fn void ICMP_Initialise()
18 * \brief Initialise the ICMP Layer
20 void ICMP_Initialise()
22 IPv4_RegisterCallback(IP4PROT_ICMP, ICMP_GetPacket);
26 * \fn void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer)
27 * \brief Handles a packet from the IP Layer
29 void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buffer)
31 tICMPHeader *hdr = Buffer;
33 Log("[ICMP ] hdr->Type = %i", hdr->Type);
34 Log("[ICMP ] hdr->Code = %i", hdr->Code);
35 Log("[ICMP ] hdr->Checksum = 0x%x", ntohs(hdr->Checksum));
36 Log("[ICMP ] hdr->ID = 0x%x", ntohs(hdr->ID));
37 Log("[ICMP ] hdr->Sequence = 0x%x", ntohs(hdr->Sequence));