<function name="rpcf_get_routers_list" id="0x5002"> <input/> <output> <integer name="routers_size" /> <for name="i" from="0" count="routers_size"> <integer name="router_id" array_index="i" /> <integer name="router_type" array_index="i" /> <string name="router_ip" array_index="i" /> <string name="login" array_index="i" /> <string name="password" array_index="i" /> <string name="router_comments" array_index="i" /> <integer name="router_bin_ip" array_index="i" /> </for> </output> </function>
function rpcf_get_routers_list() { //0x5002 $ret = array(); if (!$this->connection->urfa_call(0x5002)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $this->connection->urfa_send_param($packet); if ($x = $this->connection->urfa_get_data()) { $routers_size = $x->DataGetInt(); $ret['routers_size'] = $routers_size; for ($i = 0; $i < $routers_size; $i++) { $router['router_id'] = $x->DataGetInt(); $router['router_type'] = $x->DataGetInt(); $router['router_ip'] = $x->DataGetString(); $router['login'] = $x->DataGetString(); $router['password'] = $x->DataGetString(); $router['router_comments'] = $x->DataGetString(); $router['router_bin_ip'] = $x->DataGetInt(); $ret['routers'][] = $router; unset ($router); } } return $ret; }