Commit 34cac05e authored by Pekka Pessi's avatar Pekka Pessi

Added "features" module.

darcs-hash:20051026221007-65a35-a482dcead8ad3a5928530244a7adc45ca0337863.gz
parent 4964c480
......@@ -125,12 +125,13 @@ Makefile
packages/Makefile
packages/sofia-sip.spec
packages/sofia-sip-ua.pc
libsofia-sip-ua/nua/sofia_config.h
libsofia-sip-ua/Makefile
libsofia-sip-ua/bnf/Makefile
libsofia-sip-ua/docs/Makefile
libsofia-sip-ua/docs/Doxyfile.version
libsofia-sip-ua/docs/sofia-footer.html
libsofia-sip-ua/features/Makefile
libsofia-sip-ua/features/sofia_sip_features.h
libsofia-sip-ua/http/Makefile
libsofia-sip-ua/ipt/Makefile
libsofia-sip-ua/iptsec/Makefile
......@@ -140,8 +141,8 @@ libsofia-sip-ua/nta/Makefile
libsofia-sip-ua/nth/Makefile
libsofia-sip-ua/nua/Makefile
libsofia-sip-ua/sdp/Makefile
libsofia-sip-ua/soa/Makefile
libsofia-sip-ua/sip/Makefile
libsofia-sip-ua/soa/Makefile
libsofia-sip-ua/sresolv/Makefile
libsofia-sip-ua/stun/Makefile
libsofia-sip-ua/su/Makefile
......
......@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
# note: order does matter in the subdir list
SUBDIRS = su bnf sresolv sdp url msg sip stun ipt soa \
tport http nea nta iptsec nth nua
tport http nea nta iptsec nth nua features
DIST_SUBDIRS = docs $(SUBDIRS)
EXTRA_DIST = sofia.am
......
PROJECT_NAME = "features"
OUTPUT_DIRECTORY = ../docs/html/features
INPUT = sofia_sip_features.docs .
@INCLUDE = ../docs/Doxyfile.conf
TAGFILES += ../docs/docs/doxytags=../docs
TAGFILES += ../docs/su/doxytags=../su
TAGFILES += ../docs/ipt/doxytags=../ipt
TAGFILES += ../docs/bnf/doxytags=../bnf
TAGFILES += ../docs/url/doxytags=../url
TAGFILES += ../docs/msg/doxytags=../msg
TAGFILES += ../docs/sip/doxytags=../sip
TAGFILES += ../docs/sresolv/doxytags=../sresolv
TAGFILES += ../docs/tport/doxytags=../tport
TAGFILES += ../docs/nta/doxytags=../nta
TAGFILES += ../docs/sdp/doxytags=../sdp
GENERATE_TAGFILE = ../docs/features/doxytags
ALIASES +=
#
# Makefile.am for sofia features module
#
# ----------------------------------------------------------------------
# Header paths
INCLUDES = -I$(srcdir)/../bnf \
-I$(srcdir)/../ipt \
-I$(srcdir)/../iptsec \
-I$(srcdir)/../http \
-I$(srcdir)/../msg \
-I$(srcdir)/../nea \
-I$(srcdir)/../nta \
-I$(srcdir)/../nth \
-I$(srcdir)/../nua \
-I$(srcdir)/../sdp \
-I$(srcdir)/../sip \
-I$(srcdir)/../soa \
-I$(srcdir)/../tport \
-I$(srcdir)/../url \
-I$(srcdir)/../su
# ----------------------------------------------------------------------
# Build targets
noinst_LTLIBRARIES = libsofia.la
# ----------------------------------------------------------------------
# Rules for building the targets
include_HEADERS = sofia_sip_features.h
libsofia_la_SOURCES = sofia_sip_features.c
# ----------------------------------------------------------------------
# Install and distribution rules
# ----------------------------------------------------------------------
# Sofia specific rules
include $(srcdir)/../sofia.am
......@@ -22,47 +22,104 @@
*
*/
/**@file sofia_config.c Provide sofia-sip features.
*
/**@file sofia_sip_features.c
* Provide features available through the sofia-sip library.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
*
* @date Created: Mon Oct 24 14:51:32 2005 ppessi
*/
#include "config.h"
#include "config.h"
#include <stddef.h>
#include "su_configure.h"
#include "sofia_config.h"
#include <su_configure.h>
#include <tport_tls.h>
#include "sofia_sip_features.h"
/** The name and version of software package providing Sofia-SIP-UA library. */
char const * const sofia_sip_name_version = SOFIA_SIP_NAME_VERSION;
/** The name and version of software package providing S/MIME functionality. */
char const * const sofia_has_smime = NULL;
/** The name and version of software package providing TLS functionality.
*
* TLS over TCP is used as transport for SIP messages when using SIPS
* scheme. Using TLS over TCP with SIP is described in @RFC3261.
*/
#if HAVE_OPENSSL
char const * const sofia_has_tls = tls_version;
#else
char const * const sofia_has_tls;
#endif
/** The name and version of software package providing DTLS functionality.
*
* DTLS or TLS over datagram transport (UDP) can be used as transport for
* SIP messages.
*/
char const * const sofia_has_dtls;
char const *sofia_name_version = PACKAGE_STRING;
/** The name and version of software package providing TLS over SCTP functionality.
*
* TLS over SCTP can be used as transport for SIP messages.
*/
char const * const sofia_has_tls_sctp;
#if HAVE_SOFIA_SIGCOMP
#include <sigcomp.h>
char const *sofia_has_sigcomp = sigcomp_package_version;
#else
char const *sofia_has_sigcomp = NULL;
#endif
#if HAVE_OPENSSL
#include <tport_tls.h>
char const *sofia_has_tls = tls_version;
/** The name and version of software package providing SigComp functionality.
*
* SigComp can be used to compress SIP messages.
*/
#if HAVE_SOFIA_SIGCOMP
char const * const sofia_has_sigcomp = sigcomp_package_version;
#else
char const *sofia_has_tls = NULL;
char const * const sofia_has_sigcomp;
#endif
/** The name and version of software package providing STUN functionality.
*
* STUN is a protocol used to traverse NATs with UDP.
*/
#if HAVE_SOFIA_STUN
char const *sofia_has_stun = NULL;
extern char const stun_version[];
char const * const sofia_has_stun = stun_version;
#else
char const *sofia_has_stun = NULL;
char const * const sofia_has_stun;
#endif
/** The name and version of software package providing TURN functionality.
*
* TURN is a protocol used to traverse NATs or firewalls with TCP or UDP.
*/
char const * const sofia_has_turn;
/** The name and version of software package providing UPnP functionality.
*
* UPnP (Universal Plug and Play) can be used to traverse NATs or firewalls.
*/
char const * const sofia_has_upnp;
/** The name and version of software package providing SCTP functionality.
*
* SCTP can be used as transport for SIP messages. The software providing it
* can be, for example, LKSCTP (Linux kernel SCTP) for Linux.
*/
char const * const sofia_has_sctp;
/* We don't have viable SCTP transport interface */
/** The name and version of software package providing IPv6 functionality.
*
* IPv6 can be used to send SIP messages.
*/
#if SU_HAVE_IN6
char const *sofia_has_ipv6 = "v6";
char const * const sofia_has_ipv6 = "IPv6";
#else
char const *sofia_has_ipv6 = NULL;
char const * const sofia_has_ipv6;
#endif
char const *sofia_has_smime = NULL;
/* -*- text -*- */
/**@mainpage Sofia User Agent Library Features
@section features_meta Module Meta Information
The @b features module provides application information about the various
features possibly available through the sofia-sip-ua binary API.
@CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
@STATUS Core library
@LICENSE LGPL
@par Contributor(s):
- Pekka Pessi <Pekka.Pessi@nokia.com>
@section features_overview Overview
The #sofia_sip_name_version contains the name and release of currently
installed @a libsofia-sip-ua.so library. The macro #SOFIA_SIP_NAME_VERSION
contains the name and release of currently available include files.
The Sofia SIP binary API hides some protocols used under the SIP stack.
While the binary API stays the same, the features are not necessarily there.
These features are mainly related to encryption, compression and underlying
transports.
- #sofia_has_smime
- #sofia_has_tls
- #sofia_has_dtls
- #sofia_has_tls_sctp
- #sofia_has_sigcomp
- #sofia_has_stun
- #sofia_has_turn
- #sofia_has_upnp
- #sofia_has_sctp
- #sofia_has_ipv6
*/
\ No newline at end of file
/*
* This file is part of the Sofia-SIP package
/* This -*- C -*- file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
......@@ -22,28 +21,34 @@
*
*/
/**@file sofia_version.h
* @brief Nokia User Agent Library
/**@file sofia_sip_features.h
* @brief Nokia User Agent Library Features
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Wed Feb 14 17:09:44 2001 ppessi
*/
#ifndef SOFIA_VERSION_H
/** Defined when @b <sofia_version.h> has been included. */
#define SOFIA_VERSION_H
#ifndef SOFIA_SIP_FEATURES_H
/** Defined when <sofia_sip_features.h> has been included. */
#define SOFIA_SIP_FEATURES_H
/** Define as current Sofia version */
#define SOFIA_VERSION @PACKAGE_VERSION@
#define SOFIA_SIP_VERSION "@PACKAGE_VERSION@"
/** Define as current Sofia name and version */
#define SOFIA_NAME_VERSION @PACKAGE_STRING@
#define SOFIA_SIP_NAME_VERSION "@PACKAGE_NAME@-@PACKAGE_VERSION@"
extern char const *sofia_name_version;
extern char const *sofia_has_sigcomp;
extern char const *sofia_has_tls;
extern char const *sofia_has_stun;
extern char const *sofia_has_ipv6;
extern char const *sofia_has_smime;
extern char const * const sofia_sip_name_version;
extern char const * const sofia_has_smime;
extern char const * const sofia_has_tls;
extern char const * const sofia_has_dtls;
extern char const * const sofia_has_tls_sctp;
extern char const * const sofia_has_sigcomp;
extern char const * const sofia_has_stun;
extern char const * const sofia_has_turn;
extern char const * const sofia_has_upnp;
extern char const * const sofia_has_sctp;
extern char const * const sofia_has_ipv6;
#endif
......@@ -34,11 +34,10 @@ TESTS = test_nua
BUILT_SOURCES = nua_tag_ref.c
include_HEADERS = nua.h nua_stack.h nua_tag.h sofia_config.h
include_HEADERS = nua.h nua_tag.h
libnua_la_SOURCES = nua.c nua_common.c nua_stack.c \
nua_tag.c nua_tag_ref.c \
sofia_config.c
libnua_la_SOURCES = nua.c nua_stack.h nua_common.c nua_stack.c \
nua_tag.c nua_tag_ref.c
COVERAGE_INPUT = $(libnua_la_SOURCES) $(include_HEADERS)
......
......@@ -32,7 +32,7 @@
* @author Kai Vehmanen <Kai.Vehmanen@nokia.com>
*
* @date Created: Thu Jul 24 17:21:00 2003 ppessi
* @date Last modified: Mon Aug 8 19:10:15 2005 ppessi
* @date Last modified: Wed Oct 26 14:15:27 2005 ppessi
*/
#include "config.h"
......@@ -48,6 +48,8 @@
#include <su.h>
#include <su_localinfo.h>
#include <openssl/opensslv.h>
#define STUN_DEBUG 5 /* default log level */
/** STUN log. */
......@@ -83,6 +85,9 @@ struct stun_socket_s
int ss_state;
};
char const stun_version[] =
"sofia-sip-stun-" PACKAGE_VERSION " with " OPENSSL_VERSION_TEXT;
/**
* Check if a STUN engine should be created.
*
......
......@@ -46,6 +46,8 @@
typedef struct stun_engine_s stun_engine_t;
typedef struct stun_socket_s stun_socket_t;
extern char const stun_version[]; /**< Name and version of STUN software */
int stun_is_requested(tag_type_t tag, tag_value_t value, ...);
stun_engine_t *stun_engine_tcreate(tag_type_t tag, tag_value_t value, ...);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment