<div dir="ltr">Did you try the setValid() method on headers?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 13, 2017 at 4:49 AM, Bian Jason <span dir="ltr"><<a href="mailto:imaginezz@outlook.com" target="_blank">imaginezz@outlook.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="ZH-CN" link="#0563C1" vlink="#954F72">
<div class="m_2073648814434559358WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I have some questions about how to add header in p4_16.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I use the code of simple_router.p4app in <a href="https://github.com/p4lang/p4app/tree/master/examples/simple_router.p4app" target="_blank">
https://github.com/p4lang/<wbr>p4app/tree/master/examples/<wbr>simple_router.p4app</a>.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">And I declared a header test_udp in header.p4 and use packet.emit(test_udp) in DeparserImpl, but the code doesn’t work.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Jason<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">祝好</span></b><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:black">
</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">-----------------------------</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">边子政</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">北京邮电大学</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">移动电话:<span lang="EN-US"><a href="tel:+86%20132%206949%203616" value="+8613269493616" target="_blank">+8613269493616</a></span></span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">电子邮箱:<span lang="EN-US"><a href="mailto:imaginezz@outlook.com" target="_blank"><span style="color:blue">Imaginezz@outlook.com</span></a></span></span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:16.2pt"><b><span style="font-size:10.0pt;font-family:"Microsoft YaHei UI",sans-serif;color:#400080">地址:北京市海淀区西土城路<span lang="EN-US">10</span>号北京邮电大学</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
P4-dev mailing list<br>
<a href="mailto:P4-dev@lists.p4.org">P4-dev@lists.p4.org</a><br>
<a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" rel="noreferrer" target="_blank">http://lists.p4.org/mailman/<wbr>listinfo/p4-dev_lists.p4.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Antonin<br></div></div>
</div>