You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/02/08 16:51:44 UTC
[17/20] mesos git commit: Added an Address::family() function.
Added an Address::family() function.
Review: https://reviews.apache.org/r/29540
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4065fa69
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4065fa69
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4065fa69
Branch: refs/heads/master
Commit: 4065fa6926e10b541a73e380da027942bdc8cd13
Parents: 4a93512
Author: Benjamin Hindman <be...@gmail.com>
Authored: Thu Jan 1 20:01:25 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sat Feb 7 14:46:44 2015 -0800
----------------------------------------------------------------------
3rdparty/libprocess/include/process/address.hpp | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/4065fa69/3rdparty/libprocess/include/process/address.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/address.hpp b/3rdparty/libprocess/include/process/address.hpp
index 7db6271..f5fb4dd 100644
--- a/3rdparty/libprocess/include/process/address.hpp
+++ b/3rdparty/libprocess/include/process/address.hpp
@@ -17,6 +17,8 @@ namespace network {
// Represents a network "address", subsuming the struct addrinfo and
// struct sockaddr* that typically is used to encapsulate IP and port.
+//
+// TODO(benh): Create a Family enumeration to replace sa_family_t.
class Address
{
public:
@@ -52,6 +54,11 @@ public:
return !(*this == that);
}
+ sa_family_t family() const
+ {
+ return AF_INET;
+ }
+
uint32_t ip;
uint16_t port;
};