[][src]Function libipt_sys::pt_pkt_next

pub unsafe extern "C" fn pt_pkt_next(
    decoder: *mut pt_packet_decoder,
    packet: *mut pt_packet,
    size: usize
) -> c_int

Decode the next packet and advance the decoder.

Decodes the packet at @decoder's current position into @packet and adjusts the @decoder's position by the number of bytes the packet had consumed.

The @size argument must be set to sizeof(struct pt_packet).

Returns the number of bytes consumed on success, a negative error code otherwise.

Returns -pte_bad_opc if the packet is unknown. Returns -pte_bad_packet if an unknown packet payload is encountered. Returns -pte_eos if @decoder reached the end of the Intel PT buffer. Returns -pte_invalid if @decoder or @packet is NULL. Returns -pte_nosync if @decoder is out of sync.