cpLayer = packet-&gt;getLayerOfType&lt;pcpp::TcpLayer&gt;();</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        pcpp::tcphdr *tcpHeader = tcpLayer-&gt;getTcpHeader();</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>        </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>        <span class="comment">// 获取端口信息</span></div>
<div class="line"><a id="l00152" name="l0015