if (netdev->valid_remote_ip)
smap_add_format(args, "remote_ip", IP_FMT,
IP_ARGS(netdev->remote_addr.sin_addr.s_addr));
if (netdev->valid_remote_port)
smap_add_format(args, "remote_port", "%"PRIu16,
ntohs(netdev->remote_addr.sin_port));
if (netdev->valid_remote_ip)
smap_add_format(args, "remote_ip", IP_FMT,
IP_ARGS(netdev->remote_addr.sin_addr.s_addr));
if (netdev->valid_remote_port)
smap_add_format(args, "remote_port", "%"PRIu16,
ntohs(netdev->remote_addr.sin_port));