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

int nlmsg_validate ( struct nlmsghdr nlh,
int  hdrlen,
int  maxtype,
struct nla_policy policy 
)

nlmsg_validate - validate a netlink message including attributes

  • nlh netlinket message header
  • hdrlen length of familiy specific header
  • maxtype maximum attribute type to be expected
  • policy validation policy

Definition at line 324 of file msg.c.

References nla_validate(), nlmsg_attrdata(), nlmsg_attrlen(), nlmsghdr::nlmsg_len, and nlmsg_msg_size().

{
      if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
            return -EINVAL;

      return nla_validate(nlmsg_attrdata(nlh, hdrlen),
                      nlmsg_attrlen(nlh, hdrlen), maxtype, policy);
}


Generated by  Doxygen 1.6.0   Back to index