> On Nov. 6, 2014, 5:49 p.m., Dominic Hamon wrote:
> > src/master/master.cpp, line 321
> > <https://reviews.apache.org/r/27447/diff/4/?file=751194#file751194line321>
> >
> > there really should be a utility method on node for this. especially as
> > the check will need to be extended to ::1.
> >
> > Maybe 'isLoopback()'?
I intend to add for the IPAddress struct some methods to check for inaddr_any
and loopback IPs:
bool is_loopback() const
{
if(family == AF_INET)
{
return ipv4_addr.s_addr == INADDR_LOOPBACK;
}
else if(family == AF_INET6)
{
IPAddress ipv6_loopback(in6addr_loopback);
return ipv6_loopback == ipv6_addr;
}
return false;
}
bool is_inaddrany() const
{
if(family == AF_INET)
{
return ipv4_addr.s_addr == INADDR_ANY;
}
else if(family == AF_INET6)
{
IPAddress ipv6_inaddr_any(in6addr_any);
return ipv6_inaddr_any == ipv6_addr;
}
return false;
}
- Evelina
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27447/#review60193
-----------------------------------------------------------
On Nov. 6, 2014, 2:49 a.m., Evelina Dumitrescu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27447/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2014, 2:49 a.m.)
>
>
> Review request for mesos, Dominic Hamon, Joris Van Remoortere, and switched
> to 'mcypark'.
>
>
> Bugs: MESOS-2019
> https://issues.apache.org/jira/browse/MESOS-2019
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> At the moment, the Node class is used to keep a mapping from a socket to the
> ip & port pair in the process namespace.
> I want to propose to extend its use by replacing the ip & port fields from
> the UPID class and process namespace with this type.
>
>
> Diffs
> -----
>
> src/common/protobuf_utils.cpp 33ce782960e88e07b910f844fbdcae4c0f19d9a7
> src/master/master.cpp a860496d9d75ae4e007d35627d778caf10d08428
> src/sched/sched.cpp e5f828d0bf9dd03a01920634abfae685a7861b44
> src/scheduler/scheduler.cpp c74187cfeb57a748fd57198d3badd4b8773490eb
> src/slave/http.cpp 965d78c3e3ea2e3c922f62aabf6fc87c5cf2ab8d
> src/slave/slave.cpp dbfd1a8101d78dee8ea3ac19d990a6a7892e59be
> src/tests/fetcher_tests.cpp e026e875c7197cd214ef0432d7c40207553c8671
> src/tests/files_tests.cpp a696aa22d56b37ee70c6e64c81a849da6d436451
> src/tests/gc_tests.cpp f7747e2999cbd64ab0cd0321cca0021489dc3346
> src/tests/logging_tests.cpp 58e9b3399c3de28b1c5b3a8ec8fdf85b7a31c6d5
> src/tests/master_contender_detector_tests.cpp
> 8f7fb18f0ca985364565fc4cd50f113b1461fbe7
> src/tests/master_tests.cpp a6d1a4aaaaa5b7d50a88e5b101c43f62d21300cf
> src/tests/monitor_tests.cpp 4b950e14bd94cdfa21212268b56bebdc1200078d
>
> Diff: https://reviews.apache.org/r/27447/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Evelina Dumitrescu
>
>