Merge "master" into "wdp".
[sliver-openvswitch.git] / utilities / ovs-openflowd.c
index e84a399..8e5b4d5 100644 (file)
 #include "compiler.h"
 #include "daemon.h"
 #include "dirs.h"
-#include "dpif.h"
 #include "leak-checker.h"
 #include "list.h"
 #include "netdev.h"
 #include "ofpbuf.h"
 #include "ofproto/ofproto.h"
+#include "ofproto/wdp.h"
 #include "openflow/openflow.h"
 #include "packets.h"
 #include "poll-loop.h"
@@ -44,6 +44,7 @@
 #include "unixctl.h"
 #include "util.h"
 #include "vconn.h"
+#include "xfif.h"
 
 #include "vlog.h"
 #define THIS_MODULE VLM_openflowd
@@ -91,7 +92,7 @@ main(int argc, char *argv[])
     struct ofproto *ofproto;
     struct ofsettings s;
     int error;
-    struct dpif *dpif;
+    struct xfif *xfif;
     struct netflow_options nf_options;
 
     proctitle_init(argc, argv);
@@ -113,7 +114,7 @@ main(int argc, char *argv[])
     VLOG_INFO("Open vSwitch version %s", VERSION BUILDNR);
     VLOG_INFO("OpenFlow protocol version 0x%02x", OFP_VERSION);
 
-    error = dpif_create_and_open(s.dp_name, s.dp_type, &dpif);
+    error = xfif_create_and_open(s.dp_name, s.dp_type, &xfif);
     if (error) {
         ovs_fatal(error, "could not create datapath");
     }
@@ -130,7 +131,7 @@ main(int argc, char *argv[])
                 ovs_fatal(error, "failed to open %s as a device", port);
             }
 
-            error = dpif_port_add(dpif, port, 0, NULL);
+            error = xfif_port_add(xfif, port, 0, NULL);
             if (error) {
                 ovs_fatal(error, "failed to add %s as a port", port);
             }
@@ -182,17 +183,17 @@ main(int argc, char *argv[])
             ovs_fatal(error, "unrecoverable datapath error");
         }
         unixctl_server_run(unixctl);
-        dp_run();
+        wdp_run();
         netdev_run();
 
         ofproto_wait(ofproto);
         unixctl_server_wait(unixctl);
-        dp_wait();
+        wdp_wait();
         netdev_wait();
         poll_block();
     }
 
-    dpif_close(dpif);
+    xfif_close(xfif);
 
     return 0;
 }
@@ -475,7 +476,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
     }
 
     /* Local vconns. */
-    dp_parse_name(argv[0], &s->dp_name, &s->dp_type);
+    xf_parse_name(argv[0], &s->dp_name, &s->dp_type);
 
     /* Controllers. */
     s->n_controllers = argc > 1 ? argc - 1 : 1;