Hi list
I have some problems understanding the implementation of the MAC and PHY headers.
I have a P2P 802.11g link in which I have sending UDP packets with size 1500 bytes
By the way, are 1500 = 1500 application level or 1500 = 1492 application +8 udp???
onoff1.SetAttribute ("PacketSize", UintegerValue (1500));
When I trace the PHY level
Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/State/Tx",MakeCallback(&Experiment::PhyTx2,this));
with
void
Experiment::PhyTx2 (std::string context , ns3::Ptr<ns3::Packet const> p, ns3::WifiMode a, ns3::WifiPreamble ab, unsigned char c)
{
WifiMacHeader hdr1;
if(p->GetSize() > 10){ // only data packets
p_tx_1 += 1;
p->PeekHeader(hdr1);
std::cout << p->GetSize() << " bytes PHY - " << hdr1.GetSize() << " bytes MAC header " << std::endl;
}
}
I get:
1566 bytes PHY - 26 bytes MAC header
So I don't know how to compose the total overload.
Suposing that 1566 are the total size, what should be the correct decomposition?
1566= 1500 (aplication level) + 8 (UDP) + 20 (IP) + 26 (MAC) + 4 (FCS) + 8 (PHY)?
1566= 1492 (aplication level) + 8 (UDP) + 20 (IP) + 26 (MAC) + 4 (FCS) + 16 (PHY)?
But I had understood that PHY layer are 6 bytes of the header + 18 of the preamble and don't fix with any suposition
What I am doing wrong??
Any idea is welcomed
Thanks you in advance
Kind regards,
Esteban