> On Feb. 18, 2015, 1:28 a.m., Jie Yu wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp, lines 409-413 > > <https://reviews.apache.org/r/29288/diff/22/?file=862203#file862203line409> > > > > Looking at the comments of fields `IP::address_` and `IP::netmask_`, > > looks like we always store addresses in host order. That makes me wondering > > how this function is possible? > > Evelina Dumitrescu wrote: > Removed the comments. networkToHost and hostToNetwork are wrappers for > ntohl and htonl.
OK. But I am confused. Say an IP always stores real ip address in host order. After you invoked hostToNetwork, are you saying that the real ip is stored in network order in IP? ``` IP ip1; // the real ip in ip1 is stored in host order according to your comments for the field memebers ip2 = hostToNetwork(ip1); // so the real ip in ip2 is stored in network order? Does that violate your comments? ``` - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29288/#review72771 ----------------------------------------------------------- On Feb. 21, 2015, 3:21 p.m., Evelina Dumitrescu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29288/ > ----------------------------------------------------------- > > (Updated Feb. 21, 2015, 3:21 p.m.) > > > Review request for mesos, Benjamin Hindman, Dominic Hamon, Jie Yu, Joris Van > Remoortere, and Niklas Nielsen. > > > Bugs: MESOS-1919 > https://issues.apache.org/jira/browse/MESOS-1919 > > > Repository: mesos > > > Description > ------- > > Created the inner class InAddrStorage encapsulated inside the IP class. > The class uses a union with the in_addr and in6_addr fields. > I considered that the The MasterInfo protobuffers should have both an ipv4 > and an ipv6 field. > I intend to use the same Classifiers, addition, removal and update of > container filters, but write different encode/decode functions for IPv4/ICMP > and IPv6/ICMPv6 because the processing of the protocol headers differ. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > b464e517bb1e7b6b381c6cd6c0466ed788a82615 > 3rdparty/libprocess/3rdparty/stout/tests/net_tests.cpp > 425132e5d7c3770be4a5a39feea5a2f22179b871 > > Diff: https://reviews.apache.org/r/29288/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Evelina Dumitrescu > >
