masked_scan_uint32


Description:

public ssize_t masked_scan_uint32 (uint32 mask, uint32 pattern, size_t offset, size_t size)

Scan for pattern pattern with applied mask mask in the adapter data, starting from offset offset.

The bytes in pattern and mask are interpreted left-to-right, regardless of endianness. All four bytes of the pattern must be present in the adapter for it to match, even if the first or last bytes are masked out.

It is an error to call this function without making sure that there is enough data (offset+size bytes) in the adapter.

This function calls masked_scan_uint32_peek passing null for value.

Parameters:

this

a Adapter

mask

mask to apply to data before matching against pattern

pattern

pattern to match (after mask is applied)

offset

offset into the adapter data from which to start scanning, returns the last scanned position.

size

number of bytes to scan from offset

Returns: