HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_IpAddress.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_IpAddress.h
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __UT_IPADDRESS_H__
13 #define __UT_IPADDRESS_H__
14 
15 #include "UT_API.h"
16 
17 #include "UT_Assert.h"
18 #include "UT_FixedArray.h"
19 #include "UT_StringHolder.h"
20 
21 #include <SYS/SYS_Compiler.h>
22 
23 #include <cstdint>
24 #include <cstring>
25 
27 {
28  ANY,
29  IPv4,
30  IPv6
31 };
32 
33 /// This represents a Ipv4 address.
35 {
36 public:
38 
39  UT_IpAddressV4() : myAddress(0) { }
40 
41  explicit UT_IpAddressV4(uint32_t addr) { convert_(addr); }
42  explicit UT_IpAddressV4(const bytes_t& addr)
43  {
44  std::memcpy(&myAddress, addr.data(), 4);
45  }
47  unsigned char i0,
48  unsigned char i1,
49  unsigned char i2,
50  unsigned char i3)
51  {
52  convert_(i0, i1, i2, i3);
53  }
55  myAddress(addr.myAddress)
56  {}
58  {
59  myAddress = addr.myAddress;
60  return *this;
61  }
62 
63  bool operator==(const UT_IpAddressV4& other) const
64  {
65  return myAddress == other.myAddress;
66  }
67  bool operator!=(const UT_IpAddressV4& other) const
68  {
69  return !(*this == other);
70  }
71  bool operator<(const UT_IpAddressV4& other) const
72  {
73  return toUInt() < other.toUInt();
74  }
75  bool operator>(const UT_IpAddressV4& other) const
76  {
77  return other.toUInt() < toUInt();
78  }
79  bool operator<=(const UT_IpAddressV4& other) const
80  {
81  return !(other < *this);
82  }
83  bool operator>=(const UT_IpAddressV4& other) const
84  {
85  return !(*this < other);
86  }
87 
89  {
90  return toUInt() == 0;
91  }
93  {
94  return (toUInt() & 0xFF000000) == 0x7F000000;
95  }
97  {
98  return (toUInt() & 0xF0000000) == 0xE0000000;
99  }
101  {
102  bytes_t bytes;
103  std::memcpy(bytes.data(), &myAddress, 4);
104  return bytes;
105  }
106 
107  // Returns value in host byte order
108  SYS_NO_DISCARD_RESULT uint32_t toUInt() const;
109 
110  SYS_NO_DISCARD_RESULT static UT_IpAddressV4 fromString(
111  const UT_StringRef& str);
112  SYS_NO_DISCARD_RESULT UT_StringHolder toString() const;
114  {
115  return UT_IpAddressV4();
116  }
118  {
119  return UT_IpAddressV4(0x7F000001);
120  }
122  {
123  return UT_IpAddressV4(0xFFFFFFFF);
124  }
125 
126  SYS_NO_DISCARD_RESULT static uint32_t networkToHost(uint32_t v);
127  SYS_NO_DISCARD_RESULT static uint32_t hostToNetwork(uint32_t v);
128 private:
129  void convert_(uint32_t addr);
130  void convert_(uint8 i0, uint8 i1, uint8 i2, uint8 i3);
131 
132  // Stored in network byte order
133  uint32_t myAddress;
134 };
135 
136 /// This represents a Ipv6 address.
138 {
139 public:
141 
142  UT_IpAddressV6() : myAddress() { }
143  explicit UT_IpAddressV6(const bytes_t& addr) : myAddress(addr) {}
144 
145  bool operator==(const UT_IpAddressV6& other) const
146  {
147  return std::memcmp(myAddress.data(), other.myAddress.data(), 16) == 0;
148  }
149  bool operator!=(const UT_IpAddressV6& other) const
150  {
151  return !(*this == other);
152  }
153  bool operator<(const UT_IpAddressV6& other) const
154  {
155  return myAddress < other.myAddress;
156  }
157  bool operator>(const UT_IpAddressV6& other) const
158  {
159  return other < *this;
160  }
161  bool operator<=(const UT_IpAddressV6& other) const
162  {
163  return !(other < *this);
164  }
165  bool operator>=(const UT_IpAddressV6& other) const
166  {
167  return !(*this < other);
168  }
169 
171  {
172  // Pure IPv6 loopback ::1.
173  const bool pure_v6_loopback
174  = myAddress[0] == 0 && myAddress[1] == 0 && myAddress[2] == 0
175  && myAddress[3] == 0 && myAddress[4] == 0
176  && myAddress[5] == 0 && myAddress[6] == 0
177  && myAddress[7] == 0 && myAddress[8] == 0
178  && myAddress[9] == 0 && myAddress[10] == 0
179  && myAddress[11] == 0 && myAddress[12] == 0
180  && myAddress[13] == 0 && myAddress[14] == 0
181  && myAddress[15] == 1;
182  if (pure_v6_loopback)
183  return true;
184  // IPv4-mapped loopback ::ffff:127.x.x.x. A dual-stack v6 listener
185  // receives v4 clients as v4-mapped v6 at the socket layer, and
186  // downstream IP checks (license IP mask, isLocalConnection) rely on
187  // this method recognizing the v4 loopback form.
188  return isV4Mapped() && toV4().isLoopback();
189  }
191  {
192  return myAddress[0] == 0 && myAddress[1] == 0 && myAddress[2] == 0
193  && myAddress[3] == 0 && myAddress[4] == 0 && myAddress[5] == 0
194  && myAddress[6] == 0 && myAddress[7] == 0 && myAddress[8] == 0
195  && myAddress[9] == 0 && myAddress[10] == 0 && myAddress[11] == 0
196  && myAddress[12] == 0 && myAddress[13] == 0 && myAddress[14] == 0
197  && myAddress[15] == 0;
198  }
200  {
201  return myAddress[0] == 0 && myAddress[1] == 0 && myAddress[2] == 0
202  && myAddress[3] == 0 && myAddress[4] == 0 && myAddress[5] == 0
203  && myAddress[6] == 0 && myAddress[7] == 0 && myAddress[8] == 0
204  && myAddress[9] == 0 && myAddress[10] == 0xff
205  && myAddress[11] == 0xff;
206  }
208  {
209  return myAddress[0] == 0xfe && ((myAddress[1] & 0xc0) == 0x80);
210  }
212  {
213  return myAddress[0] == 0xfe && ((myAddress[1] & 0xc0) == 0xc0);
214  }
216  {
217  return myAddress[0] == 0xff;
218  }
220  {
221  return UT_IpAddressV6({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1});
222  }
223 
224  SYS_NO_DISCARD_RESULT const bytes_t& toBytes() const { return myAddress; }
225 
226  SYS_NO_DISCARD_RESULT static UT_IpAddressV6 fromString(
227  const UT_StringRef& str);
228  SYS_NO_DISCARD_RESULT UT_StringHolder toString() const;
230  {
231  UT_ASSERT(isV4Mapped());
232  return UT_IpAddressV4(
233  myAddress[12], myAddress[13], myAddress[14], myAddress[15]);
234  }
235 
236 private:
237  bytes_t myAddress;
238 };
239 
240 /// This represents either an Ipv4 address or an Ipv6 address.
242 {
243 public:
245  myType(Type::ipv4)
246  {
247  myIP.myIPv4 = UT_IpAddressV4();
248  }
250  : myType(Type::ipv4)
251  {
252  myIP.myIPv4 = UT_IpAddressV4(addr);
253  }
255  : myType(Type::ipv6)
256  {
257  myIP.myIPv6 = UT_IpAddressV6(addr);
258  }
260  unsigned char i0,
261  unsigned char i1,
262  unsigned char i2,
263  unsigned char i3)
264  : myType(Type::ipv4)
265  {
266  myIP.myIPv4 = UT_IpAddressV4(i0, i1, i2, i3);
267  }
268  UT_IpAddress(const UT_IpAddress& ip) : myType(ip.myType)
269  {
270  if (myType == Type::ipv4)
271  {
272  myIP.myIPv4 = ip.myIP.myIPv4;
273  }
274  else
275  {
276  myIP.myIPv6 = ip.myIP.myIPv6;
277  }
278  }
279  UT_IpAddress(const UT_IpAddressV4& ip) : myType(Type::ipv4)
280  {
281  myIP.myIPv4 = ip;
282  }
283  UT_IpAddress(const UT_IpAddressV6& ip) : myType(Type::ipv6)
284  {
285  myIP.myIPv6 = ip;
286  }
287 
288  bool operator==(const UT_IpAddress& other) const
289  {
290  if (isV4())
291  {
292  if (!other.isV4())
293  return false;
294  return myIP.myIPv4 == other.myIP.myIPv4;
295  }
296  return other.isV6() && myIP.myIPv6 == other.myIP.myIPv6;
297  }
298  bool operator!=(const UT_IpAddress& other) const
299  {
300  return !(*this == other);
301  }
302 
304  {
305  myType = ip.myType;
306  if (myType == Type::ipv4)
307  {
308  myIP.myIPv4 = ip.myIP.myIPv4;
309  }
310  else
311  {
312  myIP.myIPv6 = ip.myIP.myIPv6;
313  }
314  return *this;
315  }
317  {
318  myIP.myIPv4 = ip;
319  myType = Type::ipv4;
320  return *this;
321  }
323  {
324  myIP.myIPv6 = ip;
325  myType = Type::ipv6;
326  return *this;
327  }
328 
329  SYS_NO_DISCARD_RESULT bool isV4() const { return myType == Type::ipv4; }
330  SYS_NO_DISCARD_RESULT bool isV6() const { return myType == Type::ipv6; }
332  {
333  if (isV4())
334  return myIP.myIPv4.isUnspecified();
335  return myIP.myIPv6.isUnspecified();
336  }
338  {
339  if (isV4())
340  return myIP.myIPv4.isLoopback();
341  return myIP.myIPv6.isLoopback();
342  }
343 
345  const UT_StringRef& str)
346  {
347  // Check what type this address is in.
348  exint idx = str.findCharIndex(':');
349  if (idx >= 0)
350  {
352  }
354  }
355 
357  {
358  if (isV4())
359  return myIP.myIPv4.toString();
360  return myIP.myIPv6.toString();
361  }
362 
364  {
365  if (!isV4())
366  return UT_IpAddressV4();
367  return myIP.myIPv4;
368  }
370  {
371  if (!isV6())
372  return UT_IpAddressV6();
373  return myIP.myIPv6;
374  }
375 
376 private:
377  enum class Type
378  {
379  ipv4,
380  ipv6
381  };
382 
383  Type myType;
384  union IP
385  {
386  IP()
387  {
388  new(&myIPv6) UT_IpAddressV6;
389  }
390 
391  UT_IpAddressV4 myIPv4;
392  UT_IpAddressV6 myIPv6;
393  } myIP;
394 };
395 
397 {
398 public:
400  static constexpr uint32_t host_address_len = 32;
401 
403  myAddress(),
404  myPrefixLength(host_address_len)
405  {}
406  UT_IpNetworkV4(const address_t& address, uint16 prefix_length)
407  : myAddress(address), myPrefixLength(prefix_length)
408  {
409  UT_ASSERT(myPrefixLength <= host_address_len);
410  }
412  : myAddress(net.myAddress), myPrefixLength(net.myPrefixLength)
413  {
414  }
416  {
417  myAddress = other.myAddress;
418  myPrefixLength = other.myPrefixLength;
419  return *this;
420  }
421  bool operator==(const UT_IpNetworkV4& other) const
422  {
423  return myAddress == other.myAddress
424  && myPrefixLength == other.myPrefixLength;
425  }
426  bool operator!=(const UT_IpNetworkV4& other) const
427  {
428  return !(*this == other);
429  }
430  SYS_NO_DISCARD_RESULT static UT_IpNetworkV4 fromString(
431  const UT_StringRef& str);
433  {
434  return myAddress;
435  }
436  SYS_NO_DISCARD_RESULT address_t netmask() const;
438  {
439  return UT_IpAddressV4(myAddress.toUInt() & netmask().toUInt());
440  }
442  {
443  return UT_IpNetworkV4(network(), myPrefixLength);
444  }
445  SYS_NO_DISCARD_RESULT uint16_t prefixLength() const { return myPrefixLength; }
446  SYS_NO_DISCARD_RESULT bool isHost() const { return myPrefixLength == host_address_len; }
447  SYS_NO_DISCARD_RESULT bool isSubnetOf(const UT_IpNetworkV4& other) const;
449  {
450  UT_StringHolder str;
451  str.format("{}/{}", myAddress.toString(), myPrefixLength);
452  return str;
453  }
455  {
456  return UT_IpNetworkV4(UT_IpAddressV4::loopback(), host_address_len);
457  }
458 
459 private:
460  address_t myAddress;
461  uint16_t myPrefixLength;
462 };
463 
465 {
466 public:
468  static constexpr uint32_t host_address_len = 128;
469 
471  myAddress(),
472  myPrefixLength(host_address_len)
473  {}
474  UT_IpNetworkV6(const address_t& address, uint32_t prefix_length)
475  : myAddress(address), myPrefixLength(prefix_length)
476  {
477  UT_ASSERT(myPrefixLength <= host_address_len);
478  }
480  : myAddress(other.myAddress), myPrefixLength(other.myPrefixLength)
481  {
482  }
483 
485  {
486  myAddress = other.myAddress;
487  myPrefixLength = other.myPrefixLength;
488  return *this;
489  }
490  bool operator==(const UT_IpNetworkV6& net) const
491  {
492  return myAddress == net.myAddress
493  && myPrefixLength == net.myPrefixLength;
494  }
495  bool operator!=(const UT_IpNetworkV6& net) const { return !(*this == net); }
496 
497  SYS_NO_DISCARD_RESULT static UT_IpNetworkV6 fromString(
498  const UT_StringRef& str);
499  SYS_NO_DISCARD_RESULT address_t network() const;
501  {
502  return myAddress;
503  }
505  {
506  return UT_IpNetworkV6(network(), myPrefixLength);
507  }
508  SYS_NO_DISCARD_RESULT uint32_t prefixLength() const { return myPrefixLength; }
509  SYS_NO_DISCARD_RESULT bool isHost() const { return myPrefixLength == host_address_len; }
510  SYS_NO_DISCARD_RESULT bool isSubnetOf(const UT_IpNetworkV6& net) const;
512  {
513  UT_StringHolder str;
514  str.format("{}/{}", myAddress.toString(), myPrefixLength);
515  return str;
516  }
518  {
519  return UT_IpNetworkV6(UT_IpAddressV6::loopback(), host_address_len);
520  }
521 private:
522  address_t myAddress;
523  uint32_t myPrefixLength;
524 };
525 
526 #endif // __UT_IPADDRESS_H__
527 
SYS_NO_DISCARD_RESULT UT_StringHolder toString() const
Definition: UT_IpAddress.h:356
SYS_NO_DISCARD_RESULT bool isV4Mapped() const
Definition: UT_IpAddress.h:199
bool operator>(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:75
unsigned short uint16
Definition: SYS_Types.h:38
UT_IpAddressV4(const bytes_t &addr)
Definition: UT_IpAddress.h:42
UT_IpAddress(const UT_IpAddress &ip)
Definition: UT_IpAddress.h:268
SYS_NO_DISCARD_RESULT UT_StringHolder toString() const
Definition: UT_IpAddress.h:448
UT_IpAddress(const UT_IpAddressV6 &ip)
Definition: UT_IpAddress.h:283
UT_IpAddressV4(const UT_IpAddressV4 &addr)
Definition: UT_IpAddress.h:54
static SYS_NO_DISCARD_RESULT UT_IpNetworkV4 loopback()
Definition: UT_IpAddress.h:454
SYS_NO_DISCARD_RESULT UT_StringHolder toString() const
Definition: UT_IpAddress.h:511
UT_IpAddress(const UT_IpAddressV4::bytes_t &addr)
Definition: UT_IpAddress.h:249
const GLdouble * v
Definition: glcorearb.h:837
This represents a Ipv4 address.
Definition: UT_IpAddress.h:34
static SYS_NO_DISCARD_RESULT UT_IpAddressV4 loopback()
Definition: UT_IpAddress.h:117
bool operator>=(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:165
int64 exint
Definition: SYS_Types.h:125
static SYS_NO_DISCARD_RESULT UT_IpAddressV4 broadcast()
Definition: UT_IpAddress.h:121
bool operator==(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:145
SYS_NO_DISCARD_RESULT bool isUnspecified() const
Definition: UT_IpAddress.h:190
SYS_NO_DISCARD_RESULT const address_t & address() const
Definition: UT_IpAddress.h:500
GLint GLint i2
Definition: glad.h:2724
SYS_NO_DISCARD_RESULT uint32_t prefixLength() const
Definition: UT_IpAddress.h:508
static SYS_NO_DISCARD_RESULT UT_IpAddressV6 fromString(const UT_StringRef &str)
#define UT_API
Definition: UT_API.h:14
UT_IpAddress(unsigned char i0, unsigned char i1, unsigned char i2, unsigned char i3)
Definition: UT_IpAddress.h:259
bool operator==(const UT_IpAddress &other) const
Definition: UT_IpAddress.h:288
SYS_NO_DISCARD_RESULT bool isHost() const
Definition: UT_IpAddress.h:509
bool operator<=(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:79
bool operator==(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:63
UT_IpAddressV4(uint32_t addr)
Definition: UT_IpAddress.h:41
bool operator!=(const UT_IpAddress &other) const
Definition: UT_IpAddress.h:298
UT_IpNetworkV4 & operator=(const UT_IpNetworkV4 &other)
Definition: UT_IpAddress.h:415
unsigned char uint8
Definition: SYS_Types.h:36
SYS_NO_DISCARD_RESULT UT_IpNetworkV4 canonical() const
Definition: UT_IpAddress.h:441
SYS_NO_DISCARD_RESULT bool isMulticast() const
Definition: UT_IpAddress.h:96
UT_IpAddress & operator=(const UT_IpAddress &ip)
Definition: UT_IpAddress.h:303
bool operator>=(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:83
This represents either an Ipv4 address or an Ipv6 address.
Definition: UT_IpAddress.h:241
static SYS_NO_DISCARD_RESULT UT_IpAddressV4 any()
Definition: UT_IpAddress.h:113
std::array< T, N > UT_FixedArray
Definition: UT_FixedArray.h:19
UT_IpAddressV4 & operator=(const UT_IpAddressV4 &addr)
Definition: UT_IpAddress.h:57
SYS_NO_DISCARD_RESULT bool isLoopback() const
Definition: UT_IpAddress.h:170
SYS_FORCE_INLINE exint findCharIndex(char c) const
Find the location of the character (or -1 if not found)
UT_IpNetworkV6(const address_t &address, uint32_t prefix_length)
Definition: UT_IpAddress.h:474
SYS_NO_DISCARD_RESULT bool isV6() const
Definition: UT_IpAddress.h:330
SYS_NO_DISCARD_RESULT UT_IpAddressV4 toV4() const
Definition: UT_IpAddress.h:229
UT_IpAddressV4(unsigned char i0, unsigned char i1, unsigned char i2, unsigned char i3)
Definition: UT_IpAddress.h:46
UT_IpAddress & operator=(const UT_IpAddressV6 &ip)
Definition: UT_IpAddress.h:322
bool operator!=(const UT_IpNetworkV6 &net) const
Definition: UT_IpAddress.h:495
bool operator<(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:71
static SYS_NO_DISCARD_RESULT UT_IpAddressV4 fromString(const UT_StringRef &str)
bool operator==(const UT_IpNetworkV6 &net) const
Definition: UT_IpAddress.h:490
#define SYS_NO_DISCARD_RESULT
Definition: SYS_Compiler.h:93
GLint i1
Definition: glad.h:2724
UT_IpAddress(const UT_IpAddressV4 &ip)
Definition: UT_IpAddress.h:279
UT_IpAddress(const UT_IpAddressV6::bytes_t &addr)
Definition: UT_IpAddress.h:254
SYS_NO_DISCARD_RESULT bool isSiteLocal() const
Definition: UT_IpAddress.h:211
bool operator>(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:157
UT_IpNetworkV4(const address_t &address, uint16 prefix_length)
Definition: UT_IpAddress.h:406
bool operator!=(const UT_IpAddressV4 &other) const
Definition: UT_IpAddress.h:67
SYS_NO_DISCARD_RESULT bool isLoopback() const
Definition: UT_IpAddress.h:337
size_t format(const char *fmt, const Args &...args)
Format a string using the same formatting codes as UTformat.
bool operator<(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:153
UT_IpNetworkV6(const UT_IpNetworkV6 &other)
Definition: UT_IpAddress.h:479
SYS_NO_DISCARD_RESULT address_t network() const
Definition: UT_IpAddress.h:437
SYS_NO_DISCARD_RESULT const address_t & address() const
Definition: UT_IpAddress.h:432
bool operator!=(const UT_IpNetworkV4 &other) const
Definition: UT_IpAddress.h:426
UT_FixedArray< uint8, 4 > bytes_t
Definition: UT_IpAddress.h:37
SYS_NO_DISCARD_RESULT UT_IpNetworkV6 canonical() const
Definition: UT_IpAddress.h:504
SYS_NO_DISCARD_RESULT UT_IpAddressV4 toV4() const
Definition: UT_IpAddress.h:363
UT_IpNetworkV4(const UT_IpNetworkV4 &net)
Definition: UT_IpAddress.h:411
SYS_NO_DISCARD_RESULT bool isV4() const
Definition: UT_IpAddress.h:329
This represents a Ipv6 address.
Definition: UT_IpAddress.h:137
static SYS_NO_DISCARD_RESULT UT_IpAddress fromString(const UT_StringRef &str)
Definition: UT_IpAddress.h:344
SYS_NO_DISCARD_RESULT UT_IpAddressV6 toV6() const
Definition: UT_IpAddress.h:369
SYS_NO_DISCARD_RESULT uint32_t toUInt() const
SYS_NO_DISCARD_RESULT bool isHost() const
Definition: UT_IpAddress.h:446
UT_FixedArray< uint8, 16 > bytes_t
Definition: UT_IpAddress.h:140
SYS_NO_DISCARD_RESULT bool isUnspecified() const
Definition: UT_IpAddress.h:88
SYS_NO_DISCARD_RESULT const bytes_t toBytes() const
Definition: UT_IpAddress.h:100
SYS_NO_DISCARD_RESULT uint16_t prefixLength() const
Definition: UT_IpAddress.h:445
bool operator==(const UT_IpNetworkV4 &other) const
Definition: UT_IpAddress.h:421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
UT_IpNetworkV6 & operator=(const UT_IpNetworkV6 &other)
Definition: UT_IpAddress.h:484
SYS_NO_DISCARD_RESULT bool isMulticast() const
Definition: UT_IpAddress.h:215
bool operator!=(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:149
static SYS_NO_DISCARD_RESULT UT_IpAddressV6 loopback()
Definition: UT_IpAddress.h:219
SYS_NO_DISCARD_RESULT bool isLinkLocal() const
Definition: UT_IpAddress.h:207
UT_IpAddressV6(const bytes_t &addr)
Definition: UT_IpAddress.h:143
bool operator<=(const UT_IpAddressV6 &other) const
Definition: UT_IpAddress.h:161
UT_IpAddress & operator=(const UT_IpAddressV4 &ip)
Definition: UT_IpAddress.h:316
SYS_NO_DISCARD_RESULT bool isLoopback() const
Definition: UT_IpAddress.h:92
Definition: format.h:4365
SYS_NO_DISCARD_RESULT const bytes_t & toBytes() const
Definition: UT_IpAddress.h:224
UT_IpAddressFamily
Definition: UT_IpAddress.h:26
static SYS_NO_DISCARD_RESULT UT_IpNetworkV6 loopback()
Definition: UT_IpAddress.h:517
SYS_NO_DISCARD_RESULT bool isUnspecified() const
Definition: UT_IpAddress.h:331