In [ ]:
ipfix_file = "../test/mawi-0330-3hours.ipfix"

In [ ]:
import ipfix
import qof
import pandas as pd

ipfix.ie.use_iana_default() # loads IANA default IEs from module core definitions
ipfix.ie.use_5103_default() # loads reverse IEs for RFC5103 biflows
ipfix.ie.use_specfile("qof.iespec") # loads enterprise-specific IEs for QoF

ipfix.types.use_integer_ipv4() # accelerate dataframe processing of per-IP stuff

In [ ]:
df = qof.dataframe_from_ipfix(ipfix_file, ("minTcpRttMilliseconds", "lastTcpRttMilliseconds", "tcpRttSampleCount",
                                           "packetDeltaCount", "reversePacketDeltaCount", 
                                           "tcpSequenceLossCount", "reverseTcpSequenceLossCount"))

In [ ]:
print ("Total flows:         "+str(len(df)))
df = qof.drop_lossy(df)
print ("  of which lossless: "+str(len(df)))

In [ ]:
df["minTcpRttMilliseconds"].hist(bins=100,range=(1,400),weights=(df["packetDeltaCount"]+df["reversePacketDeltaCount"]))

In [ ]:
df["lastTcpRttMilliseconds"].hist(bins=100,range=(1,500),weights=(df["packetDeltaCount"]+df["reversePacketDeltaCount"]))

In [ ]: