The first line should be: class Mac802154Packet: public MacPacket
It describes and "Is a" relationship, so everything protected and public in MacPacket is inherited by Mac802154Packet. See the documentation in this site.
First line means, that you derive your class Mac802154Packet from the class MacPacket which has a global scope without a namespace (::). The public identifier means, that you have access to all public and protected members implemented in the base class MacPacket.
(::) tells the compiler to look for MacPacket definition in the global namespace instead of local, (:) means "derive from". public means "everything that is public in MacPacket should also be public in Mac8021... and everything that is protected should also be protected in Mac8021..."
So the first line means:
"Derive Mac802154Packet from global MackPacket"
If you used protected instead of public, everything that is public in MacPacket would be protected in Mac8021...