<function name="rpcf_delete_from_ipgroup" id="0x5101"> <input> <integer name="slink_id"/> <ip_address name="ip_address"/> <ip_address name="mask" default="255.255.255.255"/> </input> <output> <integer name="result"/> <if variable="result" value="0" condition="eq"> <error code="16" comment="unable to delete IP-address from ipgroup"/> </if> </output> </function>
function rpcf_delete_from_ipgroup($slink_id,$ip,$mask="255.255.255.255") { //0x5101 if (!$this->connection->urfa_call(0x5101)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($slink_id); $packet->DataSetIPAddress($ip); $packet->DataSetIPAddress($mask); $this->connection->urfa_send_param($packet); if ($x = $this->connection->urfa_get_data()) { $code=$x->DataGetInt(); // $this->connection->urfa_get_data(); } else { return -1; // invalid slink_id } // 0 delete error return $code; }