MCPcopy Create free account
hub / github.com/amule-project/amule / IsGoodIP

Function IsGoodIP

src/NetworkFunctions.cpp:133–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132
133bool IsGoodIP(uint32 ip, bool filterLAN) noexcept
134{
135 for (unsigned int i = 0; i < itemsof(reserved_ranges); ++i) {
136 if (((ip ^ reserved_ranges[i].addr) & reserved_ranges[i].mask) == 0) {
137 return false;
138 }
139 }
140
141 return !(filterLAN && IsLanIP(ip));
142}
143
144bool IsLanIP(uint32_t ip) noexcept
145{

Callers 8

AddServerMethod · 0.85
IsGoodIPPortFunction · 0.85
KademliaSearchFileMethod · 0.85
AddSourcesMethod · 0.85
AddClientSourcesMethod · 0.85
CSearchFileMethod · 0.85
TESTFunction · 0.85

Calls 1

IsLanIPFunction · 0.85

Tested by 1

TESTFunction · 0.68