Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int nla_memcmp ( const struct nlattr *  nla,
const void *  data,
size_t  size 
)

Compare attribute payload with memory area.

  • nla Attribute.
  • data Memory area to compare to.
  • size Number of bytes to compare.
See also:
memcmp(3)
Returns:
An integer less than, equal to, or greater than zero.

Definition at line 747 of file attr.c.

References nla_data(), and nla_len().

{
      int d = nla_len(nla) - size;

      if (d == 0)
            d = memcmp(nla_data(nla), data, size);

      return d;
}


Generated by  Doxygen 1.6.0   Back to index