Stas Kozlov <mancubus77@...> writes:

> 
> Hi, All
> 
> What is data format for ofp_parser.OFPPacketOut()? I was trying to 
build 
> packet with ryu.lib.packet.packet:
> 
ethernet(dst='00:00:00:00:00:00',ethertype=33024,src='00:07:0d:af:f4:54'
), 
> vlan(cfi=0,ethertype=2048,pcp=0,vid=32), 
> 
ipv4(csum=60513,dst='131.151.32.129',flags=0,header_length=20,identifica
tion=35421,offset=1480,option='TEST',proto=1,src='131.151.32.21',tos=0,t
otal_length=24,ttl=64,version=4)
> But got an error:
>    File 
> "/usr/local/lib/python2.7/dist-
packages/ryu/ofproto/ofproto_v1_3_parser.py", 
> line 2385, in _serialize_body
>      self.buf += self.data
> TypeError: can't concat Packet to bytearray
> 
>   Thanks in advance

I suppose this needs to be corrected as follows:

  if len(self.buf) < offset:
    self.buf += bytearray(offset - len(self.buf))
  self.buf += self.data
> 
> ----------------------------------------------------------------------
--------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> 




------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to