Active and Programmable Networks for Adaptive