private function Reader::ipV4StartNode in Smart IP 6.2
Same name and namespace in other branches
- 7.2 includes/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php \MaxMind\Db\Reader::ipV4StartNode()
1 call to Reader::ipV4StartNode()
- Reader::startNode in includes/vendor/ maxmind-db/ reader/ src/ MaxMind/ Db/ Reader.php 
File
- includes/vendor/ maxmind-db/ reader/ src/ MaxMind/ Db/ Reader.php, line 161 
Class
- Reader
- Instances of this class provide a reader for the MaxMind DB format. IP addresses can be looked up using the <code>get</code> method.
Namespace
MaxMind\DbCode
private function ipV4StartNode() {
  // This is a defensive check. There is no reason to call this when you
  // have an IPv4 tree.
  if ($this->metadata->ipVersion == 4) {
    return 0;
  }
  if ($this->ipV4Start != 0) {
    return $this->ipV4Start;
  }
  $node = 0;
  for ($i = 0; $i < 96 && $node < $this->metadata->nodeCount; $i++) {
    $node = $this
      ->readNode($node, 0);
  }
  $this->ipV4Start = $node;
  return $node;
}