Hello,
The IP header is a Layer 3 header where you will specify the
source/destination IP addresses. You will also specify the upper layer
protocol that the network layer should communicate with for that specific
packet. This information is embedded in the packet using "protocol" field.
In the layer 4 header (TCP/UDP), you will specify the port information.
http://www.tcpipguide.com/free/t_IPDatagramGeneralFormat.htm
There are lot of layer 4 protocols that are not dependent upon the TCP/UDP
stacks. They directly interact with the IP layer and have their own way of
encapsulating the packet.
Essentially, you can look at entire TCP/IP stack as a way of packaging data
within a packet.
Hope this helps.
Regards,
NT