riot_sys

Function os_mbuf_cmpm

Source
pub unsafe extern "C" fn os_mbuf_cmpm(
    om1: *const os_mbuf,
    offset1: u16,
    om2: *const os_mbuf,
    offset2: u16,
    len: u16,
) -> c_int
Expand description

Compares the contents of two mbuf chains. The ranges of the two chains to be compared are specified via the two offset parameters and the len parameter. Neither mbuf chain is required to contain a packet header.

@param om1 The first mbuf chain to compare. @param offset1 The absolute offset within om1 at which to start the comparison. @param om2 The second mbuf chain to compare. @param offset2 The absolute offset within om2 at which to start the comparison. @param len The number of bytes to compare.

@return 0 if both mbuf segments are identical; A memcmp() return code if the segment contents differ; INT_MAX if a specified range extends beyond the end of its corresponding mbuf chain.