1. A method for finding, in a rule base, a rule matching a data packet, a data packet comprising parameter fields for identifying the data packet, the rule base comprising a plurality of sequentially labelled rules, each rule comprising one or more parameter fields, and a rule matching a data packet being a rule, whose parameter field values correspond to the parameter field values of said data packet, and the method comprising the steps of: determining rule sets for the data packet, one rule set comprising the rules to which one parameter field value of the data packet can match, and finding the rule with the smallest label that is present in all said rule sets of the data packet, said rule with the smallest label indicating the rule matching the data packet.