This paper proposes a novel future-proof software defined networking architecture that has multiple programmable function modules that interact with flow tables. The proposed architecture can easily adapt to new protocols with variable-length header, provides new network functions locally, and let the switch serves offloaded network functions from the cloud with minimized network latency.