summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-28 09:38:33 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-28 09:38:33 -0700
commitfdc3e103ccc3207c4a00b8476d8635772c6c6dc4 (patch)
tree523a36878faad65dc9d561dbc3cc1954a23374de /node
parentc1b0329969d3601fe80ef3298837edac5bdbbed2 (diff)
downloadinfinitytier-fdc3e103ccc3207c4a00b8476d8635772c6c6dc4.tar.gz
infinitytier-fdc3e103ccc3207c4a00b8476d8635772c6c6dc4.zip
Cleanup and docs.
Diffstat (limited to 'node')
-rw-r--r--node/InetAddress.hpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp
index 5e5eb06e..c4d5cfda 100644
--- a/node/InetAddress.hpp
+++ b/node/InetAddress.hpp
@@ -52,8 +52,8 @@ namespace ZeroTier {
*
* This is basically a "mixin" for sockaddr_storage. It adds methods and
* operators, but does not modify the structure. This can be cast to/from
- * sockaddr_storage and used interchangeably. Don't change this as it's
- * used in a few places.
+ * sockaddr_storage and used interchangeably. DO NOT change this by e.g.
+ * adding non-static fields, since much code depends on this identity.
*/
struct InetAddress : public sockaddr_storage
{
@@ -326,7 +326,7 @@ struct InetAddress : public sockaddr_storage
inline bool isV6() const throw() { return (ss_family == AF_INET6); }
/**
- * @return pointer to raw IP address bytes
+ * @return pointer to raw address bytes or NULL if not available
*/
inline const void *rawIpData() const
throw()
@@ -339,19 +339,6 @@ struct InetAddress : public sockaddr_storage
}
/**
- * @return pointer to raw IP address bytes
- */
- inline void *rawIpData()
- throw()
- {
- switch(ss_family) {
- case AF_INET: return (void *)&(reinterpret_cast<struct sockaddr_in *>(this)->sin_addr.s_addr);
- case AF_INET6: return (void *)(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr);
- default: return 0;
- }
- }
-
- /**
* Performs an IP-only comparison or, if that is impossible, a memcmp()
*
* @param a InetAddress to compare again