Logo Search packages:      
Sourcecode: libnl2 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 350 of file msg.c.

References nla_validate(), nlmsg_attrdata(), and nlmsg_attrlen().

{
      if (!nlmsg_valid_hdr(nlh, hdrlen))
            return -NLE_MSG_TOOSHORT;

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


Generated by  Doxygen 1.6.0   Back to index