features.c 3.86 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>
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.
 * @showinitializer
 */
Pekka Pessi's avatar
Pekka Pessi committed
44 45
char const * const sofia_sip_name_version = SOFIA_SIP_NAME_VERSION;

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


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

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

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

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

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

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

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

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

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

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