XML

<function name="rpcf_edit_tclass" id="0x2303">
	<input>
		<integer name="tclass_id"/>
		<string name="tclass_name"/>
		<integer name="graph_color"/>
		<integer name="is_display"/>
		<integer name="is_fill"/>
		<integer name="time_range_id"/>
		<integer name="dont_save"/>
		<integer name="local_traf_policy"/>
		<integer name="tclass_count"/>
		<for name="x" from="0" count="tclass_count">
			<ip_address name="saddr" array_index="i"/>
			<ip_address name="saddr_mask" array_index="i"/>
			<integer name="sport" array_index="i"/>
			<integer name="input" array_index="i"/>
			<ip_address name="src_as" array_index="i"/>
			<ip_address name="daddr" array_index="i"/>
			<ip_address name="daddr_mask" array_index="i"/>
			<integer name="dport" array_index="i"/>
			<integer name="output" array_index="i"/>
			<ip_address name="dst_as" array_index="i"/>
			<integer name="proto" array_index="i"/>
			<integer name="tos" array_index="i"/>
			<integer name="nexthop" array_index="i"/>
			<integer name="tcp_flags" array_index="i"/>
			<ip_address name="ip_from" array_index="i"/>
			<integer name="use_sport" array_index="i"/>
			<integer name="use_input" array_index="i"/>
			<integer name="use_src_as" array_index="i"/>
			<integer name="use_dport" array_index="i"/>
			<integer name="use_output" array_index="i"/>
			<integer name="use_dst_as" array_index="i"/>
			<integer name="use_proto" array_index="i"/>
			<integer name="use_tos" array_index="i"/>
			<integer name="use_nexthop" array_index="i"/>
			<integer name="use_tcp_flags" array_index="i"/>
			<integer name="skip" array_index="i"/>
		</for>
	</input>
	<output/>
</function>

PHP

function rpcf_edit_tclass($tclass_id, $tclass_name, $graph_color, $is_display, $is_fill, $time_range_id, $dont_save, $local_traf_policy, $tclass) { //0x2303
	if (!$this->connection->urfa_call(0x2303)) {
		print "Error calling function ". __FUNCTION__ ."\n";
		return FALSE;
	}
	$packet = $this->connection->getPacket();
	$packet->DataSetInt($tclass_id);
	$packet->DataSetString($tclass_name);
	$packet->DataSetInt($graph_color);
	$packet->DataSetInt($is_display);
	$packet->DataSetInt($is_fill);
	$packet->DataSetInt($time_range_id);
	$packet->DataSetInt($dont_save);
	$packet->DataSetInt($local_traf_policy);
	$packet->DataSetInt(count($tclass));
	for($i=0; $i<count($tclass); $i++) {
	        $packet->DataSetIPAddress($tclass[$i]['saddr']);
	        $packet->DataSetIPAddress($tclass[$i]['saddr_mask']);
	        $packet->DataSetInt($tclass[$i]['sport']);
	        $packet->DataSetInt($tclass[$i]['input']);
	        $packet->DataSetIPAddress($tclass[$i]['src_as']);
	        $packet->DataSetIPAddress($tclass[$i]['daddr']);
	        $packet->DataSetIPAddress($tclass[$i]['daddr_mask']);
	        $packet->DataSetInt($tclass[$i]['dport']);
		$packet->DataSetInt($tclass[$i]['output']);
		$packet->DataSetIPAddress($tclass[$i]['dst_as']);
		$packet->DataSetInt($tclass[$i]['proto']);
		$packet->DataSetInt($tclass[$i]['tos']);
		$packet->DataSetInt($tclass[$i]['nexthop']);
		$packet->DataSetInt($tclass[$i]['tcp_flags']);
		$packet->DataSetIPAddress($tclass[$i]['ip_from']);
		$packet->DataSetInt($tclass[$i]['use_sport']);
		$packet->DataSetInt($tclass[$i]['use_input']);
		$packet->DataSetInt($tclass[$i]['use_src_as']);
		$packet->DataSetInt($tclass[$i]['use_dport']);
		$packet->DataSetInt($tclass[$i]['use_output']);
		$packet->DataSetInt($tclass[$i]['use_dst_as']);
		$packet->DataSetInt($tclass[$i]['use_proto']);
		$packet->DataSetInt($tclass[$i]['use_tos']);
		$packet->DataSetInt($tclass[$i]['use_nexthop']);
		$packet->DataSetInt($tclass[$i]['use_tcp_flags']);
		$packet->DataSetInt($tclass[$i]['skip']);
        }
        $this->connection->urfa_send_param($packet);
        $this->connection->urfa_get_data();
	return 0;
}
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_edit_tclass_id_0x2303.txt · Последние изменения: 2009/09/11 10:58 От 91.211.185.185
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki