def parse_flow(flow_line):
    tmp = flow_line.split()
    if flow_line.find(':') > 0 and len(tmp) > 8:
        # IPv6 layout
        return {
            'BKT':tmp[0],
            'Prot':tmp[1],
            'flowid':tmp[2],
            'Source':tmp[3],
            'Destination':tmp[4],
            'pkt':int(tmp[5]) if tmp[5].isdigit() else 0,
            'bytes':int(tmp[6]) if tmp[6].isdigit() else 0,
            'drop_pkt':int(tmp[7]) if tmp[7].isdigit() else 0,
            'drop_bytes':int(tmp[8]) if tmp[8].isdigit() else 0,
        }
    elif len(tmp) > 7:
        return {
            'BKT':tmp[0],
            'Prot':tmp[1],
            'Source':tmp[2],
            'Destination':tmp[3],
            'pkt':int(tmp[4]) if tmp[4].isdigit() else 0,
            'bytes':int(tmp[5]) if tmp[5].isdigit() else 0,
            'drop_pkt':int(tmp[6]) if tmp[6].isdigit() else 0,
            'drop_bytes':int(tmp[7]) if tmp[7].isdigit() else 0
        }