__u16 nc_flags;
};
-int rtnl_dump_filter_l(struct rtnl_handle *rth,
- const struct rtnl_dump_filter_arg *arg);
int rtnl_dump_filter_nc(struct rtnl_handle *rth,
rtnl_filter_t filter,
void *arg, __u16 nc_flags);
int rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iovec, size_t iovlen,
struct nlmsghdr **answer)
__attribute__((warn_unused_result));
-int rtnl_talk_extack(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct nlmsghdr **answer, nl_ext_ack_fn_t errfn)
- __attribute__((warn_unused_result));
int rtnl_talk_suppress_rtnl_errmsg(struct rtnl_handle *rtnl, struct nlmsghdr *n,
struct nlmsghdr **answer)
__attribute__((warn_unused_result));
int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta,
int len, unsigned short flags);
-int parse_rtattr_byindex(struct rtattr *tb[], int max,
- struct rtattr *rta, int len);
struct rtattr *parse_rtattr_one(int type, struct rtattr *rta, int len);
int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rta, int len);
return len;
}
-int rtnl_dump_filter_l(struct rtnl_handle *rth,
- const struct rtnl_dump_filter_arg *arg)
+static int rtnl_dump_filter_l(struct rtnl_handle *rth,
+ const struct rtnl_dump_filter_arg *arg)
{
struct sockaddr_nl nladdr;
struct iovec iov;
return __rtnl_talk_iov(rtnl, iovec, iovlen, answer, true, NULL);
}
-int rtnl_talk_extack(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct nlmsghdr **answer,
- nl_ext_ack_fn_t errfn)
-{
- return __rtnl_talk(rtnl, n, answer, true, errfn);
-}
-
int rtnl_talk_suppress_rtnl_errmsg(struct rtnl_handle *rtnl, struct nlmsghdr *n,
struct nlmsghdr **answer)
{
return 0;
}
-int parse_rtattr_byindex(struct rtattr *tb[], int max,
- struct rtattr *rta, int len)
-{
- int i = 0;
-
- memset(tb, 0, sizeof(struct rtattr *) * max);
- while (RTA_OK(rta, len)) {
- if (rta->rta_type <= max && i < max)
- tb[i++] = rta;
- rta = RTA_NEXT(rta, len);
- }
- if (len)
- fprintf(stderr, "!!!Deficit %d, rta_len=%d\n",
- len, rta->rta_len);
- return i;
-}
-
struct rtattr *parse_rtattr_one(int type, struct rtattr *rta, int len)
{
while (RTA_OK(rta, len)) {