[Ns-bugs] [Bug 407] OLSR is missing HNA support
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Wed Jan 27 08:12:48 PST 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=407
--- Comment #9 from Gustavo J. A. M. Carneiro <gjcarneiro at gmail.com> 2010-01-27 11:12:47 EDT ---
(In reply to comment #8)
> Thanks for the review, will work on the flaws.
>
> Regarding the naming convention, here's what I'd tried:
>
> Suppose a node A has an association named (networkAddr, netmask), it sends this
> association in an HNA message, which is received by a node B.
>
> (gatewayAddr, networkAddr, netmask, expirationTime) is saved by node B as an
> AssociationTuple. The list of AssociationTuple's make an AssociationSet. (This
> is in accordance with RFC 3626).
OK
>
> Now here's the part where I tried to come up with my own names, was and am
> still confused, and would like some help:
>
> (networkAddr, netmask) is an 'Association', used by A. I used the same name as
> was already used in olsr-message-header.h.
It's not the same thing. In olsr-header.h the struct Association {} is
namespaced inside the Hna struct, which is inside olsr::Message. So the full
C++ identifier is actually ns3::olsr::Message::Hna::Association :-)
>
> In the Get/Insert/Erase methods, I used HostNetAssociation to refer to
> 'Association' set of a node, which is what the node shares with the rest of the
> network through HNA messages.
>
> Should I keep (networkAddr, netmask) as 'HostNetAssociation' rather than
> 'Assocation'? That will divide things into HostNetAssociation - HostNetAssocSet
> and AssociationTuple - AssociationSet ? Else can you please suggest what names
> I can use here?
To remain consistent with the rfc, I think it should be InsertAssociationTuple,
EraseAssociation, etc. Although I don't agree with the rfc (I think
"association tuple" is too vague), at least it's a documented naming.
>
> And after the discussion I had with Tom, I think it would be better if
> RoutingProtocol::InjectRoute() is renamed to
> RoutingProtocol::AddHostNetAssociation(). What do you think?
I think the naming conventions in NS3 forbid abbreviated names like 'Net'.
Perhaps two separate methods could be added:
1. AddHostAssociation(Ipv4Address)
2. AddNetworkAssociation(Ipv4Address, Ipv4Mask)
_however_, I normally like code that is more intelligent. In OLSR you don't
have have AddOlsrInterface; it just uses all the available interfaces in the
node. Likewise, perhaps an automatic approach could be used here as well? It
would require the code to:
1. Go to the Ipv4 interface of the node;
2. Get the list of routing protocols;
3. Iterate over the list and, for each "static ipv4 routing protocol":
3a. Iterate over the static routing entries and generate Hna message(s)
based on them.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list