oms_aa_dest_addr_get()

Abstract

Obtains a destination address at random from an address list.

Syntax

oms_aa_dest_addr_get (oms_aa_handle, dest_address_ptr)

Argument Type Description
oms_aa_handle OmsT_Aa_Address_Handle Handle to the list for the specific address type
dest_address_ptr int * Memory address to which the address will be copied

Return Type

void

No value returned

Details

If dest_address_ptr points to a number equal to OMSC_AA_AUTO_ADDRESS, this procedure chooses an address at random from the address list and copies it into the location referenced by dest_address_ptr. If dest_address_ptr points to an explicit address (i.e., any number other than OMSC_AA_AUTO_ADDRESS), this procedure leaves the value "as is" and exits.

Example

From csms_pbx process model, setup enter execs:

/ If the destination is specified as AUTO ASSIGNED    */
/* pick a packet from the pool of available addresses  */
/* Else the address has been specified and should be   */
/* used as-is.                                         */
if (dest_address == OMSC_AA_AUTO_ASSIGN)
	{
	/* Call function to generate a random destination     */
	/* from the pool of available addresses.              */
	/* Also make sure that my own address isn't picked */
	/* for destination.             */
	  do
		{
		call_dest_address = OMSC_AA_AUTO_ASSIGN;
		oms_aa_dest_addr_get (oms_aa_handle,
		 &call_dest_address);
		} while (call_dest_address == my_address);
	else
	call_dest_address = dest_address;

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com