1. A network device comprising: a plurality of flow tables; a plurality of function modules configured to perform different processing on a packet; and an entry module configured to determine an operation to be performed first on a packet between a table search operation and a function module execution operation, when the packet is received, wherein, as a result of the operation determined by the entry module, a table search operation or a function module execution operation to be performed next is designated, and the designation is repeated until there is no operation to be performed next.