/*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* We don't cache the local port, because that changes from one connection
* attempt to the next. */
- uint32_t local_ip, remote_ip;
- uint16_t remote_port;
+ ovs_be32 local_ip, remote_ip;
+ ovs_be16 remote_port;
/* Messages sent or received are copied to the monitor connections. */
#define MAX_MONITORS 8
return rconn->vconn ? vconn_get_local_port(rconn->vconn) : 0;
}
+/* Returns the OpenFlow version negotiated with the peer, or -1 if there is
+ * currently no connection or if version negotiation is not yet complete. */
+int
+rconn_get_version(const struct rconn *rconn)
+{
+ return rconn->vconn ? vconn_get_version(rconn->vconn) : -1;
+}
+
/* Returns the total number of packets successfully received by the underlying
* vconn. */
unsigned int