+static int
+netdev_pltap_down(struct netdev_pltap *dev)
+ OVS_REQUIRES(dev->mutex)
+{
+ if (!netdev_pltap_finalized(dev)) {
+ return 0;
+ }
+
+ return vsys_transaction("vif_down", NULL, "%s\n", dev->real_name);
+}
+
+static int
+netdev_pltap_promisc(struct netdev_pltap *dev, bool promisc)
+ OVS_REQUIRES(dev-mutex)
+{
+ if (!netdev_pltap_finalized(dev)) {
+ return 0;
+ }
+
+ return vsys_transaction("promisc", NULL, "%s\n%s",
+ dev->real_name,
+ (promisc ? "" : "-\n"));
+}
+
+static void
+netdev_pltap_sync_flags(struct netdev_pltap *dev)
+ OVS_REQUIRES(sync_list_mutex)
+{
+
+ ovs_mutex_lock(&dev->mutex);
+
+ if (dev->fd < 0 || !netdev_pltap_finalized(dev)) {
+ goto out;
+ }
+
+ VLOG_DBG("sync_flags(%s): current: %s %s target: %s %s",
+ dev->real_name,
+ (dev->flags & NETDEV_UP ? "UP" : "-"),
+ (dev->flags & NETDEV_PROMISC ? "PROMISC" : "-"),
+ (dev->new_flags & NETDEV_UP ? "UP" : "-"),
+ (dev->new_flags & NETDEV_PROMISC ? "PROMISC" : "-"));
+
+ if ((dev->new_flags & NETDEV_UP) && !(dev->flags & NETDEV_UP)) {
+ (void) netdev_pltap_up(dev);
+ } else if (!(dev->new_flags & NETDEV_UP) && (dev->flags & NETDEV_UP)) {
+ (void) netdev_pltap_down(dev);
+ }
+
+ if ((dev->new_flags & NETDEV_PROMISC) ^ (dev->flags & NETDEV_PROMISC)) {
+ (void) netdev_pltap_promisc(dev, dev->new_flags & NETDEV_PROMISC);
+ }
+
+ netdev_pltap_update_seq(dev);
+
+out:
+ sync_done(dev);
+ ovs_mutex_unlock(&dev->mutex);
+}
+
+
+static int
+netdev_pltap_get_config(const struct netdev *dev_, struct smap *args)
+{
+ struct netdev_pltap *netdev = netdev_pltap_cast(dev_);
+
+ ovs_mutex_lock(&netdev->mutex);
+ if (netdev->valid_local_ip)