How would a MAC layer look into the MAC header if it is the one to put the MAC header onto the packet coming from upper layer (Network layer)? I am talking about the packet that a node sends out to other node. I am not talking about MAC layer's function after it "receives" the packet from other node. Please let me know how a MAC header is created by a node. It has to some how look at the IP header of the frame coming from above layer in order to append the MAC layer header to the packet.
More specifically, i would like to know that how a node that is sending out a MAC packet would know the destination MAC address? Is it communicated to it by the higher layer? If yes, how is it done for higher layer protocols other than IP?
Thanks in advance.
Aswin