<function name="rpcf_get_ipzone" id="0x2802"> <input> <integer name="id" /> </input> <output> <string name="name" /> <integer name="count" /> <for name="i" from="0" count="count"> <ip_address name="net" array_index="i" /> <ip_address name="mask" array_index="i" /> <ip_address name="gateaway" array_index="i" /> </for> </output> </function>
function rcpf_get_ipzone($zone_id) { //0x2802 $ret=array(); if (!$this->connection->urfa_call(0x2802)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($zone_id); $this->connection->urfa_send_param($packet); $x = $this->connection->urfa_get_data(); $ret['name'] = $x->DataGetString(); $ret['count'] = $x->DataGetInt(); for ($i=0;$i<$ret['count'];$i++) { $x = $this->connection->urfa_get_data(); $subnet['net']=$x->DataGetIPAddress(); $subnet['mask']=$x->DataGetIPAddress(); $subnet['gateway']=$x->DataGetIPAddress(); $ret['subnets'][]=$subnet; } $this->connection->urfa_get_data(); return $ret; }