You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
is it possible to create a single P4 file template containing the common standard headers that P4 is actually able to parse? for example, containing:
L2 headers
IPv4 headers
IPv6 headers
TCP headers
UDP headers
...
This way, whenever someone has to deal with standard protocols it's just a matter of 'copy-paste'.
The text was updated successfully, but these errors were encountered:
Recently someone volunteered to coordinate an effort to create such a file that would be published by the P4.org group in one of their repositories. I will try to remember to update this issue when that is published, but I suspect there will be a fair amount of discussion and editing that happens between now and when it is published, e.g. it could easily be at least a month, if not two.
And a mere 3.5 years later, an update :-). Alan Lo worked towards this idea in 2021, but the effort kind of stalled and was mostly forgotten about. Recently I asked him if he was willing to publish his work under the Apache 2 license, and he agreed. The resulting files are in this directory of this repo now: https://github.com/jafingerhut/p4-guide/tree/master/standard-header-defns
Davide Scano is interested in enhancing this and seeing if we can convince the p4c developers to add a file like this into p4c's set of system-wide include files.
Hi,
is it possible to create a single P4 file template containing the common standard headers that P4 is actually able to parse? for example, containing:
This way, whenever someone has to deal with standard protocols it's just a matter of 'copy-paste'.
The text was updated successfully, but these errors were encountered: