MCPcopy
hub / github.com/panva/node-oidc-provider / isSpecialUseIPv4

Function isSpecialUseIPv4

lib/helpers/fetch_request.js:84–91  ·  view source on GitHub ↗
(address)

Source from the content-addressed store, hash-verified

82}
83
84function isSpecialUseIPv4(address) {
85 const addr = ipv4ToInt(address);
86 const bucket = V4_OCTET_BUCKETS[(addr >>> 24) & 0xff];
87 for (let i = 0; i < bucket.length; i++) {
88 if (((addr & bucket[i].mask) >>> 0) === bucket[i].prefix) return true;
89 }
90 return false;
91}
92
93// IANA IPv6 Special-Purpose Address Space
94// https://www.iana.org/assignments/iana-ipv6-special-registry/

Callers 3

isSpecialUseIPv6Function · 0.85
isSpecialUseIPFunction · 0.85

Calls 1

ipv4ToIntFunction · 0.85

Tested by

no test coverage detected