Skip to content

Commit

Permalink
Merge pull request #102 from SantiagoMunoz/master
Browse files Browse the repository at this point in the history
doc: Consider null buffer_id in first example
  • Loading branch information
anarkiwi committed Feb 1, 2021
2 parents 91542b2 + 42957ee commit 3c86fc0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/source/writing_ryu_app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ the ports.
dp = msg.datapath
ofp = dp.ofproto
ofp_parser = dp.ofproto_parser
actions = [ofp_parser.OFPActionOutput(ofp.OFPP_FLOOD)]
data = None
if msg.buffer_id == ofp.OFP_NO_BUFFER:
data = msg.data
out = ofp_parser.OFPPacketOut(
datapath=dp, buffer_id=msg.buffer_id, in_port=msg.in_port,
actions=actions)
actions=actions, data = data)
dp.send_msg(out)
Expand Down

0 comments on commit 3c86fc0

Please sign in to comment.