op_trace_objtype()

摘要

在 ODB 中启用对对象类型的跟踪。

语法

op_trace_objtype (label, value)
参数 类型 说明
label const char * 要跟踪的参数名称。该字符串将显示在跟踪输出中。
value int 待跟踪的参数。

返回类型

void

无返回值。

示例

static void
ospf_fail_recover (void)
	{
	Objid    fail_rec_objid;
	int      object_type, intrpt_type;

	/** Process Failure/Recovery interrupts that pertain to this node.  **/
	FIN (ospf_fail_recover ());

#if defined (OPD_DEBUG)
	op_trace_objid ("Object failed/recovered", fail_rec_objid);
	op_trace_objtype ("Object type", object_type);
	op_trace_intrpt_type ("Interrupt received", intrpt_type);
#endif

	/* Get the source of the interrupt, i.e. the object that failed/recovered. */
	fail_rec_objid = op_intrpt_source ();

	/* Get the type of object.  */
	object_type = op_id_to_type (fail_rec_objid);

	/* Get the interrupt type.  */
	intrpt_type = op_intrpt_type ();

	...

详情

无。

用途

提供了一种以编程方式向 ODB 发出跟踪命令、从而自动跟踪对象类型的方法。

错误

  • 可恢复错误:label 参数无效。

参考

  • 无。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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