P4 is more general than OpenFlow, allowing users to define exactly how the forwarding plane processes packets. OpenFlow can be expressed in the P4 language; openflow.p4 provides a helpful way to get started.