MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / isIPv4Compatible

Method isIPv4Compatible

MonaBase/sources/IPAddress.cpp:247–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245 return (ntohs(words[0]) & 0xFFE0) == 0xFEC0;
246 }
247 bool isIPv4Compatible() const {
248 const UInt16* words = reinterpret_cast<const UInt16*>(&_addr);
249 return words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 && words[4] == 0 && words[5] == 0;
250 }
251 bool isIPv4Mapped() const {
252 const UInt16* words = reinterpret_cast<const UInt16*>(&_addr);
253 return words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 && words[4] == 0 && ntohs(words[5]) == 0xFFFF;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected