* @revision 03 * @license http://creativecommons.org/licenses/by-sa/2.0/de/ Creative Commons Attribution-Share Alike 2.0 Germany * @homepage http://oss.tiggerswelt.net/oscar/ * @copyright Copyright © 2008 tiggersWelt.net */ class Oscar_TLV_IPAddr extends Oscar_TLV { /* Type of this TLV */ const TYPE = 0x000A; const MAX_LENGTH = 0x04; const LENGTH = 0x04; public $IP = ""; // {{{ parse /** * @access public * @return void */ public function parse () { $this->IP = long2ip (Oscar_Common::str2int32 ($this->Data, 0, true)); } // }}} // {{{ generate /** * @access public * @return string */ public function generate () { $this->Data = Oscar_Common::int32tostr (ip2long ($this->IP)); return parent::generate (); } // }}} } ?>