Hi,
On 2015年04月05日 03:08, Николай Жупиков wrote:
> Hello! Please tell me how to extract the value of the field tcp_flags
> (openflow 1.5) using ryu.
> If possible, write example code.
Your question is how to extract the tcp_flags from packets (e.g. from packet-in
data), right?
If so, you can do it with "Packet Library".
e.g.)
from ryu.lib.packet import packet
from ryu.lib.packet import tcp
@set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
def _packet_in_handler(self, ev):
msg = ev.msg
pkt = packet.Packet(msg.data)
tcp_pkt = pkt.get_protocol(tcp.tcp)
if tcp_pkt is not None:
print 'tcp_pkt.bits = %d' % tcp_pkt.bits
The value of "bits" shows "Control Bits" of TCP header,
which is "The original TCP flags defined in RFC 793"(OF1.5 Spec).
Thanks
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel