git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofp-util: Don't return static data in ofputil_packet_in_reason_to_string().
[sliver-openvswitch.git]
/
lib
/
ofp-util.h
diff --git
a/lib/ofp-util.h
b/lib/ofp-util.h
index
010c34d
..
1c8d6cd
100644
(file)
--- a/
lib/ofp-util.h
+++ b/
lib/ofp-util.h
@@
-27,6
+27,7
@@
#include "netdev.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/types.h"
#include "netdev.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/types.h"
+#include "type-props.h"
struct ofpbuf;
struct ofpbuf;
@@
-334,7
+335,10
@@
struct ofpbuf *ofputil_encode_packet_in(const struct ofputil_packet_in *,
enum ofputil_protocol protocol,
enum nx_packet_in_format);
enum ofputil_protocol protocol,
enum nx_packet_in_format);
-const char *ofputil_packet_in_reason_to_string(enum ofp_packet_in_reason);
+enum { OFPUTIL_PACKET_IN_REASON_BUFSIZE = INT_STRLEN(int) + 1 };
+const char *ofputil_packet_in_reason_to_string(enum ofp_packet_in_reason,
+ char *reasonbuf,
+ size_t bufsize);
bool ofputil_packet_in_reason_from_string(const char *,
enum ofp_packet_in_reason *);
bool ofputil_packet_in_reason_from_string(const char *,
enum ofp_packet_in_reason *);