2
votes

I want write code using POX controller to capture the FIN packets in live traffic.

How to find the FIN packets coming to the switch in pox controller ?

Does flow_stats has the flags attribute?

My question is in which function I get the details of FIN packets?

1

1 Answers

0
votes

You may need to use packet.find('tcp') method in your PacketIn function for determining the presence of FIN in the received packet. FIN is one of the TCP attributes in POX which shall be set to True when FIN is present (FIN flag is set in TCP header). You can use it to determine the presence of FIN on the data returned by packet.find('tcp'). Below is a small snapshot :

def _handle_PacketIn (self, event):
packet = event.parsed
parsed_tcp = packet.find('tcp')
if parsed_tcp:
  if parsed_tcp.FIN:
    print "FIN is present"

Refer to this link of POX Wiki for more information : https://openflow.stanford.edu/display/ONL/POX+Wiki.html#POXWiki-Workingwithpackets%3Apox.lib.packet