# How define the arp header in the P4 program

**URL:** <https://forum.p4.org/t/how-define-the-arp-header-in-the-p4-program/584>\
**Category:** Getting Started with P4\
**Created:** [January 3, 2023, 7:01pm UTC](https://forum.p4.org/t/how-define-the-arp-header-in-the-p4-program/584 "2023-01-03T19:01:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DavideS](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/davides/32/120_2.png) [@DavideS](https://forum.p4.org/u/DavideS)\
**Post date:** [January 4, 2023, 8:39am UTC](https://forum.p4.org/t/how-define-the-arp-header-in-the-p4-program/584/2 "2023-01-04T08:39:33Z")

</div>

HI @Lululouisa ,

1. could you please chare your error and program?
2. here and example of P4 program, [tutorials/basic.p4 at master · p4lang/tutorials · GitHub](https://github.com/p4lang/tutorials/blob/master/exercises/basic/solution/basic.p4), in general you should define your header and then you can use it in the parser and in the ingress/egress pipeline. More in detail, [tutorials/basic.p4 at master · p4lang/tutorials · GitHub](https://github.com/p4lang/tutorials/blob/master/exercises/basic/solution/basic.p4#L60) here the parser check if the value of the ethernet type is IPV4 if yes the parser start to parse the IPv4 header. You have to do a similar things according to the ARP protocol specification

---

_[View the full topic](https://forum.p4.org/t/how-define-the-arp-header-in-the-p4-program/584)._
