summaryrefslogtreecommitdiff
path: root/lib/odp-util.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-12-29 15:20:33 -0800
committerBen Pfaff <blp@nicira.com>2011-01-27 21:08:37 -0800
commitffeda91a477a62d267696e08103f3ac6ec9a0102 (patch)
tree9d2e650f25386a64043fab5aee9e7c257881fcaf /lib/odp-util.c
parent6d9e6eb44fc82ae985e6e8db4f156ba56f8bea39 (diff)
downloadopenvswitch-ffeda91a477a62d267696e08103f3ac6ec9a0102.tar.gz
ovs-dpctl: Use netdev_get_config() to print vport configurations.
This is cleaner than parsing "odp_port"s directly. It takes one step toward eliminating use of odp_port from any userspace code outside of lib/netdev-vport.c and lib/dpif-linux.c. Reviewed by Justin Pettit.
Diffstat (limited to 'lib/odp-util.c')
-rw-r--r--lib/odp-util.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 193f97be0..013a7f18f 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -201,35 +201,6 @@ format_odp_flow(struct ds *ds, const struct odp_flow *f)
ds_put_cstr(ds, ", actions:");
format_odp_actions(ds, f->actions, f->actions_len);
}
-
-void
-format_odp_port_type(struct ds *ds, const struct odp_port *p)
-{
- if (!strcmp(p->type, "gre")
- || !strcmp(p->type, "ipsec_gre")
- || !strcmp(p->type, "capwap")) {
- const struct tnl_port_config *config;
-
- config = (struct tnl_port_config *)p->config;
-
- ds_put_format(ds, " (%s: remote_ip="IP_FMT,
- p->type, IP_ARGS(&config->daddr));
-
- if (config->saddr) {
- ds_put_format(ds, ", local_ip="IP_FMT, IP_ARGS(&config->saddr));
- }
-
- if (config->in_key) {
- ds_put_format(ds, ", in_key=%#"PRIx64, ntohll(config->in_key));
- }
-
- ds_put_cstr(ds, ")");
- } else if (!strcmp(p->type, "patch")) {
- ds_put_format(ds, " (%s: peer=%s)", p->type, (char *)p->config);
- } else if (strcmp(p->type, "system")) {
- ds_put_format(ds, " (%s)", p->type);
- }
-}
/* Returns the correct length of the payload for a flow key attribute of the
* specified 'type', or -1 if 'type' is unknown. */