SIP API Developer's Guide

Exit Print View

Updated: July 2014
 
 

Connection Manager

The connection manager provides I/O functionality. The connection manager is not part of the library but interacts with the stack using well defined interfaces. This section describes the usage model of the connection manager, its interface with the stack, and the requirements that are imposed by the library. The connection manager must register the following mandatory interfaces with the stack as part of stack initialization:

int          sip_conn_send(const sip_conn_object_t, char *, int);
void         sip_hold_conn_object(sip_conn_object_t);
void         sip_rel_conn_object(sip_conn_object_t);
boolean_t    sip_conn_is_reliable(sip_conn_object_t);
boolean_t    sip_conn_is_stream(sip_conn_object_t);
int          sip_conn_remote_address(sip_conn_object_t, 
                    struc sockaddr *, socklen_t *);
int          sip_conn_local_address(sip_conn_object_t, 
                    struct sockaddr *, socklen_t *);
int          sip_conn_transport(sip_conn_object_t);

If the application uses timer values that are specific to a connection object, the application must register the following interfaces to provide those values for Timer 1, Timer 2, Timer 4, and Timer D:

int		sip_conn_timer1(sip_conn_object_t);
int		sip_conn_timer2(sip_conn_object_t);
int		sip_conn_timer4(sip_conn_object_t);
int		sip_conn_timerd(sip_conn_object_t);

A connection object represents a connection. A connection is identified by the local endpoint, the remote endpoint, and the transport.

The library requires that the first element of the connection object is a void pointer. The stack reserves this void pointer for its own use. The application must initialize each connection object by calling the sip_init_conn_object() function before using the object. The connection object is opaque to the stack.