Abstract:This paper designs a domain-specific language P3 for reconfigurable protocol-independent packet parsers. Due to the requirement to facilitate the implementation of a high-security network, the language is designed from the perspective of high trustworthiness, including the formal definition of type system and operational semantics of the language and its trusted compiler architecture. Based on the full understanding of the basic requirements of the reconfigurable hardware, from the view of hardware-software codesign, the core characteristics of P3 language and its trusted compiler architecture named P3C are finally defined. As the reconfigurable packet parser is an important part of SDN and programmable data plane, implementing the trusted compiler architecture of P3C will be of great significance to the security of SDN. It is expected that the development of P3C project will promote the further research in the field of network and formal method.