git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modules/IPStack - Add structure for propagating ICMP errors
[tpg/acess2.git]
/
KernelLand
/
Modules
/
IPStack
/
icmp.c
diff --git
a/KernelLand/Modules/IPStack/icmp.c
b/KernelLand/Modules/IPStack/icmp.c
index
fa9927e
..
f34d790
100644
(file)
--- a/
KernelLand/Modules/IPStack/icmp.c
+++ b/
KernelLand/Modules/IPStack/icmp.c
@@
-26,7
+26,7
@@
struct {
*/
void ICMP_Initialise()
{
*/
void ICMP_Initialise()
{
- IPv4_RegisterCallback(IP4PROT_ICMP, ICMP_GetPacket);
+ IPv4_RegisterCallback(IP4PROT_ICMP, ICMP_GetPacket
, NULL
);
}
/**
}
/**
@@
-64,12
+64,15
@@
void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buff
{
case 3: // Port Unreachable
Log_Debug("ICMPv4", "Destination Unreachable (Port Unreachable)");
{
case 3: // Port Unreachable
Log_Debug("ICMPv4", "Destination Unreachable (Port Unreachable)");
+ IPv4_HandleError( Interface, IPERR_PORT_UNREACHABLE,
+ htons(Length)-sizeof(tICMPHeader), hdr->Data );
break;
default:
Log_Debug("ICMPv4", "Destination Unreachable (Code %i)", hdr->Code);
break;
default:
Log_Debug("ICMPv4", "Destination Unreachable (Code %i)", hdr->Code);
+ IPv4_HandleError( Interface, IPERR_MISC,
+ htons(Length)-sizeof(tICMPHeader), hdr->Data );
break;
}
break;
}
-// IPv4_Unreachable( Interface, hdr->Code, htons(hdr->Length)-sizeof(tICMPHeader), hdr->Data );
break;
// -- 8: Echo Request
break;
// -- 8: Echo Request
UCC
git Repository :: git.ucc.asn.au