op_pk_is_format()

Abstract

Tests the name of a packet format.

Syntax

op_pk_is_format (pktptr, fmt_name)
Argument Type Description
pktptr Packet * pointer to the packet-of-interest [A pointer to a packet can be obtained from many KPs, including op_pk_create(), op_pk_create_fmt(), op_pk_copy(), op_pk_get(), op_subq_pk_access(), and op_subq_pk_remove().]
fmt_name const char * name of a packet format, or VOSC_NIL for unformatted packets

Return Type

VosT_Boolean

VOSC_TRUE if the packet has the named format; VOSC_FALSE if the packet has a different format or an error occurred.

Example

/* 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"))
	{
	/* ... */
	}

Details

None.

Purpose

Provides a fast way to test the name of a packet format.

Errors

  • None.

Reference

  • Use the KP op_pk_format() to get the name of a packet’s format for manual testing

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