appllayer am enter execs

来自「opnet网络仿真」· 代码 · 共 46 行

TXT
46
字号
/* A packet has arrived from the application layer.	*/
/* If the destination address specified is "Random"	*/
/* then generate a destination and forward the appl	*/
/* packet to the MAC layer with that information.	*/
if (destination_address == OMSC_AA_AUTO_ASSIGN)
	{
	/* Initialize current destination address to the Auto */
	/* Assign value										  */
	curr_dest_addr = destination_address;

	/* Call function to generate a random destination	*/
	/* from the pool of available addresses.			*/
	oms_aa_dest_addr_get (oms_aa_handle, &curr_dest_addr);

	/* Keep on generating the random addresses until source */
	/* address is not same as current address.				*/
	while (curr_dest_addr == mac_address)
		{
		/* Initialize current destination address to the Auto */
		/* Assign value										  */
		curr_dest_addr = destination_address;

		/* Call function to generate a random destination	*/
		/* from the pool of available addresses.			*/
		oms_aa_dest_addr_get (oms_aa_handle, &curr_dest_addr);
		}
	
	}
else
	{
	/* The packet needs to be sent to an explicit	*/
	/* destination as specified in the "Destination	*/
	/* Address" attribute.							*/
	curr_dest_addr = destination_address;
	}

/* Set this information in the interface control	*/
/* information to be sent to the MAC layer.			*/
op_ici_attr_set (wlan_mac_req_iciptr, "dest_addr", curr_dest_addr);

/* Install the control informationand send it to	*/
/* the MAC layer.									*/
op_ici_install (wlan_mac_req_iciptr);
op_pk_send (pkptr, outstrm_to_mac);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?