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

int nla_strcmp ( const struct nlattr nla,
const char *  str 
)

Compare a string attribute against a string

  • nla netlink string attribute
  • str another string

Definition at line 441 of file attr.c.

References nla_data(), and nla_len().

{
      int len = strlen(str) + 1;
      int d = nla_len(nla) - len;

      if (d == 0)
            d = memcmp(nla_data(nla), str, len);

      return d;
}


Generated by  Doxygen 1.6.0   Back to index