Modify/create packets with Trema using Ruby

54 views
Skip to first unread message

sp kexagi

unread,
Jul 21, 2014, 5:19:56 AM7/21/14
to trem...@googlegroups.com
Hi,
I am trying to generate arp packets and send them out using Ruby with Trema. I have tried Racket but there seems to be some sort of incompatibility with other libraries/ruby versions. Is there a way to convert packets generated with Pio to Trema PacketIn objects? Alternatively, I would like to modify the contents of an arp packet, although there doesn't seem to be a way to do that using any Trema actions. Any suggestions would be most welcome.

Thank you,
Spiros

eishun kondo

unread,
Jul 22, 2014, 1:41:11 AM7/22/14
to trem...@googlegroups.com
Hi Spiros

Sorry,  I'm not good at English.

how do you want to convert?
for example: change the value of  "sender_protocol_address"  field of ARP packet.

Regards,
Eishun Kondoh.

sp kexagi

unread,
Jul 23, 2014, 11:47:28 AM7/23/14
to trem...@googlegroups.com
I actually found a way to create an ARP reply and send it out using
create_arp_reply_from()
found here: https://github.com/stereocat/training/blob/master/simple-firewall/router-utils.rb

Thanks for replying

eishun kondo

unread,
Jul 23, 2014, 8:39:05 PM7/23/14
to trem...@googlegroups.com
Hi.

trema / pio is much simpler than it. 
For ARP packet generate, please refer to the following URL.


Regards,
Eishun Kondoh.

2014年7月24日木曜日、sp kexagi<spke...@gmail.com>さんは書きました:
--
You received this message because you are subscribed to the Google Groups "trema-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trema-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages