HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

18 HP-UX C SIP Stack Programmers Guide
SIP Stack Architecture
TRANSACTION LAYER The Transaction layer creates and manages transaction objects. Each
transaction is responsible for maintaining states, and sending and receiving
messages and retransmissions using the Transport layer. The Transaction layer
also maps incoming messages to transactions.
TRANSPORT LAYER The Transport layer handles SIP networking I/O. This layer manages UDP
sockets and TCP connections, as specified in RFC 3261, and sends and receives
messages.
MESSAGE LAYER The Message layer handles parsing and encoding of SIP messages. The message
layer allows browsing and editing of the contents of SIP messages and also
comparison of message parts, such as SIP addresses.
P
ARSER ENGINE SIP is a text-encoded protocol, which means that messages are sent on the wire
in textual format—as opposed to binary encoding formats such as ASN.1 PER.
Although encoding text messages is relatively simple, parsing them can be more
complex because of the large degree of freedom provided by text grammars. SIP
grammar is specified in RFC 3261, which uses ABNF
1
to represent the message
structure.
The SIP Stack use a dedicated rule based LALR
2
parser implemented according
to the syntax and grammar of the protocol. This parser is optimized for
performance and is thread-safe so that multiple messages can be parsed
simultaneously in different thread contexts.
1. Augmented Backus-Naur Form
2. Look Ahead Left-to-right parse, Rightmost-derivation