[Ns-developers] icmp message error reporting

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Sep 16 14:31:48 PDT 2008


On Tue, 2008-09-16 at 17:15 -0400, Raj Bhattacharjea wrote:
> Thanks for the summary of changes.  I looked through the code in
> ns-3-simu, and most of the changes look sound.  My only concern is the
> mtu enforcement when a UdpSocketImpl tries to send a too large packet
> (udp-socket-impl.cc:377), which, given that you wrote a thorough
> explanation in the comments, you realize is a hack.  The solution
> implied by your code comments is to propagate Send errors back up the
> stack correctly, perhaps via return values on all the Send calls down
> the stack to notify the calling layers of the result.  Is there some

agreed.

> hurdle to implementing this?  That said, the code isn't terrible, and

yes, it is hard because the error is generated in
Ipv4L3Protocol::SendRealOut which is called by the routing modules which
are called by Ipv4L3Protocol::Send which must return the final error.
So, we generate potentially multiple errors from SendRealOut for a
single call to Send so, you need to merge these errors together.

Really, the issue here is that the callback-based routing API is a bit
horrid: I was hoping that tom would fix that with his ipv4 rework and
that I would be able to remove the hack from UdpSocketImpl::DoSendTo at
that time.

> with the documentation you provided, I don't have a huge problem with
> it, its just a way to force the behavior you want in terms of the
> current API.  Implementing it "correctly" would break our API, and I
> can hear Gustavo now...

I don't think that this would break the publicly-exposed API: Send is
really just API which is internal to the internet-stack.

> My other question is: are you proposing to merge the entire simu
> branch at this point, or just the changes to support ICMP (and the
> applications that use it)?

I am proposing to merge only the icmp stuff. My tree has also a couple
of other small changes to ipv4-l3-protocol but I was planning to send
these to you separately from the icmp code: they are all really small
and quite obvious fixes/improvements.

Mathieu



More information about the Ns-developers mailing list