vconn: New function pvconn_get_name().
authorBen Pfaff <blp@nicira.com>
Wed, 4 Mar 2009 17:57:13 +0000 (09:57 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 00:55:53 +0000 (16:55 -0800)
lib/vconn.c
lib/vconn.h

index 6755734a9a07b79335e122e9baaee1129909c7e9..4dd25a674b58c862470590795489cdf8593fb94d 100644 (file)
@@ -724,6 +724,14 @@ pvconn_open(const char *name, struct pvconn **pvconnp)
     return EAFNOSUPPORT;
 }
 
+/* Returns the name that was used to open 'pvconn'.  The caller must not
+ * modify or free the name. */
+const char *
+pvconn_get_name(const struct pvconn *pvconn)
+{
+    return pvconn->name;
+}
+
 /* Closes 'pvconn'. */
 void
 pvconn_close(struct pvconn *pvconn)
index 375f155cd28a5dd55bb410cafc7fee75d658442a..192962c4f55694cffe489f3deff10cc0ace438b6 100644 (file)
@@ -79,6 +79,7 @@ void vconn_send_wait(struct vconn *);
 
 /* Passive vconns: virtual listeners for incoming OpenFlow connections. */
 int pvconn_open(const char *name, struct pvconn **);
+const char *pvconn_get_name(const struct pvconn *);
 void pvconn_close(struct pvconn *);
 int pvconn_accept(struct pvconn *, int min_version, struct vconn **);
 void pvconn_wait(struct pvconn *);