JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SIPAPI Developer's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  SIP Overview

2.  Oracle Solaris SIP Internals

SIP Stack Initialization

Generic Stack Parameters

Upper Layer Registrations

Connection Manager Interfaces

Custom Header Table

Header Management Layer

Writing Parsers For Custom Headers

Transaction Management Layer

Transaction Creation And Maintenance

Transaction Creation and ACK Signal Generation

Transaction Deletion

Transaction Lookup

Transaction Timers

Transaction And Network Errors

Dialog Management Layer

UAC Dialog Creation

UAS Dialog Creation

Dialog Caching

Dialog Termination, Deletion, and Notification

Message Formatting Layer

Receiving Messages

Sending Messages

Connection Manager

Connection Object

Caching a Connection Object

Freeing a Connection Object

Sending Messages

Receiving Messages

Transaction Layer and I/O Errors

Timer Management Layer

Generating Call-ID, From and To tags, Branch-ID and Cseq

Multithreading Support

3.  Multithreading and URI Support

4.  SIP API Functions

A.  Examples of Use

B.  Programming with the SIP API

C.  Transaction Timers

Index

Message Formatting Layer

The message formatting layer represents the message in the form that the next component or layer requires.

If the incoming message arrives over TCP, the message formatting layer breaks the byte stream at message boundaries. The message formatting layer parses the message in order to represent the message as a SIP message.

When the application is sending a message, the message formatting layer copies all of the message's headers and contents into a contiguous buffer before delivering the message to the application's send function.

Receiving Messages

The application sends the incoming message to the stack along with the connection object. If the transport is TCP, the message formatting layer breaks the byte stream at message boundaries. The SIP message's Content-Length header determines the message boundaries. A Content-Length header must be present in every message delivered over TCP in order to comply with RFC 3261. If the stack receives a message over TCP that does not contain a Content-Length header, the stack's behavior is unspecified.

The message formatting layer holds excess data that is not part of the current message for use with the next packet. When the system closes or reuses a connection, the connection manager must notify the stack. After receiving the notification, the stack frees the data and resources that the stack allocated to that connection. The stack delivers the message to the application by calling the receive function. The application registers the receive function with the stack during stack initialization.

Sending Messages

An application sends a SIP message by using the sip_sendmsg() function with the connection object and any message specific flags. The message formatting layer adds a Content-Length header and a line that contains only a Carriage Return/Line Feed (CRLF) character to the message and delivers the packet to the next layer. The message formatting layer copies all of the SIP message's headers and contents into a contiguous buffer before delivering the message to the application's send function. The connection manager provides the send function.