1. A method for filtering a packet at a network interface, comprising the steps of: (1) receiving, at a compiler, a procedure statement and a filter statement; (2) processing, in a single invocation at the compiler, the procedure statement and the filter statement so that the procedure statement has a table format with a procedure index and a procedure function and the filter statement has a 5-tuple format with a corresponding procedure index; and (3) loading the procedure statement and the filter statement from the compiler to an interpreter.