Hi,
Please refer to the 'data' attribute of OFPPacketOut.
You can set a binary type value, which you want send, into this attribute.
e.g.)
req = ofp_parser.OFPPacketOut(datapath, buffer_id,in_port, actions,
data=<BINARY_TYPE_VALUE>)
FYI: For building a binary type packet data, Ryu provides the packet libraries.
'bin_packet' in the following example is a binary type value to send.
http://osrg.github.io/ryu-book/en/html/packet_lib.html#generation-of-packets-serialization
Thanks,
Iwase
On 2016年08月05日 14:19, Alan Wang wrote:
> HI,
>
> Thanks for your reply!!
>
>
> def send_packet_out(self, datapath, buffer_id, in_port):
>
> ofp = datapath.ofproto
> ofp_parser = datapath.ofproto_parser
>
> actions = [ofp_parser.OFPActionOutput(ofp.OFPP_FLOOD, 0)]
> req = ofp_parser.OFPPacketOut(datapath, buffer_id,in_port, actions)
> datapath.send_msg(req)
>
>
> In these codes of the example, i can't find data the controller send.
>
> I think it can't send data what i want to send.
>
> Thanks,
>
> Alan
>
>
> 2016-08-05 12:04 GMT+08:00 Iwase Yusuke <[email protected]
> <mailto:[email protected]>>:
>
> Hi,
>
> You can use Packet-Out messages for such purpose, I guess.
>
> http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPacketOut
>
> <http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPacketOut>
>
> Thanks,
> Iwase
>
>
>
> On 2016年08月05日 12:45, Alan Wang wrote:
>
> Hi All,
>
> I want to send some data controller collected from Controller to Host.
>
> What should i do ?
>
> Thanks,
>
> Alan.
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel