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

Method isLoopback

MonaBase/sources/IPAddress.cpp:230–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228 words[4] == 0 && words[5] == 0 && words[6] == 0 && words[7] == 0;
229 }
230 bool isLoopback() const {
231 const UInt16* words = reinterpret_cast<const UInt16*>(&_addr);
232 return words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 &&
233 words[4] == 0 && words[5] == 0 && words[6] == 0 && ntohs(words[7]) == 0x0001;
234 }
235 bool isMulticast() const {
236 const UInt16* words = reinterpret_cast<const UInt16*>(&_addr);
237 return (ntohs(words[0]) & 0xFFE0) == 0xFF00;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected