On Fri, 17 Oct 2014 00:36:28 +0000
Weiyang Mo <[email protected]> wrote:

> Hi All,
> 
> I would like to create some LLC packets with specific payload. I did the 
> following:
> 
> e = ethernet.ethernet(dst='ff:ff:ff:ff:ff:ff',
>                               src='08:60:6e:7f:74:e7',
>                               ethertype=1000)
> 
> l= llc.llc(dsap_addr=1,ssap_addr=1,control=llc.ControlFormatI())
> p = packet.Packet()
> p.add_protocol(e)
> p.add_protocol(l)
> p.serialize()
> 
> I execute the code and I do find the LLC packet is constructed, however I 
> have no ideas where can I append its payload.

After calling serialize() method, p.data includes the on-wire packet
data. How about appending your payload to it?

Or IIRC, you can call add_protocol() with your payload:

https://github.com/osrg/ryu/blob/master/ryu/lib/packet/packet.py#L67

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to