oms_buffer_user_data_set()

Abstract

Sets the user data associated with the buffer.

Syntax

oms_buffer_user_data_set (buffer_handle, user_data_ptr)

Argument Type Description
buffer_handle OmsT_Buffer_Handle buffer object to set
user_data_ptr void * user data to associate with buffer

Return Type

None.

Details

None.

Packet Buffer Functions

The functions that implement the specialized buffer management for packets (oms_buffer_pk) operations are described in this section. Only one function, oms_buffer_pk_pool_create(), provides a new API. In all the other cases, the oms_buffer_pk function has only these changes:

  • function names refer to packets and bytes. In the oms_buffer package, for example, there is a function called oms_buffer_free_units_get(). In the specialized package, the analogous function is called oms_buffer_free_bytes_get().
  • argument types are appropriate for their context. In the oms_buffer package, for example, functions that access elements return “void *”. In the specialized package, the analogous functions return “Packet *”.

Any oms_buffer function can be used with buffers and pools created with oms_buffer_pk functions.

Table 9: Renaming of oms_buffer Functions in oms_buffer_pk

oms_buffer Name oms_buffer_pk Name
oms_buffer_free_units_get oms_buffer_free_bytes_get
oms_buffer_free_elements_get oms_buffer_free_packets_get
oms_buffer_max_units_get oms_buffer_max_bytes_get
oms_buffer_max_elements_get oms_buffer_max_packets_get
oms_buffer_num_units_get oms_buffer_num_bytes_get
oms_buffer_num_elements_get oms_buffer_num_packets_get
oms_buffer_element_find oms_buffer_packet_find
oms_buffer_access oms_buffer_pk_access
oms_buffer_create oms_buffer_pk_create
oms_buffer_dequeue oms_buffer_pk_dequeue
oms_buffer_pool_free_elements_get oms_buffer_pool_free_packets_get
oms_buffer_pool_free_units_get oms_buffer_pool_free_bytes_get
oms_buffer_pool_max_elements_get oms_buffer_pool_max_packets_get
oms_buffer_pool_max_units_get oms_buffer_pool_max_bytes_get
oms_buffer_pool_num_elements_get oms_buffer_pool_num_packets_get
oms_buffer_pool_num_units_get oms_buffer_pool_num_bytes_get

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