Ignore:
Timestamp:
Oct 11, 2014, 12:39:43 AM (10 years ago)
Author:
chronos
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/NetworkAddress.php

    r698 r701  
    9191        return($Result);
    9292  }
     93 
     94  function EncodeMAC($MAC)
     95  {
     96        $MAC = explode(':', $MAC);
     97        $Data = array_reverse(unpack('C*', $this->Address));
     98        print_r($Data);
     99        $Data[7] = $MAC[0];
     100        $Data[6] = $MAC[1] ^ 0x02;
     101        $Data[5] = $MAC[2];
     102        $Data[4] = 0xff;
     103        $Data[3] = 0xfe;
     104        $Data[2] = $MAC[3];
     105        $Data[1] = $MAC[4];
     106        $Data[0] = $MAC[5];
     107        print_r($Data);
     108        $this->Address = pack('C*', $Data);
     109  }
    93110
    94111}
Note: See TracChangeset for help on using the changeset viewer.