Merge "master" into "wdp".
[sliver-openvswitch.git] / utilities / ovs-openflowd.c
index d3b7ff5..e5d30d3 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"
@@ -45,6 +45,7 @@
 #include "util.h"
 #include "vconn.h"
 #include "vlog.h"
+#include "xfif.h"
 
 VLOG_DEFINE_THIS_MODULE(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);
@@ -111,7 +112,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");
     }
@@ -122,7 +123,7 @@ main(int argc, char *argv[])
         size_t i;
 
         SVEC_FOR_EACH (i, port, &s.ports) {
-            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);
             }
@@ -165,17 +166,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;
 }
@@ -460,7 +461,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);
 
     /* Figure out controller names. */
     if (!controllers.n) {