features.c 3.93 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * 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
 *
 */

25
/**@CFILE features.c
Pekka Pessi's avatar
Pekka Pessi committed
26 27 28 29 30 31 32 33 34 35 36
 * 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 <stddef.h>

37
#include <sofia-sip/su_configure.h>
Pekka Pessi's avatar
Pekka Pessi committed
38
#include <tport_tls.h>
39
#include "sofia-sip/sofia_features.h"
Pekka Pessi's avatar
Pekka Pessi committed
40 41 42 43

/** The name and version of software package providing Sofia-SIP-UA library. */
char const * const sofia_sip_name_version = SOFIA_SIP_NAME_VERSION;

44 45 46
/** The name and version of software package providing S/MIME functionality, 
 *  NULL if none.
 */
Pekka Pessi's avatar
Pekka Pessi committed
47
char const * const sofia_sip_has_smime = NULL;
Pekka Pessi's avatar
Pekka Pessi committed
48 49


50 51
/** The name and version of software package providing TLS functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
52 53 54 55 56
 * 
 * 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
Pekka Pessi's avatar
Pekka Pessi committed
57
char const * const sofia_sip_has_tls = tls_version;
Pekka Pessi's avatar
Pekka Pessi committed
58
#else
Pekka Pessi's avatar
Pekka Pessi committed
59
char const * const sofia_sip_has_tls;
Pekka Pessi's avatar
Pekka Pessi committed
60 61
#endif

62 63
/** The name and version of software package providing DTLS functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
64 65 66 67
 *
 * DTLS or TLS over datagram transport (UDP) can be used as transport for
 * SIP messages.
 */
Pekka Pessi's avatar
Pekka Pessi committed
68
char const * const sofia_sip_has_dtls;
Pekka Pessi's avatar
Pekka Pessi committed
69

70 71
/** The name and version of software package providing TLS over SCTP functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
72 73 74
 *
 * TLS over SCTP can be used as transport for SIP messages.
 */
Pekka Pessi's avatar
Pekka Pessi committed
75
char const * const sofia_sip_has_tls_sctp;
Pekka Pessi's avatar
Pekka Pessi committed
76 77 78 79 80

#if HAVE_SOFIA_SIGCOMP
#include <sigcomp.h>
#endif

81 82
/** The name and version of software package providing SigComp functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
83 84 85 86
 *
 * SigComp can be used to compress SIP messages.
 */
#if HAVE_SOFIA_SIGCOMP
Pekka Pessi's avatar
Pekka Pessi committed
87
char const * const sofia_sip_has_sigcomp = sigcomp_package_version;
Pekka Pessi's avatar
Pekka Pessi committed
88
#else
Pekka Pessi's avatar
Pekka Pessi committed
89
char const * const sofia_sip_has_sigcomp;
Pekka Pessi's avatar
Pekka Pessi committed
90 91
#endif

92 93
/** The name and version of software package providing STUN functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
94 95 96 97 98
 *
 * STUN is a protocol used to traverse NATs with UDP.
 */
#if HAVE_SOFIA_STUN
extern char const stun_version[];
Pekka Pessi's avatar
Pekka Pessi committed
99
char const * const sofia_sip_has_stun = stun_version;
Pekka Pessi's avatar
Pekka Pessi committed
100
#else
Pekka Pessi's avatar
Pekka Pessi committed
101
char const * const sofia_sip_has_stun;
Pekka Pessi's avatar
Pekka Pessi committed
102 103
#endif

104 105
/** The name and version of software package providing TURN functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
106 107 108
 *
 * TURN is a protocol used to traverse NATs or firewalls with TCP or UDP.
 */
Pekka Pessi's avatar
Pekka Pessi committed
109
char const * const sofia_sip_has_turn;
Pekka Pessi's avatar
Pekka Pessi committed
110

111 112
/** The name and version of software package providing UPnP functionality, 
 *  NULL if none. 
Pekka Pessi's avatar
Pekka Pessi committed
113 114 115
 *
 * UPnP (Universal Plug and Play) can be used to traverse NATs or firewalls.
 */
Pekka Pessi's avatar
Pekka Pessi committed
116
char const * const sofia_sip_has_upnp;
Pekka Pessi's avatar
Pekka Pessi committed
117

118 119
/** The name and version of software package providing SCTP functionality, 
 *  NULL if none.
Pekka Pessi's avatar
Pekka Pessi committed
120 121 122 123
 *
 * SCTP can be used as transport for SIP messages. The software providing it
 * can be, for example, LKSCTP (Linux kernel SCTP) for Linux.
 */
Pekka Pessi's avatar
Pekka Pessi committed
124
char const * const sofia_sip_has_sctp;
Pekka Pessi's avatar
Pekka Pessi committed
125 126
/* We don't have viable SCTP transport interface */

127 128
/** The name and version of software package providing IPv6 functionality, 
 *  NULL if none.
Pekka Pessi's avatar
Pekka Pessi committed
129 130 131 132
 *
 * IPv6 can be used to send SIP messages.
 */
#if SU_HAVE_IN6
Pekka Pessi's avatar
Pekka Pessi committed
133
char const * const sofia_sip_has_ipv6 = "IPv6";
Pekka Pessi's avatar
Pekka Pessi committed
134
#else
Pekka Pessi's avatar
Pekka Pessi committed
135
char const * const sofia_sip_has_ipv6;
Pekka Pessi's avatar
Pekka Pessi committed
136
#endif