|
actf 0.0.1
An acute CTF reader
|
Packet related methods. More...
Go to the source code of this file.
Typedefs | |
| typedef struct actf_pkt | actf_pkt |
| A packet. | |
Enumerations | |
| enum | actf_pkt_prop { ACTF_PKT_PROP_HEADER , ACTF_PKT_PROP_CTX , ACTF_PKT_N_PROPS } |
| Packet properties. | |
Functions | |
| const actf_fld * | actf_pkt_fld (const actf_pkt *pkt, const char *key) |
| Search the top-level struct of all packet properties for a field with name key. | |
| const actf_fld * | actf_pkt_fldn (const actf_pkt *pkt, const char *key, size_t len) |
| Same as actf_pkt_fld() but with an explicit key length. | |
| const actf_fld * | actf_pkt_prop_fld (const actf_pkt *pkt, const char *key, enum actf_pkt_prop prop) |
| Search the top-level struct of a packet property for a field with name key. | |
| const actf_fld * | actf_pkt_prop_fldn (const actf_pkt *pkt, const char *key, size_t len, enum actf_pkt_prop prop) |
| Same as actf_pkt_prop_fld() but with an explicit key length. | |
| const struct actf_fld * | actf_pkt_prop (const struct actf_pkt *pkt, enum actf_pkt_prop prop) |
| Get the top-level struct of a packet property. | |
| uint64_t | actf_pkt_seq_num (const actf_pkt *pkt) |
| Get the sequence number of a packet. | |
| bool | actf_pkt_has_seq_num (const actf_pkt *pkt) |
| Check if the packet has a sequence number. | |
| uint64_t | actf_pkt_begin_tstamp (const actf_pkt *pkt) |
| Get the timestamp of the beginning of a packet in cycles. | |
| int64_t | actf_pkt_begin_tstamp_ns_from_origin (const actf_pkt *pkt) |
| Get the timestamp of the beginning of a packet in nanoseconds from origin. | |
| uint64_t | actf_pkt_end_tstamp (const actf_pkt *pkt) |
| Get the timestamp of the end of a packet in cycles. | |
| bool | actf_pkt_has_end_tstamp (const actf_pkt *pkt) |
| Check if the packet has an end timestamp. | |
| int64_t | actf_pkt_end_tstamp_ns_from_origin (const actf_pkt *pkt) |
| Get the timestamp of the end of a packet in nanoseconds from origin. | |
| uint64_t | actf_pkt_disc_event_record_snapshot (const actf_pkt *pkt) |
| Get the discarded event record snapshot of a packet. | |
| bool | actf_pkt_has_disc_event_record_snapshot (const actf_pkt *pkt) |
| Check if the packet has a discarded event record snapshot. | |
| uint64_t | actf_pkt_dstream_id (const actf_pkt *pkt) |
| Get the data stream id of the packet. | |
| uint64_t | actf_pkt_dstream_cls_id (const actf_pkt *pkt) |
| Get the data stream class id of the packet. | |
| const actf_dstream_cls * | actf_pkt_dstream_cls (const actf_pkt *pkt) |
| Get the data stream class of the packet. | |
| bool | actf_pkt_has_dstream_id (const actf_pkt *pkt) |
| Check if the packet has an explicit datastream id. | |
Packet related methods.
Search the top-level struct of all packet properties for a field with name key.
The packet properties will be searched in the following order:
| pkt | the packet |
| key | the key to search for |
| const actf_fld * actf_pkt_prop_fld | ( | const actf_pkt * | pkt, |
| const char * | key, | ||
| enum actf_pkt_prop | prop ) |
Search the top-level struct of a packet property for a field with name key.
| pkt | the packet |
| key | the key to search for |
| prop | the packet property to search through |
| const struct actf_fld * actf_pkt_prop | ( | const struct actf_pkt * | pkt, |
| enum actf_pkt_prop | prop ) |
Get the top-level struct of a packet property.
| pkt | the packet |
| prop | the packet property |
| uint64_t actf_pkt_seq_num | ( | const actf_pkt * | pkt | ) |
Get the sequence number of a packet.
The sequence number is only relevant if actf_pkt_has_seq_num() returns true.
| pkt | the packet |
| bool actf_pkt_has_seq_num | ( | const actf_pkt * | pkt | ) |
Check if the packet has a sequence number.
| pkt | the packet |
| uint64_t actf_pkt_begin_tstamp | ( | const actf_pkt * | pkt | ) |
Get the timestamp of the beginning of a packet in cycles.
The returned timestamp is the raw timestamp in cycles without clock class offsets applied to it. In most cases, you probably want to use actf_pkt_begin_tstamp_ns_from_origin() instead.
| pkt | the packet |
| int64_t actf_pkt_begin_tstamp_ns_from_origin | ( | const actf_pkt * | pkt | ) |
Get the timestamp of the beginning of a packet in nanoseconds from origin.
The returned timestamp includes any clock offset of the related clock class.
| pkt | the packet |
| uint64_t actf_pkt_end_tstamp | ( | const actf_pkt * | pkt | ) |
Get the timestamp of the end of a packet in cycles.
The returned timestamp is the raw timestamp in cycles without clock class offsets applied to it. The timestamp is only relevant if actf_pkt_has_end_tstamp() returns true. In most cases, you probably want to use actf_pkt_end_tstamp_ns_from_origin() instead.
| pkt | the packet |
| bool actf_pkt_has_end_tstamp | ( | const actf_pkt * | pkt | ) |
Check if the packet has an end timestamp.
| pkt | the packet |
| int64_t actf_pkt_end_tstamp_ns_from_origin | ( | const actf_pkt * | pkt | ) |
Get the timestamp of the end of a packet in nanoseconds from origin.
The returned timestamp includes any clock offset of the related clock class.
| pkt | the packet |
| uint64_t actf_pkt_disc_event_record_snapshot | ( | const actf_pkt * | pkt | ) |
Get the discarded event record snapshot of a packet.
The discarded event record snapshot is only relevant if actf_pkt_has_disc_event_record_snapshot() returns true.
| pkt | the packet |
| bool actf_pkt_has_disc_event_record_snapshot | ( | const actf_pkt * | pkt | ) |
Check if the packet has a discarded event record snapshot.
| pkt | the packet |
| uint64_t actf_pkt_dstream_id | ( | const actf_pkt * | pkt | ) |
Get the data stream id of the packet.
| pkt | the packet |
| uint64_t actf_pkt_dstream_cls_id | ( | const actf_pkt * | pkt | ) |
Get the data stream class id of the packet.
| pkt | the packet |
| const actf_dstream_cls * actf_pkt_dstream_cls | ( | const actf_pkt * | pkt | ) |
Get the data stream class of the packet.
| pkt | the packet |
| bool actf_pkt_has_dstream_id | ( | const actf_pkt * | pkt | ) |
Check if the packet has an explicit datastream id.
| pkt | the packet |