Bug 1359

Summary: TCP sockets can not receive ICMP notifications
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: internetAssignee: George Riley <riley>
Status: RESOLVED FIXED    
Severity: enhancement CC: bswenson3, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Add TCP functions to receive ICMP notifications from Layer3

Description Tommaso Pecorella 2012-02-08 16:05:58 UTC
TCP sockets can not receive ICMP notifications (useful for applications) due to the missing function(s):

ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl,
                            uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
                            Ipv4Address payloadSource,Ipv4Address payloadDestination,
                            const uint8_t payload[8])

I don't know if it's useful to have it, but I don't see why not.

The feature will be more useful for IPv6, in order to properly handle MTU exceeded packets (still to be done tho).

Opening a bug as a proposed enhancement to not forget about it.

T.
Comment 1 Tommaso Pecorella 2012-03-17 19:02:47 UTC
Created attachment 1360 [details]
Add TCP functions to receive ICMP notifications from Layer3

Preliminary support, untested (should work tho).

It's a copy.paste from UDP socket, so if it's bugged this, we have an issue as well,
Comment 2 Brian Swenson 2012-09-27 13:33:25 UTC
Also needed code in tcp-l4-protocol.cc/.h to call these functions. 

Fixed:  9095:8462a1160246