op_pk_is_format()

摘要

检验数据包格式的名称。

语法

op_pk_is_format (pktptr, fmt_name)
参数 类型 说明
pktptr Packet * 目标数据包的指针 [指向数据包的指针可以从许多内核过程获得,包括 op_pk_create()、op_pk_create_fmt()、op_pk_copy()、op_pk_get()、op_subq_pk_access() 和 op_subq_pk_remove()。]
fmt_name const char * 数据包格式的名称;对未格式化数据包为 VOSC_NIL

返回类型

VosT_Boolean

如果数据包具有指定格式则返回 VOSC_TRUE;如果数据包为其他格式或发生错误则返回 VOSC_FALSE。

示例

/* obtain the arriving packet */
pkptr = op_pk_get (INPUT_STRM);

/* test the format of the packet and process accordingly */
if (op_pk_is_format (pkptr, "my_format"))
	{
	/* ... */
	}

详情

无。

用途

提供一种快速检验数据包格式名称的方式。

错误

  • 无。

参考

  • 使用内核过程 op_pk_format() 获取数据包格式的名称,以便手动检验

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