def _generateFilters(self, filter_list):
        filter_strings = []
        filter_strings_ipv6 = []
        for tcfilter in filter_list:
            filter_tokens = tcfilter.split(",")
            try:
                filter_string = ""
                filter_string_ipv6 = ""
                for token in filter_tokens:
                    token_split = token.split("=")
                    key = token_split[0]
                    value = token_split[1]
                    # Check for ipv6 addresses and add them to the appropriate
                    # filter string
                    if key == "src" or key == "dst":
                        if '::' in value:
                            filter_string_ipv6 += "match ip6 {0} {1} ".format(
                                key, value)
                        else:
                            filter_string += "match ip {0} {1} ".format(
                                key, value)
                    else:
                        filter_string += "match ip {0} {1} ".format(key, value)
                        filter_string_ipv6 += "match ip6 {0} {1} ".format(
                            key, value)
                    if key == "sport" or key == "dport":
                        filter_string += "0xffff "
                        filter_string_ipv6 += "0xffff "
            except __HOLE__:
                print("Invalid filter parameters")

            if filter_string:
                filter_strings.append(filter_string)
            if filter_string_ipv6:
                filter_strings_ipv6.append(filter_string_ipv6)

        return filter_strings, filter_strings_ipv6
dataset/ETHPy150Open urbenlegend/netimpair/netimpair2.py/NetemInstance._generateFilters