op_pk_print_options()

Abstract

Prints information about a packet to an output device, optionally including TDA and VVEC values.

Syntax

op_pk_print_options (pkptr, options)
Argument Type Description
pkptr 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().]
options int what kinds of information should be output (see Details)

Return Type

void

No return value.

Example

/* obtain an incoming packet */
pkptr = op_pk_get (0);

/* determine if the packet is of the appropriate type; */
/* if so, print its contents onto the terminal */
op_pk_format (pkptr, pk_format);
if (strcmp ("ams_aal5_cpcs_pdu", pk_format) == 0)
	op_pk_print_options (pkptr, OPC_PK_PRINT_ALL);

example output:

Packet content
	ID              : 4042
	tree ID         : 3568
	address         : 0x044CC2B0
	format          : ams_aal5_cpcs_pdu
	creation module : top.Central SW1.AAL [Objid=1624]
	creation time   : 108.008848304158 sec. [1m 48s . 008ms 848us 304ns 158ps]
	stamp module    : top.Central SW1.AAL [Objid=1624]
	stamp time      : 108.008848304158 sec. [1m 48s . 008ms 848us 304ns 158ps]
	bulk size       : 704 bits
	total size      : 768 bits
	owner           : Simulation Kernel
	ICI ID          : NONE
	ID trace        : off
	tree ID trace   : off
	encap flags     : NONE
____________________________________________________________
Packet Fields
	Index Name                Type        Value           Size
	----- ------------------- ----------- --------------- ----
	    0 payload             packet      pk id (4040)    0
	    1 UU                  integer     1               8
	    2 CPI                 integer     0               8
	    3 Length              integer     0               16
	    4 CRC                 integer     0               32
____________________________________________________________
SAR Information

	Number of segment references to this packet: 2
	IDs of these segment packets: 4043 4045
____________________________________________________________
Transmission Data Attributes (TDA)
	No associated TDAs.

Details

options must be one of the following symbolic constants:

  • OPC_PK_PRINT_NO_OPTIONS—print basic information only (same output as op_pk_print())
  • OPC_PK_PRINT_TDA—print basic information plus TDA values
  • OPC_PK_PRINT_VVEC—print basic information plus VVEC values
  • OPC_PK_PRINT_ALL—print basic information plus both TDA and VVEC values

See op_pk_print() for additional details.

Purpose

Provides a mechanism for monitoring packet contents from a terminal or logging them to a file for later investigation. This KP works like op_pk_print() and provides the same output, plus allows the optional output of TDA values, VVEC values, or both.

Errors

  • Program Abort: Segmentation violation. (due to an invalid packet pointer or a malformed packet)
  • Program Abort: Packet pointer is NIL.
  • Program Abort: Packet pointer references destroyed packet.

Reference

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