<aname="l7"></a></span><spanclass=cF1>U8</span><spanclass=cF0> opcode; </span><spanclass=cF2>// includes R bit.</span><spanclass=cF0>
<aname="l8"></a></span><spanclass=cF9>U16</span><spanclass=cF0> reserved; </span><spanclass=cF2>// must be all 0 on TX</span><spanclass=cF0>
<aname="l9"></a></span><spanclass=cF9>U32</span><spanclass=cF0> req_lifetime; </span><spanclass=cF2>// seconds. 0 interpreted as 'delete'.</span><spanclass=cF0>
<aname="l10"></a></span><spanclass=cF1>U8</span><spanclass=cF0> pcp_client_ip[</span><spanclass=cFE>16</span><spanclass=cF0>]; </span><spanclass=cF2>// source ipv4 addr converted to ipv4-mapped ipv6 as per spec. 128 bits</span><spanclass=cF0>
<aname="l16"></a></span><spanclass=cF1>U8</span><spanclass=cF0> nonce[</span><spanclass=cFE>12</span><spanclass=cF0>]; </span><spanclass=cF2>// "Mapping Nonce" 96 bits of random vals.</span><spanclass=cF0>
<aname="l18"></a></span><spanclass=cF1>U8</span><spanclass=cF0> reserved[</span><spanclass=cFE>3</span><spanclass=cF0>]; </span><spanclass=cF2>// 24 bits, TX must be 0, ignore on RX.</span><spanclass=cF0>
<aname="l21"></a></span><spanclass=cF2>/*</span><spanclass=cF0></span><spanclass=cF2>internal_port. 0 'all ports' legal only on lifetime 0 (delete) or client req 'all ports'.</span><spanclass=cF0>
<aname="l22"></a></span><spanclass=cF2>must be ignored on RX. */</span><spanclass=cF0>
<aname="l25"></a></span><spanclass=cF2>/*</span><spanclass=cF0></span><spanclass=cF2>external_port. 'suggested'. if client doesnt know it or has no preference it must be 0.*/</span><spanclass=cF0>
<aname="l28"></a></span><spanclass=cF2>/*</span><spanclass=cF0></span><spanclass=cF2>external_ip. 'suggested'. if client doesnt know it or no preference,</span><spanclass=cF0>
<aname="l29"></a></span><spanclass=cF2> it must use 'address-family-specific all-zero address. */</span><spanclass=cF0>
<aname="l56"></a> request->header.req_lifetime = </span><spanclass=cFE>60</span><spanclass=cF0>; </span><spanclass=cF2>// live for 1 min.</span><spanclass=cF0>
<aname="l58"></a></span><spanclass=cF2>// force local IPV4 addr into IPV4-mapped-IPV6</span><spanclass=cF0>
<aname="l59"></a></span><spanclass=cF1>for</span><spanclass=cF0> (i = </span><spanclass=cFE>0</span><spanclass=cF0>; i <</span><spanclass=cFE>10</span><spanclass=cF0>; i++) </span><spanclass=cF2>// first 80 bits 0</span><spanclass=cF0>
<aname="l68"></a></span><spanclass=cF2>// set random 'nonce'</span><spanclass=cF0>
<aname="l69"></a></span><spanclass=cF1>for</span><spanclass=cF0> (i = </span><spanclass=cFE>0</span><spanclass=cF0>; i <</span><spanclass=cFE>12</span><spanclass=cF0>; i++)
<aname="l78"></a></span><spanclass=cF7>{</span><spanclass=cF0></span><spanclass=cF2>// if no specified ext ip, use specific ipv4-mapped-ipv6 all-zeroes address.</span><spanclass=cF0>
<aname="l79"></a></span><spanclass=cF1>for</span><spanclass=cF0> (i = </span><spanclass=cFE>0</span><spanclass=cF0>; i <</span><spanclass=cFE>10</span><spanclass=cF0>; i++)
<aname="l86"></a></span><spanclass=cF7>{</span><spanclass=cF0></span><spanclass=cF2>// else, map to param ip</span><spanclass=cF0>
<aname="l87"></a></span><spanclass=cF1>for</span><spanclass=cF0> (i = </span><spanclass=cFE>0</span><spanclass=cF0>; i <</span><spanclass=cFE>10</span><spanclass=cF0>; i++)