op_sar_seg_parent_packets_access()
Abstract
Returns a list of the parent packets of a Sar segment.
Syntax
op_sar_seg_parent_packets_access (segpk_ptr)
| Argument | Type | Description |
|---|---|---|
segpk_ptr |
Packet * |
pointer to a Sar segment |
Return Type
List *
Pointer to a list containing pointers to copies of the parent packets of the Sar segment.
Example
/* Receive an incoming packet. */
pkptr = op_pk_get (INSTRM_1);
/* Determine if the received packet is a segment, or normal packet. */
if (op_sar_pk_is_segment (pkptr) == OPC_TRUE)
{
/* Received a segment; get a list of the parent packets. */
sar_seg_parents = op_sar_seg_parent_packets_access (pkptr);
Details
This function creates a new list and places in it copies of the parent (original) packets that are represented by the Sar segment packet. A Sar segment packet often represents only sub-portions of the parent packet(s). The caller should examine the Sar segment to learn how the segment’s bit range correlates to the parent packets.
The caller is responsible for deallocating the returned list and duplicate packets.
Purpose
This function provides a means of identifying the parents of a packet segment.
Errors
- Program Abort: Packet (
<pkid>) must be a segment of another packet.
Reference
- None.