[Ns-bugs] [Bug 36] Patch with misc. IPv4 changes
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Jun 13 12:36:08 PDT 2007
http://www.nsnam.org/bugzilla/show_bug.cgi?id=36
------- Comment #10 from tomh at tomh.org 2007-06-13 15:36 -------
(In reply to comment #9)
> Created an attachment (id=19)
--> (http://www.nsnam.org/bugzilla/attachment.cgi?id=19&action=view) [edit]
> patch v3
>
> Sorry for the spam. I think I found one XXX comment where mathieu was right :P
> It was due to code copy-pasted from a very old ns3 version, and so didn't have
> proper tracing in the broadcast send path.
>
Gustavo, I may prefer to split out the broadcast example into another one, or
maybe we just wait for an Ethernet example for where it makes more sense. So
maybe hold off on simple-p2p.cc part.
Regarding the other parts of the patch:
- I agree with Mathieu that AddIpv4Interface is not the right place to add the
network route, and I confess to missing that detail when I first reviewed it.
However, it does seem to me that SetUp() and SetAddress() are logical places to
insert this route. I see that the SetUp() piece of the patch has been now
removed.
I guess it depends on what people think the semantics are of SetUp(). What
does it mean to be up? It means that the interface is usable if it has an
address, which means that it has to have a proper route associated with it
(that is one way to think about it). When you do a SetUp() in practice
(ifconfig up), it adds this network route. So I don't see why we should have
different semantics.
So I would like to suggest that SetUp() has the following logic:
if (has IP address) {
AddNetworkRoute()
]
SetDown() {
if (is up && has IP address) {
DelNetworkRoute()
}
}
SetAddress() {
if (is up) {
AddNetworkRoute();
}
}
DelAddress() { // this function doesn't yet exist
if (is up) {
DelNetworkRoute();
}
}
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list