From f3b9934270c245dc3596fa5b016b5c2b6fd97422 Mon Sep 17 00:00:00 2001 From: Giuseppe Lettieri Date: Thu, 30 Aug 2012 17:31:00 +0200 Subject: [PATCH] update to new netdev interface get/set config now use smap's instead of shash's --- lib/netdev-tunnel.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/netdev-tunnel.c b/lib/netdev-tunnel.c index 6fe6d685e..d2318dbd1 100644 --- a/lib/netdev-tunnel.c +++ b/lib/netdev-tunnel.c @@ -164,15 +164,15 @@ netdev_tunnel_close(struct netdev *netdev_) } static int -netdev_tunnel_get_config(struct netdev_dev *dev_, struct shash *args) +netdev_tunnel_get_config(struct netdev_dev *dev_, struct smap *args) { struct netdev_dev_tunnel *netdev_dev = netdev_dev_tunnel_cast(dev_); if (netdev_dev->valid_remote_ip) - shash_add(args, "remote_ip", + smap_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", + smap_add(args, "remote_port", xasprintf("%"PRIu16, ntohs(netdev_dev->remote_addr.sin_port))); return 0; } @@ -196,13 +196,13 @@ netdev_tunnel_connect(struct netdev_dev_tunnel *dev) } static int -netdev_tunnel_set_config(struct netdev_dev *dev_, const struct shash *args) +netdev_tunnel_set_config(struct netdev_dev *dev_, const struct smap *args) { struct netdev_dev_tunnel *netdev_dev = netdev_dev_tunnel_cast(dev_); struct shash_node *node; VLOG_DBG("tunnel_set_config(%s)", netdev_dev_get_name(dev_)); - SHASH_FOR_EACH(node, args) { + SMAP_FOR_EACH(node, args) { VLOG_DBG("arg: %s->%s", node->name, (char*)node->data); if (!strcmp(node->name, "remote_ip")) { struct in_addr addr; -- 2.43.0