<function name="rpcf_get_free_ips_for_house" id="0x2813"> <input> <integer name="house_id" /> </input> <output> <integer name="ips_size" /> <for name="i" from="0" count="ips_size"> <ip_address name="ips_ip" array_index="i" /> <string name="zone_name" array_index="i" /> </for> <string name="error" /> </output> </function>
function rpcf_get_free_ips_for_house($house_id) { //0x2813 $ret=array(); if (!$this->connection->urfa_call(0x2813)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($house_id); $this->connection->urfa_send_param($packet); if ($x = $this->connection->urfa_get_data()){ $ret['ips_size']=$x->DataGetInt(); for ($i=0;$i<$ret['ips_size'];$i++) { $set['ips_ip']=$x->DataGetIPAddress(); $set['zone_name']=$x->DataGetString(); $ret['free_ips'][]=$set; } } return $ret; }