[Ns-bugs] [Bug 320] getsockname returns a port number in network byte order
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Sun Oct 26 15:15:48 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=320
fw-ns3 at strlen.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Comment #2 from fw-ns3 at strlen.de 2008-10-26 18:15 -------
the API as-is SUCKS:
- its unexpected to get an integer filled in in network byte order.
- can't just convert the integer internally, since the address is also
in network byte order, so we'd have to convert the address inside
nsc, too
- this API just doesn't work when you want to provide other information
that could be stored in some sockaddr (e.g. flow label...)
Rationale:
Both getpeername and getsockname provided by NSC should be re-done.
I've posted a RFC patch that makes both use a struct sockaddr (its not that
simple due to network stack <-> host os conversion issues) to the ML:
http://mailman.isi.edu/pipermail/ns-developers/2008-October/004878.html
This of course means that the port (and address) will still be in
network byte order, but at least it will be more obvious then. The advantage
is also that it makes things simpler wrt. to other address families that might
be supported by future NSC releases.
--
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, or are watching someone who is.
More information about the Ns-bugs
mailing list