Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 ryu/tests/packet_data_generator2/gen.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/ryu/tests/packet_data_generator2/gen.c 
b/ryu/tests/packet_data_generator2/gen.c
index 62dc03f..70f28d2 100644
--- a/ryu/tests/packet_data_generator2/gen.c
+++ b/ryu/tests/packet_data_generator2/gen.c
@@ -137,6 +137,25 @@ bundle_ctrl(enum ofputil_protocol proto)
     return ofputil_encode_bundle_ctrl_reply(&oh, &msg);
 }
 
+struct ofpbuf *
+bundle_add(enum ofputil_protocol proto)
+{
+    struct ofputil_bundle_add_msg msg;
+    struct ofpbuf *fm;
+    struct ofpbuf *add;
+
+    memset(&msg, 0, sizeof(msg));
+    msg.bundle_id = 99999999;
+    msg.flags = OFPBF_ATOMIC;
+    fm = flow_mod(proto);
+    clear_xid(fm);
+    msg.msg = fm->data;
+    add = ofputil_encode_bundle_add(
+        ofputil_protocol_to_ofp_version(proto), &msg);
+    ofpbuf_delete(fm);
+    return add;
+}
+
 struct protocol_version {
     const char *name;
     const char *dir_name;
@@ -162,6 +181,7 @@ const struct message messages[] = {
     M(packet_in),
     M(flow_mod),
     M(bundle_ctrl),
+    M(bundle_add),
 };
 
 #if !defined(__arraycount)
-- 
2.1.0


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to