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

int nla_ok ( const struct nlattr nla,
int  remaining 
)

check if the netlink attribute fits into the remaining bytes

  • nla netlink attribute
  • remaining number of bytes remaining in attribute stream

Definition at line 170 of file attr.c.

References nlattr::nla_len.

{
      return remaining >= sizeof(*nla) &&
             nla->nla_len >= sizeof(*nla) &&
             nla->nla_len <= remaining;
}


Generated by  Doxygen 1.6.0   Back to index