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

int nlmsg_parse ( struct nlmsghdr nlh,
int  hdrlen,
struct nlattr tb[],
int  maxtype,
struct nla_policy policy 
)

parse attributes of a netlink message

  • nlh netlink message header
  • hdrlen length of family specific header
  • tb destination array with maxtype+1 elements
  • maxtype maximum attribute type to be expected
  • policy validation policy
See nla_parse()

Definition at line 293 of file msg.c.

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

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

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


Generated by  Doxygen 1.6.0   Back to index