title: What is the function of peekAtFront in OMNET++
body: <p>I've found the following code in OMNET++.</p>
  <pre><code>void Mac::sendDataPacket()
  {
      nbTxDataPackets++;
      if (currentTxFrame == nullptr)
          popTxQueue();
      auto packet = currentTxFrame-&gt;dup();
      const auto&amp; hdr = packet-&gt;peekAtFront&lt;MacHeaderBase&gt;();
      lastDataPktDestAddr = hdr-&gt;getDestAddr();
      attachSignal(packet, simTime());
      sendDown(packet);
  }
  </code></pre>
  <p>Can anyone tell me what is the function of below commands?</p>
  <pre><code>const auto&amp; hdr = packet-&gt;peekAtFront&lt;MacHeaderBase&gt;();
  lastDataPktDestAddr = hdr-&gt;getDestAddr();
  
  </code></pre>
  <p>Thank you</p>