1. A network device comprising: a plurality of flow tables and a plurality of function modules, executed by a processor, using algorithm, which when executed, causing the processor to search at least one of the flow tables to determine whether a flow entry in the at least one of the flow tables is matched with an input packet and to execute at least one of the function modules to perform least one of various functions, other than searching the at least one of the flow tables, related to packet processing on the input packet; and an entry module executed by the processor, using algorithm, which when executed, configured to determine which operation, between a flow table search operation searching the at least one of the flow tables and a function module execution operation executing the at least one of the function modules, is to be performed first when the input packet is received, wherein, in response to a result of the operation determined by the entry module, the processor is configured to designate a next operation until there is no operation to be performed on the received input packet, the next operation being the flow table search operation or the function module execution operation, wherein when the flow table search operation is performed, the operation to be performed next is designated by an instruction included in the flow entry matched with the input packet, and wherein the instruction designates, together with the function module execution operation to be performed next, another function module execution operation or flow table search operation to be performed subsequent to the function module execution operation.