To professor Fernando Ramos, for proposing so interesting a subject for my dissertation, and supervising it. To my open office coworkers for the friendly, fun mood, the evening karaokes and all the giggles. To Mihai Budiu of VMware, Antonin Bas of Barefoot Networks and Nate Foster of Cornell University for the continued attention to my e-mail messages and my interventions on the p4lang GitHub repositories. To Engineer Jeferson Santiago da Silva, MSc by Polytechnique Montréal, for responding to my e-mails regarding P4 externs so promptly and kindly. To Salvatore Signorello, for reviewing my written draft and pointing errors in it. To my (some current, some former) colleagues Ana Pereira, João Ferreira, Henrique Califórnia Mendes and Inês Gouveia for approaching me on my first spooky week in the Faculty of Sciences and integrating me into their group. If it hadn't been for that, I might have given up on university. To former colleagues Ricardo Tomaz and (again) Ana Pereira for the good times during our first year and the endless laughters. A special one to the conference group at my secondary school for being the most serious people I know. In particular, to Professor Armando Pedrosa. Another special one to Professor Guilherme Arroz of IST-ULisboa and doctor Luísa Barreto for being a source of encouragement. And a final one to my family for the support! Funding This work was partially supported by the European Commission through project FP7 SEGRID (607109) and project H2020 SUPERCLOUD (643964), and by national funds of Fundação para a Ciência e a Tecnologia (FCT) through project UID/-CEC/00408/2013 (LaSIGE). Finalmente, avaliámos a nossa solução através de vários testes de funcionalidade e comparámos ao NDN.p4 em termos de espaço ocupado pelas entradas da FIB.