#define TCA_ATTR_MAX TCA_ATTR_LINKTYPE
extern int tca_parse(struct nlattr **, int, struct rtnl_tc *,
- struct nla_policy *);
+ const struct nla_policy *);
#define RTNL_TC_RTABLE_SIZE 256
extern int nla_ok(const struct nlattr *, int);
extern struct nlattr * nla_next(const struct nlattr *, int *);
extern int nla_parse(struct nlattr **, int, struct nlattr *,
- int, struct nla_policy *);
+ int, const struct nla_policy *);
extern int nla_validate(const struct nlattr *, int, int,
const struct nla_policy *);
extern struct nlattr * nla_find(const struct nlattr *, int, int);
extern int nla_nest_end(struct nl_msg *, struct nlattr *);
extern void nla_nest_cancel(struct nl_msg *, const struct nlattr *);
extern int nla_parse_nested(struct nlattr **, int, struct nlattr *,
- struct nla_policy *);
+ const struct nla_policy *);
extern int nla_is_nested(const struct nlattr *);
/**
extern int genlmsg_valid_hdr(struct nlmsghdr *, int);
extern int genlmsg_validate(struct nlmsghdr *, int, int,
- struct nla_policy *);
+ const struct nla_policy *);
extern int genlmsg_parse(struct nlmsghdr *, int, struct nlattr **,
- int, struct nla_policy *);
+ int, const struct nla_policy *);
extern struct genlmsghdr *
genlmsg_hdr(struct nlmsghdr *);
extern void * genlmsg_data(const struct genlmsghdr *);
extern int nlmsg_ok(const struct nlmsghdr *, int);
extern struct nlmsghdr * nlmsg_next(struct nlmsghdr *, int *);
extern int nlmsg_parse(struct nlmsghdr *, int, struct nlattr **,
- int, struct nla_policy *);
+ int, const struct nla_policy *);
extern struct nlattr * nlmsg_find_attr(struct nlmsghdr *, int, int);
extern int nlmsg_validate(struct nlmsghdr *, int, int,
- struct nla_policy *);
+ const struct nla_policy *);
extern struct nl_msg * nlmsg_alloc(void);
extern struct nl_msg * nlmsg_alloc_size(size_t);
* @return 0 on success or a negative error code.
*/
int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
struct nlattr *nla;
int rem, err;
* @return 0 on success or a negative error code.
*/
int nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
}
* @return 0 on success or a negative error code.
*/
int genlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
struct genlmsghdr *ghdr;
* @return 0 on success or a negative error code.
*/
int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
- int maxtype, struct nla_policy *policy)
+ int maxtype, const struct nla_policy *policy)
{
struct genlmsghdr *ghdr;
* See nla_parse()
*/
int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
- int maxtype, struct nla_policy *policy)
+ int maxtype, const struct nla_policy *policy)
{
if (!nlmsg_valid_hdr(nlh, hdrlen))
return -NLE_MSG_TOOSHORT;
* @arg policy validation policy
*/
int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
if (!nlmsg_valid_hdr(nlh, hdrlen))
return -NLE_MSG_TOOSHORT;
};
int tca_parse(struct nlattr **tb, int maxattr, struct rtnl_tc *g,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
if (g->ce_mask & TCA_ATTR_OPTS)