本文整理汇总了PHP中Net_DNS2_Packet::label方法的典型用法代码示例。如果您正苦于以下问题:PHP Net_DNS2_Packet::label方法的具体用法?PHP Net_DNS2_Packet::label怎么用?PHP Net_DNS2_Packet::label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Net_DNS2_Packet
的用法示例。
在下文中一共展示了Net_DNS2_Packet::label方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
$this->psdnaddress = Net_DNS2_Packet::label($packet, $packet->offset);
return true;
}
return false;
}
示例2: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
$offset = $packet->offset;
$this->cpu = trim(Net_DNS2_Packet::label($packet, $offset), '"');
$this->os = trim(Net_DNS2_Packet::label($packet, $offset), '"');
return true;
}
return false;
}
示例3: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
$offset = $packet->offset;
$this->previous = Net_DNS2_Packet::label($packet, $offset);
$this->next = Net_DNS2_Packet::label($packet, $offset);
return true;
}
return false;
}
示例4: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
$this->isdnaddress = Net_DNS2_Packet::label($packet, $packet->offset);
//
// look for a SA (sub address) - it's optional
//
if ( (strlen($this->isdnaddress) + 1) < $this->rdlength) {
$this->sa = Net_DNS2_Packet::label($packet, $packet->offset);
} else {
$this->sa = '';
}
return true;
}
return false;
}
示例5: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
//
// unpack the order and preference
//
$x = unpack('norder/npreference', $this->rdata);
$this->order = $x['order'];
$this->preference = $x['preference'];
$offset = $packet->offset + 4;
$this->flags = Net_DNS2_Packet::label($packet, $offset);
$this->services = Net_DNS2_Packet::label($packet, $offset);
$this->regexp = Net_DNS2_Packet::label($packet, $offset);
$this->replacement = Net_DNS2_Packet::expand($packet, $offset);
return true;
}
return false;
}
示例6: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
//
// parse the preference
//
$x = unpack('npreference', $this->rdata);
$this->preference = $x['preference'];
//
// get the exchange entry server)
//
$offset = $packet->offset + 2;
$this->exchange = Net_DNS2_Packet::label($packet, $offset);
return true;
}
return false;
}
示例7: rrSet
/**
* parses the rdata of the Net_DNS2_Packet object
*
* @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
*
* @return boolean
* @access protected
*
*/
protected function rrSet(Net_DNS2_Packet &$packet)
{
if ($this->rdlength > 0) {
$length = $packet->offset + $this->rdlength;
$offset = $packet->offset;
while ($length > $offset) {
$this->text[] = Net_DNS2_Packet::label($packet, $offset);
}
return true;
}
return false;
}