MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / OnReceiveICMP

Function OnReceiveICMP

Kernel/src/net/interface.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 }
21
22 void OnReceiveICMP(void* data, size_t length){
23 if(length < sizeof(ICMPHeader)){
24 Log::Warning("[Network] [ICMP] Discarding packet (too short)");
25 return;
26 }
27
28 ICMPHeader* header = (ICMPHeader*)data;
29 Log::Info("[Network] [ICMP] Received packet, Type: %d, Code: %d", header->type, header->code);
30 }
31
32 void OnReceiveUDP(IPv4Header& ipHeader, void* data, size_t length){
33 if(length < sizeof(UDPHeader)){

Callers 1

OnReceiveIPv4Function · 0.85

Calls 2

WarningFunction · 0.85
InfoFunction · 0.85

Tested by

no test coverage detected