2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-util: New function ofputil_port_to_string().

This function is more convenient than ofputil_format_port() when a "struct
ds" is not already in use.  This commit converts one caller for which this
was already true, and the following commit will add another.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-06-24 13:18:46 -07:00
parent 46d4c97ff7
commit 28b1143228
2 changed files with 26 additions and 12 deletions

View File

@@ -40,6 +40,8 @@ enum ofperr ofputil_check_output_port(ofp_port_t ofp_port,
ofp_port_t max_ports);
bool ofputil_port_from_string(const char *, ofp_port_t *portp);
void ofputil_format_port(ofp_port_t port, struct ds *);
void ofputil_port_to_string(ofp_port_t, char namebuf[OFP_MAX_PORT_NAME_LEN],
size_t bufsize);
/* Converting OFPFW10_NW_SRC_MASK and OFPFW10_NW_DST_MASK wildcard bit counts
* to and from IP bitmasks. */