Commit af7e9e59 authored by Pekka Pessi's avatar Pekka Pessi

Fixed features.

Added libfeatures.la into .so. Renamed sofia_has_* as sofia_sip_has_*. Using
features in nua_cli.c

darcs-hash:20051027085718-65a35-38d8f1db97568ba8a41f8381d95b802e4f830a5e.gz
parent 7628bf26
......@@ -13,6 +13,7 @@ lib_LTLIBRARIES = libsofia-sip-ua.la
libsofia_sip_ua_la_SOURCES =
libsofia_sip_ua_la_LIBADD = bnf/libbnf.la \
features/libfeatures.la \
ipt/libipt.la \
iptsec/libiptsec.la \
msg/libmsg.la \
......
......@@ -24,14 +24,14 @@ INCLUDES = -I$(srcdir)/../bnf \
# ----------------------------------------------------------------------
# Build targets
noinst_LTLIBRARIES = libsofia.la
noinst_LTLIBRARIES = libfeatures.la
# ----------------------------------------------------------------------
# Rules for building the targets
include_HEADERS = sofia_sip_features.h
libsofia_la_SOURCES = sofia_sip_features.c
libfeatures_la_SOURCES = sofia_sip_features.c
# ----------------------------------------------------------------------
# Install and distribution rules
......
......@@ -42,7 +42,7 @@
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;
char const * const sofia_sip_has_smime = NULL;
/** The name and version of software package providing TLS functionality.
......@@ -51,9 +51,9 @@ char const * const sofia_has_smime = NULL;
* scheme. Using TLS over TCP with SIP is described in @RFC3261.
*/
#if HAVE_OPENSSL
char const * const sofia_has_tls = tls_version;
char const * const sofia_sip_has_tls = tls_version;
#else
char const * const sofia_has_tls;
char const * const sofia_sip_has_tls;
#endif
/** The name and version of software package providing DTLS functionality.
......@@ -61,13 +61,13 @@ char const * const sofia_has_tls;
* DTLS or TLS over datagram transport (UDP) can be used as transport for
* SIP messages.
*/
char const * const sofia_has_dtls;
char const * const sofia_sip_has_dtls;
/** 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;
char const * const sofia_sip_has_tls_sctp;
#if HAVE_SOFIA_SIGCOMP
#include <sigcomp.h>
......@@ -78,9 +78,9 @@ char const * const sofia_has_tls_sctp;
* SigComp can be used to compress SIP messages.
*/
#if HAVE_SOFIA_SIGCOMP
char const * const sofia_has_sigcomp = sigcomp_package_version;
char const * const sofia_sip_has_sigcomp = sigcomp_package_version;
#else
char const * const sofia_has_sigcomp;
char const * const sofia_sip_has_sigcomp;
#endif
/** The name and version of software package providing STUN functionality.
......@@ -89,29 +89,29 @@ char const * const sofia_has_sigcomp;
*/
#if HAVE_SOFIA_STUN
extern char const stun_version[];
char const * const sofia_has_stun = stun_version;
char const * const sofia_sip_has_stun = stun_version;
#else
char const * const sofia_has_stun;
char const * const sofia_sip_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;
char const * const sofia_sip_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;
char const * const sofia_sip_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;
char const * const sofia_sip_has_sctp;
/* We don't have viable SCTP transport interface */
/** The name and version of software package providing IPv6 functionality.
......@@ -119,7 +119,7 @@ char const * const sofia_has_sctp;
* IPv6 can be used to send SIP messages.
*/
#if SU_HAVE_IN6
char const * const sofia_has_ipv6 = "IPv6";
char const * const sofia_sip_has_ipv6 = "IPv6";
#else
char const * const sofia_has_ipv6;
char const * const sofia_sip_has_ipv6;
#endif
......@@ -27,15 +27,15 @@ 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
- #sofia_sip_has_smime
- #sofia_sip_has_tls
- #sofia_sip_has_dtls
- #sofia_sip_has_tls_sctp
- #sofia_sip_has_sigcomp
- #sofia_sip_has_stun
- #sofia_sip_has_turn
- #sofia_sip_has_upnp
- #sofia_sip_has_sctp
- #sofia_sip_has_ipv6
*/
\ No newline at end of file
......@@ -39,16 +39,16 @@
#define SOFIA_SIP_NAME_VERSION "@PACKAGE_NAME@-@PACKAGE_VERSION@"
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_sip_has_smime;
extern char const * const sofia_sip_has_tls;
extern char const * const sofia_sip_has_dtls;
extern char const * const sofia_sip_has_tls_sctp;
extern char const * const sofia_sip_has_sigcomp;
extern char const * const sofia_sip_has_stun;
extern char const * const sofia_sip_has_turn;
extern char const * const sofia_sip_has_upnp;
extern char const * const sofia_has_sctp;
extern char const * const sofia_has_ipv6;
extern char const * const sofia_sip_has_sctp;
extern char const * const sofia_sip_has_ipv6;
#endif
......@@ -32,7 +32,7 @@
* @author Kai Vehmanen <Kai.Vehmanen@nokia.com>
*
* @date Created: Thu Jul 24 17:21:00 2003 ppessi
* @date Last modified: Wed Oct 26 14:15:27 2005 ppessi
* @date Last modified: Thu Oct 27 10:24:48 2005 ppessi
*/
#include "config.h"
......@@ -86,7 +86,7 @@ struct stun_socket_s
};
char const stun_version[] =
"sofia-sip-stun-" PACKAGE_VERSION " with " OPENSSL_VERSION_TEXT;
"sofia-sip-stun using " OPENSSL_VERSION_TEXT;
/**
* Check if a STUN engine should be created.
......
......@@ -5,7 +5,8 @@
sofiasrc=$(top_srcdir)/libsofia-sip-ua
INCLUDES = -I$(sofiasrc)/ipt \
INCLUDES = -I$(sofiasrc)/features \
-I$(sofiasrc)/ipt \
-I$(sofiasrc)/iptsec \
-I$(sofiasrc)/msg \
-I$(sofiasrc)/nta \
......
......@@ -29,7 +29,7 @@
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Wed Feb 14 18:37:04 EET 2001 ppessi
* @date Last modified: Thu Sep 29 18:35:22 2005 ppessi
* @date Last modified: Thu Oct 27 10:22:52 2005 ppessi
*/
#include "config.h"
......@@ -304,16 +304,43 @@ void cli_print_payload(cli_t *cli, sip_payload_t const *pl);
/** Print usage message */
void usage(char const *a0)
{
fprintf(stderr, "usage: %s url\n", a0);
fprintf(stderr, "usage: %s OPTIONS [url]\n", a0);
exit(1);
}
#include <sofia_sip_features.h>
void cli_version(char const *a0)
{
printf("nua_cli %s with %s\n", PACKAGE_VERSION,
sofia_sip_name_version);
#define FEATURE(name, s) \
printf("\t%s is %s%s\n", name, s ? "enabled with " : "disabled", s ? s : "")
FEATURE("S/MIME", sofia_sip_has_smime);
FEATURE("tls", sofia_sip_has_tls);
FEATURE("dtls", sofia_sip_has_dtls);
FEATURE("sctp", sofia_sip_has_tls_sctp);
FEATURE("sigcomp", sofia_sip_has_sigcomp);
FEATURE("stun", sofia_sip_has_stun);
FEATURE("turn", sofia_sip_has_turn);
FEATURE("upnp", sofia_sip_has_upnp);
FEATURE("sctp", sofia_sip_has_sctp);
FEATURE("ipv6", sofia_sip_has_ipv6);
exit(0);
}
int main(int ac, char *av[])
{
cli_t cli[1] = {{{{sizeof(cli)}}}};
su_init();
if (av[1] &&
(strcmp(av[1], "--version") == 0 || strcmp(av[1], "-v") == 0))
cli_version(av[0]);
su_home_init(cli->cli_home);
if ((cli->cli_root = su_root_create(cli))) {
......
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