# [−][src]Function mynewt::kernel::os::os_mbuf_cmpm

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

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.

- `om1`: The first mbuf chain to compare.
- `offset1`: The absolute offset within om1 at which to start the comparison.
- `om2`: The second mbuf chain to compare.
- `offset2`: The absolute offset within om2 at which to start the comparison.
- `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.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)