int rtnl_send_check(struct rtnl_handle *rth, const void *buf, int)
__attribute__((warn_unused_result));
int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn);
-int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, int error);
+int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, unsigned int offset, int error);
int addattr(struct nlmsghdr *n, int maxlen, int type);
int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data);
return 0;
}
-int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, int error)
+int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, unsigned int offset, int error)
{
struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {};
- unsigned int hlen = sizeof(int);
const char *msg = NULL;
- if (mnl_attr_parse(nlh, hlen, err_attr_cb, tb) != MNL_CB_OK)
+ if (mnl_attr_parse(nlh, offset, err_attr_cb, tb) != MNL_CB_OK)
return 0;
if (tb[NLMSGERR_ATTR_MSG])
return 0;
}
-int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, int error)
+int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, unsigned int offset, int error)
{
return 0;
}
return 0;
/* check for any messages returned from kernel */
- if (nl_dump_ext_ack_done(h, len))
+ if (nl_dump_ext_ack_done(h, sizeof(int), len))
return len;
switch (errno) {
if (len < 0) {
errno = -len;
- nl_dump_ext_ack_done(nlh, len);
+ nl_dump_ext_ack_done(nlh, sizeof(int), len);
return MNL_CB_ERROR;
}
return MNL_CB_STOP;