aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Host/SocketAddress.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Host/SocketAddress.h')
-rw-r--r--include/lldb/Host/SocketAddress.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/lldb/Host/SocketAddress.h b/include/lldb/Host/SocketAddress.h
index 3d1ed906e1ef..bc66ad915bbe 100644
--- a/include/lldb/Host/SocketAddress.h
+++ b/include/lldb/Host/SocketAddress.h
@@ -32,15 +32,23 @@ typedef ADDRESS_FAMILY sa_family_t;
// Other libraries and framework includes
// Project includes
#include <string>
+#include <vector>
namespace lldb_private {
class SocketAddress {
public:
+ //----------------------------------------------------------------------------
+ // Static method to get all address information for a host and/or service
+ //----------------------------------------------------------------------------
+ static std::vector<SocketAddress> GetAddressInfo(const char *hostname,
+ const char *servname);
+
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
SocketAddress();
+ SocketAddress(const struct addrinfo *addr_info);
SocketAddress(const struct sockaddr &s);
SocketAddress(const struct sockaddr_in &s);
SocketAddress(const struct sockaddr_in6 &s);
@@ -63,6 +71,9 @@ public:
const SocketAddress &operator=(const struct sockaddr_storage &s);
+ bool operator==(const SocketAddress &rhs) const;
+ bool operator!=(const SocketAddress &rhs) const;
+
//------------------------------------------------------------------
// Clear the contents of this socket address
//------------------------------------------------------------------
@@ -135,6 +146,11 @@ public:
bool IsValid() const;
//------------------------------------------------------------------
+ // Returns true if the socket is INADDR_ANY
+ //------------------------------------------------------------------
+ bool IsAnyAddr() const;
+
+ //------------------------------------------------------------------
// Direct access to all of the sockaddr structures
//------------------------------------------------------------------
struct sockaddr &sockaddr() {