static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
{
	int idx;
	int s_idx = cb->family;

	if (s_idx == 0)
		s_idx = 1;

	for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) {
		int type = cb->nlh->nlmsg_type-RTM_BASE;
		struct rtnl_link *handlers;
		rtnl_dumpit_func dumpit;

		if (idx < s_idx || idx == PF_PACKET)
			continue;

		handlers = rtnl_dereference(rtnl_msg_handlers[idx]);
		if (!handlers)
			continue;

		dumpit = READ_ONCE(handlers[type].dumpit);
		if (!dumpit)
			continue;

		if (idx > s_idx) {
			memset(&cb->args[0], 0, sizeof(cb->args));
			cb->prev_seq = 0;
			cb->seq = 0;
		}
		if (dumpit(skb, cb))
			break;
	}
	cb->family = idx;

	return skb->len;
}
static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
{
	int idx;
	int s_idx = cb->family;

	if (s_idx == 0)
		s_idx = 1;

	for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) {
		int type = cb->nlh->nlmsg_type-RTM_BASE;
		struct rtnl_link *handlers;
		rtnl_dumpit_func dumpit;

		if (idx < s_idx || idx == PF_PACKET)
			continue;

		handlers = rtnl_dereference(rtnl_msg_handlers[idx]);
		if (!handlers)
			continue;

		dumpit = READ_ONCE(handlers[type].dumpit);
		if (!dumpit)
			continue;

		if (idx > s_idx) {
			memset(&cb->args[0], 0, sizeof(cb->args));
			cb->prev_seq = 0;
			cb->seq = 0;
		}
		if (dumpit(skb, cb))
			break;
	}
	cb->family = idx;

	return skb->len;
}