HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with the Transport Layer 327
Transport Layer Raw Buffer and Message Monitoring
IPV6 ADDRESSES
AND
THE TRANSPORT
A
DDRESS STRUCTURE
Several SIP Stack API functions receive a structure pointer of the
RvSipTransportAddr type as an input parameter. If you want to set an IPv6
address to a RvSipTransportAddr structure, follow these steps:
1. Create a string that corresponds to an IPv6 address (such as
fec0::1234:123).
2. Set the string to the strIP member of the structure.
3. Set a scope ID to the Ipv6Scope member of the structure.
4. Set the eAddrType member of the structure to
RVSIP_TRANSPORT_ADDRESS_TYPE_IP6.
Do not use square brackets with RvSipTransportAddr structure.
TRANSPORT LAYER
R
AW BUFFER AND
M
ESSAGE
MONITORING
The Transport layer of the SIP Stack provides several events in the form of
callback functions that are dedicated to inspecting and controlling the buffers
that are sent or received by the SIP Stack sockets. The callback functions also
inspect and control messages that are received by the transport layer and not yet
processed. The events are implemented for all transports—UDP and TCP
transports. The buffers contain encoded SIP messages. To get the events, an
application should register to the events using the
RvSipTransportMgrSetEvHandlers() function.
RAW BUFFER EVENTS The following events are supplied with the Transport Layer API:
RvSipTransportBufferToSendEv()
Before the SIP Stack passes the buffer containing exactly one encoded SIP
message to the “sending” system call, it calls this callback. Additional details,
such as local and remote addresses for UDP sockets, or connection handles for
TCP sockets, are provided with the callback. As a result of the details and buffer
inspection, an application can instruct the SIP Stack to discard the buffer by
updating the corresponding OUT parameter of the callback.
If the application did not register to the callback, the SIP Stack will send the
buffer.
Note When discarding a buffer, the SIP Stack layers (Transaction, Call-leg, and
so on) will behave as if the buffer was sent.