oms_aa_address_find()
摘要
获取某个特定地址在地址列表中的索引。
语法
oms_aa_address_find (oms_aa_handle, address)
| 参数 | 类型 | 说明 |
|---|---|---|
oms_aa_handle |
OmsT_Aa_Address_Handle |
特定地址类型对应列表的句柄。 |
address |
int |
要查找的地址 |
返回类型
int
指定地址在地址列表中所处的数组索引;如果未找到该地址,返回 -1
详细说明
无。
示例
来自 wlan_mac 进程模型的 function block 中的 wlan_tuple_find() 函数:
/* Finding the index of the station address in the list, */
/* if the station belongs to this subnet. */
list_index = oms_aa_address_find (oms_aa_wlan_handle, sta_addr);
/* If remote station entry doesn't exist then create new node. */
if (list_index >= 0)
{
if (duplicate_list_ptr [list_index] == OPC_NIL)
{
/* Creating struct type for duplicate frame */
/* (or tuple) structure. */
tuple_ptr = (WlanT_Mac_Duplicate_Buffer_Entry*) op_prg_mem_alloc
(sizeof (WlanT_Mac_Duplicate_Buffer_Entry));