add sofia-sip 1.12.4 (plus some patches through 12/21/2006) to in tree libs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3774 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2006-12-21 06:30:28 +00:00
1 parent 0cdfa4fe13
commit 2ecac238f3
719 files changed
+311340 -2

No files matched your search

@@ -0,0 +1,20 @@
2005-10-27 Pekka Pessi <Pekka.Pessi@nokia.com>
* Added aliases for RFC links in libsofia-sip-ua/docs/Doxyfile.aliases.
M ./libsofia-sip-ua/docs/Doxyfile.aliases -7 +2208
2005-10-12 Pekka Pessi <Pekka.Pessi@nokia.com>
* Fixed aliases for Doxygen 1.4.
M ./libsofia-sip-ua/docs/Doxyfile.aliases -6 +6
2005-09-08 Kai Vehmanen <kai.vehmanen@nokia.com>
* hide_emails.sh: Fixed bug in hiding addresses of
form foo.bar-bar@something.org. Fixed sf.net
bug #1277167.
@@ -0,0 +1,30 @@
PROJECT_NAME = "libsofia-sip-ua"
OUTPUT_DIRECTORY = ../docs/html
INPUT = mainpage.docs docguide.docs conformance.docs
# release.docs
@INCLUDE = ../docs/Doxyfile.conf
GENERATE_TAGFILE = docs.doxytags
TAGFILES =
TAGFILES += su.doxytags=su
TAGFILES += ipt.doxytags=ipt
TAGFILES += bnf.doxytags=bnf
TAGFILES += url.doxytags=url
TAGFILES += msg.doxytags=msg
TAGFILES += sip.doxytags=sip
TAGFILES += sresolv.doxytags=sresolv
TAGFILES += stun.doxytags=stun
TAGFILES += tport.doxytags=tport
TAGFILES += nta.doxytags=nta
TAGFILES += iptsec.doxytags=iptsec
TAGFILES += sdp.doxytags=sdp
TAGFILES += soa.doxytags=soa
TAGFILES += nea.doxytags=nea
TAGFILES += nua.doxytags=nua
TAGFILES += features.doxytags=features
EXAMPLE_PATH = ../sip
@@ -0,0 +1,48 @@
# Doxyfile 1.0.0 format
#
PREDEFINED = DOX \
DOXYGEN_ONLY=1 \
DOCUMENTATION_ONLY=1 \
SU_HAVE_INLINE=1 su_inline=inline \
SOFIA_BEGIN_DECLS SOFIA_END_DECLS SOFIAPUBFUN SOFIACALL \
SOFIAPUBVAR=extern \
SU_DLL SIP_DLL RTSP_DLL SU_DLL NTA_DLL NUA_DLL MSG_DLL AUTH_DLL \
NTH_DLL HTTP_DLL \
__attribute__()=
ALIASES = \
"MODULEPAGE=\mainpage Sofia SIP User Agent Library - " \
"CONTACT=\par Contact:\n" \
"STATUS=\par Status:\n" \
"LICENSE=\par License:\n" \
"SofiaSIP=<a href=\"../index.html\">Sofia SIP</a>" \
"SU=@ref su_index \"SU\"" "su=@ref su_index \"su\"" \
"msg=@ref msg_index \"msg\"" \
"sip=@ref sip_index \"sip\"" \
"nua=@ref nua_index \"nua\"" \
"nta=@ref nta_index \"nta\"" \
"soa=@ref soa_index \"soa\"" \
"DEF=\def" \
"TAGS=\par Related Tags:" \
"TAG=\par \n" \
"EVENTS=\par Events:\n" \
"RESPONSES=\par Related Response Codes:\n" \
"CFILE=\file" \
"IFILE=\file" \
"HI=\hideinitializer " \
"HIDE=\hideinitializer " \
"SHOW=\showinitializer " \
"LGPL2=\par Lesser GNU Public License Version 2:\n \ref lgpl2\n \if 0\n" \
"ENDLGPL2=\endif \n" \
"GPL2=\par GNU Public License Version 2:\n \ref gpl2\n \if 0\n" \
"ENDGPL2=\endif \n" \
"ERRORS=\par Errors: " \
"ERROR=\par \n \b " \
"NEW_1_12_2=@since New in <a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.2.txt\">1.12.2</a>" \
"VERSION_1_12_2=<a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.2.txt\">1.12.2</a>" \
"NEW_1_12_4=@since New in <a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.4.txt\">1.12.4</a>" \
"VERSION_1_12_4=<a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.4.txt\">1.12.4</a>" \
"VERSION_1_12_5=<a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.5.txt\">1.12.5</a>" \
"NEW_1_12_5=@since New in <a href=\"http://sofia-sip.sf.net/relnotes/relnotes-sofia-sip-1.12.5.txt\">1.12.5</a>" \
@@ -0,0 +1,66 @@
# Doxyfile 1.0.0 format
#
@INCLUDE = "../../libsofia-sip-ua/docs/Doxyfile.version"
@INCLUDE = "../../libsofia-sip-ua/docs/Doxyfile.aliases"
@INCLUDE = "../../libsofia-sip-ua/docs/Doxyfile.rfc"
OUTPUT_LANGUAGE = English
DETAILS_AT_TOP = YES
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = NO
QUIET = YES
WARNINGS = YES
DISABLE_INDEX = NO
HAVE_DOT = YES
CLASS_GRAPH = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = NO
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
HIDE_UNDOC_RELATIONS = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_SCOPE_NAMES = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
JAVADOC_AUTOBRIEF = YES
MAX_INITIALIZER_LINES = 0
ENUM_VALUES_PER_LINE = 1
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
# HTML
GENERATE_HTML = YES
HTML_OUTPUT = .
HTML_ALIGN_MEMBERS = YES
HTML_FOOTER = ../../libsofia-sip-ua/docs/sofia-footer.html
ALLEXTERNALS = NO
EXTERNAL_GROUPS = NO
# LATEX
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = pdflatex
USE_PDFLATEX = YES
PDF_HYPERLINKS = YES
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_BATCHMODE = YES
FILE_PATTERNS = *.h *.c
EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
test*.h test*.c torture*.c *test.c *torture.c \
*_tag_dll.c *_tag_ref.c
IMAGE_PATH = ../../libsofia-sip-ua/docs/pictures
@@ -0,0 +1 @@
PROJECT_NUMBER = @VERSION@
@@ -0,0 +1,50 @@
EXTRA_DIST = Doxyfile Doxyfile.aliases Doxyfile.conf \
docguide.docs \
mainpage.docs \
conformance.docs \
Doxyfile.version.in \
sofia-footer.html.in \
hide_emails.sh \
ChangeLog \
pictures/SIP_basic_incoming_operation.eps \
pictures/SIP_basic_incoming_operation.gif \
pictures/SIP_basic_incoming_operation.vsd \
pictures/SIP_basic_outgoing_operation.eps \
pictures/SIP_basic_outgoing_operation.gif \
pictures/SIP_basic_outgoing_operation.vsd \
pictures/SIP_incoming_call.eps \
pictures/SIP_incoming_call.gif \
pictures/SIP_incoming_call.vsd \
pictures/SIP_outgoing_call.eps \
pictures/SIP_outgoing_call.gif \
pictures/SIP_outgoing_call.vsd \
pictures/SIP_outgoing_operation_with_auth.eps \
pictures/SIP_outgoing_operation_with_auth.gif \
pictures/SIP_outgoing_operation_with_auth.vsd \
pictures/autotools.eps \
pictures/autotools.gif \
pictures/autotools.vsd \
pictures/nta-receiving-message.eps \
pictures/nta-receiving-message.gif
BUILT_SOURCES = Doxyfile.rfc
# Including Doxyfile.rfc in dist breaks make manpages
Doxyfile.rfc:
$(AWK) 'END { b="\\"; q="\\\""; \
print "# Autogenerated aliases for RFCs "from" .. "to ; \
print "ALIASES += " b; \
for (i=from; i < to; i++) { \
print "RFC"i"=\"<a href="q site i type q">RFC "i"</a>\" "b; \
}}' \
site=http://www.faqs.org/rfcs/rfc type=.html \
from=700 to=4800 \
/dev/null > $@
CLEANFILES = Doxyfile.rfc
# ----------------------------------------------------------------------
# Sofia specific rules
include ../sofia.am
@@ -0,0 +1,474 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# common Makefile targets for libsofia-sip-ua modules
# ---------------------------------------------------
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(srcdir)/../sofia.am $(srcdir)/Doxyfile.version.in \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/sofia-footer.html.in ChangeLog
subdir = libsofia-sip-ua/docs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/sac-general.m4 \
$(top_srcdir)/m4/sac-openssl.m4 $(top_srcdir)/m4/sac-su.m4 \
$(top_srcdir)/m4/sac-su2.m4 $(top_srcdir)/m4/sac-tport.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/libsofia-sip-ua/su/sofia-sip/su_configure.h
CONFIG_CLEAN_FILES = Doxyfile.version sofia-footer.html
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COREFOUNDATION_FALSE = @COREFOUNDATION_FALSE@
COREFOUNDATION_TRUE = @COREFOUNDATION_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWFLAG = @CWFLAG@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_COVERAGE_FALSE = @ENABLE_COVERAGE_FALSE@
ENABLE_COVERAGE_TRUE = @ENABLE_COVERAGE_TRUE@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
EXPENSIVE_CHECKS_FALSE = @EXPENSIVE_CHECKS_FALSE@
EXPENSIVE_CHECKS_TRUE = @EXPENSIVE_CHECKS_TRUE@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_VERSION = @GLIB_VERSION@
HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
HAVE_GLIB_FALSE = @HAVE_GLIB_FALSE@
HAVE_GLIB_TRUE = @HAVE_GLIB_TRUE@
HAVE_MINGW32_FALSE = @HAVE_MINGW32_FALSE@
HAVE_MINGW32_TRUE = @HAVE_MINGW32_TRUE@
HAVE_NTLM_FALSE = @HAVE_NTLM_FALSE@
HAVE_NTLM_TRUE = @HAVE_NTLM_TRUE@
HAVE_TLS_FALSE = @HAVE_TLS_FALSE@
HAVE_TLS_TRUE = @HAVE_TLS_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBVER_SOFIA_SIP_UA_AGE = @LIBVER_SOFIA_SIP_UA_AGE@
LIBVER_SOFIA_SIP_UA_CUR = @LIBVER_SOFIA_SIP_UA_CUR@
LIBVER_SOFIA_SIP_UA_GLIB_AGE = @LIBVER_SOFIA_SIP_UA_GLIB_AGE@
LIBVER_SOFIA_SIP_UA_GLIB_CUR = @LIBVER_SOFIA_SIP_UA_GLIB_CUR@
LIBVER_SOFIA_SIP_UA_GLIB_REV = @LIBVER_SOFIA_SIP_UA_GLIB_REV@
LIBVER_SOFIA_SIP_UA_GLIB_SOVER = @LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
LIBVER_SOFIA_SIP_UA_REV = @LIBVER_SOFIA_SIP_UA_REV@
LIBVER_SOFIA_SIP_UA_SOVER = @LIBVER_SOFIA_SIP_UA_SOVER@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MINGW_ENVIRONMENT = @MINGW_ENVIRONMENT@
MOSTLYCLEANFILES = @MOSTLYCLEANFILES@
NDEBUG_FALSE = @NDEBUG_FALSE@
NDEBUG_TRUE = @NDEBUG_TRUE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
REPLACE_LIBADD = @REPLACE_LIBADD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOFIA_CFLAGS = @SOFIA_CFLAGS@
SOFIA_GLIB_PKG_REQUIRES = @SOFIA_GLIB_PKG_REQUIRES@
STRIP = @STRIP@
TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@
VERSION = @VERSION@
VER_LIBSOFIA_SIP_UA_MAJOR_MINOR = @VER_LIBSOFIA_SIP_UA_MAJOR_MINOR@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
include_sofiadir = @include_sofiadir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = Doxyfile Doxyfile.aliases Doxyfile.conf \
docguide.docs \
mainpage.docs \
conformance.docs \
Doxyfile.version.in \
sofia-footer.html.in \
hide_emails.sh \
ChangeLog \
pictures/SIP_basic_incoming_operation.eps \
pictures/SIP_basic_incoming_operation.gif \
pictures/SIP_basic_incoming_operation.vsd \
pictures/SIP_basic_outgoing_operation.eps \
pictures/SIP_basic_outgoing_operation.gif \
pictures/SIP_basic_outgoing_operation.vsd \
pictures/SIP_incoming_call.eps \
pictures/SIP_incoming_call.gif \
pictures/SIP_incoming_call.vsd \
pictures/SIP_outgoing_call.eps \
pictures/SIP_outgoing_call.gif \
pictures/SIP_outgoing_call.vsd \
pictures/SIP_outgoing_operation_with_auth.eps \
pictures/SIP_outgoing_operation_with_auth.gif \
pictures/SIP_outgoing_operation_with_auth.vsd \
pictures/autotools.eps \
pictures/autotools.gif \
pictures/autotools.vsd \
pictures/nta-receiving-message.eps \
pictures/nta-receiving-message.gif
BUILT_SOURCES = Doxyfile.rfc
CLEANFILES = Doxyfile.rfc
AM_CFLAGS = $(CWFLAG) $(SOFIA_CFLAGS)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
TAG_AWK = $(top_srcdir)/libsofia-sip-ua/su/tag_dll.awk
INTERNAL_INCLUDES = \
-I$(srcdir)/../features -I../features \
-I$(srcdir)/../ipt -I../ipt \
-I$(srcdir)/../iptsec -I../iptsec \
-I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../http -I../http \
-I$(srcdir)/../msg -I../msg \
-I$(srcdir)/../nth -I../nth \
-I$(srcdir)/../nta -I../nta \
-I$(srcdir)/../nea -I../nea \
-I$(srcdir)/../nua -I../nua \
-I$(srcdir)/../soa -I../soa \
-I$(srcdir)/../sdp -I../sdp \
-I$(srcdir)/../sip -I../sip \
-I$(srcdir)/../soa -I../soa \
-I$(srcdir)/../sresolv -I../sresolv \
-I$(srcdir)/../tport -I../tport \
-I$(srcdir)/../stun -I../stun \
-I$(srcdir)/../url -I../url \
-I$(srcdir)/../su -I../su
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../sofia.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsofia-sip-ua/docs/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libsofia-sip-ua/docs/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
Doxyfile.version: $(top_builddir)/config.status $(srcdir)/Doxyfile.version.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
sofia-footer.html: $(top_builddir)/config.status $(srcdir)/sofia-footer.html.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. $(distdir)/pictures
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Including Doxyfile.rfc in dist breaks make manpages
Doxyfile.rfc:
$(AWK) 'END { b="\\"; q="\\\""; \
print "# Autogenerated aliases for RFCs "from" .. "to ; \
print "ALIASES += " b; \
for (i=from; i < to; i++) { \
print "RFC"i"=\"<a href="q site i type q">RFC "i"</a>\" "b; \
}}' \
site=http://www.faqs.org/rfcs/rfc type=.html \
from=700 to=4800 \
/dev/null > $@
built-sources: $(BUILT_SOURCES)
clean-built-sources:
-rm -rf $(BUILT_SOURCES) $(BUILT_SOURCES:%=$(srcdir)/%)
*_tag_ref.c: $(TAG_AWK)
%_tag_ref.c: %_tag.c
$(AWK) -f $(TAG_AWK) NODLL=1 $(TAG_DLL_FLAGS) $<
@ENABLE_COVERAGE_TRUE@coverage:
@ENABLE_COVERAGE_TRUE@ @$(top_srcdir)/scripts/coverage $(COVERAGE_FLAGS) $(COVERAGE_INPUT)
../bnf/libbnf.la ../http/libhttp.la ../ipt/libipt.la ../iptsec/libiptsec.la \
../msg/libmsg.la ../nea/libnea.la ../nta/libnta.la ../nth/libnth.la \
../nua/libnua.la ../sdp/libsdp.la ../sip/libsip.la ../soa/libsoa.la \
../sresolv/libsresolv.la ../stun/libstun.la ../su/libsu.la \
../tport/libtport.la ../url/liburl.la:
$(MAKE) -C $(@D) $(@F)
# ----------------------------------------------------------------------
# Sofia specific rules
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,249 @@
/*!
@page docguide Documentation Guidelines
@section doxygen Using Doxygen
Doxygen is a document generation program, used by many C/C++ projects. Its
home page is at <a href="http://www.doxygen.org">http://www.doxygen.org</a>.
The Sofia documentation is written using Doxygen.
Doxygen works by extracting the documentation data both from the actual
C/C++ source code and from the specially formatted comments.
The comments can contain some Javadoc-like
@ref doxycommands "special commands".
In general the the style of the comments and documentation should follow the
<a href="http://java.sun.com/j2se/javadoc/writingdoccomments/">
javadoc style guide</a>.
A Doxygen comment must either contain reference about the entity
it is describing, e.g., command
\@file when describing files:
@verbatim
/**
* @file foo.c
*
* Implementation of foo. The foo takes care of grokking xyzzy.
*
* @author Jaska Jokunen <jaska.jokunen@company.com> \n
*
* @date Created: Wed Oct 20 15:06:51 EEST 2004 jasjoku
*/
@endverbatim
Usually the entity that is documented comes straight after the documentation
comment. For example, documenting a function happens like this:
@anchor orch
@verbatim
/**
* Orches a candometer. If orching candometer is not possible, it
* tries to schadule hearping.
*
* @param[in] k pointer to a candometer
* @param[in] level orching level
* @param[out] return_hearping return value for schaduled hearping
*
* @return
* The function orch() returns the candometer value, or #ERROR upon an error.
* If the returned value is 0, the newly schaduled hearping is returned in
* @a return_hearping.
*/
int orch(cando_t *k, int level, hearping_t *return_hearping)
{
...
}
@endverbatim
@subsection doxyfile Doxyfile and Doxyfile.conf
The doxygen options are specified through a configuration file,
<i>Doxyfile</i>. As a convention, a module-specific Doxyfile includes
a common file libsofia-sip-ua/docs/Doxyfile.conf. This makes it possible
to keep the module-specific Doxyfiles as clean as possible:
@code
PROJECT_NAME = "ipt"
OUTPUT_DIRECTORY = ../docs/ipt
INPUT = ipt.docs .
@INCLUDE = ../Doxyfile.conf
TAGFILES += ../docs/docs/doxytags=../docs
TAGFILES += ../docs/su/doxytags=../su
GENERATE_TAGFILE = ../docs/ipt/doxytags
@endcode
From the file above, you can observe some conventions. The
Doxygen-generated HTML documentation is collected in @b docs
subdirectory at top level. A separate output directory is created for
each submodule under it. Doxytags for the module are generated in the @e
doxytags file in the output directory.
@subsection module_docs Module documentation in \<module\>.docs
Each module contains a documentation file containing at least the module
mainpage called @e \<module\>.docs. There should be the module
boilerplate information, for instance the following example is excerpt
contents of file @e ipt.docs:
@verbatim
/**
@MODULEPAGE "ipt" - Utility Module
@section ipt_meta Module Meta Information
Utility library for IP Telephony applications.
@CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
@STATUS @SofiaSIP Core library
@LICENSE LGPL
@section ipt_overview Overview
This module contain some routines useful for IPT applications, like
- ...
- ...
*/
@endverbatim
@section doxycommands Common Doxygen Commands
In this section we go through the most common Doxygen commands. All
the commands are explained in the manual.
The commands include
- @ref doxystyle "style commands (@@a, @@b, @@c, @@e, @@em, @@p)"
- @ref doxyfuncs "function parameters and return values (@@param, @@return, @@retval)"
@subsection doxystyle Style Commands - @a, @b, @c, @e
The text style can be changed with @@b @b (bold), @@c @c (code), or
@@e @e (italic) commands. Function argument names use style command
@@a.
For example, a sentence "The @b Content-Type header @a ct specifies the @e
media-type of the message body, e.g., @c audio/amr would be AMR-encoded
audio." is produced with commands like
@code
The @b Content-Type header @a ct specifies the @e media-type of
the message body, e.g., @c audio/amr would be AMR-encoded audio.
@endcode
The style commands have synonyms, e.g., @@em and @@e mean same, as
well as @@c and @@p.
@subsection doxyfuncs Function Parameters and Return Values - @param, @return, @retval
Parameters to a function are documented with @@param commands. (See
the @ref orch "orch()" function above.) As a convention, the data flow
direction [in], [out] or [in,out] is indicated in the brackets after the
@@param command keyword.
Return values can be documented in two alternative manners, either
using @@return command (see @ref orch "orch()") or @@retval command. The
latter is used if the function returns a small number of possible
values, e.g., enumeration or success/failure indication.
@verbatim
/**Schadule hearping.
*
* The function schadule() schadules a hearping.
*
* @param[in] h pointer to hearping
*
* @retval 0 hearping was successful
* @retval -1 an error occurred
*/
int schadule(hearping_t *h)
{
...
}
@endverbatim
@subsection doxyexamples Example Blocks - @code, @endcode
An example code fragment can be included using @@code and @@endcode
commands.
@verbatim
/**Destroy a hearping.
*
* The function hearping_destroy() deinitializes a hearping and
* reclaims the memory allocated for it.
*
* @param[in,out] h pointer to pointer to hearping
*
* The function clears the pointer to hearping, so it must be called
* with a pointer to pointer:
* @code
* hearping_destroy(&x->hearping);
* @endcode
*/
void hearping_destroy(hearping_t **h)
{
@endverbatim
@subsection docpar Paragraphs
The command @@par can be used to divide text into paragraphs. The text on
the same line with @@par is used as a subtitle for the paragraph. The
commands @@date, @@note, @@bug, @@todo, @@sa (See Also) and
@@deprecated can be used to add common paragraphs to documentation entries.
@subsection docfiles Documenting Files
In most files there is documentation entry for the file itself. It is
usually at top after the LGPL reference, containing @@file command or alias
@@CFILE/@@IFILE. There are Emacs macros for creating the boilerplate entry.
@subsection docgrouping Grouping Entries
When the structure of the documentation does not follow directory or file
structure, it is possible to use grouping commands @@defgroup and @@ingroup.
The command @@defgroup creates a group, and @@ingroup adds an entry to an
group.
@subsection doclinking Creating Links
Normally, Doxygen creates links to classes (and C structs) when it
encounters the struct/class name. It is also possible to add links to
functions, type names and variables. If the function name is followed by
pair of parenthesis (), Doxygen creates a link to it. If a type name or
variable is prefixed with hash @#, Doxygen creates a link to it.
It is also possible to create links with freely selected link to
documentation entries with @@link and @@endlink commands.
When the link target is a named page, section, or subsection, it is possible
to use the @@ref command.
@subsection doctext Writing Body Text
The main body of the documentation is specified with @@mainpage command. The
contents of the @@mainpage entry become the HTML home page of the
documentation set. In each documentation set generated with Doxygen there
can be only one @@mainpage command. Commands @@section, @@subsection, and
@@subsubsection can be used to structure the body text.
It is also possible to add individual HTML pages to the documentation. It
happens with @@page command. These individual pages are like the home page
added with @@mainpage, they can be accessed with the Related Pages link from
the navigation bar.
@subsection docimages Adding Images
Images are added with @@image command. As the different documentation
formats support different image formats, the @@image has list the image file
name for each supported documentation format. The following example uses
bitmap image for HTML documentation and Encapsulate PostScript for
print documents:
@code
@image html sip-parser.gif
@image latex sip-parser.eps
@endcode
*/
@@ -0,0 +1,37 @@
#!/bin/sh
#
# description: Mangle email addresses in the HTML documentation
# author: Kai Vehmanen <kai.vehmanen@nokia.com>
# version: 20050908-3
#
# --------------------------------------------------------------------
#
# This file is part of the Sofia-SIP package
#
# Copyright (C) 2005 Nokia Corporation.
#
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# --------------------------------------------------------------------
find . -name '*.html' -print | while read i ; do
(
echo "Hiding email addresses in ${i}."
sed -r -i 's/([:>;][a-z][-a-z.]*)(@[a-z][a-z]*)\.[a-z][a-z]*(["<\&])/\1\2-email.address.hidden\3/gi' $i
)
done
@@ -0,0 +1,740 @@
/* -*- 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.
For a list of module specific pages, see @ref subdirs
"source tree structure" or direct links to submodules:<br>
<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>
@section who Contact Information
You can download latest Sofia SIP from the project
<a href="http://sofia-sip.sf.net">home page</a> at
<a href="sf.net">Sourceforge.net</a>.
Please contact us if you have questions regarding this software:
<ul>
<li>Pekka Pessi <Pekka.Pessi@nokia.com></li>
<li>Kai Vehmanen <Kai.Vehmanen@nokia.com></li>
</ul>
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
In libsofia-sip-ua, there are subdirectories
Terminal and high-level libraries utilizing for both signaling and media:
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>
- <a href="iptsec/index.html">"iptsec" -
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.
Please note that C style is always a matter of taste.
@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
Loops without condition use @c for @c (;;) instead of @c while @c (1).
@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
memory management, sockets, threads and time functions.
@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
To use these data types you must include the <su_types.h> header, which
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.
You need to include <netinet/in.h> or <su.h> to use these functions.
@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
@a something beginning from the next 32 bit boundary.
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
libsofia-sip-ua directory hierarchy that contains a file \<modulename\>.docs
(where the \<modulename\> of course referes to the actual name of
the module).
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
EPS (for latex). If some program (e.g. MS Visio) is
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.
- (optionally) source code file(s) of the module and module tests.
The source code file(s) can also be located in subdirectories if necesary.
@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
Inheritance is a object-oriented practice that has limited use in Sofia.
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
home-based memory management functions from <su_alloc.h>.
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
struct derived
{
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
There are a few template types implemented as macros in Sofia libraries.
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
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
separately.
See documentation of <su_alloc.h> and @ref su_alloc "memory managment tutorial"
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
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
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 */
/* registrations were already moved to upper level home. */
su_home_deinit(temphome);
/* return ok/not-ok */
return success;
}
@endcode
@section testing Testing Your Code
See <tstdef.h> for example of how to write module tests with macros provided
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
(If there is a line of code that you have not tested, you don't know
if its working.) \n
For selected part of code you should also aim for
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",
@b my_test_foo and @b my_test_bar will be built and then run.
Make will print a
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
rely on any files that are not in version control system.
Sofia SIP's top-level makefile contains a recursive check target, so
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.
The <a href="http://www.gnu.org/manual/make/">GNU make manual</a>
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
The aclocal.m4 contains the definitions of the autoconf macros used in
@b configure.ac.
This file is generated by aclocal command.
@subsection Makefile_am Makefile.am
Makefile.am is where you define what programs and libraries should
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
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
replaced with values found during the configuration process. For instance
the variable @c @@srcdir@@ in @b Makefile.in is replaced in @b Makefile
with the source directory path (useful when compiling outside the main
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
parameters) by using command "./config.status -r" or
"./config.status --recheck".
This file is generated by configure script.
@subsection config_cache config.cache
This file contains results of the various checks that configure script
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
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
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
In addition to the macros mentioned above, there is also functions for
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().
*/
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

@@ -0,0 +1,4 @@
<hr />
Sofia-SIP @VERSION@ -
Copyright (C) 2006 Nokia Corporation. All rights reserved.
Licensed under the terms of the GNU Lesser General Public License.