IP source addresses can be easily spoofed and are often deployed for launching network attacks. Several anti-spoofing mechanisms (ASMs) have been implemented in commercial routers. However, the problem still remains fully unaddressed. This paper explores the use of programmable data plane (PDP) concepts for building better ASMs. The objective of this paper is to implement some common ASMs in P4 (a PDP language), in order to understand the feasibility of P4-based routers/switches for realizing anti-spoofing functions. This paper also presents results from the P4 implementation, realized using the NetFPGA SUME hardware platform. Experimental results describe FGPA resource utilization, throughput and latency characteristics.