An apparatus having a plurality of input/output ports for receiving and transmitting data packets, and comprising: - a data packets handling circuitry arranged to forward data packets between the input/output ports, and - an internal apparatus controller arranged to control said data packet handling circuitry, the apparatus having a control port for communication between the internal apparatus controller and an external network controller, wherein the internal apparatus controller is further arranged to: - store at least one state transition table to be used for controlling the forwarding of data packets by the data packets handling circuitry, - use said at least one state transition table for implementing at least one finite state machine, - use said at least one state transition table for handling separately distinct incoming data packets flows through corresponding distinct instances of the at least one finite state machine, - receive said at least one state transition table through the control port, wherein said at least one state transition table corresponds to the combination of a state table and a flow table, wherein the state table comprises a key column and a state column, and the internal apparatus controller is further arranged to determine through the state table state data based on data in incoming data packets, and wherein the flow table comprises a state column, an event column, an action column and an update column, and the internal apparatus controller is further arranged to determine through the flow table action information and update information based on information on events occurring at the input/output ports and on the state data determined through the state table, the action information relating to forwarding actions to be performed on the incoming data packets and the update information relating to row updates to be performed on the state data in the state table. - a data packets handling circuitry arranged to forward data packets between the input/output ports, and - an internal apparatus controller arranged to control said data packet handling circuitry, the apparatus having a control port for communication between the internal apparatus controller and an external network controller, wherein the internal apparatus controller is further arranged to: - store at least one state transition table to be used for controlling the forwarding of data packets by the data packets handling circuitry, - use said at least one state transition table for implementing at least one finite state machine, - use said at least one state transition table for handling separately distinct incoming data packets flows through corresponding distinct instances of the at least one finite state machine, - receive said at least one state transition table through the control port, - store at least one state transition table to be used for controlling the forwarding of data packets by the data packets handling circuitry, - use said at least one state transition table for implementing at least one finite state machine, - use said at least one state transition table for handling separately distinct incoming data packets flows through corresponding distinct instances of the at least one finite state machine, - receive said at least one state transition table through the control port, wherein said at least one state transition table corresponds to the combination of a state table and a flow table, wherein the state table comprises a key column and a state column, and the internal apparatus controller is further arranged to determine through the state table state data based on data in incoming data packets, and wherein the flow table comprises a state column, an event column, an action column and an update column, and the internal apparatus controller is further arranged to determine through the flow table action information and update information based on information on events occurring at the input/output ports and on the state data determined through the state table, the action information relating to forwarding actions to be performed on the incoming data packets and the update information relating to row updates to be performed on the state data in the state table.