projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7949a13
)
vconn: New function vconn_get_name().
author
Ben Pfaff
<blp@nicira.com>
Fri, 5 Sep 2008 21:33:08 +0000
(14:33 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Mon, 8 Sep 2008 17:05:13 +0000
(10:05 -0700)
include/vconn.h
patch
|
blob
|
history
lib/vconn.c
patch
|
blob
|
history
diff --git
a/include/vconn.h
b/include/vconn.h
index ec98859df85cd9c9c12dce2582b082014b9e7c40..6dcfd67558d4f59493af888f90efc4436b207a32 100644
(file)
--- a/
include/vconn.h
+++ b/
include/vconn.h
@@
-50,6
+50,7
@@
struct vconn;
void vconn_usage(bool active, bool passive);
int vconn_open(const char *name, struct vconn **);
void vconn_close(struct vconn *);
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 *);
bool vconn_is_passive(const struct vconn *);
uint32_t vconn_get_ip(const struct vconn *);
int vconn_connect(struct vconn *);
diff --git
a/lib/vconn.c
b/lib/vconn.c
index 3e06dc344ddd31758dbedd4889d00462552fa9e7..acb35d44c261e2a52fcf3eac6608c60ca4921090 100644
(file)
--- a/
lib/vconn.c
+++ b/
lib/vconn.c
@@
-217,6
+217,13
@@
vconn_close(struct vconn *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
/* 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