/* Dump information about all ports, in response to GETLINK  */
static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
/* Dump information about all ports, in response to GETLINK  */
static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
{
	struct net *net = sock_net(skb->sk);
	struct net_device *dev;
	int idx;
	idx = 0;
	for_each_netdev(net, dev) {
		if (dev->br_port == NULL || idx < cb->args[0])
			goto skip;
		if (br_fill_ifinfo(skb, dev->br_port, NETLINK_CB(cb->skb).pid,
				   cb->nlh->nlmsg_seq, RTM_NEWLINK,
				   NLM_F_MULTI) < 0)
			break;
skip:
		++idx;
	}
	cb->args[0] = idx;
	return skb->len;
}