/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 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.
#endif
struct ofpbuf;
-struct vconn_class;
+struct pvconn;
struct pvconn_class;
-
-/* This structure should be treated as opaque by vconn implementations. */
-struct vconn {
- const struct vconn_class *vclass;
- int state;
- int error;
-
- /* OpenFlow versions. */
- uint32_t allowed_versions; /* Bitmap of versions we will accept. */
- uint32_t peer_versions; /* Peer's bitmap of versions it will accept. */
- enum ofp_version version; /* Negotiated version (or 0). */
- bool recv_any_version; /* True to receive a message of any version. */
-
- char *name;
-};
+struct vconn;
+struct vconn_class;
void vconn_usage(bool active, bool passive, bool bootstrap);
void vconn_recv_wait(struct vconn *);
void vconn_send_wait(struct vconn *);
-/* Passive vconns: virtual listeners for incoming OpenFlow connections.
- *
- * This structure should be treated as opaque by vconn implementations. */
-struct pvconn {
- const struct pvconn_class *pvclass;
- char *name;
- uint32_t allowed_versions;
-};
+/* Passive vconns: virtual listeners for incoming OpenFlow connections. */
int pvconn_verify_name(const char *name);
int pvconn_open(const char *name, uint32_t allowed_versions, uint8_t dscp,
struct pvconn **pvconnp);