Hi,

I am trying to create TCP SYN packets using ryu.

Following is a segment from my code.

*def tcp_syn_packet(self , src_mac , dst_mac , src_ip , dst_ip , src_port ,
dst_port):*
*        pkt = packet.Packet()*
*        ethertype = 0x0800*
*        eth_pkt = ethernet.ethernet(dst_mac, src_mac , ethertype)*
*        ip_pkt = ipv4.ipv4(src = src_ip , dst = dst_ip)*
*        tcp_pkt = tcp.tcp(src_port = src_port , dst_port = dst_port)*
*        pkt.add_protocol(eth_pkt)*
*        pkt.add_protocol(ip_pkt)*
*        pkt.add_protocol(tcp_pkt)*
*        pkt.serialize()*

Kindly let me know what changes need to be done in order to convert this
packet in to a TCP SYN packet.

Regards,

-- 
Mututhanthrige Praveen Sameera Fernando
Graduate Research Assistant
Department of electrical and computer engineering
The University of Akron
Mobile  :  +94 077-517-3454 | +1 330-319-0215
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to