In OSI model what are the main functions of transport layer?

In OSI model what are the main functions of transport layer?