op_pk_num_fds()

Abstract

Obtains the number of fields in a packet.

Syntax

op_pk_num_fds (pkptr)
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().]

Return Type

int

Number of fields.

Example

pk_fds = op_pk_num_fds (pkptr);

Details

None.

Purpose

Provides a way to get the number of fields in a packet.

Errors

  • Program Abort: Segmentation violation. (due to invalid pkptr or value_ptr arguments)
  • Program Abort: Packet pointer is NIL.
  • Program Abort: Packet pointer references destroyed packet.
  • Recoverable Error: Contents of packet (<pk_id>) is a value vector. Packet doesn’t allow field operations.

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