diff options
author | Ben Pfaff <blp@ovn.org> | 2017-05-31 16:06:12 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-05-31 16:06:12 -0700 |
commit | 50f96b10e1c87db9fbe4df297f9b2fea13436bc0 (patch) | |
tree | 9122b84ecb6d90d0ba343f1f7b451b2db057870f /include/openvswitch/match.h | |
parent | 52182c5f50198d0f985b10677e47a9ac49ee709b (diff) | |
download | openvswitch-50f96b10e1c87db9fbe4df297f9b2fea13436bc0.tar.gz |
Support accepting and displaying port names in OVS tools.
Until now, most ovs-ofctl commands have not accepted names for ports, only
numbers, and have not been able to display port names either. It's a lot
easier for users if they can use and see meaningful names instead of
arbitrary numbers. This commit adds that support.
For backward compatibility, only interactive ovs-ofctl commands by default
display port names; to display them in scripts, use the new --names
option.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Aaron Conole <aconole@redhat.com>
Diffstat (limited to 'include/openvswitch/match.h')
-rw-r--r-- | include/openvswitch/match.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/openvswitch/match.h b/include/openvswitch/match.h index 06fa04c43..ca1dc7df9 100644 --- a/include/openvswitch/match.h +++ b/include/openvswitch/match.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. + * Copyright (c) 2009-2017 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include "openvswitch/tun-metadata.h" struct ds; +struct ofputil_port_map; /* A flow classification match. * @@ -186,9 +187,11 @@ uint32_t match_hash(const struct match *, uint32_t basis); void match_init_hidden_fields(struct match *); bool match_has_default_hidden_fields(const struct match *); -void match_format(const struct match *, struct ds *, int priority); -char *match_to_string(const struct match *, int priority); -void match_print(const struct match *); +void match_format(const struct match *, const struct ofputil_port_map *, + struct ds *, int priority); +char *match_to_string(const struct match *, const struct ofputil_port_map *, + int priority); +void match_print(const struct match *, const struct ofputil_port_map *); /* Compressed match. */ @@ -228,7 +231,9 @@ bool minimatch_equal(const struct minimatch *a, const struct minimatch *b); bool minimatch_matches_flow(const struct minimatch *, const struct flow *); void minimatch_format(const struct minimatch *, const struct tun_table *, + const struct ofputil_port_map *, struct ds *, int priority); -char *minimatch_to_string(const struct minimatch *, int priority); +char *minimatch_to_string(const struct minimatch *, + const struct ofputil_port_map *, int priority); #endif /* match.h */ |