From dd7467a01d0f0e737303f96edbfdc4e08a6690c3 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Dec 2019 15:06:08 -0800 Subject: [PATCH] ofp-monitor: Make OFP_FLOW_REMOVED_REASON_BUFSIZE public. This constant is needed to use ofp_flow_removed_reason_to_string(), which is itself public. Signed-off-by: Ben Pfaff Signed-off-by: William Tu --- include/openvswitch/ofp-monitor.h | 2 ++ lib/ofp-monitor.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/openvswitch/ofp-monitor.h b/include/openvswitch/ofp-monitor.h index 5951260d2..237cef85e 100644 --- a/include/openvswitch/ofp-monitor.h +++ b/include/openvswitch/ofp-monitor.h @@ -22,6 +22,7 @@ #include "openvswitch/match.h" #include "openvswitch/ofp-protocol.h" #include "openvswitch/ofpbuf.h" +#include "openvswitch/type-props.h" #ifdef __cplusplus extern "C" { @@ -29,6 +30,7 @@ extern "C" { struct ofputil_table_map; +#define OFP_FLOW_REMOVED_REASON_BUFSIZE (INT_STRLEN(int) + 1) const char *ofp_flow_removed_reason_to_string(enum ofp_flow_removed_reason, char *reasonbuf, size_t bufsize); diff --git a/lib/ofp-monitor.c b/lib/ofp-monitor.c index 2fffb3bf6..e12fa6d2b 100644 --- a/lib/ofp-monitor.c +++ b/lib/ofp-monitor.c @@ -38,7 +38,6 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); /* Returns a string form of 'reason'. The return value is either a statically * allocated constant string or the 'bufsize'-byte buffer 'reasonbuf'. * 'bufsize' should be at least OFP_FLOW_REMOVED_REASON_BUFSIZE. */ -#define OFP_FLOW_REMOVED_REASON_BUFSIZE (INT_STRLEN(int) + 1) const char * ofp_flow_removed_reason_to_string(enum ofp_flow_removed_reason reason, char *reasonbuf, size_t bufsize) -- 2.39.5