Ace_Decoder_All_Fragments_Get()
摘要
返回分片组中所有分片的列表。
语法
Ace_Decoder_All_Fragments_Get (fragment_pk_ptr, layer)
| 参数 | 类型 | 说明 |
|---|---|---|
fragment_pk_ptr |
AceT_Packet * |
目标数据包分片。 |
layer |
int |
目标协议层。 |
返回类型
PrgT_List *
分片列表,按偏移排序。
头文件
ace_client_api.h
示例
// 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);
}
详情
调用者不得修改本函数返回的列表。