Email This Page

SAP (v1 & v2): Session Announcement Protocol

Session Announcement Protocol (SAP) is an announcement protocol that is used to assist the advertisement of multicast multimedia conferences and other multicast sessions, and to communicate the relevant session setup information to prospective participants.

A SAP announcer periodically multicasts an announcement packet to a well-known multicast address and port. The announcement is multicast with the same scope as the session it is announcing, ensuring that the recipients of the announcement can also be potential recipients of the session the announcement describes (bandwidth and other such constraints permitting). This is also important for the scalability of the protocol, as it keeps local session announcements local.

A SAP listener learns of the multicast scopes it is within (for example, using the Multicast-Scope Zone Announcement Protocol) and listens on the well known SAP address and port for those scopes. In this manner, it will eventually learn of all the sessions being announced, allowing those sessions to be joined.

It is to be expected that sessions may be announced by a number of different mechanisms, not only SAP. For example, a session description may placed on a web page, sent by email or conveyed in a session initiation protocol. To ease interoperability with these other mechanisms, application level security is employed, rather than using IPsec authentication headers.
Protocol Structure - SAP (Session Announcement Protocol)

3

4

5

6

7

8

16

32bit

V=1

A

R

T

E

C

Auth len

Msg ID hash

Originating source (32 or 128 bits)

Optional Authentication Data

Optional timeout

Optional payload type

 

0

 

Payload

  • V - Version Number field is three bits and MUST be set to 1.
  • A: Address Type - It can have a value of 0 or 1:
    0 The originating source field contains a 32-bit IPv4 address. 
    1 The originating source contains a 128-bit IPv6 address.
  • R - Reserved. SAP announcers set this to 0. SAP listeners ignore the contents of this field.
  • T - Message Type. It can have a value of 0 or 1:
    0 Session announcement packet
    1 Session deletion packet.
  • E - Encryption Bit The encryption bit may be 0 or 1.
    1 The payload of the SAP packet is encrypted and the timeout field must be added to the packet header.
    0 The packet is not encrypted and the timeout must not be present. 
  • C - Compressed Bit. If the compressed bit is set to 1, the payload is compressed.
  • Authentication Length - An 8bits unsigned quantity giving the number of 32 bit words, following the main SAP header, that contain authentication data. If it is zero, no authentication header is present.
  • Message Identifier Hash - used in combination with the originating source, provides a globally unique identifier indicating the precise version of this announcement.
  • Originating Source - This field contains the IP address of the original source of the message. This is an IPv4 address if the A field is set to zero; otherwise, it is an IPv6 address. The address is stored in network byte order.
  • Timeout - When the session payload is encrypted, the detailed timing fields in the payload are not available to listeners not trusted with the decryption key. Under such circumstances, the header includes an additional 32-bit timestamp field stating when the session should be timed out. The value is an unsigned quantity giving the NTP time in seconds at which time the session is timed out. It is in network byte order.
  • Payload Type - The payload type field is a MIME content type specifier, describing the format of the payload. This is a variable length ASCII text string, followed by a single zero byte (ASCII NUL).
  • Payload - The Payload field includes various sub fields.


Related Protocols
UDP , TCP , RTSP , SIPRTP , SDP

Sponsor Source

SAP is defined by IETF (www.ietf.org ) in RFC 2974.



Reference
http://www.javvin.com/protocol/rfc2974.pdf : SAP Session Announcement Protocol