op_pk_create_vvec()

摘要

创建一个新的值向量包。

语法

op_pk_create_vvec ()
参数 类型 说明
无参数

返回类型

Packet*

指向该内核过程创建的新数据包的指针。

示例

/* A value vector representing an entire packet has been */
/* completely received on an esys interface. */

/* Create a new empty value vector packet */
rcv_pkptr = op_pk_create_vvec ();

/* Set the value vector obtained from the esys interface into the packet */
op_pk_vvec_set (rcv_pkptr, rcv_vvec);

/* Transform, in place, the value vector form of the packet to */
/* the named field form of an "ethernet" packet. */
op_pk_convert_from_vvec (rcv_pkptr, "ethernet");

详情

所创建的值向量包并不包含值向量。创建值向量包之后,可以使用内核过程 op_pk_vvec_set() 将一个已有的值向量放入该数据包中。此外,新创建数据包的 bulk 大小为 0,不过这可以通过 op_pk_bulk_size_set() 修改。

用途

提供一种创建空的值向量包的机制。

错误

  • 程序中止:内存分配失败。

参考

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