Ignore:
Timestamp:
Sep 19, 2014, 7:25:33 AM (10 years ago)
Author:
chronos
Message:
  • Přidáno: Nedokončená podpora pro generování IPv6 záznamů pro DNS server.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/NetworkAddress.php

    r548 r695  
    1919  function AddressToString()
    2020  {
    21    return(implode('.', array(($this->Address >> 24) & 255, ($this->Address >> 16) & 255, ($this->Address >> 8) & 255, ($this->Address & 255))));
     21    return(implode('.', array(($this->Address >> 24) & 255, ($this->Address >> 16) & 255, ($this->Address >> 8) & 255, ($this->Address & 255))));
    2222  }
    2323 
     
    5757  }
    5858}
     59
     60class NetworkAddressIPv6
     61{
     62        var $Address;
     63        var $Prefix;
     64       
     65        function __construct()
     66        {
     67                $this->Address = 0;
     68                $this->Prefix = 0;
     69        }
     70       
     71  function AddressToString()
     72  {
     73        return(inet_ntop($this->Address));
     74  }
     75 
     76  function AddressFromString($Value)
     77  {
     78        $this->Address = inet_pton($Value);
     79  }
     80       
     81}
Note: See TracChangeset for help on using the changeset viewer.