----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28387/#review62806 -----------------------------------------------------------
I would sugguest using static functions to create IPAddress instances. Also, you may wanna mimic the interfaces provided by Python ipaddress module https://docs.python.org/3/library/ipaddress.html IPAddress addr = IPAddress::IPv4Address("0.1.1.1"); IPAddress addr = IPAddress::IPv4Address(...); // in_addr version IPAddress addr = IPAddress::IPv6Address(...); // in6_addr version ... IPNetwork network = IPNetwork::IPv4Network("1.1.1.1/8"); IPNetwork network = IPNetwork::IPv4Network(ipv4Addr, prefix); IPNetwork network = IPNetwork::IPv6Network("2001:db8::0/96"); ... It might be good to separate "IPAddress" and "IPNetwork" concepts. 3rdparty/libprocess/3rdparty/stout/include/stout/ipaddress.hpp <https://reviews.apache.org/r/28387/#comment104941> Flying by. Do not have context. Is the plan to replace the existing "IP" in stout with "IPAddress"? 3rdparty/libprocess/3rdparty/stout/include/stout/ipaddress.hpp <https://reviews.apache.org/r/28387/#comment104943> Remove the space after "sizeof". 3rdparty/libprocess/3rdparty/stout/include/stout/ipaddress.hpp <https://reviews.apache.org/r/28387/#comment104942> s/isInaddrany/isInAddrAny/ - Jie Yu On Nov. 24, 2014, 5:49 a.m., Evelina Dumitrescu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28387/ > ----------------------------------------------------------- > > (Updated Nov. 24, 2014, 5:49 a.m.) > > > Review request for mesos and Dominic Hamon. > > > Bugs: MESOS-1919 > https://issues.apache.org/jira/browse/MESOS-1919 > > > Repository: mesos-git > > > Description > ------- > > Create an IP address abstraction such that every callsite does not need to > check the family and get the right address. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/Makefile.am > 00a4edd0bcde3f92630fb173aeb4fff8e9139f77 > 3rdparty/libprocess/3rdparty/stout/include/stout/ipaddress.hpp PRE-CREATION > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > a992bd9f7caf3abcc2c5e14519ca7e3ac045bb4b > 3rdparty/libprocess/3rdparty/stout/tests/net_tests.cpp > 425132e5d7c3770be4a5a39feea5a2f22179b871 > > Diff: https://reviews.apache.org/r/28387/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Evelina Dumitrescu > >
