op_sar_seg_bitrange_list_get()

Abstract

Returns a list of bit-ranges present in a specified segment.

Syntax

op_sar_seg_bitrange_list_get (src_pkptr)
Argument Type Description
src_pkptr Packet* pointer to a packet
[The packet must be a segment created in a segmentation or resegmentation buffer. A pointer to a packet can be obtained from many KP’s, such as op_pk_copy() and op_pk_get().]

Return Type

List*

Pointer to a newly created list, in which each list element is a bit-range.

Example

/* retrieve a segment from source buffer. */

segpk_ptr = op_sar_srcbuf_seg_remove (transmit_buf, MTU_SIZE);

/* before converting a segment to bits, get    */
/* bit-range information from the segment so   */
/* that a segment can be reconstructed later. */

bitrange_list_ptr = op_sar_seg_bitrange_list_get (segpk_ptr);

/* convert the segment to bits and extract its */
/* vector. Destroy the segment once this is */
/* done. */

op_pk_convert_to_vvec (segpk_ptr);
op_pk_vvec_get (segpk_ptr, &vvec);
op_pk_destroy (segpk_ptr);

Details

A segment may contain non-contiguous groups of bits from one packet, or even groups of bits from different packets. This KP provides a new list with each bit-range in the segment.

As with other lists, the memory associated with lists returned by this function should be deallocated when the lists are no longer necessary.

Purpose

Provides a mechanism for obtaining a list of contents for a segment, which may contain non-contiguous bits from the same packets or bits from separate packets.

Errors

  • Program Abort: Segmentation violation (due to a nil or corrupted packet pointer being passed as an argument)
  • Recoverable Error: Packet (<id>) must be a segment of another 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