From: Jesse Gross Date: Fri, 23 Sep 2011 18:53:12 +0000 (-0700) Subject: netlink: Expose version of nl_attr_find for key and len. X-Git-Tag: v1.3.0~219 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0b6c119bb7e62c70770a18504ae4204702020435;p=sliver-openvswitch.git netlink: Expose version of nl_attr_find for key and len. Many of our functions pass around a pointer to Netlink attributes and a length. This exposes the version of nl_attr_find that takes that format so it can be used by callers outside the Netlink library. --- diff --git a/lib/netlink.c b/lib/netlink.c index ec3584959..b4de3ed7c 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -615,7 +615,7 @@ nl_parse_nested(const struct nlattr *nla, const struct nl_policy policy[], return nl_policy_parse(&buf, 0, policy, attrs, n_attrs); } -static const struct nlattr * +const struct nlattr * nl_attr_find__(const struct nlattr *attrs, size_t size, uint16_t type) { const struct nlattr *nla; diff --git a/lib/netlink.h b/lib/netlink.h index 0bd2c41e6..2206339cb 100644 --- a/lib/netlink.h +++ b/lib/netlink.h @@ -160,5 +160,7 @@ bool nl_parse_nested(const struct nlattr *, const struct nl_policy[], const struct nlattr *nl_attr_find(const struct ofpbuf *, size_t hdr_len, uint16_t type); const struct nlattr *nl_attr_find_nested(const struct nlattr *, uint16_t type); +const struct nlattr *nl_attr_find__(const struct nlattr *attrs, size_t size, + uint16_t type); #endif /* netlink.h */