1. A method comprising: receiving a packet from a first network; executing a plurality of pipeline stages for determining a next destination of the packet, wherein the plurality of pipeline stages comprises a set of logical switch stages, a set of logical router stages, a set of transport layer service stages, and a set of application layer service stages; outputting the processed packet to a second network.