Chinaunix首页 | 论坛 | 博客
  • 博客访问: 204518
  • 博文数量: 51
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 426
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-24 08:05
文章分类

全部博文(51)

文章存档

2015年(3)

2013年(1)

2011年(4)

2010年(8)

2008年(2)

2007年(18)

2006年(15)

我的朋友

分类: 系统运维

2007-06-08 18:37:24

描述:op_subq_sort (subq_index)
功能:根据包的优先级进行排序
返回值:Void
 
说明:
     subq_index:队列号
    
 
举例:
/* determine the type
of the interrupt */
if (op_intrpt_type () == OPC_INTRPT_REMOTE)
{
/* cold reboot: total loss of queued packets */
if (op_intrpt_code () == COLD_REBOOT)
{
/* record the number of packets lost */
num_lost_packets += op_q_stat (OPC_QSTAT_PKSIZE);
/* flush the queue of its contents */
op_q_flush ();
}
/* prioritize: loop through and sort all subqueues */
else if (op_intrpt_code () == PRIORITIZE)
{
op_ima_obj_attr_get (op_id_self (), "subqueue", &subq_objid);
num_subqs = op_topo_child_count (subq_objid, OPC_OBJTYPE_SUBQ);
for (i = 0; i < num_subqs; i++)
op_subq_sort (i);
}
}
阅读(1463) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-01-05 10:36:03

你好,我正在写论文,其中有opnet的仿真,在摸索中,能否请教您一些,谢谢!QQ:601014697