Ace_Decoder_All_Fragments_Get()

Abstract

Returns a list of all fragments in a fragment group.

Syntax

Ace_Decoder_All_Fragments_Get (fragment_pk_ptr, layer)
Argument Type Description
fragment_pk_ptr AceT_Packet * Packet fragment of interest.
layer int Protocol layer of interest.

Return Type

PrgT_List *

List of fragments, sorted by offset.

ace_client_api.h

Example

// we use a fragment offset of 1 so that the fragments will be in order, except for
// the first fragment (below) where we use an offset of 0 to make it first.
Ace_Decoder_Fragment_Add (m_pk_ptr, frame, 1, m_offset - 1, 0, VOSC_FALSE);

if (prg_list_size ((VosT_Ll_Desc *)Ace_Decoder_All_Fragments_Get (m_pk_ptr,
	m_offset - 1)) == 1)
	{
	// we just added the second fragment.  Add the first fragment
	// getting the first fragment is slightly tricky -- we get the parser from the
	// current packet, and then get the first fragment from the parser.
	Ace_Parser *parser = ((Ace_Parsed_Pk *)m_pk_ptr)->get_parser ();

	// Get the first packet and make sure that it has as many layers as needed
	AceT_Packet * head_pk_ptr = (AceT_Packet *)parser->get_parsed_packet (frame - 1);
	if (Ace_Packet_Num_Protocols_Get (head_pk_ptr) > (m_offset-1))
		// subtract 1 due to option base 1/option base 0 difference
		Ace_Decoder_Fragment_Add ((AceT_Packet *)parser->get_parsed_packet
			(frame - 1), frame, 0, m_offset - 1, 0, VOSC_FALSE);
	}

Details

The caller must not modify the list returned by this function.

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