This paper presents a sum of squares (SOS) approach to the stability analysis of networked control systems (NCSs) incorporating bounded time-varying delays, bounded time-varying transmission intervals and a shared communication medium. A shared communication medium imposes that per transmission only one node, which consists of several actuators or sensors, can access the network and transmit its corresponding data. Which node obtains access is determined by a network protocol. We will provide mathematical models that describe these NCSs and transform them into suitable hybrid systems formulations. Based on these hybrid systems formulations we construct Lyapunov functions using SOS techniques that can be solved using LMI-based computations. ...