oms_buffer_pk_pool_create()

Abstract

Creates a new memory pool to manage packets of bytes.

Syntax

oms_buffer_pk_pool_create (max_bytes, max_packets, insert_proc, pool_stats, pool_name, user_data_ptr, status_ptr)

Argument Type Description
max_bytes double maximum number of bytes that can be held by this pool
max_packets double maximum number of packets that can be held by this pool
insert_proc OmsT_Buffer_Insertion_Criteria_Proc function invoked whenever a new packet is added to a buffer of the pool
pool_stats OmsT_Buffer_Stats * array of statistic handles
pool_name const char * name associated with the pool for ODB tracing
user_data_ptr void * arbitrary user data associated with the pool
status_ptr OmsT_Buffer_Create * indicator of the success or failure (with reason) of the creation of this new pool

Return Type

OmsT_Buffer_Pool_Handle

Created pool object or OPC_NIL if the operation failed.

Details

This function is a specialized version of oms_buffer_pool_create(), in which elements are packets and units are bytes. The automatically specified arguments of oms_buffer_pk_pool_create() are

  • size_proc: set to a function using op_pk_total_size_get()
  • destroy_proc: set to a function using op_pk_destroy()
  • trace_proc: set to a function returning a string containing the packet ID
  • the ODB tracing strings are set to “packet”, “packets”, “byte”, and “bytes”

See Buffer and Pool Creation and the Details section of oms_buffer_pool_create() for further background.

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