From: Giuseppe Lettieri Date: Thu, 21 Jun 2012 09:59:50 +0000 (+0200) Subject: provide get_config for netdev-tunnel's X-Git-Tag: sliver-openvswitch-0.1-1~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e90b5ad05689b7b999b367c83945973d8b9d1c13;p=sliver-openvswitch.git provide get_config for netdev-tunnel's --- diff --git a/lib/netdev-tunnel.c b/lib/netdev-tunnel.c index dd87af651..1beaf90d0 100644 --- a/lib/netdev-tunnel.c +++ b/lib/netdev-tunnel.c @@ -169,6 +169,14 @@ netdev_tunnel_close(struct netdev *netdev_) static int netdev_tunnel_get_config(struct netdev_dev *dev_, struct shash *args) { + struct netdev_dev_tunnel *netdev_dev = netdev_dev_tunnel_cast(dev_); + + if (netdev_dev->valid_remote_ip) + shash_add(args, "remote_ip", + xasprintf(IP_FMT, IP_ARGS(&netdev_dev->remote_addr.sin_addr))); + if (netdev_dev->valid_remote_port) + shash_add(args, "remote_port", + xasprintf("%"PRIu16, ntohs(netdev_dev->remote_addr.sin_port))); return 0; }