git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25b2571
)
provide get_config for netdev-tunnel's
author
Giuseppe Lettieri
<g.lettieri@iet.unipi.it>
Thu, 21 Jun 2012 09:59:50 +0000
(11:59 +0200)
committer
Giuseppe Lettieri
<g.lettieri@iet.unipi.it>
Thu, 21 Jun 2012 09:59:50 +0000
(11:59 +0200)
lib/netdev-tunnel.c
patch
|
blob
|
history
diff --git
a/lib/netdev-tunnel.c
b/lib/netdev-tunnel.c
index
dd87af6
..
1beaf90
100644
(file)
--- 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;
}