void vconn_usage(bool active, bool passive);
int vconn_open(const char *name, struct vconn **);
void vconn_close(struct vconn *);
+const char *vconn_get_name(const struct vconn *);
bool vconn_is_passive(const struct vconn *);
uint32_t vconn_get_ip(const struct vconn *);
int vconn_connect(struct vconn *);
}
}
+/* Returns the name of 'vconn', that is, the string passed to vconn_open(). */
+const char *
+vconn_get_name(const struct vconn *vconn)
+{
+ return vconn->name;
+}
+
/* Returns true if 'vconn' is a passive vconn, that is, its purpose is to
* wait for connections to arrive, not to transfer data. Returns false if
* 'vconn' is an active vconn, that is, its purpose is to transfer data, not