This paper deals with the design of protocols for 5G-and-beyond wireless networks. In particular, it considers a Next Generation RAN (NG-RAN), where the Base Band Unit (BBU) functions are split across a Central Unit (CU) and a Distributed Unit (DU). This paper proposes the use of Programming Protocol independent Packet Parsers (P4)based switches between the CU and DU for processing packets exchanged between the two. We demonstrate the smart handover (SMARTHO) scheme for a mobile User Equipment (UE) that traverses a known fixed path. The idea is to perform the resource allocation in subsequent macro-cells in advance of the user's movement, by having the P4 switch spoof the behaviour of the UE. Based on an implementation using Mininet and P4BM software switches, it is seen that the proposed method leads to around 18% and 25% reduction in handover time, for two- and three-handover sequences, respectively. © 2018 IFIP.