Update relevant artifacts to add support for DPDK v2.2.0.
[cascardo/ovs.git] / lib / vconn-provider.h
index 640c5b6..523f26f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2012, 2013, 2015 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 /* Provider interface to vconns, which provide a virtual connection to an
  * OpenFlow device. */
 
-#include "vconn.h"
+#include "openvswitch/vconn.h"
 #include "util.h"
 #include "openflow/openflow-common.h"
 \f
 /* Active virtual connection to an OpenFlow device. */
 
-/* Active virtual connection to an OpenFlow device.
- *
- * This structure should be treated as opaque by vconn implementations. */
+/* This structure should be treated as opaque by vconn implementations. */
 struct vconn {
-    const struct vconn_class *class;
+    const struct vconn_class *vclass;
     int state;
     int error;
 
@@ -40,25 +38,16 @@ struct vconn {
     enum ofp_version version;   /* Negotiated version (or 0). */
     bool recv_any_version;      /* True to receive a message of any version. */
 
-    ovs_be32 remote_ip;
-    ovs_be16 remote_port;
-    ovs_be32 local_ip;
-    ovs_be16 local_port;
-
     char *name;
 };
 
 void vconn_init(struct vconn *, const struct vconn_class *, int connect_status,
                 const char *name, uint32_t allowed_versions);
 void vconn_free_data(struct vconn *vconn);
-void vconn_set_remote_ip(struct vconn *, ovs_be32 remote_ip);
-void vconn_set_remote_port(struct vconn *, ovs_be16 remote_port);
-void vconn_set_local_ip(struct vconn *, ovs_be32 local_ip);
-void vconn_set_local_port(struct vconn *, ovs_be16 local_port);
 static inline void vconn_assert_class(const struct vconn *vconn,
-                                      const struct vconn_class *class)
+                                      const struct vconn_class *vclass)
 {
-    ovs_assert(vconn->class == class);
+    ovs_assert(vconn->vclass == vclass);
 }
 
 struct vconn_class {
@@ -69,7 +58,7 @@ struct vconn_class {
      * connection name provided by the user, e.g. "tcp:1.2.3.4".  This name is
      * useful for error messages but must not be modified.
      *
-     * 'allowed_verions' is the OpenFlow versions that may be
+     * 'allowed_versions' is the OpenFlow versions that may be
      * negotiated for a connection.
      *
      * 'suffix' is a copy of 'name' following the colon and may be modified.
@@ -139,21 +128,20 @@ struct vconn_class {
     void (*wait)(struct vconn *vconn, enum vconn_wait_type type);
 };
 \f
-/* Passive virtual connection to an OpenFlow device.
- *
- * This structure should be treated as opaque by vconn implementations. */
+/* Passive virtual connection to an OpenFlow device. */
+
+/* This structure should be treated as opaque by vconn implementations. */
 struct pvconn {
-    const struct pvconn_class *class;
+    const struct pvconn_class *pvclass;
     char *name;
     uint32_t allowed_versions;
 };
-
-void pvconn_init(struct pvconn *pvconn, const struct pvconn_class *class,
+void pvconn_init(struct pvconn *pvconn, const struct pvconn_class *pvclass,
                  const char *name, uint32_t allowed_versions);
 static inline void pvconn_assert_class(const struct pvconn *pvconn,
-                                       const struct pvconn_class *class)
+                                       const struct pvconn_class *pvclass)
 {
-    ovs_assert(pvconn->class == class);
+    ovs_assert(pvconn->pvclass == pvclass);
 }
 
 struct pvconn_class {