2006-12-21 06:30:28 +00:00
|
|
|
/* -*- text -*- */
|
|
|
|
|
|
|
|
/**@mainpage Sofia SIP User Agent Library - sofia-sip-ua
|
|
|
|
|
|
|
|
@section Introduction
|
|
|
|
|
|
|
|
This document contains automatically generated reference documentation
|
|
|
|
for Sofia-SIP components. Some introductory material and
|
|
|
|
pointers to the example code are also included.
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
For a list of module specific pages, see @ref subdirs
|
2006-12-21 06:30:28 +00:00
|
|
|
"source tree structure" or direct links to submodules:<br>
|
2008-12-16 18:05:22 +00:00
|
|
|
<a href="nua/index.html">nua</a>
|
|
|
|
<a href="su/index.html">su</a>
|
|
|
|
<a href="features/index.html">features</a>
|
|
|
|
<a href="soa/index.html">soa</a>
|
|
|
|
<a href="sdp/index.html">sdp</a>
|
|
|
|
<a href="nta/index.html">nta</a>
|
|
|
|
<a href="tport/index.html">tport</a>
|
|
|
|
<a href="sresolv/index.html">sresolv</a>
|
|
|
|
<a href="sip/index.html">sip</a>
|
|
|
|
<a href="msg/index.html">msg</a>
|
|
|
|
<a href="url/index.html">url</a>
|
|
|
|
<a href="stun/index.html">stun</a>
|
|
|
|
<a href="iptsec/index.html">iptsec</a>
|
|
|
|
<a href="nea/index.html">nea</a>
|
|
|
|
<a href="nth/index.html">nth</a>
|
|
|
|
<a href="http/index.html">http</a>
|
|
|
|
<a href="bnf/index.html">bnf</a>
|
|
|
|
<a href="ipt/index.html">ipt</a>
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@section who Contact Information
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
You can download latest Sofia SIP from the project
|
|
|
|
<a href="http://sofia-sip.sf.net">home page</a> at
|
2006-12-21 06:30:28 +00:00
|
|
|
<a href="sf.net">Sourceforge.net</a>.
|
|
|
|
|
|
|
|
Please contact us if you have questions regarding this software:
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
<ul>
|
2006-12-21 06:30:28 +00:00
|
|
|
<li>Pekka Pessi <Pekka.Pessi@nokia.com></li>
|
|
|
|
<li>Kai Vehmanen <Kai.Vehmanen@nokia.com></li>
|
2008-12-16 18:05:22 +00:00
|
|
|
</ul>
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
Or post to the Sofia-SIP mailing list:
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>mailto:sofia-sip-devel@lists.sourceforge.net</li>
|
|
|
|
<li>http://lists.sourceforge.net/lists/listinfo/sofia-sip-devel</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**@page building Source Tree Structure
|
|
|
|
|
|
|
|
@section subdirs Directory Structure
|
|
|
|
|
Merge up to the most recent sofia-sip darcs tree. Includes the following patches from darcs:
Tue Aug 21 09:38:59 EDT 2007 Pekka.Pessi@nokia.com
* tport_type_udp.c: checking error while checking that MSG_TRUNC works.
Shall I pull this patch? (1/43) [ynWvpxqadjk], or ? for help: y
Tue Aug 21 10:49:33 EDT 2007 Pekka.Pessi@nokia.com
* nua_params.c: NUTAG_SIPS_URL() now sets the handle target, too.
Problem reported by Jari Tenhunen.
Shall I pull this patch? (2/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 11:22:42 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: do not destroy INVITE transaction if it has been CANCELed
Handle gracefully cases where the INVITE transaction is destroyed
immediately after canceling it. The old behaviour was to left it up to the
application to ACK the final response returned to INVITE.
Thanks for Fabio Margarido for reporting this problem.
Shall I pull this patch? (3/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 13:02:01 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: added test with user SDP containing already rejected media
Shall I pull this patch? (4/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:41:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: added option for processing orphan responses matching with a dialog
The orphan responses matching with the dialog can now be processed by the
response callback.The dialog leg can be created with
NTATAG_RESPONSE_CALLBACK() or a response callback can be later bound to the
leg with nta_leg_bind_response().
This is practically useful only with 200 OK responses to the INVITE that are
retransmitted by the UAS. By default, the retransmission are catched by the
ACK transaction (which then retransmits the ACK request message). However,
after ACK transaction times out, the retransmitted 200 OK indicates most
probably that the ACK request messages do not reach UAS.
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (5/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:41:20 EDT 2007 Pekka.Pessi@nokia.com
UNDO: nta: added option for processing orphan responses matching with a dialog
The orphan responses matching with the dialog can now be processed by the
response callback.The dialog leg can be created with
NTATAG_RESPONSE_CALLBACK() or a response callback can be later bound to the
leg with nta_leg_bind_response().
This is practically useful only with 200 OK responses to the INVITE that are
retransmitted by the UAS. By default, the retransmission are catched by the
ACK transaction (which then retransmits the ACK request message). However,
after ACK transaction times out, the retransmitted 200 OK indicates most
probably that the ACK request messages do not reach UAS.
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (6/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 07:00:10 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: disabled nta_msg_ackbye(). Fix for sf.net bug #1750691
Thanks for Mikhail Zabaluev for reporting this bug.
Shall I pull this patch? (7/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 06:54:38 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1750691
Shall I pull this patch? (8/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 07:03:45 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for nua_bye() sending CANCEL
Shall I pull this patch? (9/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 31 12:08:09 EDT 2007 Pekka.Pessi@nokia.com
* url.c: fixed escaping of '/' %2F, ';' %3B and '=' %3D in URL path/params
Thanks for Fabio Margarido for reporting this bug.
Shall I pull this patch? (10/43) [ynWvpxqadjk], or ? for help: y
Mon Sep 3 10:14:55 EDT 2007 Pekka.Pessi@nokia.com
* url.c: do not un-escape %40 in URI parameters.
Do not unescape %2C, %3B, %3D, or %40 in URI parameters, nor
%2C, %2F, %3B, %3D, or %40 in URI path.
The @ sign can be ambiguous in the SIP URL, e.g.,
<sip:test.info;p=value@test.com>
can be parsed in two ways:
1) username contains test.info;param=value and host part has test.com
2) empty username, host part test.info, URI parameter p=value@test.com
Previously Sofia URL parser converted escaped '@' at signs (%40) in the URI
parameters to the unescaped form. The resulting URI could be ambiguous and
sometimes fail the syntax check if there was no '@' sign before the
unescaped one.
Thanks for Jan van den Bosch and Mikhail Zabaluev for reporting this bug.
Shall I pull this patch? (11/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 04:59:57 EDT 2007 Pekka.Pessi@nokia.com
* tport.c: fixed indenting, logging
Shall I pull this patch? (12/43) [ynWvpxqadjk], or ? for help: y
Fri Jul 13 12:47:33 EDT 2007 Pekka.Pessi@nokia.com
* nua/test_proxy.h, nua/test_proxy.c: added support for multiple domains
Each domain has its own registrar and authentication module.
Shall I pull this patch? (13/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:19:33 EDT 2007 Pekka.Pessi@nokia.com
* test_ops.c: added timestamp to event logging
Shall I pull this patch? (14/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:20:12 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: fixed timing problems in testing.
Shall I pull this patch? (15/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:31:04 EDT 2007 Pekka.Pessi@nokia.com
* test_ops.c: reduce su_root_step() delay to 0.1 seconds
Shall I pull this patch? (16/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:31:22 EDT 2007 Pekka.Pessi@nokia.com
* test_register.c: fixed timing problem
Shall I pull this patch? (17/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 17:03:46 EDT 2007 Pekka.Pessi@nokia.com
* test_100rel.c: fixed timing problems resulting in events being reordered
Shall I pull this patch? (18/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:40:53 EDT 2007 Pekka.Pessi@nokia.com
* nua (test_init.c, test_register.c): using test_proxy domains
Shall I pull this patch? (19/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 12:12:32 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: added cleanup code
Shall I pull this patch? (20/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:35:35 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: increase lifetime of ACK transaction from T4 to T1 x 64
nta.c creates a ACK transaction in order to restransmit ACK requests when
ever a retransmitted 2XX response to INVITE is received. The UAS retransmits
the 2XX responses for 64 x T1 (32 second by default).
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (21/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 10:21:04 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: generating libsofia-sip-ua/docs/Doxyfile.rfc before making manpages
Shall I pull this patch? (22/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:05:33 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: added TPTAG_KEEPALIVE(), TPTAG_PINGPONG(), TPTAG_PONG2PING()
Shall I pull this patch? (23/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:09:06 EDT 2007 Pekka.Pessi@nokia.com
* tport: added ping-pong keepalive on TCP. replaced single tick with connection-specific timer
Now detecting closed connections on TLS, too.
Added tests for idle timeout, receive timeout, ping-pong timeout.
Shall I pull this patch? (24/43) [ynWvpxqadjk], or ? for help: y
Fri Jul 6 10:19:32 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: added nta_incoming_received()
Shall I pull this patch? (25/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:29:56 EDT 2007 Pekka.Pessi@nokia.com
* nua_session.c: delay transition to ready when O/A is incomplete
Delay sending ACK and subsequent transition of call to the ready state when
the 200 OK response to the INVITE is received if the SDP Offer/Answer
exchange using UPDATE/PRACK was still incomplete.
Previously, if the O/A using UPDATE or PRACK was incomplete and an 200 OK
was received, the call setup logic regarded this as a fatal error and
terminated the call.
Thanks for Mike Jerris for detecting and reporting this bug.
Shall I pull this patch? (26/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:22:46 EDT 2007 Pekka.Pessi@nokia.com
* test_call_reject.c: testing Retry-After
Shall I pull this patch? (27/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:42:51 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: using rudimentary outbound support in B's proxy.
Shall I pull this patch? (28/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:48:33 EDT 2007 Pekka.Pessi@nokia.com
* nua_register.c: added some logging to nua_register_connection_closed()
Shall I pull this patch? (29/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:43:57 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: using AUTHTAG_MAX_NCOUNT(1) for Mr. C
C is now challenged every time.
Shall I pull this patch? (30/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 11:05:19 EDT 2007 Pekka.Pessi@nokia.com
* nua/test_100rel.c: fixed timing problem re response to PRACK and ACK
Shall I pull this patch? (31/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 06:02:50 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* DIST_SUBDIRS must include everything unconditionally
Shall I pull this patch? (32/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 13:53:04 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: silenced warnings
Shall I pull this patch? (33/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 16:59:48 EDT 2007 Pekka.Pessi@nokia.com
* nua: refactored dialog refresh code
Shall I pull this patch? (34/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 16:59:48 EDT 2007 Pekka.Pessi@nokia.com
UNDO: nua: refactored dialog refresh code
Shall I pull this patch? (35/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:01:25 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.[hc]: renamed functions setting refresh interval
Shall I pull this patch? (36/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:15:03 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.[hc], nua_stack.c: added nua_dialog_repeat_shutdown()
Shall I pull this patch? (37/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:19:20 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.h: renamed nua_remote_t as nua_dialog_peer_info_t
Shall I pull this patch? (38/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:23:04 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack.c: added timer to client request in order to implement Retry-After
Shall I pull this patch? (39/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:33:53 EDT 2007 Pekka.Pessi@nokia.com
* nua: added backpointers to nua_dialog_usage_t and nua_dialog_state_t
Shall I pull this patch? (40/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 13:56:48 EDT 2007 Pekka.Pessi@nokia.com
* test_nua.c: abort() in timeout alarm function if -a is given
Shall I pull this patch? (41/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 17:13:18 EDT 2007 Pekka.Pessi@nokia.com
* nua_subnotref.c: include SIPTAG_EVENT() in the nua_i_notify tag list
Shall I pull this patch? (42/43) [ynWvpxqadjk], or ? for help: y
Mon Sep 10 12:27:53 EDT 2007 Pekka.Pessi@nokia.com
* nua: save Contact from target refresh request or response.
Save the Contact header which the application has added to the target
refresh requests or responses and use the saved contact in subsequent target
refresh requests or responses.
Previously the application had no way of specifying the Contact included in
the automatic responses to target refresh requests.
Thanks for Anthony Minessale for reporting this problem.
Shall I pull this patch? (43/43) [ynWvpxqadjk], or ? for help: y
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5692 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-09-10 20:45:25 +00:00
|
|
|
In libsofia-sip-ua, there are subdirectories for different modules listed
|
|
|
|
below.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
Merge up to the most recent sofia-sip darcs tree. Includes the following patches from darcs:
Tue Aug 21 09:38:59 EDT 2007 Pekka.Pessi@nokia.com
* tport_type_udp.c: checking error while checking that MSG_TRUNC works.
Shall I pull this patch? (1/43) [ynWvpxqadjk], or ? for help: y
Tue Aug 21 10:49:33 EDT 2007 Pekka.Pessi@nokia.com
* nua_params.c: NUTAG_SIPS_URL() now sets the handle target, too.
Problem reported by Jari Tenhunen.
Shall I pull this patch? (2/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 11:22:42 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: do not destroy INVITE transaction if it has been CANCELed
Handle gracefully cases where the INVITE transaction is destroyed
immediately after canceling it. The old behaviour was to left it up to the
application to ACK the final response returned to INVITE.
Thanks for Fabio Margarido for reporting this problem.
Shall I pull this patch? (3/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 13:02:01 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: added test with user SDP containing already rejected media
Shall I pull this patch? (4/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:41:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: added option for processing orphan responses matching with a dialog
The orphan responses matching with the dialog can now be processed by the
response callback.The dialog leg can be created with
NTATAG_RESPONSE_CALLBACK() or a response callback can be later bound to the
leg with nta_leg_bind_response().
This is practically useful only with 200 OK responses to the INVITE that are
retransmitted by the UAS. By default, the retransmission are catched by the
ACK transaction (which then retransmits the ACK request message). However,
after ACK transaction times out, the retransmitted 200 OK indicates most
probably that the ACK request messages do not reach UAS.
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (5/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:41:20 EDT 2007 Pekka.Pessi@nokia.com
UNDO: nta: added option for processing orphan responses matching with a dialog
The orphan responses matching with the dialog can now be processed by the
response callback.The dialog leg can be created with
NTATAG_RESPONSE_CALLBACK() or a response callback can be later bound to the
leg with nta_leg_bind_response().
This is practically useful only with 200 OK responses to the INVITE that are
retransmitted by the UAS. By default, the retransmission are catched by the
ACK transaction (which then retransmits the ACK request message). However,
after ACK transaction times out, the retransmitted 200 OK indicates most
probably that the ACK request messages do not reach UAS.
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (6/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 07:00:10 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: disabled nta_msg_ackbye(). Fix for sf.net bug #1750691
Thanks for Mikhail Zabaluev for reporting this bug.
Shall I pull this patch? (7/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 06:54:38 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1750691
Shall I pull this patch? (8/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 30 07:03:45 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for nua_bye() sending CANCEL
Shall I pull this patch? (9/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 31 12:08:09 EDT 2007 Pekka.Pessi@nokia.com
* url.c: fixed escaping of '/' %2F, ';' %3B and '=' %3D in URL path/params
Thanks for Fabio Margarido for reporting this bug.
Shall I pull this patch? (10/43) [ynWvpxqadjk], or ? for help: y
Mon Sep 3 10:14:55 EDT 2007 Pekka.Pessi@nokia.com
* url.c: do not un-escape %40 in URI parameters.
Do not unescape %2C, %3B, %3D, or %40 in URI parameters, nor
%2C, %2F, %3B, %3D, or %40 in URI path.
The @ sign can be ambiguous in the SIP URL, e.g.,
<sip:test.info;p=value@test.com>
can be parsed in two ways:
1) username contains test.info;param=value and host part has test.com
2) empty username, host part test.info, URI parameter p=value@test.com
Previously Sofia URL parser converted escaped '@' at signs (%40) in the URI
parameters to the unescaped form. The resulting URI could be ambiguous and
sometimes fail the syntax check if there was no '@' sign before the
unescaped one.
Thanks for Jan van den Bosch and Mikhail Zabaluev for reporting this bug.
Shall I pull this patch? (11/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 04:59:57 EDT 2007 Pekka.Pessi@nokia.com
* tport.c: fixed indenting, logging
Shall I pull this patch? (12/43) [ynWvpxqadjk], or ? for help: y
Fri Jul 13 12:47:33 EDT 2007 Pekka.Pessi@nokia.com
* nua/test_proxy.h, nua/test_proxy.c: added support for multiple domains
Each domain has its own registrar and authentication module.
Shall I pull this patch? (13/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:19:33 EDT 2007 Pekka.Pessi@nokia.com
* test_ops.c: added timestamp to event logging
Shall I pull this patch? (14/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:20:12 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: fixed timing problems in testing.
Shall I pull this patch? (15/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:31:04 EDT 2007 Pekka.Pessi@nokia.com
* test_ops.c: reduce su_root_step() delay to 0.1 seconds
Shall I pull this patch? (16/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:31:22 EDT 2007 Pekka.Pessi@nokia.com
* test_register.c: fixed timing problem
Shall I pull this patch? (17/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 17:03:46 EDT 2007 Pekka.Pessi@nokia.com
* test_100rel.c: fixed timing problems resulting in events being reordered
Shall I pull this patch? (18/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:40:53 EDT 2007 Pekka.Pessi@nokia.com
* nua (test_init.c, test_register.c): using test_proxy domains
Shall I pull this patch? (19/43) [ynWvpxqadjk], or ? for help: y
Thu Aug 23 12:12:32 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: added cleanup code
Shall I pull this patch? (20/43) [ynWvpxqadjk], or ? for help: y
Fri Aug 24 09:35:35 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: increase lifetime of ACK transaction from T4 to T1 x 64
nta.c creates a ACK transaction in order to restransmit ACK requests when
ever a retransmitted 2XX response to INVITE is received. The UAS retransmits
the 2XX responses for 64 x T1 (32 second by default).
Partially fixes the sf.net bug #1750691 reported by Mikhail Zabaluev.
Shall I pull this patch? (21/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 10:21:04 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: generating libsofia-sip-ua/docs/Doxyfile.rfc before making manpages
Shall I pull this patch? (22/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:05:33 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: added TPTAG_KEEPALIVE(), TPTAG_PINGPONG(), TPTAG_PONG2PING()
Shall I pull this patch? (23/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:09:06 EDT 2007 Pekka.Pessi@nokia.com
* tport: added ping-pong keepalive on TCP. replaced single tick with connection-specific timer
Now detecting closed connections on TLS, too.
Added tests for idle timeout, receive timeout, ping-pong timeout.
Shall I pull this patch? (24/43) [ynWvpxqadjk], or ? for help: y
Fri Jul 6 10:19:32 EDT 2007 Pekka.Pessi@nokia.com
* nta.c: added nta_incoming_received()
Shall I pull this patch? (25/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 11:29:56 EDT 2007 Pekka.Pessi@nokia.com
* nua_session.c: delay transition to ready when O/A is incomplete
Delay sending ACK and subsequent transition of call to the ready state when
the 200 OK response to the INVITE is received if the SDP Offer/Answer
exchange using UPDATE/PRACK was still incomplete.
Previously, if the O/A using UPDATE or PRACK was incomplete and an 200 OK
was received, the call setup logic regarded this as a fatal error and
terminated the call.
Thanks for Mike Jerris for detecting and reporting this bug.
Shall I pull this patch? (26/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:22:46 EDT 2007 Pekka.Pessi@nokia.com
* test_call_reject.c: testing Retry-After
Shall I pull this patch? (27/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:42:51 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: using rudimentary outbound support in B's proxy.
Shall I pull this patch? (28/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:48:33 EDT 2007 Pekka.Pessi@nokia.com
* nua_register.c: added some logging to nua_register_connection_closed()
Shall I pull this patch? (29/43) [ynWvpxqadjk], or ? for help: y
Wed Jul 25 12:43:57 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: using AUTHTAG_MAX_NCOUNT(1) for Mr. C
C is now challenged every time.
Shall I pull this patch? (30/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 11:05:19 EDT 2007 Pekka.Pessi@nokia.com
* nua/test_100rel.c: fixed timing problem re response to PRACK and ACK
Shall I pull this patch? (31/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 06:02:50 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* DIST_SUBDIRS must include everything unconditionally
Shall I pull this patch? (32/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 13:53:04 EDT 2007 Pekka.Pessi@nokia.com
* test_soa.c: silenced warnings
Shall I pull this patch? (33/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 16:59:48 EDT 2007 Pekka.Pessi@nokia.com
* nua: refactored dialog refresh code
Shall I pull this patch? (34/43) [ynWvpxqadjk], or ? for help: y
Mon Jul 23 16:59:48 EDT 2007 Pekka.Pessi@nokia.com
UNDO: nua: refactored dialog refresh code
Shall I pull this patch? (35/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:01:25 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.[hc]: renamed functions setting refresh interval
Shall I pull this patch? (36/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:15:03 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.[hc], nua_stack.c: added nua_dialog_repeat_shutdown()
Shall I pull this patch? (37/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:19:20 EDT 2007 Pekka.Pessi@nokia.com
* nua_dialog.h: renamed nua_remote_t as nua_dialog_peer_info_t
Shall I pull this patch? (38/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:23:04 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack.c: added timer to client request in order to implement Retry-After
Shall I pull this patch? (39/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 12:33:53 EDT 2007 Pekka.Pessi@nokia.com
* nua: added backpointers to nua_dialog_usage_t and nua_dialog_state_t
Shall I pull this patch? (40/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 13:56:48 EDT 2007 Pekka.Pessi@nokia.com
* test_nua.c: abort() in timeout alarm function if -a is given
Shall I pull this patch? (41/43) [ynWvpxqadjk], or ? for help: y
Thu Sep 6 17:13:18 EDT 2007 Pekka.Pessi@nokia.com
* nua_subnotref.c: include SIPTAG_EVENT() in the nua_i_notify tag list
Shall I pull this patch? (42/43) [ynWvpxqadjk], or ? for help: y
Mon Sep 10 12:27:53 EDT 2007 Pekka.Pessi@nokia.com
* nua: save Contact from target refresh request or response.
Save the Contact header which the application has added to the target
refresh requests or responses and use the saved contact in subsequent target
refresh requests or responses.
Previously the application had no way of specifying the Contact included in
the automatic responses to target refresh requests.
Thanks for Anthony Minessale for reporting this problem.
Shall I pull this patch? (43/43) [ynWvpxqadjk], or ? for help: y
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5692 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-09-10 20:45:25 +00:00
|
|
|
Terminal and high-level libraries used for both signaling and media:
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
Common runtime library:
|
|
|
|
- <a href="su/index.html">"su" - sockets, memory management, threads</a>
|
|
|
|
- <a href="sresolv/index.html">"sresolv" - Asynchronous DNS resolver</a>
|
|
|
|
- <a href="ipt/index.html">"ipt" - IPT utility library</a>
|
|
|
|
|
|
|
|
SIP Signaling:
|
|
|
|
- <a href="nua/index.html">"nua" - SIP User Agent library</a>
|
|
|
|
- <a href="nea/index.html">"nea" - SIP Event API</a>
|
2008-12-16 18:05:22 +00:00
|
|
|
- <a href="iptsec/index.html">"iptsec" -
|
2006-12-21 06:30:28 +00:00
|
|
|
Digest authentication for HTTP and SIP</a>
|
|
|
|
- <a href="nta/index.html">"nta" - SIP transaction engine</a>
|
|
|
|
- <a href="tport/index.html">"tport" - Message transport</a>
|
|
|
|
- <a href="sip/index.html">"sip" - SIP messages and headers</a>
|
|
|
|
- <a href="msg/index.html">"msg" - Message handling </a>
|
|
|
|
- <a href="url/index.html">"url" - URL handling</a>
|
|
|
|
- <a href="bnf/index.html">"url" - low level parsing</a>
|
|
|
|
|
|
|
|
HTTP subsystem:
|
|
|
|
- <a href="nth/index.html">"nth" - HTTP protocol engine</a>
|
|
|
|
- <a href="http/index.html">"http" - HTTP messages and headers</a>
|
|
|
|
|
|
|
|
SDP processing:
|
|
|
|
- <a href="soa/index.html">"soa" - SDP Offer/Answer engine for SIP</a>
|
|
|
|
- <a href="sdp/index.html">"sdp" - SDP parser</a>
|
|
|
|
|
|
|
|
Other:
|
|
|
|
- <a href="stun/index.html">"stun" - STUN library</a>
|
|
|
|
|
|
|
|
Features provided by Sofia-SIP library:
|
|
|
|
- <a href="features/index.html">"features" - Features provided by Sofia SIP</a>
|
|
|
|
|
|
|
|
Documentation:
|
|
|
|
- "docs" - Doxygen reference documentation
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
@page styleguide C Style Guide
|
|
|
|
|
|
|
|
This document gives general guidelines on generic C style and code
|
|
|
|
formatting within Sofia-SIP. The guidelines include identifier naming
|
|
|
|
conventions, indenting convention, and tool usage directions.
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
Please note that C style is always a matter of taste.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@section naming Naming Conventions
|
|
|
|
|
|
|
|
Generally, identifiers within each module are prefixed with the name of
|
|
|
|
that module. For instance, the functions within http parser module @b http
|
|
|
|
have prefix @c http_. Identifiers composed of multiple words have an
|
|
|
|
underscore "_" between the words, the words themselves are in lower
|
|
|
|
case. For instance, http_request_create().
|
|
|
|
|
|
|
|
Macros should be in upper case. File names should be in lower case using
|
|
|
|
underscore as delimiter if needed.
|
|
|
|
|
|
|
|
Normal typedefs have suffix @c _t, however, function types have suffix @c
|
|
|
|
_f. The enum names also sometimes have @c _e, struct names have @c _s and
|
|
|
|
union names @c _u.
|
|
|
|
|
|
|
|
It is recommended that type itself is typedef'ed, not a pointer to the
|
|
|
|
type. It should be clear from variable declaration if the variable is a
|
|
|
|
pointer or not.
|
|
|
|
|
|
|
|
@code
|
|
|
|
typedef struct foo_s foo_t;
|
|
|
|
typedef int f_fun(foo_t *f, char const *s);
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
Struct and union members should have common prefix. For instance,
|
|
|
|
@code
|
|
|
|
struct foo_s {
|
|
|
|
int f_len;
|
|
|
|
char *f_name;
|
|
|
|
fun_f *f_fun;
|
|
|
|
};
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
This prefix makes it easier to find where members are used.
|
|
|
|
|
|
|
|
@section formatting Indenting and Formatting code
|
|
|
|
|
|
|
|
Indentation in Sofia-SIP C code generally follows the @e K&R style with indent
|
|
|
|
of 2 characters (so you can use the default "GNU" c-style in Emacs). The
|
|
|
|
maximum line length should be 80 characters.
|
|
|
|
|
|
|
|
For example,
|
|
|
|
|
|
|
|
@code
|
|
|
|
void kluge(int foo)
|
|
|
|
{
|
|
|
|
if (foo) {
|
|
|
|
bar();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
switch (baz()) {
|
|
|
|
case a:
|
|
|
|
eeny();
|
|
|
|
break;
|
|
|
|
case b:
|
|
|
|
meeny();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
moe();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
The default indentation can be achieved with GNU indent with options
|
|
|
|
@code
|
|
|
|
-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci2 -cli0 -cp33 -cs
|
|
|
|
-d0 -di1 -nfc1 -nfca -hnl -i2 -ip0 -l79 -lp -npcs -nprs -npsl -saf -sai
|
|
|
|
-saw -nsc -nsob -nss
|
|
|
|
@endcode
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
Loops without condition use @c for @c (;;) instead of @c while @c (1).
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@code
|
|
|
|
for (;;) {
|
|
|
|
foo();
|
|
|
|
if (bar())
|
|
|
|
break;
|
|
|
|
baz();
|
|
|
|
}
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
There should be whitespace on both sides of infix operators, except
|
|
|
|
<code>.</code> or <code>-></code>, which require no space, or
|
|
|
|
<code>,</code> (comma) which requires space only after). There should be
|
|
|
|
whitespace between a keyword and parenthesis following it, but no
|
|
|
|
whitespace between an identifier and parenthesis following it. E.g.,
|
|
|
|
|
|
|
|
@code
|
|
|
|
while (i++ < n)
|
|
|
|
baz();
|
|
|
|
for (;;) {
|
|
|
|
x->x_foo();
|
|
|
|
if (bar())
|
|
|
|
break;
|
|
|
|
z.z_baz++;
|
|
|
|
}
|
|
|
|
return (13 * i);
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
@page programming Programming Guide
|
|
|
|
|
|
|
|
@section porting Writing Portable Code
|
|
|
|
|
|
|
|
Most of Sofia-SIP software is written as portable. All core modules are
|
|
|
|
(or at least should be) written in ANSI C 89 with some ANSI C 99
|
|
|
|
features. If there are platform specific parts, they are collected to
|
|
|
|
separate C files and isolated from the rest of the software with a
|
|
|
|
wrapper interface.
|
|
|
|
|
|
|
|
SU module handles abstraction to OS specific functionality such as
|
2008-12-16 18:05:22 +00:00
|
|
|
memory management, sockets, threads and time functions.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@subsection ansi_99 ANSI C 99 features
|
|
|
|
|
|
|
|
The following ANSI C 99 features are to be used in Sofia-SIP software:
|
|
|
|
- Integer types
|
|
|
|
- functions va_copy() and snprintf()
|
|
|
|
|
|
|
|
The following ANSI C 99 features shall not be used in Sofia-SIP software:
|
|
|
|
- definition of a variable in the middle of function code.
|
|
|
|
(so always define your variables in the beginning of the block)
|
|
|
|
|
|
|
|
@subsection port_ints Integer Types
|
|
|
|
|
|
|
|
As you should know, the length of native storage size depends on hardware,
|
|
|
|
OS and compiler. This means in practice that the length of int or long is
|
|
|
|
not necessarily 32 bits. As a consequence, you need to make sure that the
|
|
|
|
value you intend to store in the int, can actually fit in int on different
|
|
|
|
platforms. As a rule of thumb, if the integer value can exceed 8 bits, you
|
|
|
|
should use types that have a defined length.
|
|
|
|
|
|
|
|
Nevertheless its OK to use native integer types if you bear in mind
|
|
|
|
what was said above. The original reason for having only native
|
|
|
|
data type was performance. The int type is always stored in the
|
|
|
|
fastest (and usually biggest size) possible.
|
|
|
|
|
|
|
|
Never assume anything on the length of the type. Alway use sizeof()
|
|
|
|
operator to find out the length.
|
|
|
|
|
|
|
|
C 99 standard defines the following fixed length data types:
|
|
|
|
|
|
|
|
- int64_t
|
|
|
|
- uint64_t
|
|
|
|
- int32_t
|
|
|
|
- uint32_t
|
|
|
|
- int16_t
|
|
|
|
- uint16_t
|
|
|
|
- int8_t
|
|
|
|
- uint8_t
|
|
|
|
|
Sync to current darcs tree:
Mon Sep 17 14:50:04 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/sip_util.h: updated documentation
Mon Sep 17 14:50:18 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: updated documentation
Mon Sep 17 14:50:28 EDT 2007 Pekka.Pessi@nokia.com
* soa_tag.c: updated documentation
Wed Sep 19 12:50:01 EDT 2007 Pekka.Pessi@nokia.com
* msg: updated documentation
Wed Sep 19 13:29:50 EDT 2007 Pekka.Pessi@nokia.com
* url: updated documentation
Wed Sep 19 13:32:14 EDT 2007 Pekka.Pessi@nokia.com
* nth: updated documentation
Wed Sep 19 13:32:27 EDT 2007 Pekka.Pessi@nokia.com
* nea: updated documentation
Wed Sep 19 13:33:36 EDT 2007 Pekka.Pessi@nokia.com
* http: updated documentation
Wed Sep 19 13:36:58 EDT 2007 Pekka.Pessi@nokia.com
* bnf: updated documentation
Wed Sep 19 13:38:58 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated nua_stack_init_handle() prototype
Wed Sep 19 18:45:56 EDT 2007 Pekka.Pessi@nokia.com
* sip: added sip_name_addr_xtra(), sip_name_addr_dup()
Wed Sep 19 19:00:19 EDT 2007 Pekka.Pessi@nokia.com
* sip_basic.c: cleaned old crud
Thu Sep 20 13:34:04 EDT 2007 Pekka.Pessi@nokia.com
* iptsec: updated documentation
Thu Sep 20 13:36:22 EDT 2007 Pekka.Pessi@nokia.com
* tport: updated documentation
Thu Sep 20 13:36:56 EDT 2007 Pekka.Pessi@nokia.com
* su: updated documentation
Removed internal files from doxygen-generated documentation.
Thu Sep 20 13:38:29 EDT 2007 Pekka.Pessi@nokia.com
* soa: fixed documentation
Thu Sep 20 13:39:56 EDT 2007 Pekka.Pessi@nokia.com
* sdp: updated documentation
Thu Sep 20 13:40:16 EDT 2007 Pekka.Pessi@nokia.com
* ipt: updated documentation
Thu Sep 20 14:24:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: updated documentation
Thu Sep 20 14:41:04 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated documentation
Updated tag documentation.
Moved doxygen doc entries from sofia-sip/nua_tag.h to nua_tag.c.
Removed internal datatypes and files from the generated documents.
Wed Sep 19 13:34:20 EDT 2007 Pekka.Pessi@nokia.com
* docs: updated the generation of documentation. Updated links to header files.
Thu Sep 20 08:45:32 EDT 2007 Pekka.Pessi@nokia.com
* sip/Makefile.am: added tags to <sofia-sip/sip_extra.h>
Added check for extra tags in torture_sip.c.
Thu Sep 20 14:45:22 EDT 2007 Pekka.Pessi@nokia.com
* stun: updated documentation
Wed Jul 4 18:55:20 EDT 2007 Pekka.Pessi@nokia.com
* torture_heap.c: added tests for ##sort() and su_smoothsort()
Wed Jul 4 18:56:59 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: added smoothsort.c
Fri Jul 13 12:38:44 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: heap_remove() now set()s index to 0 on removed item
Mon Jul 23 11:14:22 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: fixed bug in heap##remove()
If left kid was in heap but right was not, left kid was ignored.
Wed Jul 4 18:51:08 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Jul 4 18:51:34 EDT 2007 Pekka.Pessi@nokia.com
* heap.h: using su_smoothsort()
Fri Jul 6 10:20:27 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Sep 19 17:40:30 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: generate two parser tables, default and extended
Wed Sep 19 18:39:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: just generate list of extra headers
Allocate extended parser dynamically.
Wed Sep 19 18:59:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: added Remote-Party-ID, P-Asserted-Identity, P-Preferred-Identity
Added functions sip_update_default_mclass() and sip_extend_mclass()
for handling the extended parser. Note that Reply-To and Alert-Info are only
available with the extended parser.
Wed Sep 19 19:05:44 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Thu Sep 20 13:38:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: updated documentation
Thu Sep 20 14:17:28 EDT 2007 Pekka.Pessi@nokia.com
* docs/conformance.docs: updated
Mon Oct 1 10:11:14 EDT 2007 Pekka.Pessi@nokia.com
* tport_tag.c: re-enabled tptag_trusted
Thu Oct 4 09:21:07 EDT 2007 Pekka.Pessi@nokia.com
* su_osx_runloop.c: moved virtual function table after struct definition
Preparing for su_port_vtable_t refactoring.
Thu Oct 4 10:22:03 EDT 2007 Pekka.Pessi@nokia.com
* su_source.c: refactored initialization/deinitialization
Fri Oct 5 04:58:18 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* sip_extra.c: fixed prototypes with isize_t
Fri Oct 5 04:58:45 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nta_api.c: removed warnings about signedness
Fri Oct 5 04:59:02 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nua_params.c: removed warnings about constness
Fri Oct 5 07:20:26 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h, su_root.c: cleaned argument checking
The su_root_*() and su_port_*() functions now check their arguments once
and do not assert() with NULL arguments. The sur_task->sut_port should
always be valid while su_root_t is alive.
Fri Oct 5 07:22:09 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su: added su_root_obtain(), su_root_release() and su_root_has_thread()
When root is created with su_root_create() or cloned with su_clone_start(),
the resulting root is obtained by the calling or created thread,
respectively.
The root can be released with su_root_release() and another thread can
obtain it.
The function su_root_has_thread() can be used to check if a thread has
obtained or released the root.
Implementation upgraded the su_port_own_thread() method as su_port_thread().
Fri Oct 5 07:28:10 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h: removed su_port_threadsafe() and su_port_yield() methods
su_port_wait_events() replaces su_port_yield().
Fri Oct 5 13:26:04 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* msg_parser.awk: not extending header structure unless needed.
Removed gawk-ish /* comments */.
Fri Oct 5 14:32:25 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* run_test_su: removed GNUisms
Fri Oct 5 14:32:47 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* Makefile.am: removed implicit check target test_urlmap
Fri Oct 5 14:22:32 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* torture_sresolv.c: use CLOCK_REALTIME if no CLOCK_PROCESS_CPUTIME_ID available
Casting timespec tv_sec to unsigned long.
Fri Oct * nua_s added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 08:15:23 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated.
Mon Oct 8 09:30:36 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack: added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 10:26:31 EDT 2007 Pekka.Pessi@nokia.com
* nua: added test for nua_prack() (sf.net bug #1804248)
Avoid sending nua_i_state after nua_prack() if no SDP O/A is happening, too.
Mon Oct 8 10:32:04 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* su_source.c: don t leak the wait arrays
Mon Oct 8 10:37:11 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Wed Oct 10 11:55:21 EDT 2007 Pekka.Pessi@nokia.com
* sip_parser.c: silenced warning about extra const in sip_extend_mclass()
Wed Oct 10 11:57:08 EDT 2007 Pekka.Pessi@nokia.com
* nta_tag.c: updated tag documentation
Wed Oct 10 13:16:40 EDT 2007 Pekka.Pessi@nokia.com
* nua: fix logging crash if outbound used with application contact
Silenced warnings.
Wed Oct 10 13:30:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: removed extra "const"
Wed Oct 10 13:31:45 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am's: fixed distclean of documentation
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5840 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-10-11 14:16:59 +00:00
|
|
|
To use these data types you must include the <sofia-sip/su_types.h> header, which
|
2006-12-21 06:30:28 +00:00
|
|
|
takes care of including correct file. If @b su includes are not available,
|
|
|
|
you must include the following code segment to each file where you plan to
|
|
|
|
use them:
|
|
|
|
|
|
|
|
@code
|
|
|
|
#if HAVE_STDINT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#elif HAVE_INTTYPES_H
|
|
|
|
#include <inttypes.h>
|
|
|
|
#else
|
|
|
|
#error Define HAVE_STDINT_H as 1 if you have <stdint.h>, \
|
|
|
|
or HAVE_INTTYPES_H if you have <inttypes.h>
|
|
|
|
#endif
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
@subsection port_byte_sex Byte order
|
|
|
|
|
|
|
|
The host byte order on different platforms vary. When you do only
|
|
|
|
local processing, need not to worry about the byte order. But as
|
|
|
|
soon as you start writing code that send or receives anything to
|
|
|
|
the network, you need to start worrying.
|
|
|
|
|
|
|
|
If you wish to convert the byte order, it is simply done by calling
|
|
|
|
one the following functions:
|
|
|
|
|
|
|
|
The htonl() function converts the unsigned integer hostlong from
|
|
|
|
host byte order to network byte order.
|
|
|
|
|
|
|
|
The htons() function converts the unsigned short integer hostshort
|
|
|
|
from host byte order to network byte order.
|
|
|
|
|
|
|
|
The ntohl() function converts the unsigned integer netlong from
|
|
|
|
network byte order to host byte order.
|
|
|
|
|
|
|
|
The ntohs() function converts the unsigned short integer netshort
|
|
|
|
from network byte order to host byte order.
|
|
|
|
|
Sync to current darcs tree:
Mon Sep 17 14:50:04 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/sip_util.h: updated documentation
Mon Sep 17 14:50:18 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: updated documentation
Mon Sep 17 14:50:28 EDT 2007 Pekka.Pessi@nokia.com
* soa_tag.c: updated documentation
Wed Sep 19 12:50:01 EDT 2007 Pekka.Pessi@nokia.com
* msg: updated documentation
Wed Sep 19 13:29:50 EDT 2007 Pekka.Pessi@nokia.com
* url: updated documentation
Wed Sep 19 13:32:14 EDT 2007 Pekka.Pessi@nokia.com
* nth: updated documentation
Wed Sep 19 13:32:27 EDT 2007 Pekka.Pessi@nokia.com
* nea: updated documentation
Wed Sep 19 13:33:36 EDT 2007 Pekka.Pessi@nokia.com
* http: updated documentation
Wed Sep 19 13:36:58 EDT 2007 Pekka.Pessi@nokia.com
* bnf: updated documentation
Wed Sep 19 13:38:58 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated nua_stack_init_handle() prototype
Wed Sep 19 18:45:56 EDT 2007 Pekka.Pessi@nokia.com
* sip: added sip_name_addr_xtra(), sip_name_addr_dup()
Wed Sep 19 19:00:19 EDT 2007 Pekka.Pessi@nokia.com
* sip_basic.c: cleaned old crud
Thu Sep 20 13:34:04 EDT 2007 Pekka.Pessi@nokia.com
* iptsec: updated documentation
Thu Sep 20 13:36:22 EDT 2007 Pekka.Pessi@nokia.com
* tport: updated documentation
Thu Sep 20 13:36:56 EDT 2007 Pekka.Pessi@nokia.com
* su: updated documentation
Removed internal files from doxygen-generated documentation.
Thu Sep 20 13:38:29 EDT 2007 Pekka.Pessi@nokia.com
* soa: fixed documentation
Thu Sep 20 13:39:56 EDT 2007 Pekka.Pessi@nokia.com
* sdp: updated documentation
Thu Sep 20 13:40:16 EDT 2007 Pekka.Pessi@nokia.com
* ipt: updated documentation
Thu Sep 20 14:24:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: updated documentation
Thu Sep 20 14:41:04 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated documentation
Updated tag documentation.
Moved doxygen doc entries from sofia-sip/nua_tag.h to nua_tag.c.
Removed internal datatypes and files from the generated documents.
Wed Sep 19 13:34:20 EDT 2007 Pekka.Pessi@nokia.com
* docs: updated the generation of documentation. Updated links to header files.
Thu Sep 20 08:45:32 EDT 2007 Pekka.Pessi@nokia.com
* sip/Makefile.am: added tags to <sofia-sip/sip_extra.h>
Added check for extra tags in torture_sip.c.
Thu Sep 20 14:45:22 EDT 2007 Pekka.Pessi@nokia.com
* stun: updated documentation
Wed Jul 4 18:55:20 EDT 2007 Pekka.Pessi@nokia.com
* torture_heap.c: added tests for ##sort() and su_smoothsort()
Wed Jul 4 18:56:59 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: added smoothsort.c
Fri Jul 13 12:38:44 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: heap_remove() now set()s index to 0 on removed item
Mon Jul 23 11:14:22 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: fixed bug in heap##remove()
If left kid was in heap but right was not, left kid was ignored.
Wed Jul 4 18:51:08 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Jul 4 18:51:34 EDT 2007 Pekka.Pessi@nokia.com
* heap.h: using su_smoothsort()
Fri Jul 6 10:20:27 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Sep 19 17:40:30 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: generate two parser tables, default and extended
Wed Sep 19 18:39:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: just generate list of extra headers
Allocate extended parser dynamically.
Wed Sep 19 18:59:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: added Remote-Party-ID, P-Asserted-Identity, P-Preferred-Identity
Added functions sip_update_default_mclass() and sip_extend_mclass()
for handling the extended parser. Note that Reply-To and Alert-Info are only
available with the extended parser.
Wed Sep 19 19:05:44 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Thu Sep 20 13:38:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: updated documentation
Thu Sep 20 14:17:28 EDT 2007 Pekka.Pessi@nokia.com
* docs/conformance.docs: updated
Mon Oct 1 10:11:14 EDT 2007 Pekka.Pessi@nokia.com
* tport_tag.c: re-enabled tptag_trusted
Thu Oct 4 09:21:07 EDT 2007 Pekka.Pessi@nokia.com
* su_osx_runloop.c: moved virtual function table after struct definition
Preparing for su_port_vtable_t refactoring.
Thu Oct 4 10:22:03 EDT 2007 Pekka.Pessi@nokia.com
* su_source.c: refactored initialization/deinitialization
Fri Oct 5 04:58:18 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* sip_extra.c: fixed prototypes with isize_t
Fri Oct 5 04:58:45 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nta_api.c: removed warnings about signedness
Fri Oct 5 04:59:02 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nua_params.c: removed warnings about constness
Fri Oct 5 07:20:26 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h, su_root.c: cleaned argument checking
The su_root_*() and su_port_*() functions now check their arguments once
and do not assert() with NULL arguments. The sur_task->sut_port should
always be valid while su_root_t is alive.
Fri Oct 5 07:22:09 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su: added su_root_obtain(), su_root_release() and su_root_has_thread()
When root is created with su_root_create() or cloned with su_clone_start(),
the resulting root is obtained by the calling or created thread,
respectively.
The root can be released with su_root_release() and another thread can
obtain it.
The function su_root_has_thread() can be used to check if a thread has
obtained or released the root.
Implementation upgraded the su_port_own_thread() method as su_port_thread().
Fri Oct 5 07:28:10 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h: removed su_port_threadsafe() and su_port_yield() methods
su_port_wait_events() replaces su_port_yield().
Fri Oct 5 13:26:04 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* msg_parser.awk: not extending header structure unless needed.
Removed gawk-ish /* comments */.
Fri Oct 5 14:32:25 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* run_test_su: removed GNUisms
Fri Oct 5 14:32:47 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* Makefile.am: removed implicit check target test_urlmap
Fri Oct 5 14:22:32 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* torture_sresolv.c: use CLOCK_REALTIME if no CLOCK_PROCESS_CPUTIME_ID available
Casting timespec tv_sec to unsigned long.
Fri Oct * nua_s added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 08:15:23 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated.
Mon Oct 8 09:30:36 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack: added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 10:26:31 EDT 2007 Pekka.Pessi@nokia.com
* nua: added test for nua_prack() (sf.net bug #1804248)
Avoid sending nua_i_state after nua_prack() if no SDP O/A is happening, too.
Mon Oct 8 10:32:04 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* su_source.c: don t leak the wait arrays
Mon Oct 8 10:37:11 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Wed Oct 10 11:55:21 EDT 2007 Pekka.Pessi@nokia.com
* sip_parser.c: silenced warning about extra const in sip_extend_mclass()
Wed Oct 10 11:57:08 EDT 2007 Pekka.Pessi@nokia.com
* nta_tag.c: updated tag documentation
Wed Oct 10 13:16:40 EDT 2007 Pekka.Pessi@nokia.com
* nua: fix logging crash if outbound used with application contact
Silenced warnings.
Wed Oct 10 13:30:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: removed extra "const"
Wed Oct 10 13:31:45 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am's: fixed distclean of documentation
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5840 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-10-11 14:16:59 +00:00
|
|
|
You need to include <netinet/in.h> or <sofia-sip/su.h> to use these functions.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@subsection port_struct Packing structures
|
|
|
|
|
|
|
|
By default, compilers usually arrange structures so that they are
|
|
|
|
quick to access. This means that most fields in the structure start
|
|
|
|
at the 32 bit boundary. If you need to conserve memory, you may use
|
|
|
|
structure packing.
|
|
|
|
|
|
|
|
To tell the compiler that you only need certain amount of bits to
|
|
|
|
store a variable, you can use bit-fields. Compiler may or may not
|
|
|
|
pack the bit-fields.
|
|
|
|
|
|
|
|
@code
|
|
|
|
struct foo {
|
|
|
|
unsigned bar:5;
|
|
|
|
unsigned foo:2;
|
|
|
|
unsigned :0;
|
|
|
|
int something;
|
|
|
|
}
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
If compiler decides to pack this structure, this code generates a
|
|
|
|
structure that has @a bar and @a foo in the first seven bits, and then
|
2008-12-16 18:05:22 +00:00
|
|
|
@a something beginning from the next 32 bit boundary.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
One problem arises when using packed bit-fields: on ARM it is
|
|
|
|
generally not possible to access a 32 bit field that does not start from
|
|
|
|
the 32-bit boundary. Hence the example has the :0 padding member in the
|
|
|
|
structure. Seems handy but beware: initialization of this structure fails
|
|
|
|
on some ARM gcc compilers. (Ask Kai Vehmanen for details).
|
|
|
|
|
|
|
|
A way to force packing of a structure is to use preprocessor
|
|
|
|
directive @c @#pragma(pack). This directive is compiler specific, so if
|
|
|
|
you plan to write truly portable code, you cannot use it. We have
|
|
|
|
used it in some parts of the Sofia-SIP though. Only alternative is to
|
|
|
|
write functions that fetch the desired bits from a 32 bit field
|
|
|
|
with bit operations; not very handy and error prone.
|
|
|
|
|
|
|
|
The same aligment problem also arises if you cast for example char
|
|
|
|
buffer to a int32_t. You can only read int32_t from the 32bit boundary
|
|
|
|
on ARM platform. So be careful.
|
|
|
|
|
|
|
|
As a conclusion, when using bit-fields and stucture packing, beware
|
|
|
|
of the pitfalls. If you don't really need to use them (as in parsing
|
|
|
|
binary protocols), don't use them.
|
|
|
|
|
|
|
|
@section file_organization File and Directory Structure
|
|
|
|
|
|
|
|
A Sofia-SIP library module can be defined as a subdirectory under the
|
2008-12-16 18:05:22 +00:00
|
|
|
libsofia-sip-ua directory hierarchy that contains a file \<modulename\>.docs
|
|
|
|
(where the \<modulename\> of course referes to the actual name of
|
|
|
|
the module).
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
In case you like to start developing a new module, please
|
|
|
|
contact Sofia-SIP development team so that they can help you to set up
|
|
|
|
the basic module for you.
|
|
|
|
|
|
|
|
An overview of the contents of a module directory:
|
|
|
|
- file \<modulename\>.docs \n
|
|
|
|
Main documentation file for the module. See @ref module_docs
|
|
|
|
for more information
|
|
|
|
- subdirectory pictures \n
|
|
|
|
Contains any pictures/images
|
|
|
|
that are needed by the module documentation. The
|
|
|
|
file formats to use are GIF (for html pages) and
|
2008-12-16 18:05:22 +00:00
|
|
|
EPS (for latex). If some program (e.g. MS Visio) is
|
2006-12-21 06:30:28 +00:00
|
|
|
used to create the pictures, also the original
|
|
|
|
files must be stored here.\n
|
|
|
|
(Note that old modules may have "images" subdirectory instead of
|
|
|
|
"pictures")
|
|
|
|
- files Makefile.am \n
|
|
|
|
See section @ref build "dealing with GNU Autotools" below.
|
2008-12-16 18:05:22 +00:00
|
|
|
- (optionally) source code file(s) of the module and module tests.
|
2006-12-21 06:30:28 +00:00
|
|
|
The source code file(s) can also be located in subdirectories if necesary.
|
2008-12-16 18:05:22 +00:00
|
|
|
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
@section oo_with_c Writing Object-Oriented Code
|
|
|
|
|
|
|
|
While C does not provide any special object-oriented features on its own, it
|
|
|
|
is possible to program in object-oriented way using C, too. Sofia code make
|
|
|
|
use of many object-oriented features while being written entirely in C.
|
|
|
|
|
|
|
|
@subsection oo_hiding Data Hiding
|
|
|
|
|
|
|
|
Data hiding is a practice that makes separation between two modules very
|
|
|
|
clear. Outside code cannot directly access the data within a module, but it
|
|
|
|
has to use functions provided for that purpose. Data hiding also makes it
|
|
|
|
easier to define a protocol between two objects - all communication happens
|
|
|
|
using function calls.
|
|
|
|
|
|
|
|
How to implement data hiding in C? Easiest answer is to only declare data
|
|
|
|
structures in the header files, not to define them. We have a typedef #msg_t
|
|
|
|
for @link msg_s struct msg_s @endlink in <sofia-sip/msg.h>, but the actual
|
|
|
|
structure is defined in "msg_internal.h". Programs outside @b msg module
|
|
|
|
does not have access to the @link msg_s struct msg_s @endlink, but they have
|
|
|
|
to to access the #msg_t object through method functions provided in
|
|
|
|
<sofia-sip/msg.h>. The @b msg implementation is also free to change the
|
|
|
|
internal layout of the structure, only keeping the function interface
|
|
|
|
unmodified.
|
|
|
|
|
|
|
|
@subsection oo_interface Interfaces
|
|
|
|
|
|
|
|
Abstract interface is another object-oriented practice used in Sofia. Parser
|
|
|
|
headers, defined in <sofia-sip/msg_types.h>, is a good example of abstract
|
|
|
|
interface. The type for message headers, #msg_header_t, is defined using two
|
|
|
|
C structures @link msg_common_s struct msg_common_s @endlink
|
|
|
|
(#msg_common_t), and @link msg_hclass_s struct msg_hclass_s @endlink
|
|
|
|
(#msg_hclass_t).
|
|
|
|
|
|
|
|
Abstract interface is achieved using virtual function table in #msg_hclass_t
|
|
|
|
structure, bit like C++ typically implements abstract classes and virtual
|
|
|
|
functions. For implemenation of each header, the function table is
|
|
|
|
initialized with functions responsible for decoding, encoding and
|
|
|
|
manipulating the header structure. Unlike C++, the class of the object
|
|
|
|
(#msg_hclass_t) is represented by a real data structure which also contains
|
|
|
|
header-specific data, like header name.
|
|
|
|
|
|
|
|
@dontinclude sip_basic.c
|
|
|
|
@skipline msg_hclass_t sip_contact_class
|
|
|
|
@skip {{
|
|
|
|
@until }};
|
|
|
|
|
|
|
|
@subsection oo_derived Inheritance and Derived Objects
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
Inheritance is a object-oriented practice that has limited use in Sofia.
|
2006-12-21 06:30:28 +00:00
|
|
|
Most common example of inheritance is use of #su_home_t. Many objects are
|
|
|
|
derived from #su_home_t, which means that they can use the various
|
2008-12-16 18:05:22 +00:00
|
|
|
home-based memory management functions from <su_alloc.h>.
|
2006-12-21 06:30:28 +00:00
|
|
|
|
|
|
|
In this sence, inheritance means that a pointer to a derived object can be
|
|
|
|
casted as a pointer to a base object. In other words, the derived object
|
|
|
|
must have the base object at the beginning of its memory area:
|
|
|
|
|
|
|
|
@code
|
2008-12-16 18:05:22 +00:00
|
|
|
struct derived
|
2006-12-21 06:30:28 +00:00
|
|
|
{
|
|
|
|
struct base base[1];
|
|
|
|
int extra;
|
|
|
|
char *data;
|
|
|
|
};
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
There are three alternatives to cast a pointer to derived to a pointer to
|
|
|
|
base:
|
|
|
|
@code
|
|
|
|
struct base *base1 = (struct base *)derived;
|
|
|
|
struct base *base2 = &derived->base;
|
|
|
|
struct base *base3 = derived->base;
|
|
|
|
@endcode
|
|
|
|
The third alternative works because base was used as a 1-element array.
|
|
|
|
|
|
|
|
@subsection oo_templates Templates
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
There are a few template types implemented as macros in Sofia libraries.
|
2006-12-21 06:30:28 +00:00
|
|
|
They include hash table, defined in <sofia-sip/htable.h>, which can be used
|
|
|
|
to define hash tables types and accessor functions for different object, and
|
|
|
|
red-black tree, defined in <sofia-sip/rbtree.h>.
|
|
|
|
|
|
|
|
@section memory Memory Management
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
The home-based memory management is useful when a lot of memory blocks are
|
|
|
|
allocated for given task. The allocations are done via the memory home,
|
|
|
|
which keeps a reference to each allocated memory block. When the memory
|
|
|
|
home is then freed, it will free all memory blocks to which it has
|
|
|
|
reference. This simplifies application logic because application code does
|
|
|
|
not need to keep track of the allocated memory and free every allocated block
|
2006-12-21 06:30:28 +00:00
|
|
|
separately.
|
|
|
|
|
Sync to current darcs tree:
Mon Sep 17 14:50:04 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/sip_util.h: updated documentation
Mon Sep 17 14:50:18 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: updated documentation
Mon Sep 17 14:50:28 EDT 2007 Pekka.Pessi@nokia.com
* soa_tag.c: updated documentation
Wed Sep 19 12:50:01 EDT 2007 Pekka.Pessi@nokia.com
* msg: updated documentation
Wed Sep 19 13:29:50 EDT 2007 Pekka.Pessi@nokia.com
* url: updated documentation
Wed Sep 19 13:32:14 EDT 2007 Pekka.Pessi@nokia.com
* nth: updated documentation
Wed Sep 19 13:32:27 EDT 2007 Pekka.Pessi@nokia.com
* nea: updated documentation
Wed Sep 19 13:33:36 EDT 2007 Pekka.Pessi@nokia.com
* http: updated documentation
Wed Sep 19 13:36:58 EDT 2007 Pekka.Pessi@nokia.com
* bnf: updated documentation
Wed Sep 19 13:38:58 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated nua_stack_init_handle() prototype
Wed Sep 19 18:45:56 EDT 2007 Pekka.Pessi@nokia.com
* sip: added sip_name_addr_xtra(), sip_name_addr_dup()
Wed Sep 19 19:00:19 EDT 2007 Pekka.Pessi@nokia.com
* sip_basic.c: cleaned old crud
Thu Sep 20 13:34:04 EDT 2007 Pekka.Pessi@nokia.com
* iptsec: updated documentation
Thu Sep 20 13:36:22 EDT 2007 Pekka.Pessi@nokia.com
* tport: updated documentation
Thu Sep 20 13:36:56 EDT 2007 Pekka.Pessi@nokia.com
* su: updated documentation
Removed internal files from doxygen-generated documentation.
Thu Sep 20 13:38:29 EDT 2007 Pekka.Pessi@nokia.com
* soa: fixed documentation
Thu Sep 20 13:39:56 EDT 2007 Pekka.Pessi@nokia.com
* sdp: updated documentation
Thu Sep 20 13:40:16 EDT 2007 Pekka.Pessi@nokia.com
* ipt: updated documentation
Thu Sep 20 14:24:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: updated documentation
Thu Sep 20 14:41:04 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated documentation
Updated tag documentation.
Moved doxygen doc entries from sofia-sip/nua_tag.h to nua_tag.c.
Removed internal datatypes and files from the generated documents.
Wed Sep 19 13:34:20 EDT 2007 Pekka.Pessi@nokia.com
* docs: updated the generation of documentation. Updated links to header files.
Thu Sep 20 08:45:32 EDT 2007 Pekka.Pessi@nokia.com
* sip/Makefile.am: added tags to <sofia-sip/sip_extra.h>
Added check for extra tags in torture_sip.c.
Thu Sep 20 14:45:22 EDT 2007 Pekka.Pessi@nokia.com
* stun: updated documentation
Wed Jul 4 18:55:20 EDT 2007 Pekka.Pessi@nokia.com
* torture_heap.c: added tests for ##sort() and su_smoothsort()
Wed Jul 4 18:56:59 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: added smoothsort.c
Fri Jul 13 12:38:44 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: heap_remove() now set()s index to 0 on removed item
Mon Jul 23 11:14:22 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: fixed bug in heap##remove()
If left kid was in heap but right was not, left kid was ignored.
Wed Jul 4 18:51:08 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Jul 4 18:51:34 EDT 2007 Pekka.Pessi@nokia.com
* heap.h: using su_smoothsort()
Fri Jul 6 10:20:27 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Sep 19 17:40:30 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: generate two parser tables, default and extended
Wed Sep 19 18:39:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: just generate list of extra headers
Allocate extended parser dynamically.
Wed Sep 19 18:59:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: added Remote-Party-ID, P-Asserted-Identity, P-Preferred-Identity
Added functions sip_update_default_mclass() and sip_extend_mclass()
for handling the extended parser. Note that Reply-To and Alert-Info are only
available with the extended parser.
Wed Sep 19 19:05:44 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Thu Sep 20 13:38:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: updated documentation
Thu Sep 20 14:17:28 EDT 2007 Pekka.Pessi@nokia.com
* docs/conformance.docs: updated
Mon Oct 1 10:11:14 EDT 2007 Pekka.Pessi@nokia.com
* tport_tag.c: re-enabled tptag_trusted
Thu Oct 4 09:21:07 EDT 2007 Pekka.Pessi@nokia.com
* su_osx_runloop.c: moved virtual function table after struct definition
Preparing for su_port_vtable_t refactoring.
Thu Oct 4 10:22:03 EDT 2007 Pekka.Pessi@nokia.com
* su_source.c: refactored initialization/deinitialization
Fri Oct 5 04:58:18 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* sip_extra.c: fixed prototypes with isize_t
Fri Oct 5 04:58:45 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nta_api.c: removed warnings about signedness
Fri Oct 5 04:59:02 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nua_params.c: removed warnings about constness
Fri Oct 5 07:20:26 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h, su_root.c: cleaned argument checking
The su_root_*() and su_port_*() functions now check their arguments once
and do not assert() with NULL arguments. The sur_task->sut_port should
always be valid while su_root_t is alive.
Fri Oct 5 07:22:09 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su: added su_root_obtain(), su_root_release() and su_root_has_thread()
When root is created with su_root_create() or cloned with su_clone_start(),
the resulting root is obtained by the calling or created thread,
respectively.
The root can be released with su_root_release() and another thread can
obtain it.
The function su_root_has_thread() can be used to check if a thread has
obtained or released the root.
Implementation upgraded the su_port_own_thread() method as su_port_thread().
Fri Oct 5 07:28:10 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h: removed su_port_threadsafe() and su_port_yield() methods
su_port_wait_events() replaces su_port_yield().
Fri Oct 5 13:26:04 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* msg_parser.awk: not extending header structure unless needed.
Removed gawk-ish /* comments */.
Fri Oct 5 14:32:25 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* run_test_su: removed GNUisms
Fri Oct 5 14:32:47 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* Makefile.am: removed implicit check target test_urlmap
Fri Oct 5 14:22:32 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* torture_sresolv.c: use CLOCK_REALTIME if no CLOCK_PROCESS_CPUTIME_ID available
Casting timespec tv_sec to unsigned long.
Fri Oct * nua_s added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 08:15:23 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated.
Mon Oct 8 09:30:36 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack: added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 10:26:31 EDT 2007 Pekka.Pessi@nokia.com
* nua: added test for nua_prack() (sf.net bug #1804248)
Avoid sending nua_i_state after nua_prack() if no SDP O/A is happening, too.
Mon Oct 8 10:32:04 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* su_source.c: don t leak the wait arrays
Mon Oct 8 10:37:11 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Wed Oct 10 11:55:21 EDT 2007 Pekka.Pessi@nokia.com
* sip_parser.c: silenced warning about extra const in sip_extend_mclass()
Wed Oct 10 11:57:08 EDT 2007 Pekka.Pessi@nokia.com
* nta_tag.c: updated tag documentation
Wed Oct 10 13:16:40 EDT 2007 Pekka.Pessi@nokia.com
* nua: fix logging crash if outbound used with application contact
Silenced warnings.
Wed Oct 10 13:30:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: removed extra "const"
Wed Oct 10 13:31:45 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am's: fixed distclean of documentation
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5840 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-10-11 14:16:59 +00:00
|
|
|
See documentation of <sofia-sip/su_alloc.h> and @ref su_alloc "memory managment tutorial"
|
2006-12-21 06:30:28 +00:00
|
|
|
for more information of memory management services.
|
|
|
|
|
|
|
|
@subsection contextdata Memory management of context data
|
|
|
|
|
|
|
|
A typical example of use of a memory home is to have a memory home structure
|
|
|
|
(#su_home_t) as part of operation context information structure.
|
|
|
|
|
|
|
|
@code
|
|
|
|
/* context info structure */
|
|
|
|
struct context {
|
|
|
|
su_home_t ctx_home[1]; /* memory home */
|
|
|
|
other_t *ctx_other_stuff; /* example of memory areas */
|
|
|
|
...
|
|
|
|
};
|
|
|
|
|
|
|
|
/* context pointer */
|
|
|
|
struct context *ctx;
|
|
|
|
|
|
|
|
/* Allocate memory for context structure and initialize memory home */
|
|
|
|
ctx = su_home_clone(NULL, sizeof (struct context));
|
|
|
|
|
|
|
|
/* Allocate memory and register it with memory home */
|
|
|
|
ctx->ctx_other_stuff = su_zalloc(ctx->ctx_home, sizeof(other_t));
|
|
|
|
|
|
|
|
... processing and allocating more memory ...
|
|
|
|
|
|
|
|
/* Release registered memory areas, home, and context structure */
|
|
|
|
su_home_zap(ctx->ctx_home);
|
|
|
|
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
@subsection combining Combining allocations
|
|
|
|
|
|
|
|
Another place where home-based memory management makes programmers
|
2008-12-16 18:05:22 +00:00
|
|
|
life easier is case where a sub-procedure makes multiple memory allocations
|
|
|
|
and, in case the sub-procedure fails, all the allocations must be released
|
2006-12-21 06:30:28 +00:00
|
|
|
and, in case the sub-procedure is succesfull, all allocations must be
|
|
|
|
controlled by upper level memory management.
|
|
|
|
|
|
|
|
@code
|
|
|
|
/* example sub-procedure. top_home is upper-level memory home */
|
|
|
|
int sub_procedure( su_home_t *top_home, ... )
|
|
|
|
{
|
|
|
|
su_home_t temphome[1] = { SU_HOME_INIT(temphome) };
|
|
|
|
|
|
|
|
... allocations and other processing ...
|
|
|
|
|
|
|
|
/* was processing successfull ? */
|
|
|
|
if (success) {
|
|
|
|
/* ok -> move registered allocated memory to upper level memory home */
|
|
|
|
su_home_move( top_home, temphome );
|
|
|
|
}
|
|
|
|
/* destroy temporary memory home (and registered allocations) */
|
|
|
|
/* Note than in case processing was succesfull the memory */
|
2008-12-16 18:05:22 +00:00
|
|
|
/* registrations were already moved to upper level home. */
|
2006-12-21 06:30:28 +00:00
|
|
|
su_home_deinit(temphome);
|
|
|
|
|
|
|
|
/* return ok/not-ok */
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
@section testing Testing Your Code
|
|
|
|
|
Sync to current darcs tree:
Mon Sep 17 14:50:04 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/sip_util.h: updated documentation
Mon Sep 17 14:50:18 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/tport_tag.h: updated documentation
Mon Sep 17 14:50:28 EDT 2007 Pekka.Pessi@nokia.com
* soa_tag.c: updated documentation
Wed Sep 19 12:50:01 EDT 2007 Pekka.Pessi@nokia.com
* msg: updated documentation
Wed Sep 19 13:29:50 EDT 2007 Pekka.Pessi@nokia.com
* url: updated documentation
Wed Sep 19 13:32:14 EDT 2007 Pekka.Pessi@nokia.com
* nth: updated documentation
Wed Sep 19 13:32:27 EDT 2007 Pekka.Pessi@nokia.com
* nea: updated documentation
Wed Sep 19 13:33:36 EDT 2007 Pekka.Pessi@nokia.com
* http: updated documentation
Wed Sep 19 13:36:58 EDT 2007 Pekka.Pessi@nokia.com
* bnf: updated documentation
Wed Sep 19 13:38:58 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated nua_stack_init_handle() prototype
Wed Sep 19 18:45:56 EDT 2007 Pekka.Pessi@nokia.com
* sip: added sip_name_addr_xtra(), sip_name_addr_dup()
Wed Sep 19 19:00:19 EDT 2007 Pekka.Pessi@nokia.com
* sip_basic.c: cleaned old crud
Thu Sep 20 13:34:04 EDT 2007 Pekka.Pessi@nokia.com
* iptsec: updated documentation
Thu Sep 20 13:36:22 EDT 2007 Pekka.Pessi@nokia.com
* tport: updated documentation
Thu Sep 20 13:36:56 EDT 2007 Pekka.Pessi@nokia.com
* su: updated documentation
Removed internal files from doxygen-generated documentation.
Thu Sep 20 13:38:29 EDT 2007 Pekka.Pessi@nokia.com
* soa: fixed documentation
Thu Sep 20 13:39:56 EDT 2007 Pekka.Pessi@nokia.com
* sdp: updated documentation
Thu Sep 20 13:40:16 EDT 2007 Pekka.Pessi@nokia.com
* ipt: updated documentation
Thu Sep 20 14:24:20 EDT 2007 Pekka.Pessi@nokia.com
* nta: updated documentation
Thu Sep 20 14:41:04 EDT 2007 Pekka.Pessi@nokia.com
* nua: updated documentation
Updated tag documentation.
Moved doxygen doc entries from sofia-sip/nua_tag.h to nua_tag.c.
Removed internal datatypes and files from the generated documents.
Wed Sep 19 13:34:20 EDT 2007 Pekka.Pessi@nokia.com
* docs: updated the generation of documentation. Updated links to header files.
Thu Sep 20 08:45:32 EDT 2007 Pekka.Pessi@nokia.com
* sip/Makefile.am: added tags to <sofia-sip/sip_extra.h>
Added check for extra tags in torture_sip.c.
Thu Sep 20 14:45:22 EDT 2007 Pekka.Pessi@nokia.com
* stun: updated documentation
Wed Jul 4 18:55:20 EDT 2007 Pekka.Pessi@nokia.com
* torture_heap.c: added tests for ##sort() and su_smoothsort()
Wed Jul 4 18:56:59 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am: added smoothsort.c
Fri Jul 13 12:38:44 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: heap_remove() now set()s index to 0 on removed item
Mon Jul 23 11:14:22 EDT 2007 Pekka.Pessi@nokia.com
* sofia-sip/heap.h: fixed bug in heap##remove()
If left kid was in heap but right was not, left kid was ignored.
Wed Jul 4 18:51:08 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Jul 4 18:51:34 EDT 2007 Pekka.Pessi@nokia.com
* heap.h: using su_smoothsort()
Fri Jul 6 10:20:27 EDT 2007 Pekka.Pessi@nokia.com
* smoothsort.c: added
Wed Sep 19 17:40:30 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: generate two parser tables, default and extended
Wed Sep 19 18:39:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: just generate list of extra headers
Allocate extended parser dynamically.
Wed Sep 19 18:59:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: added Remote-Party-ID, P-Asserted-Identity, P-Preferred-Identity
Added functions sip_update_default_mclass() and sip_extend_mclass()
for handling the extended parser. Note that Reply-To and Alert-Info are only
available with the extended parser.
Wed Sep 19 19:05:44 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Thu Sep 20 13:38:59 EDT 2007 Pekka.Pessi@nokia.com
* sip: updated documentation
Thu Sep 20 14:17:28 EDT 2007 Pekka.Pessi@nokia.com
* docs/conformance.docs: updated
Mon Oct 1 10:11:14 EDT 2007 Pekka.Pessi@nokia.com
* tport_tag.c: re-enabled tptag_trusted
Thu Oct 4 09:21:07 EDT 2007 Pekka.Pessi@nokia.com
* su_osx_runloop.c: moved virtual function table after struct definition
Preparing for su_port_vtable_t refactoring.
Thu Oct 4 10:22:03 EDT 2007 Pekka.Pessi@nokia.com
* su_source.c: refactored initialization/deinitialization
Fri Oct 5 04:58:18 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* sip_extra.c: fixed prototypes with isize_t
Fri Oct 5 04:58:45 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nta_api.c: removed warnings about signedness
Fri Oct 5 04:59:02 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* test_nua_params.c: removed warnings about constness
Fri Oct 5 07:20:26 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h, su_root.c: cleaned argument checking
The su_root_*() and su_port_*() functions now check their arguments once
and do not assert() with NULL arguments. The sur_task->sut_port should
always be valid while su_root_t is alive.
Fri Oct 5 07:22:09 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su: added su_root_obtain(), su_root_release() and su_root_has_thread()
When root is created with su_root_create() or cloned with su_clone_start(),
the resulting root is obtained by the calling or created thread,
respectively.
The root can be released with su_root_release() and another thread can
obtain it.
The function su_root_has_thread() can be used to check if a thread has
obtained or released the root.
Implementation upgraded the su_port_own_thread() method as su_port_thread().
Fri Oct 5 07:28:10 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* su_port.h: removed su_port_threadsafe() and su_port_yield() methods
su_port_wait_events() replaces su_port_yield().
Fri Oct 5 13:26:04 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* msg_parser.awk: not extending header structure unless needed.
Removed gawk-ish /* comments */.
Fri Oct 5 14:32:25 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* run_test_su: removed GNUisms
Fri Oct 5 14:32:47 EDT 2007 Pekka Pessi <Pekka.Pessi@nokia.com>
* Makefile.am: removed implicit check target test_urlmap
Fri Oct 5 14:22:32 EDT 2007 Pekka Pessi <first.lastname@nokia.com>
* torture_sresolv.c: use CLOCK_REALTIME if no CLOCK_PROCESS_CPUTIME_ID available
Casting timespec tv_sec to unsigned long.
Fri Oct * nua_s added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 08:15:23 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated.
Mon Oct 8 09:30:36 EDT 2007 Pekka.Pessi@nokia.com
* nua_stack: added handling nua_prack()
Thanks to Fabio Margarido for the patch.
Mon Oct 8 10:24:35 EDT 2007 Pekka.Pessi@nokia.com
* test_nua: added test for sf.net bug #1803686
Mon Oct 8 10:26:31 EDT 2007 Pekka.Pessi@nokia.com
* nua: added test for nua_prack() (sf.net bug #1804248)
Avoid sending nua_i_state after nua_prack() if no SDP O/A is happening, too.
Mon Oct 8 10:32:04 EDT 2007 Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* su_source.c: don t leak the wait arrays
Mon Oct 8 10:37:11 EDT 2007 Pekka.Pessi@nokia.com
* RELEASE: updated
Wed Oct 10 11:55:21 EDT 2007 Pekka.Pessi@nokia.com
* sip_parser.c: silenced warning about extra const in sip_extend_mclass()
Wed Oct 10 11:57:08 EDT 2007 Pekka.Pessi@nokia.com
* nta_tag.c: updated tag documentation
Wed Oct 10 13:16:40 EDT 2007 Pekka.Pessi@nokia.com
* nua: fix logging crash if outbound used with application contact
Silenced warnings.
Wed Oct 10 13:30:45 EDT 2007 Pekka.Pessi@nokia.com
* msg_parser.awk: removed extra "const"
Wed Oct 10 13:31:45 EDT 2007 Pekka.Pessi@nokia.com
* Makefile.am's: fixed distclean of documentation
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5840 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-10-11 14:16:59 +00:00
|
|
|
See <sofia-sip/tstdef.h> for example of how to write module tests with macros provided
|
2006-12-21 06:30:28 +00:00
|
|
|
by Sofia.
|
|
|
|
|
|
|
|
Here are some ideas of what you should test:
|
|
|
|
- "Smoke test" \n
|
|
|
|
See that the module compiles, links and executes.
|
|
|
|
- Module API functions should be tested with\n
|
|
|
|
- valid args
|
|
|
|
- not valid args
|
|
|
|
- Aim for 100% line coverage\n
|
2008-12-16 18:05:22 +00:00
|
|
|
(If there is a line of code that you have not tested, you don't know
|
2006-12-21 06:30:28 +00:00
|
|
|
if its working.) \n
|
2008-12-16 18:05:22 +00:00
|
|
|
For selected part of code you should also aim for
|
2006-12-21 06:30:28 +00:00
|
|
|
100% branch/path coverage.\n
|
|
|
|
But be anyway reasonable with these because in practise complete
|
|
|
|
coverage is next to impossible to achive (so 80% is ok in practise).
|
|
|
|
- Create test to check assumptions and/or tricks used in code.\n
|
|
|
|
For example if you rely on some compiler feature, create a test that
|
|
|
|
will fail with a compiler that does not have that feature.
|
|
|
|
|
|
|
|
@subsection check Running Module Tests
|
|
|
|
|
|
|
|
Automake, which is used to build Sofia SIP, has builtin
|
|
|
|
support for unit tests. To add an automatically run test to your module,
|
|
|
|
you just have to add the following few lines to your module's Makefile.am
|
|
|
|
(of course, you have to write the test programs, too):
|
|
|
|
|
|
|
|
@code
|
|
|
|
TESTS = test_foo test_bar
|
|
|
|
|
|
|
|
check_PROGRAMS = test_foo test_bar
|
|
|
|
|
|
|
|
test_foo_SOURCES = foo.c foo.h
|
|
|
|
test_foo_LDADD = -L. -lmy
|
|
|
|
|
|
|
|
test_bar_SOURCES = bar.c bar.h
|
|
|
|
test_foo_LDADD = -L. -lmy
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
Each test program should either return zero for success or a non-zero
|
|
|
|
error code in its main function. Now when you run "make check",
|
2008-12-16 18:05:22 +00:00
|
|
|
@b my_test_foo and @b my_test_bar will be built and then run.
|
2006-12-21 06:30:28 +00:00
|
|
|
Make will print a
|
2008-12-16 18:05:22 +00:00
|
|
|
summary of how the tests went. As these tests are run from the build
|
|
|
|
system, the tests must be non-interactive (no questions asked) and not
|
2006-12-21 06:30:28 +00:00
|
|
|
rely on any files that are not in version control system.
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
Sofia SIP's top-level makefile contains a recursive check target, so
|
2006-12-21 06:30:28 +00:00
|
|
|
you can use "cd sofia-sip ; make check" to run all the existing tests
|
|
|
|
with a single command.
|
|
|
|
|
|
|
|
@section build Dealing with GNU Autotools
|
|
|
|
|
|
|
|
Sofia-SIP build system is based on the GNU tools automake, autoconf and
|
|
|
|
libtool. This toolset has become the de-facto way of building Linux
|
|
|
|
software. Because of this there is a lot of publicly available documentation
|
|
|
|
about these tools, and of course, lots and lots of examples.
|
|
|
|
|
|
|
|
A good introduction to these tools is available at
|
|
|
|
<a href="http://developer.gnome.org/doc/books/WGA/generating-makefiles.html">
|
|
|
|
developer.gnome.org</a>. <a href="http://sources.redhat.com/autobook">Autobook</a>
|
|
|
|
provides more detailed documentation for autoconf and automake.
|
2008-12-16 18:05:22 +00:00
|
|
|
The <a href="http://www.gnu.org/manual/make/">GNU make manual</a>
|
2006-12-21 06:30:28 +00:00
|
|
|
is also a good source of information.
|
|
|
|
|
|
|
|
@subsection autogen_sh autogen.sh
|
|
|
|
|
|
|
|
At top-level there is a shell script called @b autogen.sh. It calls a
|
|
|
|
convenient tool called @b autoreconf which will generate configure script
|
|
|
|
for you. It also fixes the mode bits: the mode bits are not stored in
|
|
|
|
<a href="http://darcs.net">darcs</a> version control system.
|
|
|
|
|
|
|
|
@code
|
|
|
|
$ sh autogen.sh
|
|
|
|
$ ./configure ... with your configure options ...
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
@subsection configure_ac configure.ac
|
|
|
|
|
|
|
|
The @b configure.ac file (older autoconf versions used also @b configure.in)
|
|
|
|
contains the primary configuration for autoconf. configure.ac contains
|
|
|
|
checks for all external libraries, non-standard language and compiler
|
|
|
|
features that are needed to build the target module.
|
|
|
|
|
|
|
|
This file is created by the developer of the module.
|
|
|
|
|
|
|
|
@subsection sofia_m4 m4 files
|
|
|
|
|
|
|
|
Sofia-SIP's own autoconf macros are stored in the top-level direcry called @b
|
|
|
|
m4. These macros, along with all other macros used by @b configure.ac, are
|
|
|
|
copied into the module-specific @b aclocal.m4 file by an utility called
|
|
|
|
aclocal.
|
|
|
|
|
|
|
|
Contact Sofia-SIP development team, if you need changes to these files.
|
|
|
|
|
|
|
|
@subsection aclocal_m4 aclocal.m4
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
The aclocal.m4 contains the definitions of the autoconf macros used in
|
2006-12-21 06:30:28 +00:00
|
|
|
@b configure.ac.
|
|
|
|
|
|
|
|
This file is generated by aclocal command.
|
|
|
|
|
|
|
|
@subsection Makefile_am Makefile.am
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
Makefile.am is where you define what programs and libraries should
|
2006-12-21 06:30:28 +00:00
|
|
|
be built, and also what source files are needed to create them.
|
|
|
|
When you run automake, it creates the file Makefile.in.
|
|
|
|
|
|
|
|
This file is created by the developer of the module.
|
|
|
|
|
|
|
|
@subsection configure configure
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
When you run configure script, it performs all the checks defined in
|
|
|
|
@b configure.ac and then replaces all @b xxx.in files with equivalent
|
|
|
|
@b xxx files. All @c @@FOO@@ variables in the source @b *.in files are
|
2006-12-21 06:30:28 +00:00
|
|
|
replaced with values found during the configuration process. For instance
|
2008-12-16 18:05:22 +00:00
|
|
|
the variable @c @@srcdir@@ in @b Makefile.in is replaced in @b Makefile
|
|
|
|
with the source directory path (useful when compiling outside the main
|
2006-12-21 06:30:28 +00:00
|
|
|
source tree).
|
|
|
|
|
|
|
|
This file is generated by autoconf command.
|
|
|
|
|
|
|
|
@subsection config_status config.status
|
|
|
|
|
|
|
|
This script stores the last parameters given to configre command.
|
|
|
|
If necessary you can rerun the last given configure script (with given
|
2008-12-16 18:05:22 +00:00
|
|
|
parameters) by using command "./config.status -r" or
|
2006-12-21 06:30:28 +00:00
|
|
|
"./config.status --recheck".
|
|
|
|
|
|
|
|
This file is generated by configure script.
|
|
|
|
|
|
|
|
@subsection config_cache config.cache
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
This file contains results of the various checks that configure script
|
2006-12-21 06:30:28 +00:00
|
|
|
performed. In case the configure script failed, you might try to
|
|
|
|
delete this file and run the configure script again.
|
|
|
|
|
|
|
|
This file is generated by configure script.
|
|
|
|
|
|
|
|
@subsection Makefile Makefile
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
The @b Makefile contains the actual rules how to build the target
|
|
|
|
libraries and program. It is used by the @c make program. @b Makefile
|
2006-12-21 06:30:28 +00:00
|
|
|
is generated from @b Makefile.in when you run @c autoconf command.
|
|
|
|
Ensure that "make dist" and "make install" targets work.
|
|
|
|
|
|
|
|
This file is generated by config.status and configure scripts.
|
|
|
|
|
|
|
|
@subsection config_h config.h
|
|
|
|
|
|
|
|
This file contains C language defines of various confurable issues.
|
|
|
|
|
|
|
|
This file is generated by config.status and configure script.
|
|
|
|
|
|
|
|
@subsection sofia_sip_configure_h sofia-sip/su_configure.h
|
|
|
|
|
|
|
|
This file contains C language defines describing how the Sofia SIP UA
|
|
|
|
library is configured.
|
|
|
|
|
|
|
|
This file is generated by config.status and configure script.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
@page debug_logs Debugging Logs
|
|
|
|
|
|
|
|
The Sofia-SIP components can output various debugging information. The
|
|
|
|
detail of the debugging output is determined by the debugging level. The
|
|
|
|
level is usually module-specific and it can be modified by module-specific
|
|
|
|
environment variable. There is also a default level for all modules,
|
|
|
|
controlled by environment variable #SOFIA_DEBUG.
|
|
|
|
|
|
|
|
The environment variables controlling the logging and other debug output are
|
|
|
|
as follows:
|
|
|
|
- #SOFIA_DEBUG Default debug level (0..9)
|
|
|
|
- #NUA_DEBUG User Agent engine (<a href="nua/index.html">nua</a>) debug level (0..9)
|
|
|
|
- #SOA_DEBUG SDP Offer/Answer engine (<a href="soa/index.html">soa</a>) debug level (0..9)
|
|
|
|
- #NEA_DEBUG Event engine (<a href="nea/index.html">nea</a>) debug level (0..9)
|
|
|
|
- #IPTSEC_DEBUG HTTP/SIP autentication module debug level (0..9)
|
|
|
|
- #NTA_DEBUG Transaction engine debug level (0..9)
|
|
|
|
- #TPORT_DEBUG Transport event debug level (0..9)
|
|
|
|
- #TPORT_LOG If set, print out all parsed SIP messages on transport layer
|
|
|
|
- #TPORT_DUMP Filename for dumping unparsed messages from transport
|
|
|
|
- #SU_DEBUG <a href="nea/index.html">su</a> module debug level (0..9)
|
|
|
|
|
|
|
|
The defined debug output levels are:
|
|
|
|
- 0 SU_DEBUG_0() - fatal errors, panic
|
|
|
|
- 1 SU_DEBUG_1() - critical errors, minimal progress at subsystem level
|
|
|
|
- 2 SU_DEBUG_2() - non-critical errors
|
|
|
|
- 3 SU_DEBUG_3() - warnings, progress messages
|
|
|
|
- 5 SU_DEBUG_5() - signaling protocol actions (incoming packets, ...)
|
|
|
|
- 7 SU_DEBUG_7() - media protocol actions (incoming packets, ...)
|
|
|
|
- 9 SU_DEBUG_9() - entering/exiting functions, very verbatim progress
|
|
|
|
|
2008-12-16 18:05:22 +00:00
|
|
|
In addition to the macros mentioned above, there is also functions for
|
2006-12-21 06:30:28 +00:00
|
|
|
printing logging messages:
|
|
|
|
- su_llog(), su_vllog()
|
|
|
|
- su_perror(), su_perror2()
|
|
|
|
|
|
|
|
The log level can be set (to a level defined in a configuration file, for
|
|
|
|
instance) with following functions
|
|
|
|
- su_log_set_level(), su_log_soft_set_level()
|
|
|
|
|
|
|
|
The log output can be redirected to, e.g., system log or loggin server, with
|
|
|
|
su_log_redirect().
|
|
|
|
|
|
|
|
*/
|