Communication networks are growing exponentially, and new services and applications are being introduced unceasingly. To meet the demands of these services and applications, current network systems have to be modified, replaced or supplemented. Various technologies, such as reconfigurable devices or active networks, have attempted to address this problem. In this paper, we introduce a programmable, generic forwarding element (GFE), which can be used as a platform for a flexible and reconfigurable network system. This platform and the resulting network system enable on-the-fly definition of adaptive and dynamic network functionalities, so that the demands of new services and applications can be met. Additionally, specific service instances or traffic flows can be handled by this platform on a temporary and locality basis, according to traffic patterns, application demands, and provisioning decisions. The proposed GFE complies with today's standards and can easily be adopted for future standards. A network processor is used to implement this platform, so that frame processing is achieved at wire speed, even though each frame is analyzed and processed by a meta-program. An XML-based definition of the forwarding element is used to describe frame processing, based on the frame contents and ingress port, and on various system and network parameters.