First define a common header file, probably in .h or using ProtocolBuffer, to capture StructAndPacket in sketch files and UDP packet definition in tofino-boilerplate.
When converting .c file to .sk file in domino-compiler, use that header, and generate both .h (which should contain the spec function implementation using the common header file) and .sk files.
Compile .sk file using iterative_solver --target-tofino.
Modify the tofino-boilerplate's control plane program to link with modified .h file from step 2, and call the spec function for each packet and compare the output.