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...