Compare commits
6 Commits
bba7c19d6c
...
a4b431c196
Author | SHA1 | Date |
---|---|---|
Andreas Eversberg | a4b431c196 | |
Andreas Eversberg | c25cf594d4 | |
Andreas Eversberg | 7016dc46d8 | |
Andreas Eversberg | 08bea4502b | |
Andreas Eversberg | 105ec37f86 | |
Andreas Eversberg | 0181ef5789 |
|
@ -38,3 +38,4 @@ out/
|
|||
*.orig
|
||||
tests/CI/output
|
||||
.develvars
|
||||
configure
|
||||
|
|
|
@ -57,6 +57,8 @@ SPANDSP=@PBX_SPANDSP@
|
|||
SPEEX=@PBX_SPEEX@
|
||||
SPEEXDSP=@PBX_SPEEXDSP@
|
||||
SPEEX_PREPROCESS=@PBX_SPEEX_PREPROCESS@
|
||||
VEVS=@PBX_VEVS@
|
||||
LIBMNL=@PBX_LIBMNL@
|
||||
SQLITE3=@PBX_SQLITE3@
|
||||
SRTP=@PBX_SRTP@
|
||||
SS7=@PBX_SS7@
|
||||
|
|
|
@ -0,0 +1,285 @@
|
|||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
*
|
||||
* \brief Translate between signed linear and Vocal EVS codec
|
||||
*
|
||||
* \ingroup codecs
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>vevs</depend>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#include "asterisk/translate.h"
|
||||
#include "asterisk/config.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/utils.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#define uint8 uint8_t
|
||||
#define uint16 uint16_t
|
||||
#define uint32 uint32_t
|
||||
#define vbool bool
|
||||
#define sint15 int16_t
|
||||
#include "vocal-evs/evs.h"
|
||||
|
||||
#define BUFFER_SAMPLES 8000 /* 0.5 seconds @ 16 kHz */
|
||||
#define BUFFER_FRAMES 8192 /* Enough for about 0.5 seconds @ 128 Kbps */
|
||||
|
||||
/* Sample frame data */
|
||||
|
||||
#include "asterisk/slin.h"
|
||||
#include "ex_vevs.h"
|
||||
|
||||
/* Encoder and decoder instances */
|
||||
|
||||
struct evs_enc_pvt {
|
||||
evs_enc_ctx_t enc; /* Encoder states */
|
||||
int chunk; /* Size of chunk to encode (in samples) */
|
||||
int16_t buf[BUFFER_SAMPLES]; /* Buffer to store received uncompressed audio */
|
||||
};
|
||||
|
||||
struct evs_dec_pvt {
|
||||
evs_dec_ctx_t dec; /* Decoder states */
|
||||
int chunk; /* Size of chunk to decode (in samples) */
|
||||
};
|
||||
|
||||
#warning hacking
|
||||
int vocal_evs_init_coder (evs_enc_ctx_t *ctx, uint16 bandwidth, uint16 sampling_frequency, uint32 bitrate, vbool dtx_enable) { return 320; }
|
||||
int vocal_evs_process_coder (evs_enc_ctx_t *ctx, uint8 *enc_data, uint16 enc_data_size, const sint15 *enc_samples, uint16 sample_count) { return 320; }
|
||||
int vocal_evs_close_coder (evs_enc_ctx_t *ctx) { return 0; }
|
||||
int vocal_evs_init_decoder (evs_dec_ctx_t *ctx, uint16 sampling_frequency) { return 320; }
|
||||
int vocal_evs_process_decoder (evs_dec_ctx_t *ctx, sint15 *dec_samples, uint16 max_sample_count, uint8 *dec_data, uint16 dec_data_size) { return 320; }
|
||||
int vocal_evs_close_decoder (evs_dec_ctx_t *ctx) { return 0; }
|
||||
|
||||
|
||||
/* Create and destroy codec intances */
|
||||
|
||||
static int evs_enc_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct evs_enc_pvt *enc = pvt->pvt;
|
||||
const unsigned int sample_rate = pvt->t->src_codec.sample_rate;
|
||||
int rc;
|
||||
|
||||
memset(enc, 0, sizeof(*enc));
|
||||
rc = vocal_evs_init_coder(&enc->enc, EVS_BW_NB, EVS_SF_16K, EVS_BR_5K90, false);
|
||||
if (rc <= 0) {
|
||||
ast_log(LOG_ERROR, "Error creating the Vocal EVS encoder\n");
|
||||
return -1;
|
||||
}
|
||||
enc->chunk = rc;
|
||||
|
||||
ast_debug(3, "Created encoder (Vocal EVS) with sample rate %d\n", sample_rate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void evs_enc_destroy(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct evs_enc_pvt *enc = pvt->pvt;
|
||||
|
||||
vocal_evs_close_coder(&enc->enc);
|
||||
|
||||
ast_debug(3, "Destroyed encoder (Vocal EVS)\n");
|
||||
}
|
||||
|
||||
static int evs_dec_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct evs_dec_pvt *dec = pvt->pvt;
|
||||
const unsigned int sample_rate = pvt->t->src_codec.sample_rate;
|
||||
int rc;
|
||||
|
||||
memset(dec, 0, sizeof(*dec));
|
||||
rc = vocal_evs_init_decoder(&dec->dec, EVS_SF_16K);
|
||||
if (rc <= 0) {
|
||||
ast_log(LOG_ERROR, "Error creating the Vocal EVS decoder\n");
|
||||
return -1;
|
||||
}
|
||||
dec->chunk = rc;
|
||||
|
||||
ast_debug(3, "Created decoder (Vocal EVS) with sample rate %d\n", sample_rate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void evs_dec_destroy(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct evs_dec_pvt *dec = pvt->pvt;
|
||||
|
||||
vocal_evs_close_decoder(&dec->dec);
|
||||
|
||||
ast_debug(3, "Destroyed encoder (Vocal EVS)\n");
|
||||
}
|
||||
|
||||
/* Encoder */
|
||||
|
||||
static int lintoevs_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
||||
{
|
||||
struct evs_enc_pvt *enc = pvt->pvt;
|
||||
|
||||
/* XXX We should look at how old the rest of our stream is, and if it
|
||||
is too old, then we should overwrite it entirely, otherwise we can
|
||||
get artifacts of earlier talk that do not belong */
|
||||
if (pvt->samples + f->samples > BUFFER_SAMPLES) {
|
||||
ast_log(LOG_WARNING, "Out of buffer space\n");
|
||||
return -1;
|
||||
}
|
||||
memcpy(enc->buf + pvt->samples, f->data.ptr, f->datalen);
|
||||
pvt->samples += f->samples;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintoevs_frameout(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct evs_enc_pvt *enc = pvt->pvt;
|
||||
struct ast_frame *result = NULL;
|
||||
struct ast_frame *last = NULL;
|
||||
int samples = 0; /* output samples */
|
||||
|
||||
while (pvt->samples >= enc->chunk) {
|
||||
struct ast_frame *current;
|
||||
int rc;
|
||||
|
||||
rc = vocal_evs_process_coder(&enc->enc, pvt->outbuf.uc, BUFFER_FRAMES, enc->buf, enc->chunk);
|
||||
if (rc <= 0) {
|
||||
ast_log(LOG_ERROR, "Error encoding with Vocal EVS encoder\n");
|
||||
pvt->samples = 0;
|
||||
return NULL;
|
||||
}
|
||||
samples += enc->chunk;
|
||||
pvt->samples -= enc->chunk;
|
||||
current = ast_trans_frameout(pvt, rc, enc->chunk);
|
||||
if (!current) {
|
||||
continue;
|
||||
} else if (last) {
|
||||
/* Append frame */
|
||||
AST_LIST_NEXT(last, frame_list) = current;
|
||||
} else {
|
||||
/* Return first frame */
|
||||
result = current;
|
||||
}
|
||||
last = current;
|
||||
}
|
||||
|
||||
/* Move the data at the end of the buffer to the front */
|
||||
if (samples) {
|
||||
memmove(enc->buf, enc->buf + samples, pvt->samples * sizeof(int16_t));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Decoder */
|
||||
|
||||
static int evstolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
||||
{
|
||||
struct evs_dec_pvt *dec = pvt->pvt;
|
||||
int16_t *dst = pvt->outbuf.i16;
|
||||
int rc;
|
||||
|
||||
if (BUFFER_SAMPLES - pvt->samples < dec->chunk) {
|
||||
ast_log(LOG_WARNING, "Out of buffer space\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (f->datalen == 0) {
|
||||
ast_log(LOG_DEBUG, "Conceal missing EVS frame.\n");
|
||||
/* The documentation does not give a hint on how bad frames indicated and if they are concealed at all. This may not work!*/
|
||||
rc = vocal_evs_process_decoder(&dec->dec, dst + pvt->samples, BUFFER_SAMPLES - pvt->samples, NULL, 0);
|
||||
if (rc <= 0) {
|
||||
ast_log(LOG_ERROR, "Error concealing missing EVS frame with Vocal EVS decoder\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
rc = vocal_evs_process_decoder(&dec->dec, dst + pvt->samples, BUFFER_SAMPLES - pvt->samples, f->data.ptr, f->datalen);
|
||||
if (rc <= 0) {
|
||||
ast_log(LOG_ERROR, "Error decoding with Vocal EVS decoder\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
pvt->samples += rc;
|
||||
pvt->datalen += rc * sizeof(int16_t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_translator lintoevs = {
|
||||
.name = "lintovevs",
|
||||
.src_codec = {
|
||||
.name = "slin",
|
||||
.type = AST_MEDIA_TYPE_AUDIO,
|
||||
.sample_rate = 16000,
|
||||
},
|
||||
.dst_codec = {
|
||||
.name = "vevs",
|
||||
.type = AST_MEDIA_TYPE_AUDIO,
|
||||
.sample_rate = 16000,
|
||||
},
|
||||
.format = "vevs",
|
||||
.newpvt = evs_enc_new,
|
||||
.framein = lintoevs_framein,
|
||||
.frameout = lintoevs_frameout,
|
||||
.destroy = evs_enc_destroy,
|
||||
.sample = slin16_sample,
|
||||
.buf_size = BUFFER_FRAMES,
|
||||
.desc_size = sizeof (struct evs_enc_pvt ),
|
||||
};
|
||||
|
||||
static struct ast_translator evstolin = {
|
||||
.name = "vevstolin",
|
||||
.src_codec = {
|
||||
.name = "vevs",
|
||||
.type = AST_MEDIA_TYPE_AUDIO,
|
||||
.sample_rate = 16000,
|
||||
},
|
||||
.dst_codec = {
|
||||
.name = "slin",
|
||||
.type = AST_MEDIA_TYPE_AUDIO,
|
||||
.sample_rate = 16000,
|
||||
},
|
||||
.format = "slin",
|
||||
.newpvt = evs_dec_new,
|
||||
.framein = evstolin_framein,
|
||||
.destroy = evs_dec_destroy,
|
||||
.sample = vevs_sample,
|
||||
.buffer_samples = BUFFER_SAMPLES,
|
||||
.buf_size = BUFFER_SAMPLES * 2,
|
||||
.desc_size = sizeof (struct evs_dec_pvt ),
|
||||
};
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintoevs);
|
||||
res |= ast_unregister_translator(&evstolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_register_translator(&evstolin);
|
||||
res |= ast_register_translator(&lintoevs);
|
||||
|
||||
if (res) {
|
||||
unload_module();
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Vocal EVS Coder/Decoder",
|
||||
.support_level = AST_MODULE_SUPPORT_CORE,
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
#include "asterisk/format_cache.h" /* for ast_format_evs */
|
||||
#include "asterisk/frame.h" /* for ast_frame, etc */
|
||||
|
||||
static uint8_t ex_vevs[] = { /* PRIMARY_16400, WB */
|
||||
0x05, 0x51, 0x63, 0x4e, 0xa7, 0x87, 0x0c, 0xc4,
|
||||
0x50, 0x3c, 0xcf, 0x60, 0x19, 0xbf, 0xd3, 0x93,
|
||||
0xf4, 0xd9, 0x49, 0xac, 0x89, 0xce, 0x4c, 0x4d,
|
||||
0x5e, 0x01, 0xff, 0x80, 0x00, 0x17, 0x17, 0xd5,
|
||||
0x73, 0x7b, 0xd5, 0x1d, 0xe1, 0xcf, 0x65, 0x0b,
|
||||
0xee, 0x95
|
||||
};
|
||||
|
||||
static struct ast_frame *vevs_sample(void)
|
||||
{
|
||||
static struct ast_frame f = {
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.datalen = sizeof(ex_vevs),
|
||||
.samples = 320,
|
||||
.mallocd = 0,
|
||||
.offset = 0,
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = ex_vevs,
|
||||
};
|
||||
|
||||
f.subclass.format = ast_format_vevs;
|
||||
|
||||
return &f;
|
||||
}
|
|
@ -579,6 +579,10 @@ AST_EXT_LIB_SETUP([OPUS], [Opus], [opus])
|
|||
AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile])
|
||||
AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
|
||||
AST_EXT_LIB_SETUP([BEANSTALK], [Beanstalk Job Queue], [beanstalk])
|
||||
#FIXME
|
||||
AST_EXT_LIB_SETUP([VEVS], [Vocal EVS Audio Decoder/Encoder], [bluetooth])
|
||||
#AST_EXT_LIB_SETUP([VEVS], [Vocal EVS Audio Decoder/Encoder], [vocal-evs])
|
||||
AST_EXT_LIB_SETUP([LIBMNL], [MNL library], [mnl])
|
||||
|
||||
if test "x${PBX_PJPROJECT}" != "x1" ; then
|
||||
AST_EXT_LIB_SETUP([PJPROJECT], [PJPROJECT], [pjproject])
|
||||
|
@ -2409,6 +2413,11 @@ AST_EXT_LIB_CHECK([BLUETOOTH], [bluetooth], [ba2str], [bluetooth/bluetooth.h])
|
|||
|
||||
AST_EXT_LIB_CHECK([BEANSTALK], [beanstalk], [bs_version], [beanstalk.h])
|
||||
|
||||
#FIXME
|
||||
AST_EXT_LIB_CHECK([VEVS], [bluetooth], [ba2str], [bluetooth/bluetooth.h])
|
||||
AST_EXT_LIB_CHECK([LIBMNL], [mnl], [mnl_socket_open], [libmnl/libmnl.h])
|
||||
#AST_EXT_LIB_CHECK([VEVS], [vocal-evs], [vevs_enc], [vocal-evs/evs.h])
|
||||
|
||||
PG_CONFIG=":"
|
||||
if test "${USE_PGSQL}" != "no"; then
|
||||
if test "x${PGSQL_DIR}" != "x"; then
|
||||
|
|
|
@ -1226,6 +1226,9 @@
|
|||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Define to 1 if you have the Vocal EVS Audio Decoder/Encoder library. */
|
||||
#undef HAVE_VEVS
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#undef HAVE_VFORK
|
||||
|
||||
|
|
|
@ -245,6 +245,10 @@ extern struct ast_format *ast_format_silk8;
|
|||
extern struct ast_format *ast_format_silk12;
|
||||
extern struct ast_format *ast_format_silk16;
|
||||
extern struct ast_format *ast_format_silk24;
|
||||
/*!
|
||||
* \brief Built-in cached Vocal EVS format.
|
||||
*/
|
||||
extern struct ast_format *ast_format_vevs;
|
||||
|
||||
/*!
|
||||
* \brief Initialize format cache support within the core.
|
||||
|
|
|
@ -297,6 +297,8 @@ struct ast_sip_transport {
|
|||
int allow_reload;
|
||||
/*! Automatically send requests out the same transport requests have come in on */
|
||||
int symmetric_transport;
|
||||
/*! Local ports for client and server to use with IMS */
|
||||
int ims_port_c, ims_port_s;
|
||||
/*! This is a flow to another target */
|
||||
int flow;
|
||||
};
|
||||
|
@ -563,7 +565,9 @@ enum ast_sip_auth_type {
|
|||
/*! Google Oauth */
|
||||
AST_SIP_AUTH_TYPE_GOOGLE_OAUTH,
|
||||
/*! Credentials not stored this is a fake auth */
|
||||
AST_SIP_AUTH_TYPE_ARTIFICIAL
|
||||
AST_SIP_AUTH_TYPE_ARTIFICIAL,
|
||||
/*! Credentials stored as a username and RES combination */
|
||||
AST_SIP_AUTH_TYPE_IMS_AKA
|
||||
};
|
||||
|
||||
#define SIP_SORCERY_AUTH_TYPE "auth"
|
||||
|
@ -578,6 +582,9 @@ struct ast_sip_auth {
|
|||
AST_STRING_FIELD(auth_user);
|
||||
/*! Authentication password */
|
||||
AST_STRING_FIELD(auth_pass);
|
||||
/*! IMS Authentication password */
|
||||
char ims_res[8];
|
||||
int ims_res_len;
|
||||
/*! Authentication credentials in MD5 format (hash of user:realm:pass) */
|
||||
AST_STRING_FIELD(md5_creds);
|
||||
/*! Refresh token to use for OAuth authentication */
|
||||
|
@ -586,7 +593,13 @@ struct ast_sip_auth {
|
|||
AST_STRING_FIELD(oauth_clientid);
|
||||
/*! Secret to use for OAuth authentication */
|
||||
AST_STRING_FIELD(oauth_secret);
|
||||
/*! Use USIM emulation with these parameters */
|
||||
AST_STRING_FIELD(usim_opc);
|
||||
AST_STRING_FIELD(usim_k);
|
||||
AST_STRING_FIELD(usim_sqn);
|
||||
);
|
||||
/*! Use AMI interface for communication with USIM (instead of emulation) */
|
||||
unsigned int usim_ami;
|
||||
/*! The time period (in seconds) that a nonce may be reused */
|
||||
unsigned int nonce_lifetime;
|
||||
/*! Used to determine what to use when authenticating */
|
||||
|
@ -4198,4 +4211,6 @@ const int ast_sip_hangup_sip2cause(int cause);
|
|||
*/
|
||||
int ast_sip_str2rc(const char *name);
|
||||
|
||||
extern unsigned char *volte_auth;
|
||||
|
||||
#endif /* _RES_PJSIP_H */
|
||||
|
|
|
@ -925,6 +925,16 @@ static struct ast_codec silk24 = {
|
|||
.samples_count = silk_samples
|
||||
};
|
||||
|
||||
static struct ast_codec vevs = {
|
||||
.name = "vevs",
|
||||
.description = "Vocal EVS",
|
||||
.type = AST_MEDIA_TYPE_AUDIO,
|
||||
.sample_rate = 16000,
|
||||
.minimum_ms = 20,
|
||||
.maximum_ms = 300,
|
||||
.default_ms = 20,
|
||||
};
|
||||
|
||||
#define CODEC_REGISTER_AND_CACHE(codec) \
|
||||
({ \
|
||||
int __res_ ## __LINE__ = 0; \
|
||||
|
@ -1003,6 +1013,7 @@ int ast_codec_builtin_init(void)
|
|||
res |= CODEC_REGISTER_AND_CACHE_NAMED("silk12", silk12);
|
||||
res |= CODEC_REGISTER_AND_CACHE_NAMED("silk16", silk16);
|
||||
res |= CODEC_REGISTER_AND_CACHE_NAMED("silk24", silk24);
|
||||
res |= CODEC_REGISTER_AND_CACHE(vevs);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -252,6 +252,10 @@ struct ast_format *ast_format_silk8;
|
|||
struct ast_format *ast_format_silk12;
|
||||
struct ast_format *ast_format_silk16;
|
||||
struct ast_format *ast_format_silk24;
|
||||
/*!
|
||||
* \brief Built-in cached Vocal EVS format.
|
||||
*/
|
||||
struct ast_format *ast_format_vevs;
|
||||
|
||||
/*! \brief Number of buckets to use for the media format cache (should be prime for performance reasons) */
|
||||
#define CACHE_BUCKETS 53
|
||||
|
@ -359,6 +363,7 @@ static void format_cache_shutdown(void)
|
|||
ao2_replace(ast_format_silk12, NULL);
|
||||
ao2_replace(ast_format_silk16, NULL);
|
||||
ao2_replace(ast_format_silk24, NULL);
|
||||
ao2_replace(ast_format_vevs, NULL);
|
||||
}
|
||||
|
||||
int ast_format_cache_init(void)
|
||||
|
@ -468,6 +473,8 @@ static void set_cached_format(const char *name, struct ast_format *format)
|
|||
ao2_replace(ast_format_silk16, format);
|
||||
} else if (!strcmp(name, "silk24")) {
|
||||
ao2_replace(ast_format_silk24, format);
|
||||
} else if (!strcmp(name, "vevs")) {
|
||||
ao2_replace(ast_format_vevs, format);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3724,6 +3724,7 @@ int ast_rtp_engine_init(void)
|
|||
set_next_mime_type(ast_format_opus, 0, "audio", "opus", 48000);
|
||||
set_next_mime_type(ast_format_vp8, 0, "video", "VP8", 90000);
|
||||
set_next_mime_type(ast_format_vp9, 0, "video", "VP9", 90000);
|
||||
set_next_mime_type(ast_format_vevs, 0, "audio", "EVS", 16000);
|
||||
|
||||
/* Define the static rtp payload mappings */
|
||||
add_static_payload(0, ast_format_ulaw, 0);
|
||||
|
|
|
@ -351,4 +351,10 @@ SNDFILE_LIB=@SNDFILE_LIB@
|
|||
BEANSTALK_INCLUDE=@BEANSTALK_INCLUDE@
|
||||
BEANSTALK_LIB=@BEANSTALK_LIB@
|
||||
|
||||
VEVS_INCLUDE=@VEVS_INCLUDE@
|
||||
VEVS_LIB=@VEVS_LIB@
|
||||
|
||||
LIBMNL_INCLUDE=@LIBMNL_INCLUDE@
|
||||
LIBMNL_LIB=@LIBMNL_LIB@
|
||||
|
||||
HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@
|
||||
|
|
|
@ -61,6 +61,7 @@ $(call MOD_ADD_C,res_snmp,snmp/agent.c)
|
|||
$(call MOD_ADD_C,res_parking,$(wildcard parking/*.c))
|
||||
$(call MOD_ADD_C,res_pjsip,$(wildcard res_pjsip/*.c))
|
||||
$(call MOD_ADD_C,res_pjsip_session,$(wildcard res_pjsip_session/*.c))
|
||||
$(call MOD_ADD_C,res_pjsip_outbound_registration,$(wildcard res_pjsip_outbound_registration/*.c))
|
||||
$(call MOD_ADD_C,res_prometheus,$(wildcard prometheus/*.c))
|
||||
$(call MOD_ADD_C,res_ari,ari/cli.c ari/config.c ari/ari_websockets.c)
|
||||
$(call MOD_ADD_C,res_ari_model,ari/ari_model_validators.c)
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
/*** MODULEINFO
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#include <ctype.h> /* for tolower */
|
||||
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/format.h"
|
||||
#include "asterisk/logger.h" /* for ast_log, LOG_WARNING */
|
||||
#include "asterisk/strings.h" /* for ast_str_append */
|
||||
#include "asterisk/utils.h" /* for MAX, MIN */
|
||||
|
||||
struct evs_attr {
|
||||
int dummy;
|
||||
};
|
||||
|
||||
static void evs_destroy(struct ast_format *format)
|
||||
{
|
||||
struct evs_attr *attr = ast_format_get_attribute_data(format);
|
||||
|
||||
ast_free(attr);
|
||||
}
|
||||
|
||||
static void attr_init(struct evs_attr *attr)
|
||||
{
|
||||
memset(attr, 0, sizeof(*attr));
|
||||
}
|
||||
|
||||
static int evs_clone(const struct ast_format *src, struct ast_format *dst)
|
||||
{
|
||||
struct evs_attr *original = ast_format_get_attribute_data(src);
|
||||
struct evs_attr *attr = ast_malloc(sizeof(*attr));
|
||||
|
||||
#warning hacking
|
||||
abort();
|
||||
if (!attr) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (original) {
|
||||
*attr = *original;
|
||||
} else {
|
||||
attr_init(attr);
|
||||
}
|
||||
|
||||
ast_format_set_attribute_data(dst, attr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_format *evs_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)
|
||||
{
|
||||
char *attribs = ast_strdupa(attributes), *attrib;
|
||||
struct ast_format *cloned;
|
||||
struct evs_attr *attr;
|
||||
// unsigned int val;
|
||||
|
||||
cloned = ast_format_clone(format);
|
||||
if (!cloned) {
|
||||
return NULL;
|
||||
}
|
||||
attr = ast_format_get_attribute_data(cloned);
|
||||
|
||||
/* lower-case everything, so we are case-insensitive */
|
||||
for (attrib = attribs; *attrib; ++attrib) {
|
||||
*attrib = tolower(*attrib);
|
||||
} /* based on channels/chan_sip.c:process_a_sdp_image() */
|
||||
|
||||
ast_log(LOG_WARNING, "Unhandled received attribute '%s', please fix!\n", attrib);
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
static void evs_generate_sdp_fmtp(const struct ast_format *format, unsigned int payload, struct ast_str **str)
|
||||
{
|
||||
struct evs_attr *attr = ast_format_get_attribute_data(format);
|
||||
|
||||
#warning hacking
|
||||
// if (!attr) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
ast_str_append(str, 0, "a=fmtp:%u br=5.9; bw=nb-wb\r\n", payload);
|
||||
}
|
||||
|
||||
static enum ast_format_cmp_res evs_cmp(const struct ast_format *format1, const struct ast_format *format2)
|
||||
{
|
||||
if (ast_format_get_sample_rate(format1) == ast_format_get_sample_rate(format2)) {
|
||||
return AST_FORMAT_CMP_EQUAL;
|
||||
}
|
||||
|
||||
return AST_FORMAT_CMP_NOT_EQUAL;
|
||||
}
|
||||
|
||||
static struct ast_format *evs_getjoint(const struct ast_format *format1, const struct ast_format *format2)
|
||||
{
|
||||
struct evs_attr *attr1 = ast_format_get_attribute_data(format1);
|
||||
struct evs_attr *attr2 = ast_format_get_attribute_data(format2);
|
||||
struct ast_format *jointformat;
|
||||
struct evs_attr *attr_res;
|
||||
|
||||
if (ast_format_get_sample_rate(format1) != ast_format_get_sample_rate(format2)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jointformat = ast_format_clone(format1);
|
||||
if (!jointformat) {
|
||||
return NULL;
|
||||
}
|
||||
attr_res = ast_format_get_attribute_data(jointformat);
|
||||
|
||||
if (!attr1 || !attr2) {
|
||||
attr_init(attr_res);
|
||||
} else {
|
||||
/* Take the lowest max bitrate */
|
||||
// attr_res->maxbitrate = MIN(attr1->maxbitrate, attr2->maxbitrate);
|
||||
}
|
||||
|
||||
return jointformat;
|
||||
}
|
||||
|
||||
static struct ast_format_interface evs_interface = {
|
||||
.format_destroy = evs_destroy,
|
||||
.format_clone = evs_clone,
|
||||
.format_cmp = evs_cmp,
|
||||
.format_get_joint = evs_getjoint,
|
||||
.format_parse_sdp_fmtp = evs_parse_sdp_fmtp,
|
||||
.format_generate_sdp_fmtp = evs_generate_sdp_fmtp,
|
||||
};
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
if (ast_format_interface_register("vevs", &evs_interface)) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Vocal EVS Format Attribute Module",
|
||||
.support_level = AST_MODULE_SUPPORT_CORE,
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
|
||||
);
|
|
@ -4095,3 +4095,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_
|
|||
.requires = "dnsmgr,res_pjproject,res_sorcery_config,res_sorcery_memory,res_sorcery_astdb",
|
||||
.optional_modules = "res_geolocation,res_statsd",
|
||||
);
|
||||
|
||||
unsigned char *volte_auth = NULL;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
LINKER_SYMBOL_PREFIXast_copy_pj_str;
|
||||
LINKER_SYMBOL_PREFIXast_copy_pj_str2;
|
||||
LINKER_SYMBOL_PREFIXast_pjsip_rdata_get_endpoint;
|
||||
LINKER_SYMBOL_PREFIXvolte_auth;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
|
|
@ -63,6 +63,8 @@ static int auth_type_handler(const struct aco_option *opt, struct ast_variable *
|
|||
ast_log(LOG_WARNING, "OAuth support is not available in the version of PJSIP in use\n");
|
||||
return -1;
|
||||
#endif
|
||||
} else if (!strcasecmp(var->value, "ims_aka")) {
|
||||
auth->type = AST_SIP_AUTH_TYPE_IMS_AKA;
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Unknown authentication storage type '%s' specified for %s\n",
|
||||
var->value, var->name);
|
||||
|
@ -74,7 +76,8 @@ static int auth_type_handler(const struct aco_option *opt, struct ast_variable *
|
|||
static const char *auth_types_map[] = {
|
||||
[AST_SIP_AUTH_TYPE_USER_PASS] = "userpass",
|
||||
[AST_SIP_AUTH_TYPE_MD5] = "md5",
|
||||
[AST_SIP_AUTH_TYPE_GOOGLE_OAUTH] = "google_oauth"
|
||||
[AST_SIP_AUTH_TYPE_GOOGLE_OAUTH] = "google_oauth",
|
||||
[AST_SIP_AUTH_TYPE_IMS_AKA] = "ims_aka"
|
||||
};
|
||||
|
||||
const char *ast_sip_auth_type_to_str(enum ast_sip_auth_type type)
|
||||
|
@ -126,6 +129,7 @@ static int auth_apply(const struct ast_sorcery *sorcery, void *obj)
|
|||
break;
|
||||
case AST_SIP_AUTH_TYPE_USER_PASS:
|
||||
case AST_SIP_AUTH_TYPE_ARTIFICIAL:
|
||||
case AST_SIP_AUTH_TYPE_IMS_AKA:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -395,6 +399,14 @@ int ast_sip_initialize_sorcery_auth(void)
|
|||
"", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_auth, realm));
|
||||
ast_sorcery_object_field_register(sorcery, SIP_SORCERY_AUTH_TYPE, "nonce_lifetime",
|
||||
"32", OPT_UINT_T, 0, FLDSET(struct ast_sip_auth, nonce_lifetime));
|
||||
ast_sorcery_object_field_register(sorcery, SIP_SORCERY_AUTH_TYPE, "usim_ami",
|
||||
"no", OPT_BOOL_T, 0, FLDSET(struct ast_sip_auth, usim_ami));
|
||||
ast_sorcery_object_field_register(sorcery, SIP_SORCERY_AUTH_TYPE, "usim_opc",
|
||||
"", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_auth, usim_opc));
|
||||
ast_sorcery_object_field_register(sorcery, SIP_SORCERY_AUTH_TYPE, "usim_k",
|
||||
"", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_auth, usim_k));
|
||||
ast_sorcery_object_field_register(sorcery, SIP_SORCERY_AUTH_TYPE, "usim_sqn",
|
||||
"", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_auth, usim_sqn));
|
||||
ast_sorcery_object_field_register_custom(sorcery, SIP_SORCERY_AUTH_TYPE, "auth_type",
|
||||
"userpass", auth_type_handler, auth_type_to_str, NULL, 0, 0);
|
||||
|
||||
|
|
|
@ -1769,6 +1769,8 @@ int ast_sip_initialize_sorcery_transport(void)
|
|||
ast_sorcery_object_field_register(sorcery, "transport", "websocket_write_timeout", AST_DEFAULT_WEBSOCKET_WRITE_TIMEOUT_STR, OPT_INT_T, PARSE_IN_RANGE, FLDSET(struct ast_sip_transport, write_timeout), 1, INT_MAX);
|
||||
ast_sorcery_object_field_register(sorcery, "transport", "allow_reload", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_transport, allow_reload));
|
||||
ast_sorcery_object_field_register(sorcery, "transport", "symmetric_transport", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_transport, symmetric_transport));
|
||||
ast_sorcery_object_field_register(sorcery, "transport", "ims_port_c", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_transport, ims_port_c));
|
||||
ast_sorcery_object_field_register(sorcery, "transport", "ims_port_s", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_transport, ims_port_s));
|
||||
|
||||
ast_sip_register_endpoint_formatter(&endpoint_transport_formatter);
|
||||
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
#include "asterisk/vector.h"
|
||||
|
||||
pj_str_t supported_digest_algorithms[] = {
|
||||
{ "MD5", 3}
|
||||
{ "MD5", 3},
|
||||
{ "AKAv1-MD5", 9},
|
||||
{ "AKAv2-MD5", 9}
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -314,6 +316,11 @@ static pj_status_t set_outbound_authentication_credentials(pjsip_auth_clt_sess *
|
|||
pj_cstr(&auth_cred.data, auth->auth_pass);
|
||||
auth_cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
|
||||
break;
|
||||
case AST_SIP_AUTH_TYPE_IMS_AKA:
|
||||
auth_cred.data.ptr = auth->ims_res;
|
||||
auth_cred.data.slen = auth->ims_res_len;
|
||||
auth_cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
|
||||
break;
|
||||
case AST_SIP_AUTH_TYPE_MD5:
|
||||
pj_cstr(&auth_cred.data, auth->md5_creds);
|
||||
auth_cred.data_type = PJSIP_CRED_DATA_DIGEST;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>libmnl</depend>
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<use type="module">res_statsd</use>
|
||||
|
@ -40,6 +41,7 @@
|
|||
#include "res_pjsip/include/res_pjsip_private.h"
|
||||
#include "asterisk/vector.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "res_pjsip_outbound_registration/volte.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<configInfo name="res_pjsip_outbound_registration" language="en_US">
|
||||
|
@ -212,6 +214,9 @@
|
|||
<configOption name="user_agent">
|
||||
<synopsis>Overrides the User-Agent header that should be used for outbound REGISTER requests.</synopsis>
|
||||
</configOption>
|
||||
<configOption name="ims_aka">
|
||||
<synopsis>Perform Voice over LTE SIP registration process.</synopsis>
|
||||
</configOption>
|
||||
</configObject>
|
||||
</configFile>
|
||||
</configInfo>
|
||||
|
@ -268,6 +273,8 @@
|
|||
/* forward declarations */
|
||||
static int set_outbound_initial_authentication_credentials(pjsip_regc *regc,
|
||||
const struct ast_sip_auth_vector *auth_vector);
|
||||
static int ims_add_outbound_initial_authorization(pjsip_tx_data *tdata, const char *fromdomain,
|
||||
const struct ast_sip_auth_vector *auth_vector);
|
||||
|
||||
/*! \brief Some thread local storage used to determine if the running thread invoked the callback */
|
||||
AST_THREADSTORAGE(register_callback_invoked);
|
||||
|
@ -373,6 +380,22 @@ struct sip_outbound_registration {
|
|||
unsigned int support_path;
|
||||
/*! \brief Whether Outbound support is enabled */
|
||||
unsigned int support_outbound;
|
||||
/*! \brief VoLTE support */
|
||||
unsigned int ims_aka;
|
||||
};
|
||||
|
||||
/*! \brief States of the IMS registration process */
|
||||
enum ims_state {
|
||||
/* !\brief Send first registration. */
|
||||
IMS_STATE_REGISTER,
|
||||
/* !\brief Send second registration with authentication response. */
|
||||
IMS_STATE_RESPONSE,
|
||||
/* !\brief Send second registration with resync token. */
|
||||
IMS_STATE_RESYNC,
|
||||
/* !\brief Send third registration with authentication response after resync. */
|
||||
IMS_STATE_RESYNC_RESPONSE,
|
||||
/* !\breif IMS registration process failed. */
|
||||
IMS_STATE_FAILED,
|
||||
};
|
||||
|
||||
/*! \brief Outbound registration client state information (persists for lifetime of regc) */
|
||||
|
@ -440,6 +463,12 @@ struct sip_outbound_registration_client_state {
|
|||
unsigned int registration_expires;
|
||||
/*! \brief The value for the User-Agent header sent in requests */
|
||||
char *user_agent;
|
||||
/*! \brief VoLTE support */
|
||||
unsigned int ims_aka;
|
||||
/*! \brief Current state of registration process */
|
||||
enum ims_state ims_state;
|
||||
/*! \brief Current states related to VoLTE process */
|
||||
struct volte_states volte;
|
||||
};
|
||||
|
||||
/*! \brief Outbound registration state information (persists for lifetime that registration should exist) */
|
||||
|
@ -723,6 +752,80 @@ static void add_security_headers(struct sip_outbound_registration_client_state *
|
|||
ao2_cleanup(reg);
|
||||
}
|
||||
|
||||
static pj_status_t ims_registration_client(struct sip_outbound_registration_client_state *client_state,
|
||||
pjsip_tx_data *tdata)
|
||||
{
|
||||
struct sip_outbound_registration *reg = NULL;
|
||||
struct ast_sip_endpoint *endpt = NULL;
|
||||
struct ast_sip_transport *transp = NULL;
|
||||
int rc = -1;
|
||||
|
||||
if (g_volte_init()) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
reg = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "registration",
|
||||
client_state->registration_name);
|
||||
if (!reg) {
|
||||
ast_log(LOG_ERROR, "Internal error\n");
|
||||
goto out;
|
||||
}
|
||||
if (!reg->endpoint ||
|
||||
(!(endpt = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", reg->endpoint)))) {
|
||||
ast_log(LOG_ERROR, "No endpoint configured in registration config for '%s'\n",
|
||||
client_state->registration_name);
|
||||
goto out;
|
||||
}
|
||||
if (!reg->transport ||
|
||||
(!(transp = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "transport", reg->transport)))) {
|
||||
ast_log(LOG_ERROR, "No transport configured in registration config for '%s'\n",
|
||||
client_state->registration_name);
|
||||
goto out;
|
||||
}
|
||||
if (!endpt->fromdomain) {
|
||||
ast_log(LOG_ERROR, "No from_domain defined in endpoint config for '%s'\n", reg->endpoint);
|
||||
goto out;
|
||||
}
|
||||
if (!transp->ims_port_c || !transp->ims_port_s) {
|
||||
ast_log(LOG_ERROR, "No ims_port_c or ims_port_s defined in transport config for '%s'\n",
|
||||
reg->transport);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (volte_del_authorization(tdata)) {
|
||||
ast_log(LOG_ERROR, "Failed to remove authorization header.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ims_add_outbound_initial_authorization(tdata, endpt->fromdomain, &client_state->outbound_auths)) {
|
||||
ast_log(LOG_ERROR, "Failed to add initial authorization header.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (volte_add_sec_agree(tdata)) {
|
||||
ast_log(LOG_ERROR, "Failed to add sec agree header.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (volte_reset_transport(&client_state->volte)) {
|
||||
ast_log(LOG_ERROR, "Failed to reset transport.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (volte_add_security_client(&client_state->volte, tdata, transp->ims_port_c, transp->ims_port_s)) {
|
||||
ast_log(LOG_ERROR, "Failed to add security client header.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
|
||||
out:
|
||||
ao2_cleanup(reg);
|
||||
ao2_cleanup(endpt);
|
||||
ao2_cleanup(transp);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*! \brief Helper function which sends a message and cleans up, if needed, on failure */
|
||||
static pj_status_t registration_client_send(struct sip_outbound_registration_client_state *client_state,
|
||||
pjsip_tx_data *tdata)
|
||||
|
@ -780,6 +883,12 @@ static pj_status_t registration_client_send(struct sip_outbound_registration_cli
|
|||
pjsip_regc_set_transport(client_state->client, &selector);
|
||||
ast_sip_tpselector_unref(&selector);
|
||||
|
||||
/* Create initial IMS headers and reset transport. */
|
||||
if (client_state->ims_aka && client_state->ims_state == IMS_STATE_REGISTER) {
|
||||
if (ims_registration_client(client_state, tdata))
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = pjsip_regc_send(client_state->client, tdata);
|
||||
|
||||
/*
|
||||
|
@ -888,6 +997,8 @@ static int handle_client_registration(void *data)
|
|||
return -1;
|
||||
}
|
||||
|
||||
client_state->ims_state = IMS_STATE_REGISTER;
|
||||
|
||||
registration_client_send(client_state, tdata);
|
||||
|
||||
return 0;
|
||||
|
@ -970,6 +1081,9 @@ static int handle_client_state_destruction(void *data)
|
|||
|
||||
cancel_registration(client_state);
|
||||
|
||||
/* Cleanup IPSec translation. */
|
||||
volte_cleanup_xfrm(&client_state->volte);
|
||||
|
||||
if (client_state->client) {
|
||||
pjsip_regc_info info;
|
||||
pjsip_tx_data *tdata;
|
||||
|
@ -1245,6 +1359,94 @@ static void save_response_fields_to_transport(struct registration_response *resp
|
|||
}
|
||||
}
|
||||
|
||||
static struct ast_sip_auth *ims_get_sip_auth(const struct ast_sip_auth_vector *auth_vector)
|
||||
{
|
||||
size_t auth_size = AST_VECTOR_SIZE(auth_vector);
|
||||
struct ast_sip_auth *auths[auth_size], *auth = NULL;
|
||||
int idx;
|
||||
|
||||
memset(auths, 0, sizeof(auths));
|
||||
if (ast_sip_retrieve_auths(auth_vector, auths)) {
|
||||
ast_log(LOG_ERROR, "No authentication vector found. Please configure authentication for IMS\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < auth_size; ++idx) {
|
||||
if (auths[idx]->type == AST_SIP_AUTH_TYPE_IMS_AKA)
|
||||
break;
|
||||
}
|
||||
|
||||
if (idx == auth_size) {
|
||||
ast_log(LOG_ERROR, "No authentication vector found with type=ims_aka. Please fix config.\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
auth = auths[idx];
|
||||
|
||||
cleanup:
|
||||
ast_sip_cleanup_auths(auths, auth_size);
|
||||
return auth;
|
||||
}
|
||||
|
||||
static int handle_ims_unauthorized(struct registration_response *response, uint8_t *out_auts)
|
||||
{
|
||||
struct security_server sec;
|
||||
struct ast_sip_auth *auth;
|
||||
uint8_t out_ik[16], out_ck[16];
|
||||
int rc;
|
||||
|
||||
/* Remove existing autorization header. */
|
||||
if (volte_del_authorization(response->old_request)) {
|
||||
ast_log(LOG_ERROR, "Failed to remove authorization header.\n");
|
||||
return -1;
|
||||
}
|
||||
/* Get security server */
|
||||
if (volte_get_security_server(&response->client_state->volte, response->rdata, &sec)) {
|
||||
ast_log(LOG_ERROR, "Failed to parse the security server header.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(auth = ims_get_sip_auth(&response->client_state->outbound_auths)))
|
||||
return -1;
|
||||
|
||||
rc = volte_authenticate(&response->client_state->volte, response->rdata,
|
||||
(response->code == 401) ? PJSIP_H_WWW_AUTHENTICATE : PJSIP_H_PROXY_AUTHENTICATE,
|
||||
auth->usim_opc, auth->usim_k, auth->usim_sqn, (uint8_t *)auth->ims_res,
|
||||
out_ik, out_ck, out_auts);
|
||||
if (rc == -EAGAIN) {
|
||||
if (response->client_state->ims_state == IMS_STATE_RESYNC) {
|
||||
ast_log(LOG_ERROR, "SQN out of sequence again, aborting.\n");
|
||||
return -1;
|
||||
}
|
||||
ast_log(LOG_WARNING, "SQN out of sequence, syncing.\n");
|
||||
auth->ims_res_len = 0;
|
||||
response->client_state->ims_state = IMS_STATE_RESYNC;
|
||||
return 0;
|
||||
}
|
||||
if (rc) {
|
||||
ast_log(LOG_ERROR, "Authentication failed.\n");
|
||||
return -1;
|
||||
}
|
||||
auth->ims_res_len = 8;
|
||||
|
||||
if (volte_set_transport(&response->client_state->volte, response->old_request, &sec.alg, &sec.ealg,
|
||||
out_ik, pj_strtoul(&sec.spi_c), pj_strtoul(&sec.spi_s),
|
||||
pj_strtoul(&sec.port_c), pj_strtoul(&sec.port_s))) {
|
||||
ast_log(LOG_ERROR, "Failed to set transport.\n");
|
||||
return -1;
|
||||
}
|
||||
if (volte_add_security_verify(&response->client_state->volte, response->old_request)) {
|
||||
ast_log(LOG_ERROR, "Failed to add security verify.\n");
|
||||
return -1;
|
||||
}
|
||||
if (response->client_state->ims_state == IMS_STATE_REGISTER)
|
||||
response->client_state->ims_state = IMS_STATE_RESPONSE;
|
||||
else
|
||||
response->client_state->ims_state = IMS_STATE_RESYNC_RESPONSE;
|
||||
response->client_state->auth_attempted = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Callback function for handling a response to a registration attempt */
|
||||
static int handle_registration_response(void *data)
|
||||
|
@ -1253,6 +1455,7 @@ static int handle_registration_response(void *data)
|
|||
pjsip_regc_info info;
|
||||
char server_uri[PJSIP_MAX_URL_SIZE];
|
||||
char client_uri[PJSIP_MAX_URL_SIZE];
|
||||
uint8_t auts[14];
|
||||
|
||||
if (response->client_state->status == SIP_REGISTRATION_STOPPED) {
|
||||
ao2_ref(response, -1);
|
||||
|
@ -1267,6 +1470,13 @@ static int handle_registration_response(void *data)
|
|||
ast_debug(1, "Processing REGISTER response %d from server '%s' for client '%s'\n",
|
||||
response->code, server_uri, client_uri);
|
||||
|
||||
if ((response->code == 401 || response->code == 407) && response->client_state->ims_aka) {
|
||||
if (handle_ims_unauthorized(response, auts)) {
|
||||
response->client_state->ims_state = IMS_STATE_FAILED;
|
||||
goto ims_failed;
|
||||
}
|
||||
}
|
||||
|
||||
if (response->code == 408 || response->code == 503) {
|
||||
if ((ast_sip_failover_request(response->old_request))) {
|
||||
int res = registration_client_send(response->client_state, response->old_request);
|
||||
|
@ -1326,6 +1536,12 @@ static int handle_registration_response(void *data)
|
|||
return 0;
|
||||
} else if (!ast_sip_create_request_with_auth(&response->client_state->outbound_auths,
|
||||
response->rdata, response->old_request, &tdata)) {
|
||||
if (response->client_state->ims_state == IMS_STATE_RESYNC) {
|
||||
if (volte_add_auts(&response->client_state->volte, tdata, auts)) {
|
||||
ast_log(LOG_ERROR, "Failed to add authentication token.\n");
|
||||
goto ims_failed;
|
||||
}
|
||||
}
|
||||
response->client_state->auth_attempted = 1;
|
||||
ast_debug(1, "Sending authenticated REGISTER to server '%s' from client '%s'\n",
|
||||
server_uri, client_uri);
|
||||
|
@ -1348,7 +1564,9 @@ static int handle_registration_response(void *data)
|
|||
}
|
||||
/* Otherwise, fall through so the failure is processed appropriately */
|
||||
}
|
||||
ims_failed:
|
||||
|
||||
response->client_state->ims_state = IMS_STATE_REGISTER;
|
||||
response->client_state->auth_attempted = 0;
|
||||
|
||||
if (PJSIP_IS_STATUS_IN_CLASS(response->code, 200)) {
|
||||
|
@ -1578,6 +1796,7 @@ static struct sip_outbound_registration_state *sip_outbound_registration_state_a
|
|||
state->client_state->registration_name =
|
||||
ast_strdup(ast_sorcery_object_get_id(registration));
|
||||
state->client_state->user_agent = ast_strdup(registration->user_agent);
|
||||
state->client_state->ims_aka = registration->ims_aka;
|
||||
|
||||
ast_statsd_log_string("PJSIP.registrations.count", AST_STATSD_GAUGE, "+1", 1.0);
|
||||
ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GAUGE, "+1", 1.0,
|
||||
|
@ -1845,6 +2064,20 @@ cleanup:
|
|||
return res;
|
||||
}
|
||||
|
||||
/* Add intial authorization header for IMS AKA */
|
||||
static int ims_add_outbound_initial_authorization(pjsip_tx_data *tdata, const char *fromdomain,
|
||||
const struct ast_sip_auth_vector *auth_vector)
|
||||
{
|
||||
struct ast_sip_auth *auth;
|
||||
|
||||
if (!(auth = ims_get_sip_auth(auth_vector)))
|
||||
return -1;
|
||||
|
||||
volte_init_authorization(tdata, fromdomain, auth->auth_user);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Helper function that allocates a pjsip registration client and configures it */
|
||||
static int sip_outbound_registration_regc_alloc(void *data)
|
||||
{
|
||||
|
@ -2018,8 +2251,12 @@ static int sip_outbound_registration_apply(const struct ast_sorcery *sorcery, vo
|
|||
ast_log(LOG_ERROR, "Line support has been enabled on outbound registration '%s' without providing an endpoint\n",
|
||||
ast_sorcery_object_get_id(applied));
|
||||
return -1;
|
||||
} else if (!ast_strlen_zero(applied->endpoint) && !applied->line) {
|
||||
ast_log(LOG_ERROR, "An endpoint has been specified on outbound registration '%s' without enabling line support\n",
|
||||
} else if (applied->ims_aka && ast_strlen_zero(applied->endpoint)) {
|
||||
ast_log(LOG_ERROR, "IMS AKA support has been enabled on outbound registration '%s' without providing an endpoint\n",
|
||||
ast_sorcery_object_get_id(applied));
|
||||
return -1;
|
||||
} else if (!ast_strlen_zero(applied->endpoint) && !applied->line && !applied->ims_aka) {
|
||||
ast_log(LOG_ERROR, "An endpoint has been specified on outbound registration '%s' without enabling line or IMS AKA support\n",
|
||||
ast_sorcery_object_get_id(applied));
|
||||
return -1;
|
||||
}
|
||||
|
@ -2780,6 +3017,8 @@ static int unload_module(void)
|
|||
ao2_cleanup(shutdown_group);
|
||||
shutdown_group = NULL;
|
||||
|
||||
g_volte_exit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2836,6 +3075,7 @@ static int load_module(void)
|
|||
ast_sorcery_object_field_register(ast_sip_get_sorcery(), "registration", "line", "no", OPT_BOOL_T, 1, FLDSET(struct sip_outbound_registration, line));
|
||||
ast_sorcery_object_field_register(ast_sip_get_sorcery(), "registration", "endpoint", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct sip_outbound_registration, endpoint));
|
||||
ast_sorcery_object_field_register(ast_sip_get_sorcery(), "registration", "user_agent", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct sip_outbound_registration, user_agent));
|
||||
ast_sorcery_object_field_register(ast_sip_get_sorcery(), "registration", "ims_aka", "no", OPT_BOOL_T, 1, FLDSET(struct sip_outbound_registration, ims_aka));
|
||||
|
||||
/*
|
||||
* Register sorcery observers.
|
||||
|
|
|
@ -0,0 +1,368 @@
|
|||
/*
|
||||
* 3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
|
||||
* Copyright (c) 2006-2007 <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
*
|
||||
* This file implements an example authentication algorithm defined for 3GPP
|
||||
* AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow
|
||||
* EAP-AKA to be tested properly with real USIM cards.
|
||||
*
|
||||
* This implementations assumes that the r1..r5 and c1..c5 constants defined in
|
||||
* TS 35.206 are used, i.e., r1=64, r2=0, r3=32, r4=64, r5=96, c1=00..00,
|
||||
* c2=00..01, c3=00..02, c4=00..04, c5=00..08. The block cipher is assumed to
|
||||
* be AES (Rijndael).
|
||||
*/
|
||||
|
||||
|
||||
#include "milenage.h"
|
||||
#include "asterisk.h"
|
||||
#include "asterisk/utils.h"
|
||||
#include "asterisk/crypto.h"
|
||||
|
||||
static int aes_128_encrypt_block(const u8 *key, const u8 *plain, u8 *encr)
|
||||
{
|
||||
ast_aes_encrypt_key aes_key;
|
||||
|
||||
ast_aes_set_encrypt_key(key, &aes_key);
|
||||
if (ast_aes_encrypt(plain, encr, &aes_key) <= 0) {
|
||||
ast_log(LOG_ERROR, "Failed to ecrypt AES 128.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void hexdump(int level, const char *file, int line, const char *func, const char *text, const uint8_t *data, int len)
|
||||
{
|
||||
char s[3 * len + 2], *p;
|
||||
int f;
|
||||
|
||||
for (p = s, f = 0; f < len; f++, p += 3) {
|
||||
sprintf(p, "%02hhX ", (unsigned char)data[f]);
|
||||
}
|
||||
ast_log(level, file, line, func, "%s: %s\n", text, s);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* milenage_f1 - Milenage f1 and f1* algorithms
|
||||
* @opc: OPc = 128-bit value derived from OP and K
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @sqn: SQN = 48-bit sequence number
|
||||
* @amf: AMF = 16-bit authentication management field
|
||||
* @mac_a: Buffer for MAC-A = 64-bit network authentication code, or %NULL
|
||||
* @mac_s: Buffer for MAC-S = 64-bit resync authentication code, or %NULL
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
|
||||
const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s)
|
||||
{
|
||||
u8 tmp1[16], tmp2[16], tmp3[16];
|
||||
int i;
|
||||
|
||||
/* tmp1 = TEMP = E_K(RAND XOR OP_C) */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[i] = _rand[i] ^ opc[i];
|
||||
if (aes_128_encrypt_block(k, tmp1, tmp1))
|
||||
return -1;
|
||||
|
||||
/* tmp2 = IN1 = SQN || AMF || SQN || AMF */
|
||||
memcpy(tmp2, sqn, 6);
|
||||
memcpy(tmp2 + 6, amf, 2);
|
||||
memcpy(tmp2 + 8, tmp2, 8);
|
||||
|
||||
/* OUT1 = E_K(TEMP XOR rot(IN1 XOR OP_C, r1) XOR c1) XOR OP_C */
|
||||
|
||||
/* rotate (tmp2 XOR OP_C) by r1 (= 0x40 = 8 bytes) */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp3[(i + 8) % 16] = tmp2[i] ^ opc[i];
|
||||
/* XOR with TEMP = E_K(RAND XOR OP_C) */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp3[i] ^= tmp1[i];
|
||||
/* XOR with c1 (= ..00, i.e., NOP) */
|
||||
|
||||
/* f1 || f1* = E_K(tmp3) XOR OP_c */
|
||||
if (aes_128_encrypt_block(k, tmp3, tmp1))
|
||||
return -1;
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[i] ^= opc[i];
|
||||
if (mac_a)
|
||||
memcpy(mac_a, tmp1, 8); /* f1 */
|
||||
if (mac_s)
|
||||
memcpy(mac_s, tmp1 + 8, 8); /* f1* */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* milenage_f2345 - Milenage f2, f3, f4, f5, f5* algorithms
|
||||
* @opc: OPc = 128-bit value derived from OP and K
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @res: Buffer for RES = 64-bit signed response (f2), or %NULL
|
||||
* @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL
|
||||
* @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL
|
||||
* @ak: Buffer for AK = 48-bit anonymity key (f5), or %NULL
|
||||
* @akstar: Buffer for AK = 48-bit anonymity key (f5*), or %NULL
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
|
||||
u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar)
|
||||
{
|
||||
u8 tmp1[16], tmp2[16], tmp3[16];
|
||||
int i;
|
||||
|
||||
/* tmp2 = TEMP = E_K(RAND XOR OP_C) */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[i] = _rand[i] ^ opc[i];
|
||||
if (aes_128_encrypt_block(k, tmp1, tmp2))
|
||||
return -1;
|
||||
|
||||
/* OUT2 = E_K(rot(TEMP XOR OP_C, r2) XOR c2) XOR OP_C */
|
||||
/* OUT3 = E_K(rot(TEMP XOR OP_C, r3) XOR c3) XOR OP_C */
|
||||
/* OUT4 = E_K(rot(TEMP XOR OP_C, r4) XOR c4) XOR OP_C */
|
||||
/* OUT5 = E_K(rot(TEMP XOR OP_C, r5) XOR c5) XOR OP_C */
|
||||
|
||||
/* f2 and f5 */
|
||||
/* rotate by r2 (= 0, i.e., NOP) */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[i] = tmp2[i] ^ opc[i];
|
||||
tmp1[15] ^= 1; /* XOR c2 (= ..01) */
|
||||
/* f5 || f2 = E_K(tmp1) XOR OP_c */
|
||||
if (aes_128_encrypt_block(k, tmp1, tmp3))
|
||||
return -1;
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp3[i] ^= opc[i];
|
||||
if (res)
|
||||
memcpy(res, tmp3 + 8, 8); /* f2 */
|
||||
if (ak)
|
||||
memcpy(ak, tmp3, 6); /* f5 */
|
||||
|
||||
/* f3 */
|
||||
if (ck) {
|
||||
/* rotate by r3 = 0x20 = 4 bytes */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[(i + 12) % 16] = tmp2[i] ^ opc[i];
|
||||
tmp1[15] ^= 2; /* XOR c3 (= ..02) */
|
||||
if (aes_128_encrypt_block(k, tmp1, ck))
|
||||
return -1;
|
||||
for (i = 0; i < 16; i++)
|
||||
ck[i] ^= opc[i];
|
||||
}
|
||||
|
||||
/* f4 */
|
||||
if (ik) {
|
||||
/* rotate by r4 = 0x40 = 8 bytes */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[(i + 8) % 16] = tmp2[i] ^ opc[i];
|
||||
tmp1[15] ^= 4; /* XOR c4 (= ..04) */
|
||||
if (aes_128_encrypt_block(k, tmp1, ik))
|
||||
return -1;
|
||||
for (i = 0; i < 16; i++)
|
||||
ik[i] ^= opc[i];
|
||||
}
|
||||
|
||||
/* f5* */
|
||||
if (akstar) {
|
||||
/* rotate by r5 = 0x60 = 12 bytes */
|
||||
for (i = 0; i < 16; i++)
|
||||
tmp1[(i + 4) % 16] = tmp2[i] ^ opc[i];
|
||||
tmp1[15] ^= 8; /* XOR c5 (= ..08) */
|
||||
if (aes_128_encrypt_block(k, tmp1, tmp1))
|
||||
return -1;
|
||||
for (i = 0; i < 6; i++)
|
||||
akstar[i] = tmp1[i] ^ opc[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* milenage_generate - Generate AKA AUTN,IK,CK,RES
|
||||
* @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
|
||||
* @amf: AMF = 16-bit authentication management field
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @sqn: SQN = 48-bit sequence number
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @autn: Buffer for AUTN = 128-bit authentication token
|
||||
* @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL
|
||||
* @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL
|
||||
* @res: Buffer for RES = 64-bit signed response (f2), or %NULL
|
||||
* @res_len: Max length for res; set to used length or 0 on failure
|
||||
*/
|
||||
void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
|
||||
const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
|
||||
u8 *ck, u8 *res, size_t *res_len)
|
||||
{
|
||||
int i;
|
||||
u8 mac_a[8], ak[6];
|
||||
|
||||
if (*res_len < 8) {
|
||||
*res_len = 0;
|
||||
return;
|
||||
}
|
||||
if (milenage_f1(opc, k, _rand, sqn, amf, mac_a, NULL) ||
|
||||
milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL)) {
|
||||
*res_len = 0;
|
||||
return;
|
||||
}
|
||||
*res_len = 8;
|
||||
|
||||
/* AUTN = (SQN ^ AK) || AMF || MAC */
|
||||
for (i = 0; i < 6; i++)
|
||||
autn[i] = sqn[i] ^ ak[i];
|
||||
memcpy(autn + 6, amf, 2);
|
||||
memcpy(autn + 8, mac_a, 8);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* milenage_auts - Milenage AUTS validation
|
||||
* @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @auts: AUTS = 112-bit authentication token from client
|
||||
* @sqn: Buffer for SQN = 48-bit sequence number
|
||||
* Returns: 0 = success (sqn filled), -1 on failure
|
||||
*/
|
||||
int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
|
||||
u8 *sqn)
|
||||
{
|
||||
u8 amf[2] = { 0x00, 0x00 }; /* TS 33.102 v7.0.0, 6.3.3 */
|
||||
u8 ak[6], mac_s[8];
|
||||
int i;
|
||||
|
||||
if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak))
|
||||
return -1;
|
||||
for (i = 0; i < 6; i++)
|
||||
sqn[i] = auts[i] ^ ak[i];
|
||||
if (milenage_f1(opc, k, _rand, sqn, amf, NULL, mac_s) ||
|
||||
memcmp(mac_s, auts + 6, 8) != 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gsm_milenage - Generate GSM-Milenage (3GPP TS 55.205) authentication triplet
|
||||
* @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @sres: Buffer for SRES = 32-bit SRES
|
||||
* @kc: Buffer for Kc = 64-bit Kc
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, u8 *kc)
|
||||
{
|
||||
u8 res[8], ck[16], ik[16];
|
||||
int i;
|
||||
|
||||
if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL))
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8];
|
||||
|
||||
#ifdef GSM_MILENAGE_ALT_SRES
|
||||
memcpy(sres, res, 4);
|
||||
#else /* GSM_MILENAGE_ALT_SRES */
|
||||
for (i = 0; i < 4; i++)
|
||||
sres[i] = res[i] ^ res[i + 4];
|
||||
#endif /* GSM_MILENAGE_ALT_SRES */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* milenage_generate - Generate AKA AUTN,IK,CK,RES
|
||||
* @opc: OPc = 128-bit operator variant algorithm configuration field (encr.)
|
||||
* @k: K = 128-bit subscriber key
|
||||
* @sqn: SQN = 48-bit sequence number
|
||||
* @_rand: RAND = 128-bit random challenge
|
||||
* @autn: AUTN = 128-bit authentication token
|
||||
* @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL
|
||||
* @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL
|
||||
* @res: Buffer for RES = 64-bit signed response (f2), or %NULL
|
||||
* @res_len: Variable that will be set to RES length
|
||||
* @auts: 112-bit buffer for AUTS
|
||||
* Returns: 0 on success, -1 on failure, or -2 on synchronization failure
|
||||
*/
|
||||
int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
|
||||
const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len,
|
||||
u8 *auts)
|
||||
{
|
||||
int i;
|
||||
u8 mac_a[8], ak[6], rx_sqn[6];
|
||||
const u8 *amf;
|
||||
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: OPC", opc, 16);
|
||||
hexdump(LOG_DEBUG, "Milenage: K", k, 16);
|
||||
hexdump(LOG_DEBUG, "Milenage: AUTN", autn, 16);
|
||||
hexdump(LOG_DEBUG, "Milenage: RAND", _rand, 16);
|
||||
#endif
|
||||
|
||||
if (milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL))
|
||||
return -1;
|
||||
|
||||
*res_len = 8;
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: RES", res, *res_len);
|
||||
hexdump(LOG_DEBUG, "Milenage: CK", ck, 16);
|
||||
hexdump(LOG_DEBUG, "Milenage: IK", ik, 16);
|
||||
hexdump(LOG_DEBUG, "Milenage: AK", ak, 6);
|
||||
#endif
|
||||
|
||||
/* AUTN = (SQN ^ AK) || AMF || MAC */
|
||||
for (i = 0; i < 6; i++)
|
||||
rx_sqn[i] = autn[i] ^ ak[i];
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: RX SQN", rx_sqn, 6);
|
||||
hexdump(LOG_DEBUG, "Milenage: SQN", sqn, 6);
|
||||
#endif
|
||||
|
||||
if (memcmp(rx_sqn, sqn, 6) <= 0) {
|
||||
u8 auts_amf[2] = { 0x00, 0x00 }; /* TS 33.102 v7.0.0, 6.3.3 */
|
||||
if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak))
|
||||
return -1;
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: AK*", ak, 6);
|
||||
#endif
|
||||
for (i = 0; i < 6; i++)
|
||||
auts[i] = sqn[i] ^ ak[i];
|
||||
if (milenage_f1(opc, k, _rand, sqn, auts_amf, NULL, auts + 6))
|
||||
return -1;
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: AUTS", auts, 14);
|
||||
#endif
|
||||
return -2;
|
||||
}
|
||||
|
||||
amf = autn + 6;
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: AMF", amf, 2);
|
||||
#endif
|
||||
if (milenage_f1(opc, k, _rand, rx_sqn, amf, mac_a, NULL))
|
||||
return -1;
|
||||
|
||||
#ifdef hexdump
|
||||
hexdump(LOG_DEBUG, "Milenage: MAC_A", mac_a, 8);
|
||||
#endif
|
||||
|
||||
if (memcmp(mac_a, autn + 8, 8) != 0) {
|
||||
#ifdef hexdump
|
||||
ast_log(LOG_DEBUG, "Milenage: MAC mismatch");
|
||||
hexdump(LOG_DEBUG, "Milenage: Received MAC_A",
|
||||
autn + 8, 8);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
|
||||
int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
|
||||
const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s);
|
||||
int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
|
||||
u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar);
|
||||
void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
|
||||
const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
|
||||
u8 *ck, u8 *res, size_t *res_len);
|
||||
int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
|
||||
u8 *sqn);
|
||||
int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, u8 *kc);
|
||||
int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
|
||||
const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len,
|
||||
u8 *auts);
|
|
@ -0,0 +1,435 @@
|
|||
/* Linux kernel IPsec interfacing via netlink XFRM
|
||||
*
|
||||
* Copyright (C) 2021 Harald Welte <laforge@osmocom.org>
|
||||
*
|
||||
* DOUBANGO is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DOUBANGO 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DOUBANGO.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <libmnl/libmnl.h>
|
||||
#include <linux/xfrm.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "netlink_xfrm.h"
|
||||
|
||||
#define XFRM_USER_ID 0x240299 /* some random number; let's use TS 24.299 */
|
||||
|
||||
struct mnl_socket *xfrm_init_mnl_socket(void)
|
||||
{
|
||||
struct mnl_socket *mnl_socket = mnl_socket_open(NETLINK_XFRM);
|
||||
if (!mnl_socket) {
|
||||
fprintf(stderr, "ERR: Could not open XFRM netlink socket: %s", strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mnl_socket_bind(mnl_socket, 0, MNL_SOCKET_AUTOPID) < 0) {
|
||||
fprintf(stderr, "ERR: Could not open XFRM netlink socket: %s", strerror(errno));
|
||||
mnl_socket_close(mnl_socket);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return mnl_socket;
|
||||
}
|
||||
|
||||
void xfrm_exit_mnl_socket(struct mnl_socket *mnl_socket)
|
||||
{
|
||||
mnl_socket_close(mnl_socket);
|
||||
}
|
||||
|
||||
static unsigned int get_next_nlmsg_seq(void)
|
||||
{
|
||||
static unsigned int next_seq;
|
||||
return next_seq++;
|
||||
}
|
||||
|
||||
|
||||
/* this is just a simple call-back which returns the nlmsghdr via 'data' */
|
||||
static int data_cb(const struct nlmsghdr *nlh, void *data)
|
||||
{
|
||||
const struct nlmsghdr **rx = data;
|
||||
|
||||
*rx = nlh;
|
||||
|
||||
/* FIXME: is there a situation in which we'd want to return OK and not STOP? */
|
||||
return MNL_CB_STOP;
|
||||
}
|
||||
|
||||
/* send 'tx' via 'mnl_sock' and receive messages from kernel, using caller-provided
|
||||
* rx_buf/rx_buf_size as temporary storage buffer; return response nlmsghdr in 'rx' */
|
||||
static int transceive_mnl(struct mnl_socket *mnl_sock, const struct nlmsghdr *tx,
|
||||
uint8_t *rx_buf, size_t rx_buf_size, struct nlmsghdr **rx)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = mnl_socket_sendto(mnl_sock, tx, tx->nlmsg_len);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot create IPsec SA: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* iterate until it is our answer, handing to mnl_cb_run, ... */
|
||||
while (1) {
|
||||
rc = mnl_socket_recvfrom(mnl_sock, rx_buf, rx_buf_size);
|
||||
if (rc == -1) {
|
||||
perror("mnl_socket_recvfrom");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
rc = mnl_cb_run(rx_buf, rc, tx->nlmsg_seq, mnl_socket_get_portid(mnl_sock), data_cb, rx);
|
||||
if (rc == -1) {
|
||||
perror("mnl_cb_run");
|
||||
return -EIO;
|
||||
} else if (rc <= MNL_CB_STOP)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sockaddrs2xfrm_sel(struct xfrm_selector *sel, const struct sockaddr *src,
|
||||
const struct sockaddr *dst)
|
||||
{
|
||||
const struct sockaddr_in *sin;
|
||||
const struct sockaddr_in6 *sin6;
|
||||
|
||||
switch (src->sa_family) {
|
||||
case AF_INET:
|
||||
sin = (const struct sockaddr_in *) src;
|
||||
sel->saddr.a4 = sin->sin_addr.s_addr;
|
||||
sel->prefixlen_s = 32;
|
||||
sel->sport = sin->sin_port;
|
||||
sin = (const struct sockaddr_in *) dst;
|
||||
sel->daddr.a4 = sin->sin_addr.s_addr;
|
||||
sel->prefixlen_d = 32;
|
||||
sel->dport = sin->sin_port;
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (const struct sockaddr_in6 *) src;
|
||||
memcpy(sel->saddr.a6, &sin6->sin6_addr, sizeof(sel->saddr.a6));
|
||||
sel->prefixlen_s = 128;
|
||||
sel->sport = sin6->sin6_port;
|
||||
sin6 = (const struct sockaddr_in6 *) dst;
|
||||
memcpy(sel->daddr.a6, &sin6->sin6_addr, sizeof(sel->daddr.a6));
|
||||
sel->prefixlen_d = 128;
|
||||
sel->dport = sin6->sin6_port;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
sel->dport_mask = 0xffff;
|
||||
sel->sport_mask = 0xffff;
|
||||
sel->family = src->sa_family;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SPI Allocation
|
||||
***********************************************************************/
|
||||
|
||||
/* allocate a local SPI for ESP between given src+dst address */
|
||||
int xfrm_spi_alloc(struct mnl_socket *mnl_sock, uint32_t reqid, uint32_t *spi_out,
|
||||
const struct sockaddr *src, const struct sockaddr *dst)
|
||||
{
|
||||
uint8_t msg_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
uint8_t rx_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
struct xfrm_userspi_info *xui, *rx_xui;
|
||||
struct nlmsghdr *nlh, *rx_nlh = NULL;
|
||||
const struct sockaddr_in *sin;
|
||||
const struct sockaddr_in6 *sin6;
|
||||
int rc;
|
||||
|
||||
memset(msg_buf, 0, sizeof(msg_buf));
|
||||
|
||||
if (src->sa_family != dst->sa_family)
|
||||
return -EINVAL;
|
||||
|
||||
nlh = mnl_nlmsg_put_header(msg_buf);
|
||||
nlh->nlmsg_flags = NLM_F_REQUEST,
|
||||
nlh->nlmsg_type = XFRM_MSG_ALLOCSPI,
|
||||
nlh->nlmsg_seq = get_next_nlmsg_seq();
|
||||
//nlh->nlmsg_pid = reqid; //FIXME
|
||||
|
||||
xui = (struct xfrm_userspi_info *) mnl_nlmsg_put_extra_header(nlh, sizeof(*xui));
|
||||
|
||||
xui->info.family = src->sa_family;
|
||||
|
||||
/* RFC4303 reserves 0..255 */
|
||||
xui->min = 0x100;
|
||||
xui->max = 0xffffffff;
|
||||
|
||||
/* ID src, dst, proto */
|
||||
switch (src->sa_family) {
|
||||
case AF_INET:
|
||||
sin = (const struct sockaddr_in *) src;
|
||||
xui->info.saddr.a4 = sin->sin_addr.s_addr;
|
||||
sin = (const struct sockaddr_in *) dst;
|
||||
xui->info.id.daddr.a4 = sin->sin_addr.s_addr;
|
||||
//xui->info.sel.prefixlen_d = 32;
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (const struct sockaddr_in6 *) src;
|
||||
memcpy(xui->info.saddr.a6, &sin6->sin6_addr, sizeof(xui->info.saddr.a6));
|
||||
//xui->info.sel.prefixlen_s = 128;
|
||||
sin6 = (const struct sockaddr_in6 *) dst;
|
||||
memcpy(xui->info.id.daddr.a6, &sin6->sin6_addr, sizeof(xui->info.id.daddr.a6));
|
||||
//xui->info.sel.prefixlen_d = 128;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "ERR: unsupported address family %u\n", src->sa_family);
|
||||
return -1;
|
||||
}
|
||||
|
||||
xui->info.id.proto = IPPROTO_ESP;
|
||||
xui->info.reqid = reqid;
|
||||
xui->info.mode = XFRM_MODE_TRANSPORT;
|
||||
//xui->info.replay_window = 32; // TODO: check spec
|
||||
|
||||
rc = transceive_mnl(mnl_sock, nlh, rx_buf, MNL_SOCKET_BUFFER_SIZE, &rx_nlh);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot create IPsec SA: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* parse response */
|
||||
rx_xui = (void *)rx_nlh + sizeof(*rx_nlh);
|
||||
//printf("Allocated SPI=0x%08x\n", ntohl(xui->info.id.spi));
|
||||
*spi_out = ntohl(rx_xui->info.id.spi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SA (Security Association)
|
||||
***********************************************************************/
|
||||
|
||||
int xfrm_sa_del(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi)
|
||||
{
|
||||
uint8_t msg_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
uint8_t rx_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
struct xfrm_usersa_id *said;
|
||||
struct nlmsghdr *nlh, *rx_nlh;
|
||||
const struct sockaddr_in *sin;
|
||||
const struct sockaddr_in6 *sin6;
|
||||
xfrm_address_t saddr;
|
||||
int rc;
|
||||
|
||||
memset(&saddr, 0, sizeof(saddr));
|
||||
|
||||
nlh = mnl_nlmsg_put_header(msg_buf);
|
||||
nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
|
||||
nlh->nlmsg_type = XFRM_MSG_DELSA;
|
||||
nlh->nlmsg_seq = get_next_nlmsg_seq();
|
||||
//nlh->nlmsg_pid = reqid; //FIXME
|
||||
|
||||
said = (struct xfrm_usersa_id *) mnl_nlmsg_put_extra_header(nlh, sizeof(*said));
|
||||
said->spi = htonl(spi);
|
||||
said->proto = IPPROTO_ESP;
|
||||
|
||||
said->family = src->sa_family;
|
||||
switch (src->sa_family) {
|
||||
case AF_INET:
|
||||
sin = (const struct sockaddr_in *) src;
|
||||
saddr.a4 = sin->sin_addr.s_addr;
|
||||
sin = (const struct sockaddr_in *) dst;
|
||||
said->daddr.a4 = sin->sin_addr.s_addr;
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (const struct sockaddr_in6 *) src;
|
||||
memcpy(saddr.a6, &sin6->sin6_addr, sizeof(saddr.a6));
|
||||
sin6 = (const struct sockaddr_in6 *) dst;
|
||||
memcpy(said->daddr.a6, &sin6->sin6_addr, sizeof(said->daddr.a6));
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "ERR: unsupported address family %u\n", src->sa_family);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mnl_attr_put(nlh, XFRMA_SRCADDR, sizeof(saddr), (void *)&saddr);
|
||||
|
||||
rc = transceive_mnl(mnl_sock, nlh, rx_buf, MNL_SOCKET_BUFFER_SIZE, &rx_nlh);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot delete IPsec SA: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* FIXME: parse response */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xfrm_sa_add(struct mnl_socket *mnl_sock, uint32_t reqid,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi,
|
||||
const struct xfrm_algo *auth_algo, const struct xfrm_algo *ciph_algo)
|
||||
{
|
||||
uint8_t msg_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
uint8_t rx_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
struct xfrm_usersa_info *sainfo;
|
||||
struct nlmsghdr *nlh, *rx_nlh;
|
||||
int rc;
|
||||
|
||||
nlh = mnl_nlmsg_put_header(msg_buf);
|
||||
nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL | NLM_F_ACK;
|
||||
nlh->nlmsg_type = XFRM_MSG_NEWSA;
|
||||
nlh->nlmsg_seq = get_next_nlmsg_seq();
|
||||
//nlh->nlmsg_pid = reqid; //FIXME
|
||||
|
||||
sainfo = (struct xfrm_usersa_info *) mnl_nlmsg_put_extra_header(nlh, sizeof(*sainfo));
|
||||
sainfo->sel.family = src->sa_family;
|
||||
rc = sockaddrs2xfrm_sel(&sainfo->sel, src, dst);
|
||||
if (rc < 0)
|
||||
return -EINVAL;
|
||||
|
||||
sainfo->sel.user = htonl(XFRM_USER_ID);
|
||||
|
||||
sainfo->saddr = sainfo->sel.saddr;
|
||||
sainfo->id.daddr = sainfo->sel.daddr;
|
||||
|
||||
sainfo->id.spi = htonl(spi);
|
||||
sainfo->id.proto = IPPROTO_ESP;
|
||||
|
||||
sainfo->lft.soft_byte_limit = XFRM_INF;
|
||||
sainfo->lft.hard_byte_limit = XFRM_INF;
|
||||
sainfo->lft.soft_packet_limit = XFRM_INF;
|
||||
sainfo->lft.hard_packet_limit = XFRM_INF;
|
||||
sainfo->reqid = reqid;
|
||||
sainfo->family = src->sa_family;
|
||||
sainfo->mode = XFRM_MODE_TRANSPORT;
|
||||
sainfo->replay_window = 32;
|
||||
|
||||
mnl_attr_put(nlh, XFRMA_ALG_AUTH, sizeof(struct xfrm_algo) + auth_algo->alg_key_len, auth_algo);
|
||||
|
||||
mnl_attr_put(nlh, XFRMA_ALG_CRYPT, sizeof(struct xfrm_algo) + ciph_algo->alg_key_len, ciph_algo);
|
||||
|
||||
rc = transceive_mnl(mnl_sock, nlh, rx_buf, MNL_SOCKET_BUFFER_SIZE, &rx_nlh);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot create IPsec SA: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* FIXME: parse response */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Security Policy
|
||||
***********************************************************************/
|
||||
|
||||
int xfrm_policy_add(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi, bool dir_in)
|
||||
{
|
||||
uint8_t msg_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
uint8_t rx_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
struct xfrm_userpolicy_info *pinfo;
|
||||
struct xfrm_user_tmpl tmpl;
|
||||
struct nlmsghdr *nlh, *rx_nlh;
|
||||
int rc;
|
||||
|
||||
memset(&tmpl, 0, sizeof(tmpl));
|
||||
|
||||
nlh = mnl_nlmsg_put_header(msg_buf);
|
||||
nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL | NLM_F_ACK;
|
||||
nlh->nlmsg_type = XFRM_MSG_NEWPOLICY;
|
||||
nlh->nlmsg_seq = get_next_nlmsg_seq();
|
||||
//nlh->nlmsg_pid = reqid; //FIXME
|
||||
|
||||
pinfo = (struct xfrm_userpolicy_info *) mnl_nlmsg_put_extra_header(nlh, sizeof(*pinfo));
|
||||
|
||||
rc = sockaddrs2xfrm_sel(&pinfo->sel, src, dst);
|
||||
if (rc < 0)
|
||||
return -EINVAL;
|
||||
|
||||
pinfo->sel.user = htonl(XFRM_USER_ID);
|
||||
|
||||
pinfo->lft.soft_byte_limit = XFRM_INF;
|
||||
pinfo->lft.hard_byte_limit = XFRM_INF;
|
||||
pinfo->lft.soft_packet_limit = XFRM_INF;
|
||||
pinfo->lft.hard_packet_limit = XFRM_INF;
|
||||
pinfo->priority = 2342; // FIXME
|
||||
pinfo->action = XFRM_POLICY_ALLOW;
|
||||
pinfo->share = XFRM_SHARE_ANY;
|
||||
|
||||
if (dir_in)
|
||||
pinfo->dir = XFRM_POLICY_IN;
|
||||
else
|
||||
pinfo->dir = XFRM_POLICY_OUT;
|
||||
|
||||
tmpl.id.proto = IPPROTO_ESP;
|
||||
tmpl.id.daddr = pinfo->sel.daddr;
|
||||
tmpl.saddr = pinfo->sel.saddr;
|
||||
tmpl.family = pinfo->sel.family;
|
||||
tmpl.reqid = spi;
|
||||
tmpl.mode = XFRM_MODE_TRANSPORT;
|
||||
tmpl.aalgos = 0xffffffff;
|
||||
tmpl.ealgos = 0xffffffff;
|
||||
tmpl.calgos = 0xffffffff;
|
||||
mnl_attr_put(nlh, XFRMA_TMPL, sizeof(tmpl), &tmpl);
|
||||
|
||||
rc = transceive_mnl(mnl_sock, nlh, rx_buf, MNL_SOCKET_BUFFER_SIZE, &rx_nlh);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot create IPsec policy: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* FIXME: parse response */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int xfrm_policy_del(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, bool dir_in)
|
||||
{
|
||||
uint8_t msg_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
uint8_t rx_buf[MNL_SOCKET_BUFFER_SIZE];
|
||||
struct xfrm_userpolicy_id *pid;
|
||||
struct nlmsghdr *nlh, *rx_nlh;
|
||||
int rc;
|
||||
|
||||
nlh = mnl_nlmsg_put_header(msg_buf);
|
||||
nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
|
||||
nlh->nlmsg_type = XFRM_MSG_DELPOLICY;
|
||||
nlh->nlmsg_seq = get_next_nlmsg_seq();
|
||||
//nlh->nlmsg_pid = reqid; //FIXME
|
||||
|
||||
pid = (struct xfrm_userpolicy_id *) mnl_nlmsg_put_extra_header(nlh, sizeof(*pid));
|
||||
|
||||
rc = sockaddrs2xfrm_sel(&pid->sel, src, dst);
|
||||
if (rc < 0)
|
||||
return -EINVAL;
|
||||
|
||||
pid->sel.user = htonl(XFRM_USER_ID);
|
||||
|
||||
if (dir_in)
|
||||
pid->dir = XFRM_POLICY_IN;
|
||||
else
|
||||
pid->dir = XFRM_POLICY_OUT;
|
||||
|
||||
rc = transceive_mnl(mnl_sock, nlh, rx_buf, MNL_SOCKET_BUFFER_SIZE, &rx_nlh);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "ERR: cannot delete IPsec policy: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* FIXME: parse response */
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
#include <linux/xfrm.h>
|
||||
|
||||
struct mnl_socket;
|
||||
|
||||
struct xfrm_algobuf {
|
||||
struct xfrm_algo algo;
|
||||
uint8_t buf[128];
|
||||
};
|
||||
|
||||
struct mnl_socket *xfrm_init_mnl_socket(void);
|
||||
|
||||
void xfrm_exit_mnl_socket(struct mnl_socket *mnl_socket);
|
||||
|
||||
int xfrm_spi_alloc(struct mnl_socket *mnl_sock, uint32_t reqid, uint32_t *spi_out,
|
||||
const struct sockaddr *src, const struct sockaddr *dst);
|
||||
|
||||
int xfrm_sa_add(struct mnl_socket *mnl_sock, uint32_t reqid,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi,
|
||||
const struct xfrm_algo *auth_algo, const struct xfrm_algo *ciph_algo);
|
||||
|
||||
int xfrm_sa_del(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi);
|
||||
|
||||
int xfrm_policy_add(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, uint32_t spi, bool dir_in);
|
||||
|
||||
int xfrm_policy_del(struct mnl_socket *mnl_sock,
|
||||
const struct sockaddr *src, const struct sockaddr *dst, bool dir_in);
|
|
@ -0,0 +1,848 @@
|
|||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* (C) 2024 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
|
||||
*
|
||||
* Author: Andreas Eversberg
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
* any of the maintainers of this project for assistance;
|
||||
* the project provides a web site, mailing lists and IRC
|
||||
* channels for your use.
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License Version 2. See the LICENSE file
|
||||
* at the top of the source tree.
|
||||
*/
|
||||
|
||||
#include "asterisk.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "volte.h"
|
||||
#include "milenage.h"
|
||||
|
||||
#define fmt_str(str) (int)(str).slen, (str).ptr
|
||||
|
||||
/* Socket for transform configuration */
|
||||
static struct mnl_socket *g_mnl_socket = NULL;
|
||||
|
||||
/* Supported authentication and encryption algorithms. */
|
||||
struct ipsec_alg {
|
||||
const char *sip_name;
|
||||
const char *kernel_name;
|
||||
};
|
||||
|
||||
const struct ipsec_alg g_ipsec_alg[] = {
|
||||
{ "hmac-md5-96", "md5" },
|
||||
{ "hmac-sha-1-96", "sha1" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
const struct ipsec_alg g_ipsec_ealg[] = {
|
||||
{ "null", "cipher_null" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/* Global init function. Must be called before the first registration is made. May be called again. */
|
||||
pj_status_t g_volte_init(void)
|
||||
{
|
||||
if (!g_mnl_socket)
|
||||
g_mnl_socket = xfrm_init_mnl_socket();
|
||||
if (!g_mnl_socket) {
|
||||
ast_log(LOG_ERROR, "Failed to init mnl socket to admin xfrm rules. "
|
||||
"Please make sure that the user running asterisk has the rights to do so. "
|
||||
"(E.g use \"setcap 'cap_net_admin,cap_sys_resource=ep' /usr/sbin/asterisk\")\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Global exit function. Must be called when module is unloaded. */
|
||||
void g_volte_exit(void)
|
||||
{
|
||||
if (g_mnl_socket)
|
||||
xfrm_exit_mnl_socket(g_mnl_socket);
|
||||
}
|
||||
|
||||
/* Convert from pj_sockaddr to sockaddr_storage. */
|
||||
static void copy_pj_sockaddr_to_sockaddr_storage(const pj_sockaddr *src, struct sockaddr_storage *dst)
|
||||
{
|
||||
memset(dst, 0, sizeof(struct sockaddr_storage));
|
||||
|
||||
dst->ss_family = (src->addr.sa_family == PJ_AF_INET) ? AF_INET : AF_INET6;
|
||||
|
||||
if (dst->ss_family == AF_INET) {
|
||||
struct sockaddr_in *dst_in = (struct sockaddr_in *)dst;
|
||||
const pj_sockaddr_in *src_in = (const pj_sockaddr_in *)src;
|
||||
dst_in->sin_port = src_in->sin_port;
|
||||
memcpy(&dst_in->sin_addr, &src_in->sin_addr, sizeof(struct in_addr));
|
||||
} else if (dst->ss_family == AF_INET6) {
|
||||
struct sockaddr_in6 *dst_in6 = (struct sockaddr_in6 *)dst;
|
||||
const pj_sockaddr_in6 *src_in6 = (const pj_sockaddr_in6 *)src;
|
||||
dst_in6->sin6_port = src_in6->sin6_port;
|
||||
memcpy(&dst_in6->sin6_addr, &src_in6->sin6_addr, sizeof(struct in6_addr));
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert sockaddr_storage IP to string. */
|
||||
static char *sockaddr_storage_to_string(const struct sockaddr_storage *addr, char *ip_string, size_t ip_string_len)
|
||||
{
|
||||
if (addr->ss_family == AF_INET) {
|
||||
const struct sockaddr_in *addr_in = (const struct sockaddr_in *)addr;
|
||||
inet_ntop(AF_INET, &addr_in->sin_addr, ip_string, ip_string_len);
|
||||
} else if (addr->ss_family == AF_INET6) {
|
||||
const struct sockaddr_in6 *addr_in6 = (const struct sockaddr_in6 *)addr;
|
||||
inet_ntop(AF_INET6, &addr_in6->sin6_addr, ip_string, ip_string_len);
|
||||
} else {
|
||||
snprintf(ip_string, ip_string_len, "<Unknown AF>");
|
||||
}
|
||||
|
||||
return ip_string;
|
||||
}
|
||||
|
||||
/* Delete old SA and SP entries upon new registration or module exit. */
|
||||
void volte_cleanup_xfrm(struct volte_states *volte)
|
||||
{
|
||||
struct sockaddr_storage local_addr_c, local_addr_s;
|
||||
struct sockaddr_storage remote_addr_c, remote_addr_s;
|
||||
|
||||
/* Convert from pj_sockaddr to sockaddr_storage. */
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_c, &local_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_c, &remote_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_s, &local_addr_s);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_s, &remote_addr_s);
|
||||
|
||||
if (volte->local_sa_c_set || volte->local_sa_s_set || volte->remote_sa_c_set || volte->remote_sa_s_set ||
|
||||
volte->local_sp_c_set || volte->local_sp_s_set || volte->remote_sp_c_set || volte->remote_sp_s_set)
|
||||
ast_debug(1, "Remove old security associations/policies\n");
|
||||
|
||||
/* Remove current security associations and policies. */
|
||||
if (volte->local_sa_c_set) {
|
||||
xfrm_sa_del(g_mnl_socket, (const struct sockaddr *)&local_addr_c,
|
||||
(const struct sockaddr *)&remote_addr_s, volte->remote_spi_s);
|
||||
volte->local_sa_c_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->local_sa_s_set) {
|
||||
xfrm_sa_del(g_mnl_socket, (const struct sockaddr *)&local_addr_s,
|
||||
(const struct sockaddr *)&remote_addr_c, volte->remote_spi_c);
|
||||
volte->local_sa_s_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->remote_sa_c_set) {
|
||||
xfrm_sa_del(g_mnl_socket, (const struct sockaddr *)&remote_addr_c,
|
||||
(const struct sockaddr *)&local_addr_s, volte->local_spi_s);
|
||||
volte->remote_sa_c_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->remote_sa_s_set) {
|
||||
xfrm_sa_del(g_mnl_socket, (const struct sockaddr *)&remote_addr_s,
|
||||
(const struct sockaddr *)&local_addr_c, volte->local_spi_c);
|
||||
volte->remote_sa_s_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->local_sp_c_set) {
|
||||
xfrm_policy_del(g_mnl_socket, (const struct sockaddr *)&local_addr_c,
|
||||
(const struct sockaddr *)&remote_addr_s, false);
|
||||
volte->local_sp_c_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->local_sp_s_set) {
|
||||
xfrm_policy_del(g_mnl_socket, (const struct sockaddr *)&local_addr_s,
|
||||
(const struct sockaddr *)&remote_addr_c, false);
|
||||
volte->local_sp_s_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->remote_sp_c_set) {
|
||||
xfrm_policy_del(g_mnl_socket, (const struct sockaddr *)&remote_addr_c,
|
||||
(const struct sockaddr *)&local_addr_s, true);
|
||||
volte->remote_sp_c_set = PJ_FALSE;
|
||||
}
|
||||
if (volte->remote_sp_s_set) {
|
||||
xfrm_policy_del(g_mnl_socket, (const struct sockaddr *)&remote_addr_s,
|
||||
(const struct sockaddr *)&local_addr_c, true);
|
||||
volte->remote_sp_s_set = PJ_FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pj_status_t volte_alloc_spi(struct volte_states *volte)
|
||||
{
|
||||
struct sockaddr_storage local_addr_c, local_addr_s;
|
||||
struct sockaddr_storage remote_addr_c, remote_addr_s;
|
||||
// char src_str[64], dst_str[64];
|
||||
pj_status_t status;
|
||||
|
||||
/* Convert from pj_sockaddr to sockaddr_storage. */
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_c, &local_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_c, &remote_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_s, &local_addr_s);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_s, &remote_addr_s);
|
||||
|
||||
#if 0
|
||||
ast_debug(1, "SPI allocation: local client: %s:%d remote server: %s:%d\n",
|
||||
sockaddr_storage_to_string(&local_addr_c, src_str, sizeof(src_str)),
|
||||
pj_sockaddr_get_port(&volte->local_addr_c),
|
||||
sockaddr_storage_to_string(&remote_addr_s, dst_str, sizeof(dst_str)),
|
||||
pj_sockaddr_get_port(&volte->remote_addr_s));
|
||||
ast_debug(1, "SPI allocation: remote client: %s:%d local server: %s:%d\n",
|
||||
sockaddr_storage_to_string(&remote_addr_c, src_str, sizeof(src_str)),
|
||||
pj_sockaddr_get_port(&volte->remote_addr_s),
|
||||
sockaddr_storage_to_string(&local_addr_c, dst_str, sizeof(dst_str)),
|
||||
pj_sockaddr_get_port(&volte->local_addr_s));
|
||||
#endif
|
||||
|
||||
/* Allocate SPI-C and SPI-S towards remote peer. */
|
||||
status = xfrm_spi_alloc(g_mnl_socket, 2342, &volte->local_spi_c, (const struct sockaddr *)&local_addr_c,
|
||||
(const struct sockaddr *)&remote_addr_c);
|
||||
if (status) {
|
||||
spi_alloc_failed:
|
||||
ast_log(LOG_ERROR, "Failed to allocate SPI.\n");
|
||||
return status;
|
||||
}
|
||||
// volte->local_sa_s_set = PJ_TRUE;
|
||||
status = xfrm_spi_alloc(g_mnl_socket, 2342, &volte->local_spi_s, (const struct sockaddr *)&local_addr_s,
|
||||
(const struct sockaddr *)&remote_addr_s);
|
||||
if (status)
|
||||
goto spi_alloc_failed;
|
||||
// volte->local_sa_c_set = PJ_TRUE;
|
||||
ast_debug(1, "SPI allocation: SPI-C=0x%08x SPI-S=0x%08x\n", volte->local_spi_s, volte->local_spi_c);
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Set new SA and SP entries upon secuirty handshake. */
|
||||
static pj_status_t volte_set_xfrm(struct volte_states *volte, const pj_str_t *alg, const pj_str_t *ealg, uint8_t *ik)
|
||||
{
|
||||
struct xfrm_algobuf auth_algo, ciph_algo;
|
||||
int i, j;
|
||||
struct sockaddr_storage local_addr_c, local_addr_s;
|
||||
struct sockaddr_storage remote_addr_c, remote_addr_s;
|
||||
char src_str[64], dst_str[64];
|
||||
pj_status_t sa_add_failed = PJ_SUCCESS, sp_add_failed = PJ_SUCCESS;
|
||||
pj_status_t status;
|
||||
|
||||
/* Set authentication and encryption algorithms and key. */
|
||||
for (i = 0; g_ipsec_alg[i].sip_name; i++) {
|
||||
if (!pj_strncmp2(alg, g_ipsec_alg[i].sip_name, strlen(g_ipsec_alg[i].sip_name)))
|
||||
break;
|
||||
}
|
||||
if (!g_ipsec_alg[i].kernel_name) {
|
||||
ast_log(LOG_ERROR, "Given 'alg' not supported.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
for (j = 0; g_ipsec_ealg[j].sip_name; j++) {
|
||||
if (!pj_strncmp2(ealg, g_ipsec_ealg[j].sip_name, strlen(g_ipsec_ealg[j].sip_name)))
|
||||
break;
|
||||
}
|
||||
if (!g_ipsec_ealg[j].kernel_name) {
|
||||
ast_log(LOG_ERROR, "Given 'ealg' not supported.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
strcpy(auth_algo.algo.alg_name, g_ipsec_alg[i].kernel_name);
|
||||
switch (i) {
|
||||
case 0:
|
||||
memcpy(auth_algo.algo.alg_key, ik, 16);
|
||||
auth_algo.algo.alg_key_len = 128;
|
||||
break;
|
||||
case 1:
|
||||
memcpy(auth_algo.algo.alg_key, ik, 16);
|
||||
memset(auth_algo.algo.alg_key + 16, 0x00, 4);
|
||||
auth_algo.algo.alg_key_len = 160;
|
||||
break;
|
||||
}
|
||||
strcpy(ciph_algo.algo.alg_name, g_ipsec_ealg[j].kernel_name);
|
||||
switch (j) {
|
||||
case 0:
|
||||
ciph_algo.algo.alg_key_len = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_c, &local_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_c, &remote_addr_c);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->local_addr_s, &local_addr_s);
|
||||
copy_pj_sockaddr_to_sockaddr_storage(&volte->remote_addr_s, &remote_addr_s);
|
||||
|
||||
ast_debug(1, "xfrm: local client: %s:%d (SPI=0x%08x) remote server: %s:%d (SPI=0x%08x)\n",
|
||||
sockaddr_storage_to_string(&local_addr_c, src_str, sizeof(src_str)),
|
||||
pj_sockaddr_get_port(&volte->local_addr_c), volte->local_spi_c,
|
||||
sockaddr_storage_to_string(&remote_addr_s, dst_str, sizeof(dst_str)),
|
||||
pj_sockaddr_get_port(&volte->remote_addr_s), volte->remote_spi_s);
|
||||
ast_debug(1, "xfrm: remote client: %s:%d (SPI=0x%08x) local server: %s:%d (SPI=0x%08x)\n",
|
||||
sockaddr_storage_to_string(&remote_addr_c, src_str, sizeof(src_str)),
|
||||
pj_sockaddr_get_port(&volte->remote_addr_s), volte->remote_spi_c,
|
||||
sockaddr_storage_to_string(&local_addr_c, dst_str, sizeof(dst_str)),
|
||||
pj_sockaddr_get_port(&volte->local_addr_s), volte->local_spi_s);
|
||||
ast_debug(1, "xfrm: alg: %s ealg: %s\n", auth_algo.algo.alg_name, ciph_algo.algo.alg_name);
|
||||
|
||||
status = xfrm_sa_add(g_mnl_socket, volte->remote_spi_s, (const struct sockaddr *)&local_addr_c,
|
||||
(const struct sockaddr *)&remote_addr_s, volte->remote_spi_s,
|
||||
&auth_algo.algo, &ciph_algo.algo);
|
||||
if (status)
|
||||
sa_add_failed = status;
|
||||
else
|
||||
volte->local_sa_c_set = PJ_TRUE;
|
||||
status = xfrm_sa_add(g_mnl_socket, volte->remote_spi_c, (const struct sockaddr *)&local_addr_s,
|
||||
(const struct sockaddr *)&remote_addr_c, volte->remote_spi_c,
|
||||
&auth_algo.algo, &ciph_algo.algo);
|
||||
if (status)
|
||||
sa_add_failed = status;
|
||||
else
|
||||
volte->local_sa_s_set = PJ_TRUE;
|
||||
status = xfrm_sa_add(g_mnl_socket, volte->local_spi_s, (const struct sockaddr *)&remote_addr_c,
|
||||
(const struct sockaddr *)&local_addr_s, volte->local_spi_s,
|
||||
&auth_algo.algo, &ciph_algo.algo);
|
||||
if (status)
|
||||
sa_add_failed = status;
|
||||
else
|
||||
volte->remote_sa_c_set = PJ_TRUE;
|
||||
|
||||
status = xfrm_sa_add(g_mnl_socket, volte->local_spi_c, (const struct sockaddr *)&remote_addr_s,
|
||||
(const struct sockaddr *)&local_addr_c, volte->local_spi_c,
|
||||
&auth_algo.algo, &ciph_algo.algo);
|
||||
if (status)
|
||||
sa_add_failed = status;
|
||||
else
|
||||
volte->remote_sa_s_set = PJ_TRUE;
|
||||
status = xfrm_policy_add(g_mnl_socket, (const struct sockaddr *)&local_addr_c,
|
||||
(const struct sockaddr *)&remote_addr_s, volte->remote_spi_s, false);
|
||||
if (status)
|
||||
sp_add_failed = status;
|
||||
else
|
||||
volte->local_sp_c_set = PJ_TRUE;
|
||||
status = xfrm_policy_add(g_mnl_socket, (const struct sockaddr *)&local_addr_s,
|
||||
(const struct sockaddr *)&remote_addr_c, volte->remote_spi_c, false);
|
||||
if (status)
|
||||
sp_add_failed = status;
|
||||
else
|
||||
volte->local_sp_s_set = PJ_TRUE;
|
||||
status = xfrm_policy_add(g_mnl_socket, (const struct sockaddr *)&remote_addr_c,
|
||||
(const struct sockaddr *)&local_addr_s, volte->local_spi_s, true);
|
||||
if (status)
|
||||
sp_add_failed = status;
|
||||
else
|
||||
volte->remote_sp_c_set = PJ_TRUE;
|
||||
status = xfrm_policy_add(g_mnl_socket, (const struct sockaddr *)&remote_addr_s,
|
||||
(const struct sockaddr *)&local_addr_c, volte->local_spi_c, true);
|
||||
if (status)
|
||||
sp_add_failed = status;
|
||||
else
|
||||
volte->remote_sp_s_set = PJ_TRUE;
|
||||
|
||||
if (sa_add_failed)
|
||||
ast_log(LOG_ERROR, "Failed to add IPSec SA.\n");
|
||||
if (sp_add_failed)
|
||||
ast_log(LOG_ERROR, "Failed to add IPSec SP.\n");
|
||||
|
||||
return (sa_add_failed) ? sa_add_failed : sp_add_failed;
|
||||
}
|
||||
|
||||
/* Header field names */
|
||||
const pj_str_t STR_SUPPORTED = { "Supported", 9 };
|
||||
const pj_str_t STR_REQUIRE = { "Require", 7 };
|
||||
const pj_str_t STR_PROXY_REQUIRE = { "Proxy-Require", 13 };
|
||||
const pj_str_t STR_PATH = { "path", 4 };
|
||||
const pj_str_t STR_SEC_AGREE = { "sec-agree", 9 };
|
||||
const pj_str_t STR_AUTHORIZATION = { "Authorization", 13 };
|
||||
const pj_str_t STR_AUTS = { "auts", 4 };
|
||||
const pj_str_t STR_SECURITY_CLIENT = { "Security-Client", 15 };
|
||||
const pj_str_t STR_SECURITY_SERVER = { "Security-Server", 15 };
|
||||
const pj_str_t STR_SECURITY_VERIFY = { "Security-Verify", 15 };
|
||||
const pj_str_t STR_Q = { "q", 1 };
|
||||
const pj_str_t STR_PROT = { "prot", 4 };
|
||||
const pj_str_t STR_MOD = { "mod", 3 };
|
||||
const pj_str_t STR_SPI_C = { "spi-c", 5 };
|
||||
const pj_str_t STR_SPI_S = { "spi-s", 5 };
|
||||
const pj_str_t STR_PORT_C = { "port-c", 6 };
|
||||
const pj_str_t STR_PORT_S = { "port-s", 6 };
|
||||
const pj_str_t STR_ALG = { "alg", 3 };
|
||||
const pj_str_t STR_EALG = { "ealg", 4 };
|
||||
|
||||
/* Create string header and add given value. */
|
||||
static pj_status_t add_value_string_hdr(pjsip_tx_data *tdata, const pj_str_t *name, const pj_str_t *value)
|
||||
{
|
||||
pjsip_generic_string_hdr *hdr;
|
||||
|
||||
/* Add header. */
|
||||
hdr = pjsip_generic_string_hdr_create(tdata->pool, name, value);
|
||||
if (!hdr) {
|
||||
ast_log(LOG_ERROR, "Failed to create string header.");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Append header */
|
||||
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)hdr);
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Add a value to an array header. If the header does not exist, it is created. */
|
||||
static pj_status_t add_value_array_hdr(pjsip_tx_data *tdata, const pj_str_t *name, const pj_str_t *value)
|
||||
{
|
||||
pjsip_generic_array_hdr *hdr;
|
||||
pj_bool_t created = PJ_FALSE;
|
||||
|
||||
/* Create header, if not yet created. */
|
||||
hdr = pjsip_msg_find_hdr_by_name(tdata->msg, name, NULL);
|
||||
if (!hdr) {
|
||||
hdr = pjsip_generic_array_hdr_create(tdata->pool, name);
|
||||
created = PJ_TRUE;
|
||||
}
|
||||
if (!hdr) {
|
||||
ast_log(LOG_ERROR, "Failed to create array header.");
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (hdr->count == PJSIP_GENERIC_ARRAY_MAX_COUNT) {
|
||||
ast_log(LOG_ERROR, "Too many evalue in array, skipping %s.", value->ptr);
|
||||
return -E2BIG;
|
||||
}
|
||||
pj_strdup(tdata->pool, &hdr->values[hdr->count++], value);
|
||||
|
||||
/* Append header, if created. */
|
||||
if (created)
|
||||
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)hdr);
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Add security client header to SIP message. */
|
||||
static pj_status_t add_securety_client_hdr(pjsip_tx_data *tdata, const struct ipsec_alg alg[],
|
||||
const struct ipsec_alg ealg[], uint32_t spi_c, uint32_t spi_s,
|
||||
uint16_t port_c, uint16_t port_s)
|
||||
{
|
||||
pjsip_generic_array_hdr *hdr;
|
||||
char str[256];
|
||||
int i, j;
|
||||
|
||||
/* Add Security-Client header. */
|
||||
hdr = pjsip_generic_array_hdr_create(tdata->pool, &STR_SECURITY_CLIENT);
|
||||
if (!hdr) {
|
||||
ast_log(LOG_ERROR, "Failed to create header.");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Create tupple for given algorithms. */
|
||||
for (i = 0; alg[i].sip_name; i++) {
|
||||
for (j = 0; ealg[j].sip_name; j++) {
|
||||
snprintf(str, sizeof(str), "ipsec-3gpp; alg=%s; ealg=%s; spi-c=%u; spi-s=%u; "
|
||||
"port-c=%u; port-s=%u", alg[i].sip_name, ealg[j].sip_name, spi_c, spi_s,
|
||||
port_c, port_s);
|
||||
if (hdr->count == PJSIP_GENERIC_ARRAY_MAX_COUNT) {
|
||||
ast_log(LOG_ERROR, "Too many evalue in array, skipping '%s'.", str);
|
||||
continue;
|
||||
}
|
||||
pj_strdup2(tdata->pool, &hdr->values[hdr->count++], str);
|
||||
}
|
||||
}
|
||||
|
||||
/* Append header */
|
||||
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)hdr);
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* Add Sec-Agree to header. */
|
||||
pj_status_t volte_add_sec_agree(pjsip_tx_data *tdata)
|
||||
{
|
||||
pj_status_t status;
|
||||
|
||||
/* "Require: sec-agree" */
|
||||
status = add_value_array_hdr(tdata, &STR_REQUIRE, &STR_SEC_AGREE);
|
||||
if (status)
|
||||
return status;
|
||||
/* "Proxy-Require: sec-agree" */
|
||||
status = add_value_string_hdr(tdata, &STR_PROXY_REQUIRE, &STR_SEC_AGREE);
|
||||
if (status)
|
||||
return status;
|
||||
/* "Supported: path,sec-agree" */
|
||||
status = add_value_array_hdr(tdata, &STR_SUPPORTED, &STR_PATH);
|
||||
if (status)
|
||||
return status;
|
||||
status = add_value_array_hdr(tdata, &STR_SUPPORTED, &STR_SEC_AGREE);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Add initial Authorization header. */
|
||||
pj_status_t volte_init_authorization(pjsip_tx_data *tdata, const char *fromdomain, const char *username)
|
||||
{
|
||||
char authorization[1024];
|
||||
pj_status_t status;
|
||||
|
||||
snprintf(authorization, sizeof(authorization),
|
||||
"Digest uri=\"sip:%s\",usernmame=\"%s\",response=\"\",realm=\"%s\",nonce=\"\"",
|
||||
fromdomain, username, fromdomain);
|
||||
|
||||
const pj_str_t authorization_str = {authorization, strlen(authorization)};
|
||||
status = add_value_string_hdr(tdata, &STR_AUTHORIZATION, &authorization_str);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Remove initial Authorization header. */
|
||||
pj_status_t volte_del_authorization(pjsip_tx_data *tdata)
|
||||
{
|
||||
pjsip_authorization_hdr *auth_hdr;
|
||||
|
||||
/* remove double authentication header */
|
||||
auth_hdr = pjsip_msg_find_hdr_by_name(tdata->msg, &STR_AUTHORIZATION, NULL);
|
||||
if (auth_hdr) {
|
||||
pj_list_erase(auth_hdr);
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Reset old transport and clear IPSec transformations */
|
||||
pj_status_t volte_reset_transport(struct volte_states *volte)
|
||||
{
|
||||
pj_status_t status;
|
||||
int old_port_c;
|
||||
|
||||
/* Cleanup IPSec transform. */
|
||||
volte_cleanup_xfrm(volte);
|
||||
|
||||
/* Cleanup old transport. */
|
||||
old_port_c = pj_sockaddr_get_port(&volte->local_addr_c);
|
||||
if (old_port_c > 0 && old_port_c < 65535) {
|
||||
if (!volte->transport) {
|
||||
ast_log(LOG_ERROR, "No transport set. Please fix!\n");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
/* Create socket with default transport port. */
|
||||
status = volte->transport->create_new_sock(volte->transport, NULL);
|
||||
if (status != PJ_SUCCESS) {
|
||||
ast_log(LOG_ERROR, "Failed to get connection addresses (errno=%d).\n", errno);
|
||||
return status;
|
||||
}
|
||||
status = volte->transport->connect_new_sock(volte->transport,
|
||||
&volte->local_addr_c, &volte->remote_addr_orig);
|
||||
if (status != PJ_SUCCESS) {
|
||||
ast_log(LOG_ERROR, "Failed to change connection addresses (errno=%d).\n", errno);
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Add security client header. */
|
||||
pj_status_t volte_add_security_client(struct volte_states *volte, pjsip_tx_data *tdata, int port_c, int port_s)
|
||||
{
|
||||
pj_status_t status;
|
||||
|
||||
/* Reset addresses. */
|
||||
memset(&volte->local_addr_c, 0, sizeof(pj_sockaddr));
|
||||
volte->local_addr_c.addr.sa_family = PJ_AF_INET;
|
||||
memset(&volte->local_addr_s, 0, sizeof(pj_sockaddr));
|
||||
volte->local_addr_s.addr.sa_family = PJ_AF_INET;
|
||||
memset(&volte->remote_addr_c, 0, sizeof(pj_sockaddr));
|
||||
volte->remote_addr_c.addr.sa_family = PJ_AF_INET;
|
||||
memset(&volte->remote_addr_s, 0, sizeof(pj_sockaddr));
|
||||
volte->remote_addr_s.addr.sa_family = PJ_AF_INET;
|
||||
|
||||
/* Set new local ports */
|
||||
pj_sockaddr_set_port(&volte->local_addr_c, port_c);
|
||||
pj_sockaddr_set_port(&volte->local_addr_s, port_s);
|
||||
|
||||
/* Allocate SPI */
|
||||
status = volte_alloc_spi(volte);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
status = add_securety_client_hdr(tdata, g_ipsec_alg, g_ipsec_ealg, volte->local_spi_c, volte->local_spi_s,
|
||||
port_c, port_s);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
/* Set new transport and set IPSec transformations */
|
||||
pj_status_t volte_set_transport(struct volte_states *volte, pjsip_tx_data *tdata, const pj_str_t *alg,
|
||||
const pj_str_t *ealg, uint8_t *ik, uint32_t remote_spi_c, uint32_t remote_spi_s,
|
||||
uint16_t remote_port_c, uint16_t remote_port_s)
|
||||
{
|
||||
int local_port_c, local_port_s;
|
||||
pj_status_t status;
|
||||
|
||||
/* Cleanup IPSec transform. */
|
||||
volte_cleanup_xfrm(volte);
|
||||
|
||||
/* Get addresses from current transport and replace the local ports. */
|
||||
local_port_c = pj_sockaddr_get_port(&volte->local_addr_c);
|
||||
local_port_s = pj_sockaddr_get_port(&volte->local_addr_s);
|
||||
memcpy(&volte->local_addr_c, &tdata->tp_info.transport->local_addr, sizeof(pj_sockaddr));
|
||||
memcpy(&volte->local_addr_s, &tdata->tp_info.transport->factory->local_addr, sizeof(pj_sockaddr));
|
||||
memcpy(&volte->remote_addr_c, &tdata->tp_info.dst_addr, sizeof(pj_sockaddr));
|
||||
memcpy(&volte->remote_addr_s, &tdata->tp_info.dst_addr, sizeof(pj_sockaddr));
|
||||
memcpy(&volte->remote_addr_orig, &tdata->tp_info.dst_addr, sizeof(pj_sockaddr));
|
||||
pj_sockaddr_set_port(&volte->local_addr_c, local_port_c);
|
||||
pj_sockaddr_set_port(&volte->local_addr_s, local_port_s);
|
||||
pj_sockaddr_set_port(&volte->remote_addr_c, remote_port_c);
|
||||
pj_sockaddr_set_port(&volte->remote_addr_s, remote_port_s);
|
||||
|
||||
/* Set IPSec transform. */
|
||||
volte->remote_spi_c = remote_spi_c;
|
||||
volte->remote_spi_s = remote_spi_s;
|
||||
volte_set_xfrm(volte, alg, ealg, ik);
|
||||
|
||||
/* Create socket with new transport port. */
|
||||
if (!tdata->tp_info.transport) {
|
||||
ast_log(LOG_ERROR, "The Message has no transport. Please fix!\n");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
if (!tdata->tp_info.transport->create_new_sock || !tdata->tp_info.transport->connect_new_sock) {
|
||||
ast_log(LOG_ERROR, "The transport protocol does not support socket change. Please fix!\n");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
status = tdata->tp_info.transport->create_new_sock(tdata->tp_info.transport, &volte->local_addr_c);
|
||||
if (status != PJ_SUCCESS) {
|
||||
ast_log(LOG_ERROR, "Failed to get connection addresses (errno=%d).\n", errno);
|
||||
return status;
|
||||
}
|
||||
status = tdata->tp_info.transport->connect_new_sock(tdata->tp_info.transport,
|
||||
&volte->local_addr_c, &volte->remote_addr_s);
|
||||
if (status != PJ_SUCCESS) {
|
||||
ast_log(LOG_ERROR, "Failed to change connection addresses (errno=%d).\n", errno);
|
||||
return status;
|
||||
}
|
||||
volte->transport = tdata->tp_info.transport;
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
static void on_syntax_error(pj_scanner *scanner)
|
||||
{
|
||||
PJ_UNUSED_ARG(scanner);
|
||||
}
|
||||
|
||||
/* Store and parse security server from SIP header and fill a structure. */
|
||||
pj_status_t volte_get_security_server(struct volte_states *volte, pjsip_rx_data *rdata, struct security_server *sec)
|
||||
{
|
||||
pjsip_generic_string_hdr *sec_hdr;
|
||||
pj_scanner scanner;
|
||||
int i, j;
|
||||
|
||||
/* Get Security-Server from header. */
|
||||
sec_hdr = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_SECURITY_SERVER, NULL);
|
||||
if (!sec_hdr || !sec_hdr->hvalue.ptr) {
|
||||
ast_log(LOG_ERROR, "Missing 'Security-Server' in REGISTER response.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Store for security verify. */
|
||||
if (sec_hdr->hvalue.slen < sizeof(volte->security_server)) {
|
||||
memcpy(volte->security_server, sec_hdr->hvalue.ptr, sec_hdr->hvalue.slen);
|
||||
volte->security_server[sec_hdr->hvalue.slen] = '\0';
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Security-Server' too large.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
memset(sec, 0, sizeof(*sec));
|
||||
|
||||
pj_scan_init(&scanner, sec_hdr->hvalue.ptr, sec_hdr->hvalue.slen, 0, &on_syntax_error);
|
||||
|
||||
for (;;) {
|
||||
pj_str_t name, value;
|
||||
|
||||
pjsip_parse_param_imp(&scanner, rdata->tp_info.pool, &name, &value, 0);
|
||||
|
||||
if (!pj_stricmp(&name, &STR_Q)) {
|
||||
sec->q = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_PROT)) {
|
||||
sec->prot = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_MOD)) {
|
||||
sec->mod = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_SPI_C)) {
|
||||
sec->spi_c = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_SPI_S)) {
|
||||
sec->spi_s = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_PORT_C)) {
|
||||
sec->port_c = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_PORT_S)) {
|
||||
sec->port_s = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_ALG)) {
|
||||
sec->alg = value;
|
||||
} else
|
||||
if (!pj_stricmp(&name, &STR_EALG)) {
|
||||
sec->ealg = value;
|
||||
}
|
||||
|
||||
if (pj_scan_is_eof(&scanner))
|
||||
break;
|
||||
|
||||
/* Eat semicolon */
|
||||
if (*scanner.curptr == ';')
|
||||
pj_scan_get_char(&scanner);
|
||||
}
|
||||
pj_scan_fini(&scanner);
|
||||
|
||||
if (!sec->prot.ptr || !sec->spi_c.ptr || !sec->spi_s.ptr || !sec->port_c.ptr || !sec->port_s.ptr ||
|
||||
!sec->alg.ptr || !sec->ealg.ptr) {
|
||||
ast_log(LOG_ERROR, "Missing 'Security-Server' elements in REGISTER response. header=\"%.*s\", "
|
||||
"prot=%.*s, spi-c=%.*s, spi-s=%.*s, port-c=%.*s, port-s=%.*s, alg=%.*s, ealg=%.*s",
|
||||
fmt_str(sec_hdr->hvalue), fmt_str(sec->prot), fmt_str(sec->spi_c), fmt_str(sec->spi_s),
|
||||
fmt_str(sec->port_c), fmt_str(sec->port_s), fmt_str(sec->alg), fmt_str(sec->ealg));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; g_ipsec_alg[i].sip_name; i++) {
|
||||
if (!pj_strncmp2(&sec->alg, g_ipsec_alg[i].sip_name, strlen(g_ipsec_alg[i].sip_name)))
|
||||
break;
|
||||
}
|
||||
if (!g_ipsec_alg[i].kernel_name) {
|
||||
ast_log(LOG_ERROR, "Given 'alg=%.*s' in Security-Server header not found.\n", fmt_str(sec->alg));
|
||||
return -EINVAL;
|
||||
}
|
||||
for (j = 0; g_ipsec_ealg[j].sip_name; j++) {
|
||||
if (!pj_strncmp2(&sec->ealg, g_ipsec_ealg[j].sip_name, strlen(g_ipsec_ealg[j].sip_name)))
|
||||
break;
|
||||
}
|
||||
if (!g_ipsec_ealg[j].kernel_name) {
|
||||
ast_log(LOG_ERROR, "Given 'ealg=%.*s' in Security-Server header not found.\n", fmt_str(sec->ealg));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
pj_status_t volte_add_security_verify(struct volte_states *volte, pjsip_tx_data *tdata)
|
||||
{
|
||||
const pj_str_t security = { volte->security_server, strlen(volte->security_server)};
|
||||
pj_status_t status;
|
||||
|
||||
status = add_value_string_hdr(tdata, &STR_SECURITY_VERIFY, &security);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
static pj_status_t my_hex_to_octet_string(const char *name, const char *input, uint8_t *output, size_t output_size)
|
||||
{
|
||||
int i, n;
|
||||
|
||||
if (!input || !input[0]) {
|
||||
ast_log(LOG_ERROR, "Missing value for hex string '%s'.\n", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
i = n = 0;
|
||||
while (*input) {
|
||||
if (i == output_size) {
|
||||
ast_log(LOG_ERROR, "Value for hex string '%s' too long, expecting %zu bytes.\n", name,
|
||||
output_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (*input >= '0' && *input <= '9')
|
||||
output[i] = (output[i] << 4) | (*input - '0');
|
||||
else if (*input >= 'a' && *input <= 'f')
|
||||
output[i] = (output[i] << 4) | (*input - 'a' + 10);
|
||||
else if (*input >= 'A' && *input <= 'F')
|
||||
output[i] = (output[i] << 4) | (*input - 'A' + 10);
|
||||
else {
|
||||
ast_log(LOG_ERROR, "Value for hex string '%s' has invalid character '%c'.\n", name, *input);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (++n == 2) {
|
||||
n = 0;
|
||||
i++;
|
||||
}
|
||||
input++;
|
||||
}
|
||||
if (i < output_size) {
|
||||
ast_log(LOG_ERROR, "Value for hex string '%s' too short, expecting %zu bytes.\n", name, output_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
pj_status_t volte_authenticate(struct volte_states *volte, pjsip_rx_data *rdata, pjsip_hdr_e auth_type,
|
||||
const char *opc_str, const char *k_str, const char *sqn_str, uint8_t *out_res,
|
||||
uint8_t *out_ik, uint8_t *out_ck, uint8_t *out_auts)
|
||||
{
|
||||
pjsip_www_authenticate_hdr *auth_hdr;
|
||||
uint8_t opc[16], k[16], sqn[6], rand_auth[32], *rand = rand_auth, *autn = rand_auth + 16;
|
||||
size_t out_res_len = 8;
|
||||
int rc;
|
||||
pj_status_t status;
|
||||
|
||||
auth_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, auth_type, NULL);
|
||||
if (!auth_hdr || !auth_hdr->challenge.digest.nonce.ptr || !auth_hdr->challenge.digest.algorithm.ptr) {
|
||||
ast_log(LOG_ERROR, "Authentication header missing or incomplete in REGISTER response.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!pj_strncmp2(&auth_hdr->challenge.digest.algorithm, "AKAv2-MD5", 9)) {
|
||||
ast_log(LOG_ERROR, "Authentication algorithm not supported. Please fix!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!!pj_strncmp2(&auth_hdr->challenge.digest.algorithm, "AKAv1-MD5", 9)) {
|
||||
ast_log(LOG_ERROR, "Authentication algorithm not supported.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
status = my_hex_to_octet_string("OPC", opc_str, opc, sizeof(opc));
|
||||
if (status)
|
||||
return status;
|
||||
status = my_hex_to_octet_string("K", k_str, k, sizeof(k));
|
||||
if (status)
|
||||
return status;
|
||||
status = my_hex_to_octet_string("SQN", sqn_str, sqn, sizeof(sqn));
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
ast_base64decode(rand_auth, auth_hdr->challenge.digest.nonce.ptr, sizeof(rand_auth));
|
||||
|
||||
rc = milenage_check(opc, k, sqn, rand, autn, out_ik, out_ck, out_res, &out_res_len, out_auts);
|
||||
if (rc == -1) {
|
||||
ast_log(LOG_ERROR, "Milenage authentication failed.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (rc == -2) {
|
||||
/* Tell the caller to perform resync process. */
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
pj_status_t volte_add_auts(struct volte_states *volte, pjsip_tx_data *tdata, uint8_t *auts)
|
||||
{
|
||||
pjsip_authorization_hdr *auth_hdr;
|
||||
char enc_auts[23] = "\" \"";
|
||||
pjsip_param *param;
|
||||
|
||||
auth_hdr = pjsip_msg_find_hdr_by_name(tdata->msg, &STR_AUTHORIZATION, NULL);
|
||||
if (!auth_hdr) {
|
||||
ast_log(LOG_ERROR, "Authorization header not found in TX message. Please fix!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Encode base64. */
|
||||
ast_base64encode(enc_auts + 1, auts, 14, 21);
|
||||
enc_auts[21] = '"';
|
||||
|
||||
/* Append 'auts' to Authorization header and replace that header. */
|
||||
param = PJ_POOL_ALLOC_T(tdata->pool, pjsip_param);
|
||||
if (!param)
|
||||
return -ENOMEM;
|
||||
param->name = STR_AUTS;
|
||||
pj_strdup2(tdata->pool, ¶m->value, enc_auts);
|
||||
pj_list_insert_before(&auth_hdr->credential.digest.other_param, param);
|
||||
|
||||
return PJ_SUCCESS;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
#pragma once
|
||||
|
||||
#include "netlink_xfrm.h"
|
||||
|
||||
struct volte_states {
|
||||
pj_sockaddr local_addr_c, remote_addr_s;
|
||||
pj_sockaddr remote_addr_c, local_addr_s;
|
||||
uint32_t local_spi_c, remote_spi_s;
|
||||
uint32_t remote_spi_c, local_spi_s;
|
||||
pj_bool_t local_sa_c_set, remote_sa_s_set;
|
||||
pj_bool_t remote_sa_c_set, local_sa_s_set;
|
||||
pj_bool_t local_sp_c_set, remote_sp_s_set;
|
||||
pj_bool_t remote_sp_c_set, local_sp_s_set;
|
||||
|
||||
pjsip_transport *transport;
|
||||
pj_sockaddr remote_addr_orig;
|
||||
|
||||
char security_server[1024];
|
||||
};
|
||||
|
||||
struct security_server {
|
||||
pj_str_t q;
|
||||
pj_str_t prot;
|
||||
pj_str_t mod;
|
||||
pj_str_t spi_c;
|
||||
pj_str_t spi_s;
|
||||
pj_str_t port_c;
|
||||
pj_str_t port_s;
|
||||
pj_str_t alg;
|
||||
pj_str_t ealg;
|
||||
};
|
||||
|
||||
pj_status_t g_volte_init(void);
|
||||
void g_volte_exit(void);
|
||||
|
||||
void volte_cleanup_xfrm(struct volte_states *volte);
|
||||
pj_status_t volte_alloc_spi(struct volte_states *volte);
|
||||
|
||||
pj_status_t volte_add_sec_agree(pjsip_tx_data *tdata);
|
||||
pj_status_t volte_init_authorization(pjsip_tx_data *tdata, const char *fromdomain, const char *username);
|
||||
pj_status_t volte_del_authorization(pjsip_tx_data *tdata);
|
||||
pj_status_t volte_reset_transport(struct volte_states *volte);
|
||||
pj_status_t volte_add_security_client(struct volte_states *volte, pjsip_tx_data *tdata, int port_c, int port_s);
|
||||
pj_status_t volte_set_transport(struct volte_states *volte, pjsip_tx_data *tdata, const pj_str_t *alg,
|
||||
const pj_str_t *ealg, uint8_t *ik, uint32_t remote_spi_c, uint32_t remote_spi_s,
|
||||
uint16_t remote_port_c, uint16_t remote_port_s);
|
||||
pj_status_t volte_get_security_server(struct volte_states *volte, pjsip_rx_data *rdata, struct security_server *sec);
|
||||
pj_status_t volte_add_security_verify(struct volte_states *volte, pjsip_tx_data *tdata);
|
||||
pj_status_t volte_authenticate(struct volte_states *volte, pjsip_rx_data *rdata, pjsip_hdr_e auth_type,
|
||||
const char *opc_str, const char *k_str, const char *sqn_str, uint8_t *out_res,
|
||||
uint8_t *out_ik, uint8_t *out_ck, uint8_t *out_auts);
|
||||
pj_status_t volte_add_auts(struct volte_states *volte, pjsip_tx_data *tdata, uint8_t *auts);
|
|
@ -4,7 +4,7 @@ SUBMAKE?=$(MAKE) --quiet --no-print-directory
|
|||
ECHO_PREFIX?=@
|
||||
CMD_PREFIX?=@
|
||||
QUIET_CONFIGURE=-q
|
||||
REALLY_QUIET=>/dev/null 2>&1
|
||||
REALLY_QUIET=
|
||||
else
|
||||
SUBMAKE?=$(MAKE)
|
||||
ECHO_PREFIX?=@\#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
source
|
||||
**.bz2
|
||||
build.mak
|
||||
pjproject.symbols
|
||||
|
|
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,33 @@
|
|||
### Export Flags
|
||||
|
||||
```
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export LIB_FUZZING_ENGINE=-fsanitize=fuzzer
|
||||
export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export LDFLAGS="$CFLAGS"
|
||||
```
|
||||
|
||||
### Compile Guide
|
||||
|
||||
Note: While compiling fuzzing suite, Don't use bloat libraries.
|
||||
|
||||
```
|
||||
./configure --disable-ffmpeg --disable-ssl --disable-speex-aec --disable-speex-codec --disable-g7221-codec --disable-gsm-codec --disable-ilbc-codec --disable-resample --disable-libsrtp --disable-libwebrtc --disable-libyuv
|
||||
|
||||
make dep
|
||||
make -j$(nproc)
|
||||
make fuzz
|
||||
```
|
||||
|
||||
|
||||
### Run
|
||||
|
||||
```
|
||||
cd tests/fuzz
|
||||
mkdir cov-json
|
||||
unzip seed/fuzz-json_seed_corpus.zip
|
||||
./fuzz-json cov-json/ fuzz-json_seed_corpus/
|
||||
```
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
include build.mak
|
||||
include build/host-$(HOST_NAME).mak
|
||||
-include user.mak
|
||||
include version.mak
|
||||
|
||||
LIB_DIRS = pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build
|
||||
DIRS = $(LIB_DIRS) pjsip-apps/build $(EXTRA_DIRS)
|
||||
|
||||
ifdef MINSIZE
|
||||
MAKE_FLAGS := MINSIZE=1
|
||||
endif
|
||||
|
||||
all clean dep depend print:
|
||||
for dir in $(DIRS); do \
|
||||
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
|
||||
true; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
distclean realclean:
|
||||
for dir in $(DIRS); do \
|
||||
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
|
||||
true; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(HOST_RM) config.log
|
||||
$(HOST_RM) config.status
|
||||
|
||||
lib:
|
||||
for dir in $(LIB_DIRS); do \
|
||||
if $(MAKE) $(MAKE_FLAGS) -C $$dir lib; then \
|
||||
true; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done; \
|
||||
|
||||
|
||||
.PHONY: lib doc clean-doc
|
||||
|
||||
doc:
|
||||
@if test \( ! "$(WWWDIR)" == "" \) -a \( ! -d $(WWWDIR)/pjlib/docs/html \) ; then \
|
||||
echo 'Directory "$(WWWDIR)" does not look like a valid pjsip web directory'; \
|
||||
exit 1; \
|
||||
fi
|
||||
for dir in $(DIRS); do \
|
||||
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
|
||||
true; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
clean-doc:
|
||||
for dir in pjlib pjlib-util pjnath pjmedia pjsip; do \
|
||||
rm -rf $${dir}/docs/$${PJ_VERSION}; \
|
||||
done
|
||||
|
||||
LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \
|
||||
pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
|
||||
pjnath/lib/libpjnath-$(TARGET_NAME).a \
|
||||
pjmedia/lib/libpjmedia-$(TARGET_NAME).a \
|
||||
pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \
|
||||
pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \
|
||||
pjsip/lib/libpjsip-$(TARGET_NAME).a \
|
||||
pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \
|
||||
pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \
|
||||
pjsip/lib/libpjsua-$(TARGET_NAME).a
|
||||
BINS = pjsip-apps/bin/pjsua-$(TARGET_NAME)$(HOST_EXE)
|
||||
|
||||
size:
|
||||
@echo -n 'Date: '
|
||||
@date
|
||||
@echo
|
||||
@for lib in $(LIBS); do \
|
||||
echo "$$lib:"; \
|
||||
size -t $$lib | awk '{print $$1 "\t" $$2 "\t" $$3 "\t" $$6}'; \
|
||||
echo; \
|
||||
done
|
||||
@echo
|
||||
@for bin in $(BINS); do \
|
||||
echo "size $$bin:"; \
|
||||
size $$bin; \
|
||||
done
|
||||
|
||||
#dos2unix:
|
||||
# for f in `find . | egrep '(mak|h|c|S|s|Makefile)$$'`; do \
|
||||
# dos2unix "$$f" > dos2unix.tmp; \
|
||||
# cp dos2unix.tmp "$$f"; \
|
||||
# done
|
||||
# rm -f dos2unix.tmp
|
||||
|
||||
xhdrid:
|
||||
for f in `find . | egrep '\.(h|c|S|s|cpp|hpp)$$'`; do \
|
||||
echo Processing $$f...; \
|
||||
cat $$f | sed 's/.*\$$Author\$$/ */' > /tmp/id; \
|
||||
cp /tmp/id $$f; \
|
||||
done
|
||||
|
||||
selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test
|
||||
|
||||
pjlib-test: pjlib/bin/pjlib-test-$(TARGET_NAME)
|
||||
cd pjlib/build && ../bin/pjlib-test-$(TARGET_NAME)
|
||||
|
||||
pjlib-test-ci: pjlib/bin/pjlib-test-$(TARGET_NAME)
|
||||
cd pjlib/build && ../bin/pjlib-test-$(TARGET_NAME) --ci-mode
|
||||
|
||||
pjlib-util-test: pjlib-util/bin/pjlib-util-test-$(TARGET_NAME)
|
||||
cd pjlib-util/build && ../bin/pjlib-util-test-$(TARGET_NAME)
|
||||
|
||||
pjnath-test: pjnath/bin/pjnath-test-$(TARGET_NAME)
|
||||
cd pjnath/build && ../bin/pjnath-test-$(TARGET_NAME)
|
||||
|
||||
pjmedia-test: pjmedia/bin/pjmedia-test-$(TARGET_NAME)
|
||||
cd pjmedia/build && ../bin/pjmedia-test-$(TARGET_NAME)
|
||||
|
||||
pjsip-test: pjsip/bin/pjsip-test-$(TARGET_NAME)
|
||||
cd pjsip/build && ../bin/pjsip-test-$(TARGET_NAME)
|
||||
|
||||
pjsua-test: cmp_wav
|
||||
cd tests/pjsua && python runall.py -t 2
|
||||
|
||||
cmp_wav:
|
||||
$(MAKE) -C tests/pjsua/tools
|
||||
|
||||
fuzz:
|
||||
$(MAKE) -C tests/fuzz
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(libdir)/
|
||||
if [ "$(PJ_EXCLUDE_PJSUA2)x" = "x" ] ; then \
|
||||
cp -af $(APP_LIBXX_FILES) $(DESTDIR)$(libdir)/; \
|
||||
else \
|
||||
cp -af $(APP_LIB_FILES) $(DESTDIR)$(libdir)/; \
|
||||
fi
|
||||
mkdir -p $(DESTDIR)$(includedir)/
|
||||
for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
|
||||
cp -RLf $$d/include/* $(DESTDIR)$(includedir)/; \
|
||||
done
|
||||
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
|
||||
sed -e "s!@PREFIX@!$(prefix)!" libpjproject.pc.in | \
|
||||
sed -e "s!@INCLUDEDIR@!$(includedir)!" | \
|
||||
sed -e "s!@LIBDIR@!$(libdir)!" | \
|
||||
sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \
|
||||
sed -e "s!@PJ_INSTALL_LDFLAGS@!$(PJ_INSTALL_LDFLAGS)!" | \
|
||||
sed -e "s!@PJ_INSTALL_LDFLAGS_PRIVATE@!$(PJ_INSTALL_LDFLAGS_PRIVATE)!" | \
|
||||
sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)$(libdir)/pkgconfig/libpjproject.pc
|
||||
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(libdir)/pkgconfig/libpjproject.pc
|
||||
rmdir $(DESTDIR)$(libdir)/pkgconfig 2> /dev/null || true
|
||||
for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
|
||||
for f in $$d/include/*; do \
|
||||
$(RM) -r "$(DESTDIR)$(includedir)/`basename $$f`"; \
|
||||
done; \
|
||||
done
|
||||
rmdir $(DESTDIR)$(includedir) 2> /dev/null || true
|
||||
$(RM) $(addprefix $(DESTDIR)$(libdir)/,$(notdir $(APP_LIBXX_FILES)))
|
||||
rmdir $(DESTDIR)$(libdir) 2> /dev/null || true
|
|
@ -0,0 +1,67 @@
|
|||
|
||||
[![CI Linux](https://github.com/pjsip/pjproject/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/pjsip/pjproject/actions/workflows/ci-linux.yml)
|
||||
[![CI Mac](https://github.com/pjsip/pjproject/actions/workflows/ci-mac.yml/badge.svg)](https://github.com/pjsip/pjproject/actions/workflows/ci-mac.yml)
|
||||
[![CI Windows](https://github.com/pjsip/pjproject/actions/workflows/ci-win.yml/badge.svg)](https://github.com/pjsip/pjproject/actions/workflows/ci-win.yml)
|
||||
<BR>
|
||||
[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/pjsip.png)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#pjsip)
|
||||
[![Coverity-Scan](https://scan.coverity.com/projects/905/badge.svg)](https://scan.coverity.com/projects/pjsip)
|
||||
[![CodeQL](https://github.com/pjsip/pjproject/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/pjsip/pjproject/actions/workflows/codeql-analysis.yml)
|
||||
[![docs.pjsip.org](https://readthedocs.org/projects/pjsip/badge/?version=latest)](https://docs.pjsip.org/en/latest/)
|
||||
|
||||
|
||||
# PJSIP
|
||||
|
||||
PJSIP is a free and open source multimedia communication library written in C with high level API in C, C++, Java, C#, and Python languages. It implements standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.
|
||||
|
||||
## Getting PJSIP
|
||||
|
||||
- Main repository: https://github.com/pjsip/pjproject
|
||||
- Releases: https://github.com/pjsip/pjproject/releases
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Main documentation site: https://docs.pjsip.org
|
||||
|
||||
Table of contents:
|
||||
|
||||
- Overview
|
||||
- [Overview](https://docs.pjsip.org/en/latest/overview/intro.html)
|
||||
- [Features (Datasheet)](https://docs.pjsip.org/en/latest/overview/features.html)
|
||||
- [License](https://docs.pjsip.org/en/latest/overview/license.html)
|
||||
- **Getting started**
|
||||
- [Getting PJSIP](https://docs.pjsip.org/en/latest/get-started/getting.html)
|
||||
- [General Guidelines](https://docs.pjsip.org/en/latest/get-started/general_guidelines.html)
|
||||
- [Android](https://docs.pjsip.org/en/latest/get-started/android/index.html)
|
||||
- [iPhone](https://docs.pjsip.org/en/latest/get-started/ios/index.html)
|
||||
- [Mac/Linux/Unix](https://docs.pjsip.org/en/latest/get-started/posix/index.html)
|
||||
- [Windows](https://docs.pjsip.org/en/latest/get-started/windows/index.html)
|
||||
- [Windows Phone](https://docs.pjsip.org/en/latest/get-started/windows-phone/index.html)
|
||||
- PJSUA2 - High level API guide
|
||||
- [Introduction](https://docs.pjsip.org/en/latest/pjsua2/intro.html)
|
||||
- [Building PJSUA2](https://docs.pjsip.org/en/latest/pjsua2/building.html)
|
||||
- [General concepts](https://docs.pjsip.org/en/latest/pjsua2/general_concept.html)
|
||||
- [Hello world!](https://docs.pjsip.org/en/latest/pjsua2/building.html)
|
||||
- [Using PJSUA2](https://docs.pjsip.org/en/latest/pjsua2/using/index.html)
|
||||
- [Sample applications](https://docs.pjsip.org/en/latest/pjsua2/samples.html)
|
||||
- Specific guides
|
||||
- [Audio](https://docs.pjsip.org/en/latest/specific-guides/index.html#audio)
|
||||
- [Audio Troubleshooting](https://docs.pjsip.org/en/latest/specific-guides/index.html#audio-troubleshooting)
|
||||
- [Build and integration](https://docs.pjsip.org/en/latest/specific-guides/index.html#build-integration)
|
||||
- [Development and programming](https://docs.pjsip.org/en/latest/specific-guides/index.html#development-programming)
|
||||
- [Media](https://docs.pjsip.org/en/latest/specific-guides/index.html#media)
|
||||
- [Network and NAT](https://docs.pjsip.org/en/latest/specific-guides/index.html#network-nat)
|
||||
- [Performance and footprint](https://docs.pjsip.org/en/latest/specific-guides/index.html#performance-footprint)
|
||||
- [Security](https://docs.pjsip.org/en/latest/specific-guides/index.html#security)
|
||||
- [SIP](https://docs.pjsip.org/en/latest/specific-guides/index.html#sip)
|
||||
- [Video](https://docs.pjsip.org/en/latest/specific-guides/index.html#video)
|
||||
- [Other](https://docs.pjsip.org/en/latest/specific-guides/index.html#other)
|
||||
- API reference
|
||||
- [PJSUA2](https://docs.pjsip.org/en/latest/api/pjsua2/index.html) - high level API (Java/C#/Python/C++/swig)
|
||||
- [PJSUA-LIB](https://docs.pjsip.org/en/latest/api/pjsua-lib/index.html) - high level API (C)
|
||||
- [PJSIP](https://docs.pjsip.org/en/latest/api/pjsip/index.html) - SIP stack
|
||||
- [PJMEDIA](https://docs.pjsip.org/en/latest/api/pjmedia/index.html) - media framework
|
||||
- [PJNATH](https://docs.pjsip.org/en/latest/api/pjnath/index.html) - NAT traversal helper
|
||||
- [PJLIB-UTIL](https://docs.pjsip.org/en/latest/api/pjlib-util/index.html) - utilities
|
||||
- [PJLIB](https://docs.pjsip.org/en/latest/api/pjlib/index.html) - portable library
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 2.x | :white_check_mark: |
|
||||
| < 2.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please email security@pjsip.org
|
||||
|
||||
|
||||
Encrypt sensitive information using our PGP public key below.
|
||||
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Comment: User-ID: Teluu <security@pjsip.org>
|
||||
Comment: Created: 7/29/2021 8:24 AM
|
||||
Comment: Expires: 7/29/2023 12:00 PM
|
||||
Comment: Type: 3,072-bit RSA (secret key available)
|
||||
Comment: Usage: Signing, Encryption, Certifying User-IDs
|
||||
Comment: Fingerprint: C2A9D29D94D131466D8832AE15BA5B3B5DAE8B36
|
||||
|
||||
|
||||
mQGNBGECAzwBDADjloGXRtTaSoTj+Nz4uy5Ei8e9CpIe0kEXLUykdr0bxWh7EiUX
|
||||
EqkZnFXbt3bWcFTVp7CQMn1as8/AUSteRbKuweLVyx/fFFtxrOQIBNqrwJhwwbmx
|
||||
SKLc4Pe/RqT8HmJb+MRnU3rkuzJ4ak0Nh5fLUFL/gBmped8MqBmF8OobJt0U/z/d
|
||||
opqVGfnHPablA3nJUcbMW97GJ8FH4cX5ZT+46cbpoJo/L7WbMUpbZcnz+iPiQFFO
|
||||
/oO7AbVihdvFNd0SoXi7aE8i8BFIhOYa9nLJId/PMRqG9aFTRP8dOwbOL+EekQ7d
|
||||
5x81bQLgjpXogORDxiUns0cFgPBDz5P1Y1qXlQ+HYa8m/vIKnEZMo1mnNhBR40cM
|
||||
XyrapeA9WcXiYNo4FBEt6rHoCKpGbMG5Rfpk5u5KljDGxg3tdbuXNfbJPFAOp3IB
|
||||
hQ72zhT4rWV31J8IEmoBOT8smf04cEr+jfrjs/ejYJh//Ez7AzMhyoDm1m1ELWwW
|
||||
Mzvm5QPtm1pwHakAEQEAAbQaVGVsdXUgPHNlY3VyaXR5QHBqc2lwLm9yZz6JAdQE
|
||||
EwEIAD4WIQTCqdKdlNExRm2IMq4Vuls7Xa6LNgUCYQIDPAIbAwUJA8KZlAULCQgH
|
||||
AgYVCgkICwIEFgIDAQIeAQIXgAAKCRAVuls7Xa6LNhEGC/4p9GiArgRF0DgVa40O
|
||||
JeH8mObjpweBvQc1zpHX2cA9DhkEs/vP0lg29v1248HnnZFz0HBnXKGQVq599jZX
|
||||
blm1IphNJSWfkutfjIIH80fqDCuqHOHLhrf0qzDxIAWaSSr0Bh/rGHlsPo2+s35f
|
||||
3EMwpkDzETnoLeJMShxAwJOocZBqIieWK2/MZKdLnwn2Evb40BJ63UftFOCf7LuQ
|
||||
tbZQ/w2op3Capt+6BL5aNAwnhz5uTgzUE2dLA31YCpWPDJbE1vMy05suzbEqGLu1
|
||||
aAFAKocdw1gbFrvEj2nDhH3dD10kQeMtXNPXqtQfRcmQCi8HCetfmFjfB8n5J6YW
|
||||
G6dtmiC9RfDgUlrhfTcHRL7ioD2g8jZt2LE2yXulS+8AD10/WQTWkEHYmly0bHAE
|
||||
sbAtwNA1asVsuVNUreTirZA0KgTJRySe/WbCyaCXStlTHy2X2aKR0jaNhm56Snpz
|
||||
K+aRPTsc6ZFOQOzBMys7hBCAQlCQ0CQyzucMfV3Egl83Qxm5AY0EYQIDPAEMALRb
|
||||
OcHPuJ77J+jZGtNAp27/QDXsA1AwvyxDVP+BhZUS3gKXqoyXS3THNEQoqL8GhvZz
|
||||
j/sDQo7Hs6p3oEj+HXF2LzlOjiaqObZsYaEBrMo/OS6p/8YvVOa39eTtuvgNVeDB
|
||||
EitlH8/pjk5bsZ0KFWqijcqsu0i4ye758UyERZ1ruXHNMB4auow4ZAwqn0vNN0CH
|
||||
f1hP/2qMLw5krCgHx1QowMk7S83ljFF5J36ojOuVQjzrCd96eWMHCdUpXbBJv7dd
|
||||
firVH9JIOAMDRAEoeX/EjWqeHlPVoOElGUWqAVKveQ0GNdN10hT+1gg0lxqR8f5G
|
||||
QDz7u6pDHJHhDQeMH6HYpRLXiXN23AEYnwpzFyw7p22WihV/6rKzGAP7JECZGDsD
|
||||
w5x2/YWRcg04MWcnY25f79JM/QWfRGfX6cxdKPxDDgZKUREzESy8/VeefF+xLklg
|
||||
O8t9xASz7dU4iSzwdyT5AJX7hIjyJxij8EroQ+4rn4m/zwVE9I9vUNn139kIaQAR
|
||||
AQABiQG8BBgBCAAmFiEEwqnSnZTRMUZtiDKuFbpbO12uizYFAmECAzwCGwwFCQPC
|
||||
mZQACgkQFbpbO12uizZQHwwAkActQzy2bb6naSAAVgxvobrNuXzO+HygJLgBa37l
|
||||
NdFxbBnN0YjYYrjA5PJJZYTcEaedz8Uec2onqTDpsaMDRwouCRayo19WizmSQd34
|
||||
DdygKA2CecQdXxKUf/2vxE//Jxq1/Sq0+facynhTygG24aSI44F/iw2h+9Z9JPcM
|
||||
BwtNLdGcuWEU2slHcN24sBveBHbTyCe4h52OMr/HBPldAREa2zojF4J8fxTPD6ES
|
||||
wx8mWc79sr50EPejw2r3ipKjrbxiB1yDtiry/eZatidb0slGWLzBhawOkZAUrVJh
|
||||
DODKf+upkfP8V/MayqRdNNH8FDxYUgxYwnX9+VbtJr7BrvnoyGgOwIuxN5TV+EQt
|
||||
+Bf7Kzzsqz2/bzsPtnd/F3faAAoOEzby//fdLWUpKcubf7kVq0EQ9bMKwC56rLpd
|
||||
BnLaAfcL/676JS3bjJMc3ij3T2doC3IFwj84kNoBk+ArgBFlKjcB84Uket+rj23e
|
||||
SjwjgsVZsFg9w1+m0F72hyAQ
|
||||
=rD28
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
```
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,244 @@
|
|||
include $(PJDIR)/version.mak
|
||||
export PJ_DIR := $(PJDIR)
|
||||
|
||||
# @configure_input@
|
||||
export MACHINE_NAME := auto
|
||||
export OS_NAME := auto
|
||||
export HOST_NAME := unix
|
||||
export CC_NAME := gcc
|
||||
export TARGET_ARCH := @ac_target_arch@
|
||||
export STD_CPP_LIB := @ac_std_cpp_lib@
|
||||
export TARGET_NAME := @target@
|
||||
export CROSS_COMPILE := @ac_cross_compile@
|
||||
export LINUX_POLL := @ac_linux_poll@
|
||||
export SHLIB_SUFFIX := @ac_shlib_suffix@
|
||||
|
||||
export prefix := @prefix@
|
||||
export exec_prefix := @exec_prefix@
|
||||
export includedir := @includedir@
|
||||
export libdir := @libdir@
|
||||
|
||||
LIB_SUFFIX := $(TARGET_NAME).a
|
||||
|
||||
ifeq (@ac_shared_libraries@,1)
|
||||
export PJ_SHARED_LIBRARIES := 1
|
||||
endif
|
||||
|
||||
ifeq (@ac_no_pjsua2@,1)
|
||||
export PJ_EXCLUDE_PJSUA2 := 1
|
||||
endif
|
||||
|
||||
ifndef EXCLUDE_APP
|
||||
ifeq ($(findstring android,$(TARGET_NAME)),)
|
||||
export EXCLUDE_APP := 0
|
||||
else
|
||||
export EXCLUDE_APP := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# Determine which party libraries to use
|
||||
export APP_THIRD_PARTY_EXT :=
|
||||
export APP_THIRD_PARTY_LIBS :=
|
||||
export APP_THIRD_PARTY_LIB_FILES :=
|
||||
|
||||
ifeq (@ac_pjmedia_resample@,libresample)
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX)
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
ifeq (@ac_resample_dll@,1)
|
||||
export PJ_RESAMPLE_DLL := 1
|
||||
APP_THIRD_PARTY_LIBS += -lresample
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX)
|
||||
else
|
||||
APP_THIRD_PARTY_LIBS += -lresample-$(TARGET_NAME)
|
||||
endif
|
||||
else
|
||||
APP_THIRD_PARTY_LIBS += -lresample
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Additional flags
|
||||
@ac_build_mak_vars@
|
||||
|
||||
#
|
||||
# Video
|
||||
# Note: there are duplicated macros in pjmedia/os-auto.mak.in (and that's not
|
||||
# good!
|
||||
|
||||
# SDL flags
|
||||
SDL_CFLAGS = @ac_sdl_cflags@
|
||||
SDL_LDFLAGS = @ac_sdl_ldflags@
|
||||
|
||||
# FFMPEG flags
|
||||
FFMPEG_CFLAGS = @ac_ffmpeg_cflags@
|
||||
FFMPEG_LDFLAGS = @ac_ffmpeg_ldflags@
|
||||
|
||||
# Video4Linux2
|
||||
V4L2_CFLAGS = @ac_v4l2_cflags@
|
||||
V4L2_LDFLAGS = @ac_v4l2_ldflags@
|
||||
|
||||
# OPENH264 flags
|
||||
OPENH264_CFLAGS = @ac_openh264_cflags@
|
||||
OPENH264_LDFLAGS = @ac_openh264_ldflags@
|
||||
|
||||
# VPX flags
|
||||
VPX_CFLAGS = @ac_vpx_cflags@
|
||||
VPX_LDFLAGS = @ac_vpx_ldflags@
|
||||
|
||||
# QT
|
||||
AC_PJMEDIA_VIDEO_HAS_QT = @ac_pjmedia_video_has_qt@
|
||||
# QT_CFLAGS = @ac_qt_cflags@
|
||||
|
||||
# Darwin (Mac and iOS)
|
||||
AC_PJMEDIA_VIDEO_HAS_DARWIN = @ac_pjmedia_video_has_darwin@
|
||||
AC_PJMEDIA_VIDEO_HAS_VTOOLBOX = @ac_pjmedia_video_has_vtoolbox@
|
||||
AC_PJMEDIA_VIDEO_HAS_IOS_OPENGL = @ac_pjmedia_video_has_ios_opengl@
|
||||
DARWIN_CFLAGS = @ac_darwin_cflags@
|
||||
|
||||
# mingw
|
||||
AC_PJMEDIA_VIDEO_DEV_HAS_DSHOW = @ac_pjmedia_video_dev_has_dshow@
|
||||
ifeq (@ac_pjmedia_video_dev_has_dshow@,yes)
|
||||
DSHOW_CFLAGS = @ac_dshow_cflags@
|
||||
DSHOW_LDFLAGS = @ac_dshow_ldflags@
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libbaseclasses-$(LIB_SUFFIX)
|
||||
APP_THIRD_PARTY_LIBS += -lbaseclasses-$(TARGET_NAME)
|
||||
endif
|
||||
|
||||
# Android
|
||||
ANDROID_CFLAGS = @ac_android_cflags@
|
||||
OBOE_CFLAGS = @ac_oboe_cflags@
|
||||
|
||||
# PJMEDIA features exclusion
|
||||
PJ_VIDEO_CFLAGS += $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(DSHOW_CFLAGS) $(QT_CFLAGS) \
|
||||
$(OPENH264_CFLAGS) $(VPX_CFLAGS) $(DARWIN_CFLAGS)
|
||||
PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) $(DSHOW_LDFLAGS) \
|
||||
$(OPENH264_LDFLAGS) $(VPX_LDFLAGS)
|
||||
|
||||
# CFLAGS, LDFLAGS, and LIBS to be used by applications
|
||||
export APP_CC := @CC@
|
||||
export APP_CXX := @CXX@
|
||||
export APP_CFLAGS := -DPJ_AUTOCONF=1\
|
||||
@CFLAGS@\
|
||||
$(PJ_VIDEO_CFLAGS) \
|
||||
-I$(PJDIR)/pjlib/include\
|
||||
-I$(PJDIR)/pjlib-util/include\
|
||||
-I$(PJDIR)/pjnath/include\
|
||||
-I$(PJDIR)/pjmedia/include\
|
||||
-I$(PJDIR)/pjsip/include
|
||||
export APP_CXXFLAGS := @CXXFLAGS@ $(APP_CFLAGS)
|
||||
export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
|
||||
-L$(PJDIR)/pjlib-util/lib\
|
||||
-L$(PJDIR)/pjnath/lib\
|
||||
-L$(PJDIR)/pjmedia/lib\
|
||||
-L$(PJDIR)/pjsip/lib\
|
||||
-L$(PJDIR)/third_party/lib\
|
||||
$(PJ_VIDEO_LDFLAGS) \
|
||||
@LDFLAGS@
|
||||
export APP_LDXXFLAGS := $(APP_LDFLAGS)
|
||||
|
||||
export APP_LIB_FILES := \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip-ua-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip-simple-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjnath/lib/libpjnath-$(LIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjlib-util/lib/libpjlib-util-$(LIB_SUFFIX) \
|
||||
$(APP_THIRD_PARTY_LIB_FILES) \
|
||||
$(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX)
|
||||
export APP_LIBXX_FILES := \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsua2-$(LIB_SUFFIX) \
|
||||
$(APP_LIB_FILES)
|
||||
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
export PJLIB_LDLIB := -lpj-$(TARGET_NAME)
|
||||
export PJLIB_UTIL_LDLIB := -lpjlib-util-$(TARGET_NAME)
|
||||
export PJNATH_LDLIB := -lpjnath-$(TARGET_NAME)
|
||||
export PJMEDIA_AUDIODEV_LDLIB := -lpjmedia-audiodev-$(TARGET_NAME)
|
||||
export PJMEDIA_VIDEODEV_LDLIB := -lpjmedia-videodev-$(TARGET_NAME)
|
||||
export PJMEDIA_LDLIB := -lpjmedia-$(TARGET_NAME)
|
||||
export PJMEDIA_CODEC_LDLIB := -lpjmedia-codec-$(TARGET_NAME)
|
||||
export PJSIP_LDLIB := -lpjsip-$(TARGET_NAME)
|
||||
export PJSIP_SIMPLE_LDLIB := -lpjsip-simple-$(TARGET_NAME)
|
||||
export PJSIP_UA_LDLIB := -lpjsip-ua-$(TARGET_NAME)
|
||||
export PJSUA_LIB_LDLIB := -lpjsua-$(TARGET_NAME)
|
||||
export PJSUA2_LIB_LDLIB := -lpjsua2-$(TARGET_NAME)
|
||||
else
|
||||
export PJLIB_LDLIB := -lpj
|
||||
export PJLIB_UTIL_LDLIB := -lpjlib-util
|
||||
export PJNATH_LDLIB := -lpjnath
|
||||
export PJMEDIA_AUDIODEV_LDLIB := -lpjmedia-audiodev
|
||||
export PJMEDIA_VIDEODEV_LDLIB := -lpjmedia-videodev
|
||||
export PJMEDIA_LDLIB := -lpjmedia
|
||||
export PJMEDIA_CODEC_LDLIB := -lpjmedia-codec
|
||||
export PJSIP_LDLIB := -lpjsip
|
||||
export PJSIP_SIMPLE_LDLIB := -lpjsip-simple
|
||||
export PJSIP_UA_LDLIB := -lpjsip-ua
|
||||
export PJSUA_LIB_LDLIB := -lpjsua
|
||||
export PJSUA2_LIB_LDLIB := -lpjsua2
|
||||
|
||||
export ADD_LIB_FILES := $(PJ_DIR)/pjsip/lib/libpjsua.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsua.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX) \
|
||||
$(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX)
|
||||
|
||||
APP_LIB_FILES += $(ADD_LIB_FILES)
|
||||
|
||||
APP_LIBXX_FILES += $(PJ_DIR)/pjsip/lib/libpjsua2.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsua2.$(SHLIB_SUFFIX) \
|
||||
$(ADD_LIB_FILES)
|
||||
endif
|
||||
|
||||
ifeq ($(PJ_EXCLUDE_PJSUA2),1)
|
||||
export PJSUA2_LIB_LDLIB :=
|
||||
endif
|
||||
|
||||
export APP_LDLIBS := $(PJSUA_LIB_LDLIB) \
|
||||
$(PJSIP_UA_LDLIB) \
|
||||
$(PJSIP_SIMPLE_LDLIB) \
|
||||
$(PJSIP_LDLIB) \
|
||||
$(PJMEDIA_CODEC_LDLIB) \
|
||||
$(PJMEDIA_VIDEODEV_LDLIB) \
|
||||
$(PJMEDIA_AUDIODEV_LDLIB) \
|
||||
$(PJMEDIA_LDLIB) \
|
||||
$(PJNATH_LDLIB) \
|
||||
$(PJLIB_UTIL_LDLIB) \
|
||||
$(APP_THIRD_PARTY_LIBS)\
|
||||
$(APP_THIRD_PARTY_EXT)\
|
||||
$(PJLIB_LDLIB) \
|
||||
@LIBS@
|
||||
export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \
|
||||
-lstdc++ \
|
||||
$(APP_LDLIBS)
|
||||
|
||||
# Here are the variables to use if application is using the library
|
||||
# from within the source distribution
|
||||
export PJ_CC := $(APP_CC)
|
||||
export PJ_CXX := $(APP_CXX)
|
||||
export PJ_CFLAGS := $(APP_CFLAGS)
|
||||
export PJ_CXXFLAGS := $(APP_CXXFLAGS)
|
||||
export PJ_LDFLAGS := $(APP_LDFLAGS)
|
||||
export PJ_LDXXFLAGS := $(APP_LDXXFLAGS)
|
||||
export PJ_LDLIBS := $(APP_LDLIBS)
|
||||
export PJ_LDXXLIBS := $(APP_LDXXLIBS)
|
||||
export PJ_LIB_FILES := $(APP_LIB_FILES)
|
||||
export PJ_LIBXX_FILES := $(APP_LIBXX_FILES)
|
||||
|
||||
# And here are the variables to use if application is using the
|
||||
# library from the install location (i.e. --prefix)
|
||||
export PJ_INSTALL_DIR := @prefix@
|
||||
export PJ_INSTALL_INC_DIR := @includedir@
|
||||
export PJ_INSTALL_LIB_DIR := @libdir@
|
||||
export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @ac_cflags@
|
||||
export PJ_INSTALL_LDFLAGS_PRIVATE := $(APP_THIRD_PARTY_LIBS) $(APP_THIRD_PARTY_EXT) @LIBS@
|
||||
export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(filter-out $(PJ_INSTALL_LDFLAGS_PRIVATE),$(APP_LDXXLIBS))
|
|
@ -0,0 +1,7 @@
|
|||
@rem set MWSym2Libraries=1
|
||||
@rem set EPOCROOT=\Symbian\9.1\S60_3rd\
|
||||
@rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
|
||||
@rem set EPOCROOT=\Symbian\UIQ3SDK\
|
||||
@rem set EPOCROOT=\symbian\UIQ3.1\
|
||||
@rem set EPOCROOT=\symbian\9.2\S60_3rd_FP1\
|
||||
bldmake bldfiles
|
|
@ -0,0 +1,7 @@
|
|||
@rem call abld build -v vs6 udeb
|
||||
@rem call abld build -v gcce urel
|
||||
@rem call abld build winscw udeb
|
||||
call abld build %1 %2 %3 %4
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
prj_platforms
|
||||
winscw
|
||||
armv5
|
||||
gcce
|
||||
|
||||
prj_mmpfiles
|
||||
|
||||
/* Libraries */
|
||||
pjlib.mmp
|
||||
pjlib_util.mmp
|
||||
pjnath.mmp
|
||||
pjsdp.mmp
|
||||
pjmedia.mmp
|
||||
pjsip.mmp
|
||||
pjsip_simple.mmp
|
||||
pjsip_ua.mmp
|
||||
pjsua_lib.mmp
|
||||
libsrtp.mmp
|
||||
|
||||
/* Codecs */
|
||||
libgsmcodec.mmp
|
||||
libspeexcodec.mmp
|
||||
libg7221codec.mmp
|
||||
libpassthroughcodec.mmp
|
||||
|
||||
/* Resample */
|
||||
libresample.mmp
|
||||
|
||||
/* Audio device. */
|
||||
pjmedia_audiodev.mmp
|
||||
|
||||
/* Applications */
|
||||
//symsndtest.mmp
|
||||
pjlib_test.mmp
|
||||
../pjsip-apps/src/pjsua/symbian/group/pjsua.mmp
|
|
@ -0,0 +1,56 @@
|
|||
TARGET libg7221codec.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
//OPTION CW -lang c++
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// GSM codec third party source
|
||||
//
|
||||
|
||||
SOURCEPATH ..\third_party\g7221\common
|
||||
|
||||
SOURCE basic_op.c
|
||||
SOURCE common.c
|
||||
SOURCE huff_tab.c
|
||||
SOURCE tables.c
|
||||
|
||||
SOURCEPATH ..\third_party\g7221\decode
|
||||
|
||||
SOURCE coef2sam.c
|
||||
SOURCE dct4_s.c
|
||||
SOURCE decoder.c
|
||||
|
||||
SOURCEPATH ..\third_party\g7221\encode
|
||||
|
||||
SOURCE dct4_a.c
|
||||
SOURCE encoder.c
|
||||
SOURCE sam2coef.c
|
||||
|
||||
|
||||
//
|
||||
// GSM codec wrapper for pjmedia-codec
|
||||
//
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-codec
|
||||
SOURCE g7221.c
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\third_party
|
||||
SYSTEMINCLUDE ..\third_party\g7221\common
|
||||
SYSTEMINCLUDE ..\third_party\g7221\decode
|
||||
SYSTEMINCLUDE ..\third_party\g7221\encode
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET libgsmcodec.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA000000F
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjlib.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\libgsmcodec.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET libgsmcodec.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
//OPTION CW -lang c++
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// GSM codec third party source
|
||||
//
|
||||
|
||||
SOURCEPATH ..\third_party\gsm\src
|
||||
|
||||
SOURCE add.c
|
||||
SOURCE code.c
|
||||
SOURCE debug.c
|
||||
SOURCE decode.c
|
||||
SOURCE gsm_create.c
|
||||
SOURCE gsm_decode.c
|
||||
SOURCE gsm_destroy.c
|
||||
SOURCE gsm_encode.c
|
||||
SOURCE gsm_explode.c
|
||||
SOURCE gsm_implode.c
|
||||
SOURCE gsm_option.c
|
||||
SOURCE gsm_print.c
|
||||
SOURCE long_term.c
|
||||
SOURCE lpc.c
|
||||
SOURCE preprocess.c
|
||||
SOURCE rpe.c
|
||||
SOURCE short_term.c
|
||||
SOURCE table.c
|
||||
|
||||
|
||||
//
|
||||
// GSM codec wrapper for pjmedia-codec
|
||||
//
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-codec
|
||||
SOURCE gsm.c
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\third_party\build\gsm
|
||||
SYSTEMINCLUDE ..\third_party\gsm\inc
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
TARGET libpassthroughcodec.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
MACRO HAVE_CONFIG_H
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
//
|
||||
// Passthrough codecs wrapper for pjmedia-codec
|
||||
//
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-codec
|
||||
SOURCE passthrough.c
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
|
@ -0,0 +1,26 @@
|
|||
TARGET libresample.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
SOURCEPATH ..\third_party\resample\src
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
MACRO RESAMPLE_HAS_SMALL_FILTER=1
|
||||
MACRO RESAMPLE_HAS_LARGE_FILTER=0
|
||||
|
||||
SOURCE resamplesubs.c
|
||||
|
||||
SYSTEMINCLUDE ..\third_party\resample\include
|
||||
SYSTEMINCLUDE ..\third_party\build\resample
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
TARGET libspeexcodec.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
MACRO HAVE_CONFIG_H
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
//
|
||||
// Speex files
|
||||
//
|
||||
SOURCEPATH ..\third_party\speex\libspeex
|
||||
|
||||
SOURCE bits.c
|
||||
SOURCE cb_search.c
|
||||
SOURCE exc_5_64_table.c
|
||||
SOURCE exc_5_256_table.c
|
||||
SOURCE exc_8_128_table.c
|
||||
SOURCE exc_10_16_table.c
|
||||
SOURCE exc_10_32_table.c
|
||||
SOURCE exc_20_32_table.c
|
||||
SOURCE fftwrap.c
|
||||
SOURCE filterbank.c
|
||||
SOURCE filters.c
|
||||
SOURCE gain_table.c
|
||||
SOURCE gain_table_lbr.c
|
||||
SOURCE hexc_10_32_table.c
|
||||
SOURCE hexc_table.c
|
||||
SOURCE high_lsp_tables.c
|
||||
SOURCE kiss_fft.c
|
||||
SOURCE kiss_fftr.c
|
||||
SOURCE lpc.c
|
||||
SOURCE lsp.c
|
||||
SOURCE lsp_tables_nb.c
|
||||
SOURCE ltp.c
|
||||
SOURCE mdf.c
|
||||
SOURCE modes.c
|
||||
SOURCE modes_wb.c
|
||||
SOURCE nb_celp.c
|
||||
SOURCE preprocess.c
|
||||
SOURCE quant_lsp.c
|
||||
SOURCE sb_celp.c
|
||||
SOURCE smallft.c
|
||||
SOURCE speex.c
|
||||
SOURCE speex_callbacks.c
|
||||
SOURCE speex_header.c
|
||||
SOURCE stereo.c
|
||||
SOURCE vbr.c
|
||||
SOURCE vq.c
|
||||
SOURCE window.c
|
||||
|
||||
//
|
||||
// Speex codec wrapper for pjmedia-codec
|
||||
//
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-codec
|
||||
SOURCE speex_codec.c
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
SYSTEMINCLUDE ..\third_party\speex\include\speex
|
||||
SYSTEMINCLUDE ..\third_party\speex\include
|
||||
SYSTEMINCLUDE ..\third_party\speex\symbian
|
||||
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
|
@ -0,0 +1,60 @@
|
|||
TARGET libsrtp.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
//
|
||||
// Speex files
|
||||
//
|
||||
SOURCEPATH ..\third_party\srtp
|
||||
|
||||
SOURCE crypto\ae_xfm\xfm.c
|
||||
SOURCE crypto\cipher\aes.c
|
||||
SOURCE crypto\cipher\aes_cbc.c
|
||||
SOURCE crypto\cipher\aes_icm.c
|
||||
SOURCE crypto\cipher\cipher.c
|
||||
SOURCE crypto\cipher\null_cipher.c
|
||||
SOURCE crypto\hash\auth.c
|
||||
SOURCE crypto\hash\hmac.c
|
||||
SOURCE crypto\hash\null_auth.c
|
||||
SOURCE crypto\hash\sha1.c
|
||||
SOURCE crypto\kernel\alloc.c
|
||||
SOURCE crypto\kernel\crypto_kernel.c
|
||||
//SOURCE crypto\kernel\err.c
|
||||
SOURCE crypto\kernel\key.c
|
||||
SOURCE crypto\math\datatypes.c
|
||||
SOURCE crypto\math\gf2_8.c
|
||||
//SOURCE crypto\math\math.c
|
||||
SOURCE crypto\math\stat.c
|
||||
SOURCE crypto\replay\rdb.c
|
||||
SOURCE crypto\replay\rdbx.c
|
||||
//SOURCE crypto\replay\ut_sim.c
|
||||
SOURCE crypto\rng\ctr_prng.c
|
||||
SOURCE crypto\rng\prng.c
|
||||
//SOURCE crypto\rng\rand_linux_kernel.c
|
||||
SOURCE crypto\rng\rand_source.c
|
||||
SOURCE pjlib\srtp_err.c
|
||||
SOURCE srtp\srtp.c
|
||||
SOURCE tables\aes_tables.c
|
||||
|
||||
//SOURCEPATH ..\pjmedia\src\pjmedia
|
||||
|
||||
//SOURCE transport_srtp.c
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
SYSTEMINCLUDE ..\third_party\srtp\include
|
||||
SYSTEMINCLUDE ..\third_party\srtp\crypto\include
|
||||
SYSTEMINCLUDE ..\third_party\build\srtp
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
|
@ -0,0 +1,80 @@
|
|||
#!/bin/sh
|
||||
|
||||
MMP=$1
|
||||
if test "$MMP" == ""; then
|
||||
echo "Usage: makedef.sh FILE.MMP"
|
||||
echo " or makedef.sh all"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$MMP" == "all"; then
|
||||
. $0 pjlib.mmp
|
||||
. $0 pjlib_util.mmp
|
||||
. $0 pjnath.mmp
|
||||
. $0 pjmedia.mmp
|
||||
. $0 pjsdp.mmp
|
||||
. $0 pjsip.mmp
|
||||
. $0 pjsip_simple.mmp
|
||||
. $0 pjsip_ua.mmp
|
||||
. $0 pjsua_lib.mmp
|
||||
. $0 symbian_audio.mmp
|
||||
. $0 null_audio.mmp
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -f $MMP; then
|
||||
true
|
||||
else
|
||||
echo "Unable to open $MMP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TARGET=`grep -w '^TARGET' $MMP | awk '{print $2}' | awk -F '.' '{print $1}' | head -1`
|
||||
DEFFILE="${TARGET}U.def"
|
||||
SOURCES=`grep -w '^SOURCE' $MMP | awk '{print $2}' | tr '\\\\' '/'`
|
||||
SOURCEPATH=`grep -w '^SOURCEPATH' $MMP | tr '\\\\' '/' | awk '{print $2}'`
|
||||
INCPATH=`grep 'INCLUDE' $MMP | awk '{print $2}' | grep pj | tr '\\\\' '/'`
|
||||
INCLUDE=""
|
||||
for INC in $INCPATH; do
|
||||
INCLUDE=`echo $INCLUDE -I$INC`
|
||||
done
|
||||
|
||||
#-- debug --
|
||||
#echo TARGET=$TARGET
|
||||
#echo SOURCES=$SOURCES
|
||||
#echo SOURCEPATH=$SOURCEPATH
|
||||
#echo INCLUDE=$INCLUDE
|
||||
#-- end --
|
||||
|
||||
echo > tmpnames.def
|
||||
|
||||
echo "${TARGET}:"
|
||||
|
||||
for file in $SOURCES; do
|
||||
#SYMBOLS=`grep PJ_DEF ${SOURCEPATH}/$file | awk -F ')' '{print $2}' | awk -F '(' '{print $1}' | awk -F '=' '{print $1}' | tr -d '[:blank:]' | sort | uniq`
|
||||
SYMBOLS=`
|
||||
cpp -DPJ_SYMBIAN=1 -DPJ_DLL -DPJ_EXPORTING=1 $INCLUDE ${SOURCEPATH}/$file 2>&1 |
|
||||
grep EXPORT_C |
|
||||
sed 's/(/;/' |
|
||||
sed 's/=/;/' |
|
||||
awk -F ';' '{print $1}' |
|
||||
awk '{print $NF}'`
|
||||
echo Processing ${SOURCEPATH}/$file..
|
||||
for SYM in $SYMBOLS; do
|
||||
echo $SYM >> tmpnames.def
|
||||
done
|
||||
done
|
||||
|
||||
echo "Writing $DEFFILE"
|
||||
echo EXPORTS > $DEFFILE
|
||||
i=0
|
||||
for SYM in `cat tmpnames.def | sort | uniq`; do
|
||||
echo " $SYM"
|
||||
i=`expr $i + 1`
|
||||
printf "\\t%-40s @ $i NONAME\\n" $SYM >> $DEFFILE
|
||||
done
|
||||
|
||||
|
||||
echo
|
||||
echo "Done. Total $i symbols exported in $DEFFILE."
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET null_audio.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000000
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjlib.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\null_audio.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET null_audio.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia
|
||||
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// Platform independent source
|
||||
//
|
||||
SOURCE nullsound.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
EXPORTS
|
||||
pjmedia_snd_deinit @ 1 NONAME
|
||||
pjmedia_snd_get_dev_count @ 2 NONAME
|
||||
pjmedia_snd_get_dev_info @ 3 NONAME
|
||||
pjmedia_snd_init @ 4 NONAME
|
||||
pjmedia_snd_open @ 5 NONAME
|
||||
pjmedia_snd_open_player @ 6 NONAME
|
||||
pjmedia_snd_open_rec @ 7 NONAME
|
||||
pjmedia_snd_stream_close @ 8 NONAME
|
||||
pjmedia_snd_stream_get_info @ 9 NONAME
|
||||
pjmedia_snd_stream_start @ 10 NONAME
|
||||
pjmedia_snd_stream_stop @ 11 NONAME
|
|
@ -0,0 +1,122 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
TARGET pjlib.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000001
|
||||
|
||||
CAPABILITY NONE
|
||||
LIBRARY esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjlib.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjlib.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjlib\src\pj
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
//
|
||||
// Platform independent source
|
||||
//
|
||||
SOURCE activesock.c
|
||||
SOURCE array.c
|
||||
SOURCE config.c
|
||||
SOURCE ctype.c
|
||||
SOURCE errno.c
|
||||
SOURCE fifobuf.c
|
||||
SOURCE guid.c
|
||||
SOURCE hash.c
|
||||
SOURCE list.c
|
||||
SOURCE lock.c
|
||||
SOURCE string.c
|
||||
SOURCE log.c
|
||||
SOURCE os_info.c
|
||||
SOURCE os_info_symbian.cpp
|
||||
SOURCE os_time_common.c
|
||||
SOURCE pool.c
|
||||
SOURCE pool_buf.c
|
||||
SOURCE pool_caching.c
|
||||
SOURCE rand.c
|
||||
SOURCE rbtree.c
|
||||
SOURCE ssl_sock_common.c
|
||||
SOURCE ssl_sock_dump.c
|
||||
SOURCE sock_common.c
|
||||
SOURCE sock_qos_common.c
|
||||
SOURCE types.c
|
||||
|
||||
|
||||
//
|
||||
// Platform dependent source
|
||||
//
|
||||
SOURCE compat\string_compat.c
|
||||
SOURCE addr_resolv_symbian.cpp
|
||||
SOURCE exception_symbian.cpp
|
||||
SOURCE file_access_unistd.c
|
||||
SOURCE file_io_ansi.c
|
||||
SOURCE guid_simple.c
|
||||
SOURCE ioqueue_symbian.cpp
|
||||
SOURCE ip_helper_symbian.cpp
|
||||
SOURCE log_writer_symbian_console.cpp
|
||||
SOURCE os_core_symbian.cpp
|
||||
SOURCE os_error_symbian.cpp
|
||||
SOURCE os_timestamp_common.c
|
||||
SOURCE os_time_unix.c
|
||||
SOURCE os_timestamp_posix.c
|
||||
SOURCE pool_policy_new.cpp
|
||||
SOURCE ssl_sock_symbian.cpp
|
||||
SOURCE sock_symbian.cpp
|
||||
SOURCE sock_select_symbian.cpp
|
||||
SOURCE sock_qos_symbian.cpp
|
||||
SOURCE timer_symbian.cpp
|
||||
SOURCE unicode_symbian.cpp
|
||||
|
||||
//DOCUMENT os_symbian.h
|
||||
|
||||
//DOCUMENT pj\addr_resolv.h
|
||||
//DOCUMENT pj\array.h
|
||||
//DOCUMENT pj\assert.h
|
||||
//DOCUMENT pj\config.h
|
||||
//DOCUMENT pj\config_site.h
|
||||
//DOCUMENT pj\config_site_sample.h
|
||||
//DOCUMENT pj\ctype.h
|
||||
//DOCUMENT pj\errno.h
|
||||
//DOCUMENT pj\except.h
|
||||
//DOCUMENT pj\file_access.h
|
||||
//DOCUMENT pj\file_io.h
|
||||
//DOCUMENT pj\guid.h
|
||||
//DOCUMENT pj\hash.h
|
||||
//DOCUMENT pj\ioqueue.h
|
||||
//DOCUMENT pj\ip_helper.h
|
||||
//DOCUMENT pj\list.h
|
||||
//DOCUMENT pj\lock.h
|
||||
//DOCUMENT pj\log.h
|
||||
//DOCUMENT pj\os.h
|
||||
//DOCUMENT pj\\pool.h
|
||||
//DOCUMENT pj\\pool_buf.h
|
||||
//DOCUMENT pj\rand.h
|
||||
//DOCUMENT pj\rbtree.h
|
||||
//DOCUMENT pj\sock.h
|
||||
//DOCUMENT pj\sock_select.h
|
||||
//DOCUMENT pj\string.h
|
||||
//DOCUMENT pj\timer.h
|
||||
//DOCUMENT pj\types.h
|
||||
//DOCUMENT pj\unicode.h
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
EXPORTS
|
||||
PJ_FD_CLR @ 1 NONAME
|
||||
PJ_FD_COUNT @ 2 NONAME
|
||||
PJ_FD_ISSET @ 3 NONAME
|
||||
PJ_FD_SET @ 4 NONAME
|
||||
PJ_FD_ZERO @ 5 NONAME
|
||||
PJ_GUID_STRING_LENGTH @ 6 NONAME
|
||||
PJ_NO_MEMORY_EXCEPTION @ 7 NONAME
|
||||
PJ_VERSION @ 8 NONAME
|
||||
pj_AF_INET @ 9 NONAME
|
||||
pj_AF_INET6 @ 10 NONAME
|
||||
pj_AF_IRDA @ 11 NONAME
|
||||
pj_AF_PACKET @ 12 NONAME
|
||||
pj_AF_UNIX @ 13 NONAME
|
||||
pj_AF_UNSPEC @ 14 NONAME
|
||||
pj_GUID_STRING_LENGTH @ 15 NONAME
|
||||
pj_IPTOS_LOWDELAY @ 16 NONAME
|
||||
pj_IPTOS_MINCOST @ 17 NONAME
|
||||
pj_IPTOS_RELIABILITY @ 18 NONAME
|
||||
pj_IPTOS_THROUGHPUT @ 19 NONAME
|
||||
pj_IP_TOS @ 20 NONAME
|
||||
pj_MSG_DONTROUTE @ 21 NONAME
|
||||
pj_MSG_OOB @ 22 NONAME
|
||||
pj_MSG_PEEK @ 23 NONAME
|
||||
pj_NO_MEMORY_EXCEPTION @ 24 NONAME
|
||||
pj_SOCK_DGRAM @ 25 NONAME
|
||||
pj_SOCK_RAW @ 26 NONAME
|
||||
pj_SOCK_RDM @ 27 NONAME
|
||||
pj_SOCK_STREAM @ 28 NONAME
|
||||
pj_SOL_IP @ 29 NONAME
|
||||
pj_SOL_IPV6 @ 30 NONAME
|
||||
pj_SOL_SOCKET @ 31 NONAME
|
||||
pj_SOL_TCP @ 32 NONAME
|
||||
pj_SOL_UDP @ 33 NONAME
|
||||
pj_SO_RCVBUF @ 34 NONAME
|
||||
pj_SO_SNDBUF @ 35 NONAME
|
||||
pj_SO_TYPE @ 36 NONAME
|
||||
pj_ansi_to_unicode @ 37 NONAME
|
||||
pj_array_erase @ 38 NONAME
|
||||
pj_array_find @ 39 NONAME
|
||||
pj_array_insert @ 40 NONAME
|
||||
pj_atexit @ 41 NONAME
|
||||
pj_atomic_add @ 42 NONAME
|
||||
pj_atomic_add_and_get @ 43 NONAME
|
||||
pj_atomic_create @ 44 NONAME
|
||||
pj_atomic_dec @ 45 NONAME
|
||||
pj_atomic_dec_and_get @ 46 NONAME
|
||||
pj_atomic_destroy @ 47 NONAME
|
||||
pj_atomic_get @ 48 NONAME
|
||||
pj_atomic_inc @ 49 NONAME
|
||||
pj_atomic_inc_and_get @ 50 NONAME
|
||||
pj_atomic_set @ 51 NONAME
|
||||
pj_caching_pool_destroy @ 52 NONAME
|
||||
pj_caching_pool_init @ 53 NONAME
|
||||
pj_create_random_string @ 54 NONAME
|
||||
pj_create_unique_string @ 55 NONAME
|
||||
pj_dump_config @ 56 NONAME
|
||||
pj_elapsed_cycle @ 57 NONAME
|
||||
pj_elapsed_msec @ 58 NONAME
|
||||
pj_elapsed_nanosec @ 59 NONAME
|
||||
pj_elapsed_time @ 60 NONAME
|
||||
pj_elapsed_usec @ 61 NONAME
|
||||
pj_enter_critical_section @ 62 NONAME
|
||||
pj_enum_ip_interface @ 63 NONAME
|
||||
pj_enum_ip_route @ 64 NONAME
|
||||
pj_exception_id_alloc @ 65 NONAME
|
||||
pj_exception_id_free @ 66 NONAME
|
||||
pj_exception_id_name @ 67 NONAME
|
||||
pj_fifobuf_alloc @ 68 NONAME
|
||||
pj_fifobuf_free @ 69 NONAME
|
||||
pj_fifobuf_init @ 70 NONAME
|
||||
pj_fifobuf_max_size @ 71 NONAME
|
||||
pj_fifobuf_unalloc @ 72 NONAME
|
||||
pj_file_close @ 73 NONAME
|
||||
pj_file_delete @ 74 NONAME
|
||||
pj_file_exists @ 75 NONAME
|
||||
pj_file_flush @ 76 NONAME
|
||||
pj_file_getpos @ 77 NONAME
|
||||
pj_file_getstat @ 78 NONAME
|
||||
pj_file_move @ 79 NONAME
|
||||
pj_file_open @ 80 NONAME
|
||||
pj_file_read @ 81 NONAME
|
||||
pj_file_setpos @ 82 NONAME
|
||||
pj_file_size @ 83 NONAME
|
||||
pj_file_write @ 84 NONAME
|
||||
pj_generate_unique_string @ 85 NONAME
|
||||
pj_get_netos_error @ 86 NONAME
|
||||
pj_get_os_error @ 87 NONAME
|
||||
pj_get_timestamp @ 88 NONAME
|
||||
pj_get_timestamp_freq @ 89 NONAME
|
||||
pj_get_version @ 90 NONAME
|
||||
pj_getaddrinfo @ 91 NONAME
|
||||
pj_getdefaultipinterface @ 92 NONAME
|
||||
pj_gethostaddr @ 93 NONAME
|
||||
pj_gethostbyname @ 94 NONAME
|
||||
pj_gethostip @ 95 NONAME
|
||||
pj_gethostname @ 96 NONAME
|
||||
pj_getpid @ 97 NONAME
|
||||
pj_gettimeofday @ 98 NONAME
|
||||
pj_hash_calc @ 99 NONAME
|
||||
pj_hash_calc_tolower @ 100 NONAME
|
||||
pj_hash_count @ 101 NONAME
|
||||
pj_hash_create @ 102 NONAME
|
||||
pj_hash_first @ 103 NONAME
|
||||
pj_hash_get @ 104 NONAME
|
||||
pj_hash_next @ 105 NONAME
|
||||
pj_hash_set @ 106 NONAME
|
||||
pj_hash_set_np @ 107 NONAME
|
||||
pj_hash_this @ 108 NONAME
|
||||
pj_htonl @ 109 NONAME
|
||||
pj_htons @ 110 NONAME
|
||||
pj_inet_addr @ 111 NONAME
|
||||
pj_inet_addr2 @ 112 NONAME
|
||||
pj_inet_aton @ 113 NONAME
|
||||
pj_inet_ntoa @ 114 NONAME
|
||||
pj_inet_ntop @ 115 NONAME
|
||||
pj_inet_ntop2 @ 116 NONAME
|
||||
pj_inet_pton @ 117 NONAME
|
||||
pj_init @ 118 NONAME
|
||||
pj_ioqueue_accept @ 119 NONAME
|
||||
pj_ioqueue_connect @ 120 NONAME
|
||||
pj_ioqueue_create @ 121 NONAME
|
||||
pj_ioqueue_destroy @ 122 NONAME
|
||||
pj_ioqueue_get_user_data @ 123 NONAME
|
||||
pj_ioqueue_is_pending @ 124 NONAME
|
||||
pj_ioqueue_name @ 125 NONAME
|
||||
pj_ioqueue_op_key_init @ 126 NONAME
|
||||
pj_ioqueue_poll @ 127 NONAME
|
||||
pj_ioqueue_post_completion @ 128 NONAME
|
||||
pj_ioqueue_recv @ 129 NONAME
|
||||
pj_ioqueue_recvfrom @ 130 NONAME
|
||||
pj_ioqueue_register_sock @ 131 NONAME
|
||||
pj_ioqueue_register_sock2 @ 132 NONAME
|
||||
pj_ioqueue_send @ 133 NONAME
|
||||
pj_ioqueue_sendto @ 134 NONAME
|
||||
pj_ioqueue_set_lock @ 135 NONAME
|
||||
pj_ioqueue_set_user_data @ 136 NONAME
|
||||
pj_ioqueue_unregister @ 137 NONAME
|
||||
pj_leave_critical_section @ 138 NONAME
|
||||
pj_list_erase @ 139 NONAME
|
||||
pj_list_find_node @ 140 NONAME
|
||||
pj_list_insert_after @ 141 NONAME
|
||||
pj_list_insert_before @ 142 NONAME
|
||||
pj_list_insert_nodes_after @ 143 NONAME
|
||||
pj_list_insert_nodes_before @ 144 NONAME
|
||||
pj_list_merge_first @ 145 NONAME
|
||||
pj_list_merge_last @ 146 NONAME
|
||||
pj_list_search @ 147 NONAME
|
||||
pj_list_size @ 148 NONAME
|
||||
pj_lock_acquire @ 149 NONAME
|
||||
pj_lock_create_null_mutex @ 150 NONAME
|
||||
pj_lock_create_recursive_mutex @ 151 NONAME
|
||||
pj_lock_create_semaphore @ 152 NONAME
|
||||
pj_lock_create_simple_mutex @ 153 NONAME
|
||||
pj_lock_destroy @ 154 NONAME
|
||||
pj_lock_release @ 155 NONAME
|
||||
pj_lock_tryacquire @ 156 NONAME
|
||||
pj_log @ 157 NONAME
|
||||
pj_log_1 @ 158 NONAME
|
||||
pj_log_2 @ 159 NONAME
|
||||
pj_log_3 @ 160 NONAME
|
||||
pj_log_4 @ 161 NONAME
|
||||
pj_log_5 @ 162 NONAME
|
||||
pj_log_get_decor @ 163 NONAME
|
||||
pj_log_get_level @ 164 NONAME
|
||||
pj_log_get_log_func @ 165 NONAME
|
||||
pj_log_set_decor @ 166 NONAME
|
||||
pj_log_set_level @ 167 NONAME
|
||||
pj_log_set_log_func @ 168 NONAME
|
||||
pj_log_write @ 169 NONAME
|
||||
pj_mutex_create @ 170 NONAME
|
||||
pj_mutex_create_recursive @ 171 NONAME
|
||||
pj_mutex_create_simple @ 172 NONAME
|
||||
pj_mutex_destroy @ 173 NONAME
|
||||
pj_mutex_lock @ 174 NONAME
|
||||
pj_mutex_trylock @ 175 NONAME
|
||||
pj_mutex_unlock @ 176 NONAME
|
||||
pj_ntohl @ 177 NONAME
|
||||
pj_ntohs @ 178 NONAME
|
||||
pj_pool_alloc @ 179 NONAME
|
||||
pj_pool_alloc_from_block @ 180 NONAME
|
||||
pj_pool_allocate_find @ 181 NONAME
|
||||
pj_pool_calloc @ 182 NONAME
|
||||
pj_pool_create @ 183 NONAME
|
||||
pj_pool_create_int @ 184 NONAME
|
||||
pj_pool_create_on_buf @ 185 NONAME
|
||||
pj_pool_destroy_int @ 186 NONAME
|
||||
pj_pool_factory_default_policy @ 187 NONAME
|
||||
pj_pool_factory_get_default_policy @ 188 NONAME
|
||||
pj_pool_get_capacity @ 189 NONAME
|
||||
pj_pool_get_used_size @ 190 NONAME
|
||||
pj_pool_getobjname @ 191 NONAME
|
||||
pj_pool_init_int @ 192 NONAME
|
||||
pj_pool_release @ 193 NONAME
|
||||
pj_pool_reset @ 194 NONAME
|
||||
pj_rand @ 195 NONAME
|
||||
pj_rbtree_erase @ 196 NONAME
|
||||
pj_rbtree_find @ 197 NONAME
|
||||
pj_rbtree_first @ 198 NONAME
|
||||
pj_rbtree_init @ 199 NONAME
|
||||
pj_rbtree_insert @ 200 NONAME
|
||||
pj_rbtree_last @ 201 NONAME
|
||||
pj_rbtree_max_height @ 202 NONAME
|
||||
pj_rbtree_min_height @ 203 NONAME
|
||||
pj_rbtree_next @ 204 NONAME
|
||||
pj_rbtree_prev @ 205 NONAME
|
||||
pj_register_strerror @ 206 NONAME
|
||||
pj_rwmutex_create @ 207 NONAME
|
||||
pj_rwmutex_destroy @ 208 NONAME
|
||||
pj_rwmutex_lock_read @ 209 NONAME
|
||||
pj_rwmutex_lock_write @ 210 NONAME
|
||||
pj_rwmutex_unlock_read @ 211 NONAME
|
||||
pj_rwmutex_unlock_write @ 212 NONAME
|
||||
pj_sem_create @ 213 NONAME
|
||||
pj_sem_destroy @ 214 NONAME
|
||||
pj_sem_post @ 215 NONAME
|
||||
pj_sem_trywait @ 216 NONAME
|
||||
pj_sem_wait @ 217 NONAME
|
||||
pj_set_netos_error @ 218 NONAME
|
||||
pj_set_os_error @ 219 NONAME
|
||||
pj_shutdown @ 220 NONAME
|
||||
pj_sock_accept @ 221 NONAME
|
||||
pj_sock_bind @ 222 NONAME
|
||||
pj_sock_bind_in @ 223 NONAME
|
||||
pj_sock_close @ 224 NONAME
|
||||
pj_sock_connect @ 225 NONAME
|
||||
pj_sock_getpeername @ 226 NONAME
|
||||
pj_sock_getsockname @ 227 NONAME
|
||||
pj_sock_getsockopt @ 228 NONAME
|
||||
pj_sock_listen @ 229 NONAME
|
||||
pj_sock_recv @ 230 NONAME
|
||||
pj_sock_recvfrom @ 231 NONAME
|
||||
pj_sock_select @ 232 NONAME
|
||||
pj_sock_send @ 233 NONAME
|
||||
pj_sock_sendto @ 234 NONAME
|
||||
pj_sock_setsockopt @ 235 NONAME
|
||||
pj_sock_shutdown @ 236 NONAME
|
||||
pj_sock_socket @ 237 NONAME
|
||||
pj_sockaddr_cmp @ 238 NONAME
|
||||
pj_sockaddr_copy_addr @ 239 NONAME
|
||||
pj_sockaddr_get_addr @ 240 NONAME
|
||||
pj_sockaddr_get_addr_len @ 241 NONAME
|
||||
pj_sockaddr_get_len @ 242 NONAME
|
||||
pj_sockaddr_get_port @ 243 NONAME
|
||||
pj_sockaddr_has_addr @ 244 NONAME
|
||||
pj_sockaddr_in_get_addr @ 245 NONAME
|
||||
pj_sockaddr_in_get_port @ 246 NONAME
|
||||
pj_sockaddr_in_init @ 247 NONAME
|
||||
pj_sockaddr_in_set_addr @ 248 NONAME
|
||||
pj_sockaddr_in_set_port @ 249 NONAME
|
||||
pj_sockaddr_in_set_str_addr @ 250 NONAME
|
||||
pj_sockaddr_init @ 251 NONAME
|
||||
pj_sockaddr_print @ 252 NONAME
|
||||
pj_sockaddr_set_port @ 253 NONAME
|
||||
pj_sockaddr_set_str_addr @ 254 NONAME
|
||||
pj_srand @ 255 NONAME
|
||||
pj_str @ 256 NONAME
|
||||
pj_strassign @ 257 NONAME
|
||||
pj_strcat @ 258 NONAME
|
||||
pj_strcat2 @ 259 NONAME
|
||||
pj_strcmp @ 260 NONAME
|
||||
pj_strcmp2 @ 261 NONAME
|
||||
pj_strcpy @ 262 NONAME
|
||||
pj_strcpy2 @ 263 NONAME
|
||||
pj_strdup @ 264 NONAME
|
||||
pj_strdup2 @ 265 NONAME
|
||||
pj_strdup2_with_null @ 266 NONAME
|
||||
pj_strdup3 @ 267 NONAME
|
||||
pj_strdup_with_null @ 268 NONAME
|
||||
pj_strerror @ 269 NONAME
|
||||
pj_stricmp @ 270 NONAME
|
||||
pj_stricmp2 @ 271 NONAME
|
||||
pj_strltrim @ 272 NONAME
|
||||
pj_strncmp @ 273 NONAME
|
||||
pj_strncmp2 @ 274 NONAME
|
||||
pj_strncpy @ 275 NONAME
|
||||
pj_strncpy_with_null @ 276 NONAME
|
||||
pj_strnicmp @ 277 NONAME
|
||||
pj_strnicmp2 @ 278 NONAME
|
||||
pj_strrtrim @ 279 NONAME
|
||||
pj_strtoul @ 280 NONAME
|
||||
pj_strtoul2 @ 281 NONAME
|
||||
pj_strtrim @ 282 NONAME
|
||||
pj_symbianos_poll @ 283 NONAME
|
||||
pj_symbianos_set_params @ 284 NONAME
|
||||
pj_thread_check_stack @ 285 NONAME
|
||||
pj_thread_create @ 286 NONAME
|
||||
pj_thread_destroy @ 287 NONAME
|
||||
pj_thread_get_name @ 288 NONAME
|
||||
pj_thread_get_os_handle @ 289 NONAME
|
||||
pj_thread_get_stack_info @ 290 NONAME
|
||||
pj_thread_get_stack_max_usage @ 291 NONAME
|
||||
pj_thread_is_registered @ 292 NONAME
|
||||
pj_thread_join @ 293 NONAME
|
||||
pj_thread_local_alloc @ 294 NONAME
|
||||
pj_thread_local_free @ 295 NONAME
|
||||
pj_thread_local_get @ 296 NONAME
|
||||
pj_thread_local_set @ 297 NONAME
|
||||
pj_thread_register @ 298 NONAME
|
||||
pj_thread_resume @ 299 NONAME
|
||||
pj_thread_sleep @ 300 NONAME
|
||||
pj_thread_this @ 301 NONAME
|
||||
pj_time_decode @ 302 NONAME
|
||||
pj_time_encode @ 303 NONAME
|
||||
pj_time_gmt_to_local @ 304 NONAME
|
||||
pj_time_local_to_gmt @ 305 NONAME
|
||||
pj_time_val_normalize @ 306 NONAME
|
||||
pj_timer_entry_init @ 307 NONAME
|
||||
pj_timer_heap_cancel @ 308 NONAME
|
||||
pj_timer_heap_cancel_if_active @ 309 NONAME
|
||||
pj_timer_heap_count @ 310 NONAME
|
||||
pj_timer_heap_create @ 311 NONAME
|
||||
pj_timer_heap_destroy @ 312 NONAME
|
||||
pj_timer_heap_earliest_time @ 313 NONAME
|
||||
pj_timer_heap_mem_size @ 314 NONAME
|
||||
pj_timer_heap_poll @ 315 NONAME
|
||||
pj_timer_heap_schedule @ 316 NONAME
|
||||
pj_timer_heap_schedule_w_grp_lock @ 317 NONAME
|
||||
pj_timer_heap_set_lock @ 318 NONAME
|
||||
pj_timer_heap_set_max_timed_out_per_poll @ 319 NONAME
|
||||
pj_unicode_to_ansi @ 320 NONAME
|
||||
pj_utoa @ 321 NONAME
|
||||
pj_utoa_pad @ 322 NONAME
|
||||
platform_strerror @ 323 NONAME
|
||||
snprintf @ 324 NONAME
|
||||
vsnprintf @ 325 NONAME
|
|
@ -0,0 +1,83 @@
|
|||
TARGET pjlib_test.exe
|
||||
TARGETTYPE exe
|
||||
UID 0x0 0xA0000002
|
||||
|
||||
|
||||
SOURCEPATH ..\pjlib\src\pjlib-test
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
#if defined(PJ_BUILD_DLL)
|
||||
MACRO PJ_DLL
|
||||
LIBRARY pjlib.lib
|
||||
#else
|
||||
STATICLIBRARY pjlib.lib
|
||||
#endif
|
||||
|
||||
// Test files
|
||||
|
||||
SOURCE activesock.c
|
||||
SOURCE atomic.c
|
||||
SOURCE echo_clt.c
|
||||
SOURCE errno.c
|
||||
SOURCE exception_wrap.cpp
|
||||
SOURCE fifobuf.c
|
||||
SOURCE file.c
|
||||
SOURCE hash_test.c
|
||||
SOURCE ioq_perf.c
|
||||
SOURCE ioq_tcp.c
|
||||
SOURCE ioq_udp.c
|
||||
SOURCE ioq_unreg.c
|
||||
SOURCE list.c
|
||||
SOURCE mutex.c
|
||||
SOURCE os.c
|
||||
SOURCE pool_wrap.cpp
|
||||
SOURCE pool_perf.c
|
||||
SOURCE rand.c
|
||||
SOURCE rbtree.c
|
||||
SOURCE select.c
|
||||
SOURCE sleep.c
|
||||
SOURCE sock.c
|
||||
SOURCE sock_perf.c
|
||||
SOURCE ssl_sock.c
|
||||
SOURCE string.c
|
||||
SOURCE test_wrap.cpp
|
||||
SOURCE thread.c
|
||||
SOURCE timer.c
|
||||
SOURCE timestamp.c
|
||||
SOURCE udp_echo_srv_ioqueue.c
|
||||
SOURCE udp_echo_srv_sync.c
|
||||
SOURCE util.c
|
||||
|
||||
SOURCE main_symbian.cpp
|
||||
|
||||
DOCUMENT test.h
|
||||
|
||||
START RESOURCE pjlib_test_reg.rss
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
END
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
LIBRARY esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
LIBRARY securesocket.lib x509.lib crypto.lib x500.lib
|
||||
LIBRARY hal.lib efsrv.lib
|
||||
|
||||
#ifdef WINSCW
|
||||
STATICLIBRARY eexe.lib ecrt0.lib
|
||||
#endif
|
||||
|
||||
// Need a bit of mem for logging in the app.
|
||||
EPOCSTACKSIZE 32768
|
||||
|
||||
CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment
|
|
@ -0,0 +1,19 @@
|
|||
; pjlib_test.pkg
|
||||
|
||||
; Languages
|
||||
&EN
|
||||
|
||||
; Header
|
||||
;#{"pjlib_test"},(0x200235D3), 0, 1, 1
|
||||
#{"pjlib_test"},(0xA0000002), 0, 1, 1
|
||||
|
||||
; Platform compatibility
|
||||
[0x101F7961], *, *, *,{"Series60ProductID"}
|
||||
|
||||
; vendor
|
||||
%{"PJSIP"}
|
||||
:"PJSIP"
|
||||
|
||||
; Target
|
||||
"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\pjlib_test.exe"-"!:\sys\bin\pjlib_test.exe"
|
||||
"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\pjlib_test_reg.rSC"-"!:\private\10003a3f\import\apps\pjlib_test_reg.rSC"
|
|
@ -0,0 +1,86 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
TARGET pjlib_util.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000003
|
||||
|
||||
CAPABILITY NONE
|
||||
LIBRARY pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjlib_util.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjlib_util.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjlib-util\src\pjlib-util
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
//
|
||||
// PJLIB-UTIL files
|
||||
//
|
||||
SOURCE base64.c
|
||||
SOURCE cli.c
|
||||
SOURCE cli_console.c
|
||||
SOURCE cli_telnet.c
|
||||
SOURCE crc32.c
|
||||
SOURCE dns.c
|
||||
SOURCE dns_dump.c
|
||||
SOURCE dns_server.c
|
||||
SOURCE errno.c
|
||||
SOURCE getopt.c
|
||||
SOURCE hmac_md5.c
|
||||
SOURCE hmac_sha1.c
|
||||
SOURCE http_client.c
|
||||
SOURCE md5.c
|
||||
SOURCE pcap.c
|
||||
SOURCE resolver_wrap.cpp
|
||||
SOURCE scanner.c
|
||||
SOURCE sha1.c
|
||||
SOURCE srv_resolver.c
|
||||
SOURCE string.c
|
||||
SOURCE stun_simple.c
|
||||
SOURCE stun_simple_client.c
|
||||
SOURCE xml_wrap.cpp
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
//DOCUMENT pjlib-util\\config.h
|
||||
//DOCUMENT pjlib-util\\crc32.h
|
||||
//DOCUMENT pjlib-util\\dns.h
|
||||
//DOCUMENT pjlib-util\\errno.h
|
||||
//DOCUMENT pjlib-util\\getopt.h
|
||||
//DOCUMENT pjlib-util\\hmac_md5.h
|
||||
//DOCUMENT pjlib-util\hmac_sha1.h
|
||||
//DOCUMENT pjlib-util\http_client.h
|
||||
//DOCUMENT pjlib-util\md5.h
|
||||
//DOCUMENT pjlib-util\resolver.h
|
||||
//DOCUMENT pjlib-util\scanner.h
|
||||
//DOCUMENT pjlib-util\sha1.h
|
||||
//DOCUMENT pjlib-util\srv_resolver.h
|
||||
//DOCUMENT pjlib-util\string.h
|
||||
//DOCUMENT pjlib-util\stun_simple.h
|
||||
//DOCUMENT pjlib-util\types.h
|
||||
//DOCUMENT pjlib-util\xml.h
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
EXPORTS
|
||||
pj_cis_add_alpha @ 1 NONAME
|
||||
pj_cis_add_cis @ 2 NONAME
|
||||
pj_cis_add_num @ 3 NONAME
|
||||
pj_cis_add_range @ 4 NONAME
|
||||
pj_cis_add_str @ 5 NONAME
|
||||
pj_cis_buf_init @ 6 NONAME
|
||||
pj_cis_del_range @ 7 NONAME
|
||||
pj_cis_del_str @ 8 NONAME
|
||||
pj_cis_dup @ 9 NONAME
|
||||
pj_cis_init @ 10 NONAME
|
||||
pj_cis_invert @ 11 NONAME
|
||||
pj_crc32_calc @ 12 NONAME
|
||||
pj_crc32_final @ 13 NONAME
|
||||
pj_crc32_init @ 14 NONAME
|
||||
pj_crc32_update @ 15 NONAME
|
||||
pj_dns_dump_packet @ 16 NONAME
|
||||
pj_dns_get_type_name @ 17 NONAME
|
||||
pj_dns_make_query @ 18 NONAME
|
||||
pj_dns_packet_dup @ 19 NONAME
|
||||
pj_dns_parse_a_response @ 20 NONAME
|
||||
pj_dns_parse_packet @ 21 NONAME
|
||||
pj_dns_resolver_add_entry @ 22 NONAME
|
||||
pj_dns_resolver_cancel_query @ 23 NONAME
|
||||
pj_dns_resolver_create @ 24 NONAME
|
||||
pj_dns_resolver_destroy @ 25 NONAME
|
||||
pj_dns_resolver_dump @ 26 NONAME
|
||||
pj_dns_resolver_get_cached_count @ 27 NONAME
|
||||
pj_dns_resolver_get_settings @ 28 NONAME
|
||||
pj_dns_resolver_handle_events @ 29 NONAME
|
||||
pj_dns_resolver_set_ns @ 30 NONAME
|
||||
pj_dns_resolver_set_settings @ 31 NONAME
|
||||
pj_dns_resolver_start_query @ 32 NONAME
|
||||
pj_dns_settings_default @ 33 NONAME
|
||||
pj_dns_srv_resolve @ 34 NONAME
|
||||
pj_hmac_md5 @ 35 NONAME
|
||||
pj_hmac_md5_final @ 36 NONAME
|
||||
pj_hmac_md5_init @ 37 NONAME
|
||||
pj_hmac_md5_update @ 38 NONAME
|
||||
pj_hmac_sha1 @ 39 NONAME
|
||||
pj_hmac_sha1_final @ 40 NONAME
|
||||
pj_hmac_sha1_init @ 41 NONAME
|
||||
pj_hmac_sha1_update @ 42 NONAME
|
||||
pj_md5_final @ 43 NONAME
|
||||
pj_md5_init @ 44 NONAME
|
||||
pj_md5_update @ 45 NONAME
|
||||
pj_scan_advance_n @ 46 NONAME
|
||||
pj_scan_fini @ 47 NONAME
|
||||
pj_scan_get @ 48 NONAME
|
||||
pj_scan_get_char @ 49 NONAME
|
||||
pj_scan_get_n @ 50 NONAME
|
||||
pj_scan_get_newline @ 51 NONAME
|
||||
pj_scan_get_quote @ 52 NONAME
|
||||
pj_scan_get_quotes @ 53 NONAME
|
||||
pj_scan_get_unescape @ 54 NONAME
|
||||
pj_scan_get_until @ 55 NONAME
|
||||
pj_scan_get_until_ch @ 56 NONAME
|
||||
pj_scan_get_until_chr @ 57 NONAME
|
||||
pj_scan_init @ 58 NONAME
|
||||
pj_scan_peek @ 59 NONAME
|
||||
pj_scan_peek_n @ 60 NONAME
|
||||
pj_scan_peek_until @ 61 NONAME
|
||||
pj_scan_restore_state @ 62 NONAME
|
||||
pj_scan_save_state @ 63 NONAME
|
||||
pj_scan_skip_line @ 64 NONAME
|
||||
pj_scan_skip_whitespace @ 65 NONAME
|
||||
pj_scan_strcmp @ 66 NONAME
|
||||
pj_scan_stricmp @ 67 NONAME
|
||||
pj_scan_stricmp_alnum @ 68 NONAME
|
||||
pj_sha1_final @ 69 NONAME
|
||||
pj_sha1_init @ 70 NONAME
|
||||
pj_sha1_update @ 71 NONAME
|
||||
pj_str_unescape @ 72 NONAME
|
||||
pj_strcpy_unescape @ 73 NONAME
|
||||
pj_strncpy2_escape @ 74 NONAME
|
||||
pj_strncpy_escape @ 75 NONAME
|
||||
pj_xml_add_attr @ 76 NONAME
|
||||
pj_xml_add_node @ 77 NONAME
|
||||
pj_xml_attr_new @ 78 NONAME
|
||||
pj_xml_clone @ 79 NONAME
|
||||
pj_xml_find @ 80 NONAME
|
||||
pj_xml_find_attr @ 81 NONAME
|
||||
pj_xml_find_next_node @ 82 NONAME
|
||||
pj_xml_find_node @ 83 NONAME
|
||||
pj_xml_node_new @ 84 NONAME
|
||||
pj_xml_parse @ 85 NONAME
|
||||
pj_xml_print @ 86 NONAME
|
||||
pjlib_util_init @ 87 NONAME
|
||||
pjstun_create_bind_req @ 88 NONAME
|
||||
pjstun_get_mapped_addr @ 89 NONAME
|
||||
pjstun_msg_find_attr @ 90 NONAME
|
||||
pjstun_parse_msg @ 91 NONAME
|
|
@ -0,0 +1,136 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET pjmedia.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000004
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY null_audio.lib pjsdp.lib pjnath.lib pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjmedia.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjmedia.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
//
|
||||
// Platform independent source
|
||||
//
|
||||
|
||||
SOURCE alaw_ulaw.c
|
||||
SOURCE alaw_ulaw_table.c
|
||||
SOURCE avi_player.c
|
||||
SOURCE bidirectional.c
|
||||
SOURCE clock_thread.c
|
||||
SOURCE codec.c
|
||||
SOURCE conf_switch.c
|
||||
SOURCE conference.c
|
||||
SOURCE converter.c
|
||||
SOURCE converter_libswscale.c
|
||||
SOURCE delaybuf.c
|
||||
SOURCE echo_common.c
|
||||
SOURCE echo_port.c
|
||||
SOURCE echo_suppress.c
|
||||
SOURCE endpoint.c
|
||||
SOURCE errno.c
|
||||
SOURCE event.c
|
||||
SOURCE format.c
|
||||
SOURCE g711.c
|
||||
SOURCE jbuf.c
|
||||
SOURCE master_port.c
|
||||
SOURCE mem_capture.c
|
||||
SOURCE mem_player.c
|
||||
SOURCE null_port.c
|
||||
SOURCE plc_common.c
|
||||
SOURCE port.c
|
||||
SOURCE resample_port.c
|
||||
SOURCE resample_resample.c
|
||||
SOURCE rtcp.c
|
||||
SOURCE rtcp_xr.c
|
||||
SOURCE rtp.c
|
||||
//SDP files are in pjsdp.mmp: sdp.c, sdp_cmp.c, sdp_neg.c
|
||||
//SOURCE session.c // deprecated
|
||||
SOURCE silencedet.c
|
||||
SOURCE sound_port.c
|
||||
SOURCE splitcomb.c
|
||||
SOURCE stereo_port.c
|
||||
SOURCE stream.c
|
||||
SOURCE stream_common.c
|
||||
SOURCE stream_info.c
|
||||
SOURCE tonegen.c
|
||||
SOURCE transport_adapter_sample.c
|
||||
SOURCE transport_ice.c
|
||||
SOURCE transport_udp.c
|
||||
SOURCE transport_srtp.c
|
||||
SOURCE types.c
|
||||
SOURCE vid_codec.c
|
||||
SOURCE vid_codec_util.c
|
||||
SOURCE vid_port.c
|
||||
SOURCE vid_stream.c
|
||||
SOURCE vid_stream_info.c
|
||||
SOURCE vid_tee.c
|
||||
SOURCE wav_player.c
|
||||
SOURCE wav_playlist.c
|
||||
SOURCE wav_writer.c
|
||||
SOURCE wave.c
|
||||
SOURCE wsola.c
|
||||
|
||||
//
|
||||
// pjmedia-codec common files
|
||||
//
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-codec
|
||||
SOURCE audio_codecs.c
|
||||
SOURCE amr_sdp_match.c
|
||||
SOURCE g7221_sdp_match.c
|
||||
SOURCE h263_packetizer.c
|
||||
SOURCE h264_packetizer.c
|
||||
|
||||
|
||||
//
|
||||
// Symbian specific
|
||||
// These are on separate project
|
||||
//
|
||||
//SOURCE symbian_sound.cpp
|
||||
//SOURCE null_sound.c
|
||||
|
||||
|
||||
//
|
||||
// Header files
|
||||
//
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjnath\include
|
||||
SYSTEMINCLUDE ..\third_party\srtp\include
|
||||
SYSTEMINCLUDE ..\third_party\srtp\crypto\include
|
||||
SYSTEMINCLUDE ..\third_party\build\srtp
|
||||
SYSTEMINCLUDE ..
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
//SYSTEMINCLUDE \epoc32\include\mmf\plugin
|
||||
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
EXPORTS
|
||||
echo_supp_cancel_echo @ 1 NONAME
|
||||
echo_supp_capture @ 2 NONAME
|
||||
echo_supp_create @ 3 NONAME
|
||||
echo_supp_destroy @ 4 NONAME
|
||||
echo_supp_playback @ 5 NONAME
|
||||
pjmedia_bidirectional_port_create @ 6 NONAME
|
||||
pjmedia_calc_avg_signal @ 7 NONAME
|
||||
pjmedia_clock_create @ 8 NONAME
|
||||
pjmedia_clock_destroy @ 9 NONAME
|
||||
pjmedia_clock_start @ 10 NONAME
|
||||
pjmedia_clock_stop @ 11 NONAME
|
||||
pjmedia_clock_wait @ 12 NONAME
|
||||
pjmedia_codec_g711_deinit @ 13 NONAME
|
||||
pjmedia_codec_g711_init @ 14 NONAME
|
||||
pjmedia_codec_info_to_id @ 15 NONAME
|
||||
pjmedia_codec_mgr_alloc_codec @ 16 NONAME
|
||||
pjmedia_codec_mgr_dealloc_codec @ 17 NONAME
|
||||
pjmedia_codec_mgr_enum_codecs @ 18 NONAME
|
||||
pjmedia_codec_mgr_find_codecs_by_id @ 19 NONAME
|
||||
pjmedia_codec_mgr_get_codec_info @ 20 NONAME
|
||||
pjmedia_codec_mgr_get_default_param @ 21 NONAME
|
||||
pjmedia_codec_mgr_init @ 22 NONAME
|
||||
pjmedia_codec_mgr_register_factory @ 23 NONAME
|
||||
pjmedia_codec_mgr_set_codec_priority @ 24 NONAME
|
||||
pjmedia_codec_mgr_unregister_factory @ 25 NONAME
|
||||
pjmedia_conf_add_passive_port @ 26 NONAME
|
||||
pjmedia_conf_add_port @ 27 NONAME
|
||||
pjmedia_conf_adjust_rx_level @ 28 NONAME
|
||||
pjmedia_conf_adjust_tx_level @ 29 NONAME
|
||||
pjmedia_conf_configure_port @ 30 NONAME
|
||||
pjmedia_conf_connect_port @ 31 NONAME
|
||||
pjmedia_conf_create @ 32 NONAME
|
||||
pjmedia_conf_destroy @ 33 NONAME
|
||||
pjmedia_conf_disconnect_port @ 34 NONAME
|
||||
pjmedia_conf_enum_ports @ 35 NONAME
|
||||
pjmedia_conf_get_connect_count @ 36 NONAME
|
||||
pjmedia_conf_get_master_port @ 37 NONAME
|
||||
pjmedia_conf_get_port_count @ 38 NONAME
|
||||
pjmedia_conf_get_port_info @ 39 NONAME
|
||||
pjmedia_conf_get_ports_info @ 40 NONAME
|
||||
pjmedia_conf_get_signal_level @ 41 NONAME
|
||||
pjmedia_conf_remove_port @ 42 NONAME
|
||||
pjmedia_conf_set_port0_name @ 43 NONAME
|
||||
pjmedia_delay_buf_create @ 44 NONAME
|
||||
pjmedia_delay_buf_get @ 45 NONAME
|
||||
pjmedia_delay_buf_put @ 46 NONAME
|
||||
pjmedia_echo_cancel @ 47 NONAME
|
||||
pjmedia_echo_capture @ 48 NONAME
|
||||
pjmedia_echo_create @ 49 NONAME
|
||||
pjmedia_echo_destroy @ 50 NONAME
|
||||
pjmedia_echo_playback @ 51 NONAME
|
||||
pjmedia_echo_port_create @ 52 NONAME
|
||||
pjmedia_endpt_create @ 53 NONAME
|
||||
pjmedia_endpt_create_pool @ 54 NONAME
|
||||
pjmedia_endpt_create_sdp @ 55 NONAME
|
||||
pjmedia_endpt_destroy @ 56 NONAME
|
||||
pjmedia_endpt_dump @ 57 NONAME
|
||||
pjmedia_endpt_get_codec_mgr @ 58 NONAME
|
||||
pjmedia_endpt_get_ioqueue @ 59 NONAME
|
||||
pjmedia_endpt_get_thread @ 60 NONAME
|
||||
pjmedia_endpt_get_thread_count @ 61 NONAME
|
||||
pjmedia_ice_create @ 62 NONAME
|
||||
pjmedia_ice_destroy @ 63 NONAME
|
||||
pjmedia_ice_get_comp @ 64 NONAME
|
||||
pjmedia_ice_get_init_status @ 65 NONAME
|
||||
pjmedia_ice_init_ice @ 66 NONAME
|
||||
pjmedia_ice_modify_sdp @ 67 NONAME
|
||||
pjmedia_ice_simulate_lost @ 68 NONAME
|
||||
pjmedia_ice_start_ice @ 69 NONAME
|
||||
pjmedia_ice_start_init @ 70 NONAME
|
||||
pjmedia_ice_stop_ice @ 71 NONAME
|
||||
pjmedia_jbuf_create @ 72 NONAME
|
||||
pjmedia_jbuf_destroy @ 73 NONAME
|
||||
pjmedia_jbuf_get_frame @ 74 NONAME
|
||||
pjmedia_jbuf_get_state @ 75 NONAME
|
||||
pjmedia_jbuf_put_frame @ 76 NONAME
|
||||
pjmedia_jbuf_reset @ 77 NONAME
|
||||
pjmedia_jbuf_set_adaptive @ 78 NONAME
|
||||
pjmedia_jbuf_set_fixed @ 79 NONAME
|
||||
pjmedia_master_port_create @ 80 NONAME
|
||||
pjmedia_master_port_destroy @ 81 NONAME
|
||||
pjmedia_master_port_get_dport @ 82 NONAME
|
||||
pjmedia_master_port_get_uport @ 83 NONAME
|
||||
pjmedia_master_port_set_dport @ 84 NONAME
|
||||
pjmedia_master_port_set_uport @ 85 NONAME
|
||||
pjmedia_master_port_start @ 86 NONAME
|
||||
pjmedia_master_port_stop @ 87 NONAME
|
||||
pjmedia_mem_capture_create @ 88 NONAME
|
||||
pjmedia_mem_capture_get_size @ 89 NONAME
|
||||
pjmedia_mem_capture_set_eof_cb @ 90 NONAME
|
||||
pjmedia_mem_player_create @ 91 NONAME
|
||||
pjmedia_mem_player_set_eof_cb @ 92 NONAME
|
||||
pjmedia_null_port_create @ 93 NONAME
|
||||
pjmedia_plc_create @ 94 NONAME
|
||||
pjmedia_plc_generate @ 95 NONAME
|
||||
pjmedia_plc_save @ 96 NONAME
|
||||
pjmedia_port_destroy @ 97 NONAME
|
||||
pjmedia_port_get_frame @ 98 NONAME
|
||||
pjmedia_port_info_init @ 99 NONAME
|
||||
pjmedia_port_put_frame @ 100 NONAME
|
||||
pjmedia_resample_create @ 101 NONAME
|
||||
pjmedia_resample_destroy @ 102 NONAME
|
||||
pjmedia_resample_get_input_size @ 103 NONAME
|
||||
pjmedia_resample_port_create @ 104 NONAME
|
||||
pjmedia_resample_run @ 105 NONAME
|
||||
pjmedia_rtcp_build_rtcp @ 106 NONAME
|
||||
pjmedia_rtcp_fini @ 107 NONAME
|
||||
pjmedia_rtcp_get_ntp_time @ 108 NONAME
|
||||
pjmedia_rtcp_init @ 109 NONAME
|
||||
pjmedia_rtcp_rx_rtcp @ 110 NONAME
|
||||
pjmedia_rtcp_rx_rtp @ 111 NONAME
|
||||
pjmedia_rtcp_tx_rtp @ 112 NONAME
|
||||
pjmedia_rtp_decode_rtp @ 113 NONAME
|
||||
pjmedia_rtp_encode_rtp @ 114 NONAME
|
||||
pjmedia_rtp_session_init @ 115 NONAME
|
||||
pjmedia_rtp_session_update @ 116 NONAME
|
||||
pjmedia_session_check_dtmf @ 117 NONAME
|
||||
pjmedia_session_create @ 118 NONAME
|
||||
pjmedia_session_destroy @ 119 NONAME
|
||||
pjmedia_session_dial_dtmf @ 120 NONAME
|
||||
pjmedia_session_enum_streams @ 121 NONAME
|
||||
pjmedia_session_get_dtmf @ 122 NONAME
|
||||
pjmedia_session_get_info @ 123 NONAME
|
||||
pjmedia_session_get_port @ 124 NONAME
|
||||
pjmedia_session_get_stream_stat @ 125 NONAME
|
||||
pjmedia_session_info_from_sdp @ 126 NONAME
|
||||
pjmedia_session_pause @ 127 NONAME
|
||||
pjmedia_session_pause_stream @ 128 NONAME
|
||||
pjmedia_session_resume @ 129 NONAME
|
||||
pjmedia_session_resume_stream @ 130 NONAME
|
||||
pjmedia_session_set_dtmf_callback @ 131 NONAME
|
||||
pjmedia_silence_det_apply @ 132 NONAME
|
||||
pjmedia_silence_det_create @ 133 NONAME
|
||||
pjmedia_silence_det_detect @ 134 NONAME
|
||||
pjmedia_silence_det_disable @ 135 NONAME
|
||||
pjmedia_silence_det_set_adaptive @ 136 NONAME
|
||||
pjmedia_silence_det_set_fixed @ 137 NONAME
|
||||
pjmedia_silence_det_set_name @ 138 NONAME
|
||||
pjmedia_silence_det_set_params @ 139 NONAME
|
||||
pjmedia_snd_port_connect @ 140 NONAME
|
||||
pjmedia_snd_port_create @ 141 NONAME
|
||||
pjmedia_snd_port_create_player @ 142 NONAME
|
||||
pjmedia_snd_port_create_rec @ 143 NONAME
|
||||
pjmedia_snd_port_destroy @ 144 NONAME
|
||||
pjmedia_snd_port_disconnect @ 145 NONAME
|
||||
pjmedia_snd_port_get_ec_tail @ 146 NONAME
|
||||
pjmedia_snd_port_get_port @ 147 NONAME
|
||||
pjmedia_snd_port_get_snd_stream @ 148 NONAME
|
||||
pjmedia_snd_port_set_ec @ 149 NONAME
|
||||
pjmedia_splitcomb_create @ 150 NONAME
|
||||
pjmedia_splitcomb_create_rev_channel @ 151 NONAME
|
||||
pjmedia_splitcomb_set_channel @ 152 NONAME
|
||||
pjmedia_stream_check_dtmf @ 153 NONAME
|
||||
pjmedia_stream_create @ 154 NONAME
|
||||
pjmedia_stream_destroy @ 155 NONAME
|
||||
pjmedia_stream_dial_dtmf @ 156 NONAME
|
||||
pjmedia_stream_get_dtmf @ 157 NONAME
|
||||
pjmedia_stream_get_port @ 158 NONAME
|
||||
pjmedia_stream_get_stat @ 159 NONAME
|
||||
pjmedia_stream_get_transport @ 160 NONAME
|
||||
pjmedia_stream_info_from_sdp @ 161 NONAME
|
||||
pjmedia_stream_pause @ 162 NONAME
|
||||
pjmedia_stream_resume @ 163 NONAME
|
||||
pjmedia_stream_set_dtmf_callback @ 164 NONAME
|
||||
pjmedia_stream_start @ 165 NONAME
|
||||
pjmedia_strerror @ 166 NONAME
|
||||
pjmedia_tonegen_create @ 167 NONAME
|
||||
pjmedia_tonegen_create2 @ 168 NONAME
|
||||
pjmedia_tonegen_get_digit_map @ 169 NONAME
|
||||
pjmedia_tonegen_is_busy @ 170 NONAME
|
||||
pjmedia_tonegen_play @ 171 NONAME
|
||||
pjmedia_tonegen_play_digits @ 172 NONAME
|
||||
pjmedia_tonegen_set_digit_map @ 173 NONAME
|
||||
pjmedia_tonegen_stop @ 174 NONAME
|
||||
pjmedia_transport_udp_attach @ 175 NONAME
|
||||
pjmedia_transport_udp_close @ 176 NONAME
|
||||
pjmedia_transport_udp_create @ 177 NONAME
|
||||
pjmedia_transport_udp_create2 @ 178 NONAME
|
||||
pjmedia_transport_udp_create3 @ 179 NONAME
|
||||
pjmedia_transport_udp_get_info @ 180 NONAME
|
||||
pjmedia_transport_udp_simulate_lost @ 181 NONAME
|
||||
pjmedia_wav_player_port_create @ 182 NONAME
|
||||
pjmedia_wav_player_port_get_pos @ 183 NONAME
|
||||
pjmedia_wav_player_port_set_pos @ 184 NONAME
|
||||
pjmedia_wav_player_set_eof_cb @ 185 NONAME
|
||||
pjmedia_wav_playlist_create @ 186 NONAME
|
||||
pjmedia_wav_playlist_set_eof_cb @ 187 NONAME
|
||||
pjmedia_wav_writer_port_create @ 188 NONAME
|
||||
pjmedia_wav_writer_port_get_pos @ 189 NONAME
|
||||
pjmedia_wav_writer_port_set_cb @ 190 NONAME
|
||||
pjmedia_wave_hdr_file_to_host @ 191 NONAME
|
||||
pjmedia_wave_hdr_host_to_file @ 192 NONAME
|
|
@ -0,0 +1,33 @@
|
|||
TARGET pjmedia_audiodev.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia-audiodev
|
||||
|
||||
//
|
||||
// GCCE optimization setting
|
||||
//
|
||||
//OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
SOURCE audiodev.c
|
||||
SOURCE errno.c
|
||||
SOURCE symb_aps_dev.cpp
|
||||
SOURCE symb_mda_dev.cpp
|
||||
SOURCE symb_vas_dev.cpp
|
||||
SOURCE null_dev.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\server
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\common
|
||||
SYSTEMINCLUDE \epoc32\include\mda\common
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\plugin
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
TARGET pjnath.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000005
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjnath.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjnath.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
SOURCEPATH ..\pjnath\src\pjnath
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
//
|
||||
// PJNATH files
|
||||
//
|
||||
SOURCE errno.c
|
||||
SOURCE ice_session.c
|
||||
SOURCE ice_strans.c
|
||||
SOURCE nat_detect.c
|
||||
SOURCE stun_auth.c
|
||||
SOURCE stun_msg.c
|
||||
SOURCE stun_msg_dump.c
|
||||
SOURCE stun_session.c
|
||||
SOURCE stun_sock.c
|
||||
SOURCE stun_transaction.c
|
||||
SOURCE turn_session.c
|
||||
SOURCE turn_sock.c
|
||||
|
||||
//
|
||||
// Include files
|
||||
//
|
||||
//DOCUMENT pjnath\config.h
|
||||
//DOCUMENT pjnath\\errno.h
|
||||
//DOCUMENT pjnath\\ice_session.h
|
||||
//DOCUMENT pjnath\\ice_strans.h
|
||||
//DOCUMENT pjnath\\stun_auth.h
|
||||
//DOCUMENT pjnath\\stun_config.h
|
||||
//DOCUMENT pjnath\\stun_msg.h
|
||||
//DOCUMENT pjnath\\stun_session.h
|
||||
//DOCUMENT pjnath\\stun_transaction.h
|
||||
//DOCUMENT pjnath\\types.h
|
||||
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjnath\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
EXPORTS
|
||||
pj_ice_calc_foundation @ 1 NONAME
|
||||
pj_ice_get_cand_type_name @ 2 NONAME
|
||||
pj_ice_sess_add_cand @ 3 NONAME
|
||||
pj_ice_sess_change_role @ 4 NONAME
|
||||
pj_ice_sess_create @ 5 NONAME
|
||||
pj_ice_sess_create_check_list @ 6 NONAME
|
||||
pj_ice_sess_destroy @ 7 NONAME
|
||||
pj_ice_sess_find_default_cand @ 8 NONAME
|
||||
pj_ice_sess_on_rx_pkt @ 9 NONAME
|
||||
pj_ice_sess_send_data @ 10 NONAME
|
||||
pj_ice_sess_set_prefs @ 11 NONAME
|
||||
pj_ice_sess_start_check @ 12 NONAME
|
||||
pj_ice_strans_add_cand @ 13 NONAME
|
||||
pj_ice_strans_create @ 14 NONAME
|
||||
pj_ice_strans_create_comp @ 15 NONAME
|
||||
pj_ice_strans_destroy @ 16 NONAME
|
||||
pj_ice_strans_enum_cands @ 17 NONAME
|
||||
pj_ice_strans_get_comps_status @ 18 NONAME
|
||||
pj_ice_strans_init_ice @ 19 NONAME
|
||||
pj_ice_strans_sendto @ 20 NONAME
|
||||
pj_ice_strans_set_stun_domain @ 21 NONAME
|
||||
pj_ice_strans_set_stun_srv @ 22 NONAME
|
||||
pj_ice_strans_start_ice @ 23 NONAME
|
||||
pj_ice_strans_stop_ice @ 24 NONAME
|
||||
pj_stun_auth_cred_dup @ 25 NONAME
|
||||
pj_stun_auth_valid_for_msg @ 26 NONAME
|
||||
pj_stun_authenticate_request @ 27 NONAME
|
||||
pj_stun_authenticate_response @ 28 NONAME
|
||||
pj_stun_binary_attr_create @ 29 NONAME
|
||||
pj_stun_client_tsx_create @ 30 NONAME
|
||||
pj_stun_client_tsx_destroy @ 31 NONAME
|
||||
pj_stun_client_tsx_get_data @ 32 NONAME
|
||||
pj_stun_client_tsx_is_complete @ 33 NONAME
|
||||
pj_stun_client_tsx_on_rx_msg @ 34 NONAME
|
||||
pj_stun_client_tsx_retransmit @ 35 NONAME
|
||||
pj_stun_client_tsx_schedule_destroy @ 36 NONAME
|
||||
pj_stun_client_tsx_send_msg @ 37 NONAME
|
||||
pj_stun_client_tsx_set_data @ 38 NONAME
|
||||
pj_stun_create_key @ 39 NONAME
|
||||
pj_stun_detect_nat_type @ 40 NONAME
|
||||
pj_stun_empty_attr_create @ 41 NONAME
|
||||
pj_stun_errcode_attr_create @ 42 NONAME
|
||||
pj_stun_get_attr_name @ 43 NONAME
|
||||
pj_stun_get_class_name @ 44 NONAME
|
||||
pj_stun_get_err_reason @ 45 NONAME
|
||||
pj_stun_get_method_name @ 46 NONAME
|
||||
pj_stun_get_nat_name @ 47 NONAME
|
||||
pj_stun_msg_add_attr @ 48 NONAME
|
||||
pj_stun_msg_add_binary_attr @ 49 NONAME
|
||||
pj_stun_msg_add_empty_attr @ 50 NONAME
|
||||
pj_stun_msg_add_errcode_attr @ 51 NONAME
|
||||
pj_stun_msg_add_msgint_attr @ 52 NONAME
|
||||
pj_stun_msg_add_sockaddr_attr @ 53 NONAME
|
||||
pj_stun_msg_add_string_attr @ 54 NONAME
|
||||
pj_stun_msg_add_uint64_attr @ 55 NONAME
|
||||
pj_stun_msg_add_uint_attr @ 56 NONAME
|
||||
pj_stun_msg_add_unknown_attr @ 57 NONAME
|
||||
pj_stun_msg_check @ 58 NONAME
|
||||
pj_stun_msg_create @ 59 NONAME
|
||||
pj_stun_msg_create_response @ 60 NONAME
|
||||
pj_stun_msg_decode @ 61 NONAME
|
||||
pj_stun_msg_destroy_tdata @ 62 NONAME
|
||||
pj_stun_msg_dump @ 63 NONAME
|
||||
pj_stun_msg_encode @ 64 NONAME
|
||||
pj_stun_msg_find_attr @ 65 NONAME
|
||||
pj_stun_msgint_attr_create @ 66 NONAME
|
||||
pj_stun_session_cancel_req @ 67 NONAME
|
||||
pj_stun_session_create @ 68 NONAME
|
||||
pj_stun_session_create_ind @ 69 NONAME
|
||||
pj_stun_session_create_req @ 70 NONAME
|
||||
pj_stun_session_create_res @ 71 NONAME
|
||||
pj_stun_session_destroy @ 72 NONAME
|
||||
pj_stun_session_get_user_data @ 73 NONAME
|
||||
pj_stun_session_on_rx_pkt @ 74 NONAME
|
||||
pj_stun_session_retransmit_req @ 75 NONAME
|
||||
pj_stun_session_send_msg @ 76 NONAME
|
||||
pj_stun_session_set_credential @ 77 NONAME
|
||||
pj_stun_session_set_server_name @ 78 NONAME
|
||||
pj_stun_session_set_user_data @ 79 NONAME
|
||||
pj_stun_set_padding_char @ 80 NONAME
|
||||
pj_stun_sockaddr_attr_create @ 81 NONAME
|
||||
pj_stun_string_attr_create @ 82 NONAME
|
||||
pj_stun_uint64_attr_create @ 83 NONAME
|
||||
pj_stun_uint_attr_create @ 84 NONAME
|
||||
pj_stun_unknown_attr_create @ 85 NONAME
|
||||
pjnath_init @ 86 NONAME
|
||||
pjnath_perror @ 87 NONAME
|
|
@ -0,0 +1,386 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<?codewarrior exportversion="1.0" ideversion="5.5" success="y" ?>
|
||||
|
||||
<!DOCTYPE MWIDEWORKSPACE [
|
||||
<!ELEMENT MWIDEWORKSPACE (WINDOW*, COMWINDOW*)>
|
||||
<!ELEMENT WINDOW (SESSION, EDOCTYPE, PATH, FRAMELOC, FRAMESIZE, DOCKINFO)>
|
||||
<!ELEMENT COMWINDOW (SESSION, CLSID, OWNERPROJECT, DATA, FRAMELOC, FRAMESIZE, DOCKINFO)>
|
||||
<!ELEMENT SESSION (#PCDATA)>
|
||||
<!ELEMENT EDOCTYPE (#PCDATA)>
|
||||
<!ELEMENT DEFAULT (#PCDATA)>
|
||||
<!ELEMENT MAXIMIZED (#PCDATA)>
|
||||
<!ELEMENT PATH (#PCDATA)>
|
||||
<!ATTLIST PATH USERELATIVEPATHS (true | false) "true">
|
||||
<!ELEMENT FRAMELOC (X, Y)>
|
||||
<!ELEMENT X (#PCDATA)>
|
||||
<!ELEMENT Y (#PCDATA)>
|
||||
<!ELEMENT FRAMESIZE (W, H)>
|
||||
<!ELEMENT W (#PCDATA)>
|
||||
<!ELEMENT H (#PCDATA)>
|
||||
<!ELEMENT DOCKINFO (STATUS, ROW, COLUMN, DOCKBARID, PCTWIDTH, HGT, GROUPID)>
|
||||
<!ELEMENT STATUS (#PCDATA)>
|
||||
<!ELEMENT ROW (#PCDATA)>
|
||||
<!ELEMENT COLUMN (#PCDATA)>
|
||||
<!ELEMENT DOCKBARID (#PCDATA)>
|
||||
<!ELEMENT PCTWIDTH (#PCDATA)>
|
||||
<!ELEMENT HGT (#PCDATA)>
|
||||
<!ELEMENT GROUPID (GIDHIGHPART, GIDLOWPART)>
|
||||
<!ELEMENT GIDHIGHPART (#PCDATA)>
|
||||
<!ELEMENT GIDLOWPART (#PCDATA)>
|
||||
<!ELEMENT CLSID (#PCDATA)>
|
||||
<!ELEMENT OWNERPROJECT (#PCDATA)>
|
||||
<!ATTLIST OWNERPROJECT USERELATIVEPATHS (true | false) "true">
|
||||
<!ELEMENT DATA (#PCDATA)>
|
||||
<!ATTLIST DATA BINARYFORMAT (true | false) "true">
|
||||
]>
|
||||
|
||||
<MWIDEWORKSPACE>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<DEFAULT>true</DEFAULT>
|
||||
<PATH USERELATIVEPATHS = "true">pjlib.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjlib_util.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjnath.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">null_audio.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjsdp.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjmedia.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjsip.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjsip_simple.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjsip_ua.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">pjsua_lib.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-1</SESSION>
|
||||
<EDOCTYPE>0</EDOCTYPE>
|
||||
<PATH USERELATIVEPATHS = "true">symbian_ua.mcp</PATH>
|
||||
<FRAMELOC>
|
||||
<X>0</X>
|
||||
<Y>0</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>347</W>
|
||||
<H>128</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>1</STATUS>
|
||||
<ROW>0</ROW>
|
||||
<COLUMN>0</COLUMN>
|
||||
<DOCKBARID>59420</DOCKBARID>
|
||||
<PCTWIDTH>1.000000</PCTWIDTH>
|
||||
<HGT>350</HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART>4294967294</GIDHIGHPART>
|
||||
<GIDLOWPART>4294967294</GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-2147483648</SESSION>
|
||||
<EDOCTYPE>20</EDOCTYPE>
|
||||
<FRAMELOC>
|
||||
<X>4</X>
|
||||
<Y>23</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>1464</W>
|
||||
<H>3681</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>0</STATUS>
|
||||
<ROW></ROW>
|
||||
<COLUMN></COLUMN>
|
||||
<DOCKBARID></DOCKBARID>
|
||||
<PCTWIDTH></PCTWIDTH>
|
||||
<HGT></HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART></GIDHIGHPART>
|
||||
<GIDLOWPART></GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-2147483648</SESSION>
|
||||
<EDOCTYPE>36</EDOCTYPE>
|
||||
<FRAMELOC>
|
||||
<X>4</X>
|
||||
<Y>23</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>366</W>
|
||||
<H>354</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>0</STATUS>
|
||||
<ROW></ROW>
|
||||
<COLUMN></COLUMN>
|
||||
<DOCKBARID></DOCKBARID>
|
||||
<PCTWIDTH></PCTWIDTH>
|
||||
<HGT></HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART></GIDHIGHPART>
|
||||
<GIDLOWPART></GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
<WINDOW>
|
||||
<SESSION>-2147483648</SESSION>
|
||||
<EDOCTYPE>23</EDOCTYPE>
|
||||
<FRAMELOC>
|
||||
<X>6</X>
|
||||
<Y>81</Y>
|
||||
</FRAMELOC>
|
||||
<FRAMESIZE>
|
||||
<W>566</W>
|
||||
<H>477</H>
|
||||
</FRAMESIZE>
|
||||
<DOCKINFO>
|
||||
<STATUS>0</STATUS>
|
||||
<ROW></ROW>
|
||||
<COLUMN></COLUMN>
|
||||
<DOCKBARID></DOCKBARID>
|
||||
<PCTWIDTH></PCTWIDTH>
|
||||
<HGT></HGT>
|
||||
<GROUPID>
|
||||
<GIDHIGHPART></GIDHIGHPART>
|
||||
<GIDLOWPART></GIDLOWPART>
|
||||
</GROUPID>
|
||||
</DOCKINFO>
|
||||
</WINDOW>
|
||||
</MWIDEWORKSPACE>
|
|
@ -0,0 +1,46 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
TARGET pjsdp.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA0000006
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjlib_util.lib pjlib.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjsdp.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjsdp.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
//
|
||||
// Platform independent source
|
||||
//
|
||||
SOURCE errno.c
|
||||
SOURCE sdp_wrap.cpp
|
||||
SOURCE sdp_cmp.c
|
||||
SOURCE sdp_neg.c
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
EXPORTS
|
||||
pjmedia_sdp_attr_add @ 1 NONAME
|
||||
pjmedia_sdp_attr_clone @ 2 NONAME
|
||||
pjmedia_sdp_attr_create @ 3 NONAME
|
||||
pjmedia_sdp_attr_find @ 4 NONAME
|
||||
pjmedia_sdp_attr_find2 @ 5 NONAME
|
||||
pjmedia_sdp_attr_get_fmtp @ 6 NONAME
|
||||
pjmedia_sdp_attr_get_rtcp @ 7 NONAME
|
||||
pjmedia_sdp_attr_get_rtpmap @ 8 NONAME
|
||||
pjmedia_sdp_attr_remove @ 9 NONAME
|
||||
pjmedia_sdp_attr_remove_all @ 10 NONAME
|
||||
pjmedia_sdp_attr_to_rtpmap @ 11 NONAME
|
||||
pjmedia_sdp_conn_clone @ 12 NONAME
|
||||
pjmedia_sdp_media_add_attr @ 13 NONAME
|
||||
pjmedia_sdp_media_clone @ 14 NONAME
|
||||
pjmedia_sdp_media_cmp @ 15 NONAME
|
||||
pjmedia_sdp_media_find_attr @ 16 NONAME
|
||||
pjmedia_sdp_media_find_attr2 @ 17 NONAME
|
||||
pjmedia_sdp_media_remove_all_attr @ 18 NONAME
|
||||
pjmedia_sdp_media_remove_attr @ 19 NONAME
|
||||
pjmedia_sdp_neg_cancel_offer @ 20 NONAME
|
||||
pjmedia_sdp_neg_create_w_local_offer @ 21 NONAME
|
||||
pjmedia_sdp_neg_create_w_remote_offer @ 22 NONAME
|
||||
pjmedia_sdp_neg_get_active_local @ 23 NONAME
|
||||
pjmedia_sdp_neg_get_active_remote @ 24 NONAME
|
||||
pjmedia_sdp_neg_get_neg_local @ 25 NONAME
|
||||
pjmedia_sdp_neg_get_neg_remote @ 26 NONAME
|
||||
pjmedia_sdp_neg_get_state @ 27 NONAME
|
||||
pjmedia_sdp_neg_has_local_answer @ 28 NONAME
|
||||
pjmedia_sdp_neg_modify_local_offer @ 29 NONAME
|
||||
pjmedia_sdp_neg_negotiate @ 30 NONAME
|
||||
pjmedia_sdp_neg_send_local_offer @ 31 NONAME
|
||||
pjmedia_sdp_neg_set_local_answer @ 32 NONAME
|
||||
pjmedia_sdp_neg_set_prefer_remote_codec_order @ 33 NONAME
|
||||
pjmedia_sdp_neg_set_remote_answer @ 34 NONAME
|
||||
pjmedia_sdp_neg_set_remote_offer @ 35 NONAME
|
||||
pjmedia_sdp_neg_state_str @ 36 NONAME
|
||||
pjmedia_sdp_neg_was_answer_remote @ 37 NONAME
|
||||
pjmedia_sdp_parse @ 38 NONAME
|
||||
pjmedia_sdp_print @ 39 NONAME
|
||||
pjmedia_sdp_rtpmap_to_attr @ 40 NONAME
|
||||
pjmedia_sdp_session_clone @ 41 NONAME
|
||||
pjmedia_sdp_session_cmp @ 42 NONAME
|
||||
pjmedia_sdp_validate @ 43 NONAME
|
||||
pjmedia_strerror @ 44 NONAME
|
|
@ -0,0 +1,69 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET pjsip.dll
|
||||
TARGETTYPE dll
|
||||
|
||||
UID 0x0 0xA0000007
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjsdp.lib pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjsip.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjsip.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjsip\src\pjsip
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
// PJSIP-CORE files
|
||||
|
||||
//SOURCE sip_auth_aka.c
|
||||
SOURCE sip_auth_client.c
|
||||
SOURCE sip_auth_msg.c
|
||||
SOURCE sip_auth_parser_wrap.cpp
|
||||
SOURCE sip_auth_server.c
|
||||
SOURCE sip_config.c
|
||||
SOURCE sip_dialog_wrap.cpp
|
||||
SOURCE sip_endpoint_wrap.cpp
|
||||
SOURCE sip_errno.c
|
||||
SOURCE sip_msg.c
|
||||
SOURCE sip_multipart.c
|
||||
SOURCE sip_parser_wrap.cpp
|
||||
SOURCE sip_resolve.c
|
||||
SOURCE sip_tel_uri_wrap.cpp
|
||||
SOURCE sip_transaction.c
|
||||
SOURCE sip_transport_wrap.cpp
|
||||
SOURCE sip_transport_loop.c
|
||||
SOURCE sip_transport_tcp.c
|
||||
SOURCE sip_transport_udp.c
|
||||
SOURCE sip_transport_tls.c
|
||||
SOURCE sip_ua_layer.c
|
||||
SOURCE sip_uri.c
|
||||
SOURCE sip_util_wrap.cpp
|
||||
SOURCE sip_util_proxy_wrap.cpp
|
||||
SOURCE sip_util_statefull.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjsip\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
EXPORTS
|
||||
pjsip_accept_hdr_create @ 1 NONAME
|
||||
pjsip_accept_hdr_init @ 2 NONAME
|
||||
pjsip_ack_method @ 3 NONAME
|
||||
pjsip_allow_hdr_create @ 4 NONAME
|
||||
pjsip_allow_hdr_init @ 5 NONAME
|
||||
pjsip_auth_clt_clone @ 6 NONAME
|
||||
pjsip_auth_clt_get_prefs @ 7 NONAME
|
||||
pjsip_auth_clt_init @ 8 NONAME
|
||||
pjsip_auth_clt_init_req @ 9 NONAME
|
||||
pjsip_auth_clt_reinit_req @ 10 NONAME
|
||||
pjsip_auth_clt_set_credentials @ 11 NONAME
|
||||
pjsip_auth_clt_set_prefs @ 12 NONAME
|
||||
pjsip_auth_create_digest @ 13 NONAME
|
||||
pjsip_auth_deinit_parser @ 14 NONAME
|
||||
pjsip_auth_init_parser @ 15 NONAME
|
||||
pjsip_auth_srv_challenge @ 16 NONAME
|
||||
pjsip_auth_srv_init @ 17 NONAME
|
||||
pjsip_auth_srv_verify @ 18 NONAME
|
||||
pjsip_authorization_hdr_create @ 19 NONAME
|
||||
pjsip_bye_method @ 20 NONAME
|
||||
pjsip_calculate_branch_id @ 21 NONAME
|
||||
pjsip_cancel_method @ 22 NONAME
|
||||
pjsip_cid_hdr_create @ 23 NONAME
|
||||
pjsip_cid_hdr_init @ 24 NONAME
|
||||
pjsip_clen_hdr_create @ 25 NONAME
|
||||
pjsip_clen_hdr_init @ 26 NONAME
|
||||
pjsip_clone_text_data @ 27 NONAME
|
||||
pjsip_concat_param_imp @ 28 NONAME
|
||||
pjsip_contact_hdr_create @ 29 NONAME
|
||||
pjsip_contact_hdr_init @ 30 NONAME
|
||||
pjsip_cred_info_dup @ 31 NONAME
|
||||
pjsip_cseq_hdr_create @ 32 NONAME
|
||||
pjsip_cseq_hdr_init @ 33 NONAME
|
||||
pjsip_ctype_hdr_create @ 34 NONAME
|
||||
pjsip_ctype_hdr_init @ 35 NONAME
|
||||
pjsip_dlg_add_usage @ 36 NONAME
|
||||
pjsip_dlg_create_request @ 37 NONAME
|
||||
pjsip_dlg_create_response @ 38 NONAME
|
||||
pjsip_dlg_create_uac @ 39 NONAME
|
||||
pjsip_dlg_create_uas @ 40 NONAME
|
||||
pjsip_dlg_dec_lock @ 41 NONAME
|
||||
pjsip_dlg_dec_session @ 42 NONAME
|
||||
pjsip_dlg_fork @ 43 NONAME
|
||||
pjsip_dlg_get_mod_data @ 44 NONAME
|
||||
pjsip_dlg_inc_lock @ 45 NONAME
|
||||
pjsip_dlg_inc_session @ 46 NONAME
|
||||
pjsip_dlg_modify_response @ 47 NONAME
|
||||
pjsip_dlg_respond @ 48 NONAME
|
||||
pjsip_dlg_send_request @ 49 NONAME
|
||||
pjsip_dlg_send_response @ 50 NONAME
|
||||
pjsip_dlg_set_mod_data @ 51 NONAME
|
||||
pjsip_dlg_set_route_set @ 52 NONAME
|
||||
pjsip_dlg_set_transport @ 53 NONAME
|
||||
pjsip_dlg_terminate @ 54 NONAME
|
||||
pjsip_dlg_try_inc_lock @ 55 NONAME
|
||||
pjsip_endpt_acquire_transport @ 56 NONAME
|
||||
pjsip_endpt_add_capability @ 57 NONAME
|
||||
pjsip_endpt_cancel_timer @ 58 NONAME
|
||||
pjsip_endpt_create @ 59 NONAME
|
||||
pjsip_endpt_create_ack @ 60 NONAME
|
||||
pjsip_endpt_create_cancel @ 61 NONAME
|
||||
pjsip_endpt_create_pool @ 62 NONAME
|
||||
pjsip_endpt_create_request @ 63 NONAME
|
||||
pjsip_endpt_create_request_from_hdr @ 64 NONAME
|
||||
pjsip_endpt_create_request_fwd @ 65 NONAME
|
||||
pjsip_endpt_create_resolver @ 66 NONAME
|
||||
pjsip_endpt_create_response @ 67 NONAME
|
||||
pjsip_endpt_create_response_fwd @ 68 NONAME
|
||||
pjsip_endpt_create_tdata @ 69 NONAME
|
||||
pjsip_endpt_destroy @ 70 NONAME
|
||||
pjsip_endpt_dump @ 71 NONAME
|
||||
pjsip_endpt_get_capability @ 72 NONAME
|
||||
pjsip_endpt_get_ioqueue @ 73 NONAME
|
||||
pjsip_endpt_get_request_headers @ 74 NONAME
|
||||
pjsip_endpt_get_resolver @ 75 NONAME
|
||||
pjsip_endpt_get_timer_heap @ 76 NONAME
|
||||
pjsip_endpt_get_tpmgr @ 77 NONAME
|
||||
pjsip_endpt_handle_events @ 78 NONAME
|
||||
pjsip_endpt_handle_events2 @ 79 NONAME
|
||||
pjsip_endpt_has_capability @ 80 NONAME
|
||||
pjsip_endpt_log_error @ 81 NONAME
|
||||
pjsip_endpt_name @ 82 NONAME
|
||||
pjsip_endpt_register_module @ 83 NONAME
|
||||
pjsip_endpt_release_pool @ 84 NONAME
|
||||
pjsip_endpt_resolve @ 85 NONAME
|
||||
pjsip_endpt_respond @ 86 NONAME
|
||||
pjsip_endpt_respond_stateless @ 87 NONAME
|
||||
pjsip_endpt_schedule_timer @ 88 NONAME
|
||||
pjsip_endpt_send_raw @ 89 NONAME
|
||||
pjsip_endpt_send_raw_to_uri @ 90 NONAME
|
||||
pjsip_endpt_send_request @ 91 NONAME
|
||||
pjsip_endpt_send_request_stateless @ 92 NONAME
|
||||
pjsip_endpt_send_response @ 93 NONAME
|
||||
pjsip_endpt_send_response2 @ 94 NONAME
|
||||
pjsip_endpt_set_resolver @ 95 NONAME
|
||||
pjsip_endpt_unregister_module @ 96 NONAME
|
||||
pjsip_event_str @ 97 NONAME
|
||||
pjsip_expires_hdr_create @ 98 NONAME
|
||||
pjsip_expires_hdr_init @ 99 NONAME
|
||||
pjsip_find_msg @ 100 NONAME
|
||||
pjsip_from_hdr_create @ 101 NONAME
|
||||
pjsip_from_hdr_init @ 102 NONAME
|
||||
pjsip_fromto_hdr_set_from @ 103 NONAME
|
||||
pjsip_fromto_hdr_set_to @ 104 NONAME
|
||||
pjsip_generic_array_hdr_create @ 105 NONAME
|
||||
pjsip_generic_array_hdr_init @ 106 NONAME
|
||||
pjsip_generic_int_hdr_create @ 107 NONAME
|
||||
pjsip_generic_int_hdr_init @ 108 NONAME
|
||||
pjsip_generic_string_hdr_create @ 109 NONAME
|
||||
pjsip_generic_string_hdr_init @ 110 NONAME
|
||||
pjsip_generic_string_hdr_init2 @ 111 NONAME
|
||||
pjsip_get_ack_method @ 112 NONAME
|
||||
pjsip_get_bye_method @ 113 NONAME
|
||||
pjsip_get_cancel_method @ 114 NONAME
|
||||
pjsip_get_invite_method @ 115 NONAME
|
||||
pjsip_get_options_method @ 116 NONAME
|
||||
pjsip_get_register_method @ 117 NONAME
|
||||
pjsip_get_request_dest @ 118 NONAME
|
||||
pjsip_get_response_addr @ 119 NONAME
|
||||
pjsip_get_status_text @ 120 NONAME
|
||||
pjsip_hdr_clone @ 121 NONAME
|
||||
pjsip_hdr_print_on @ 122 NONAME
|
||||
pjsip_hdr_shallow_clone @ 123 NONAME
|
||||
pjsip_invite_method @ 124 NONAME
|
||||
pjsip_loop_set_delay @ 125 NONAME
|
||||
pjsip_loop_set_discard @ 126 NONAME
|
||||
pjsip_loop_set_failure @ 127 NONAME
|
||||
pjsip_loop_set_recv_delay @ 128 NONAME
|
||||
pjsip_loop_set_send_callback_delay @ 129 NONAME
|
||||
pjsip_loop_start @ 130 NONAME
|
||||
pjsip_max_fwd_hdr_create @ 131 NONAME
|
||||
pjsip_max_fwd_hdr_init @ 132 NONAME
|
||||
pjsip_method_cmp @ 133 NONAME
|
||||
pjsip_method_copy @ 134 NONAME
|
||||
pjsip_method_creates_dialog @ 135 NONAME
|
||||
pjsip_method_init @ 136 NONAME
|
||||
pjsip_method_init_np @ 137 NONAME
|
||||
pjsip_method_set @ 138 NONAME
|
||||
pjsip_min_expires_hdr_create @ 139 NONAME
|
||||
pjsip_min_expires_hdr_init @ 140 NONAME
|
||||
pjsip_msg_body_clone @ 141 NONAME
|
||||
pjsip_msg_body_copy @ 142 NONAME
|
||||
pjsip_msg_body_create @ 143 NONAME
|
||||
pjsip_msg_clone @ 144 NONAME
|
||||
pjsip_msg_create @ 145 NONAME
|
||||
pjsip_msg_find_hdr @ 146 NONAME
|
||||
pjsip_msg_find_hdr_by_name @ 147 NONAME
|
||||
pjsip_msg_find_remove_hdr @ 148 NONAME
|
||||
pjsip_msg_print @ 149 NONAME
|
||||
pjsip_name_addr_assign @ 150 NONAME
|
||||
pjsip_name_addr_create @ 151 NONAME
|
||||
pjsip_name_addr_init @ 152 NONAME
|
||||
pjsip_options_method @ 153 NONAME
|
||||
pjsip_param_cfind @ 154 NONAME
|
||||
pjsip_param_clone @ 155 NONAME
|
||||
pjsip_param_find @ 156 NONAME
|
||||
pjsip_param_print_on @ 157 NONAME
|
||||
pjsip_param_shallow_clone @ 158 NONAME
|
||||
pjsip_parse_end_hdr_imp @ 159 NONAME
|
||||
pjsip_parse_hdr @ 160 NONAME
|
||||
pjsip_parse_msg @ 161 NONAME
|
||||
pjsip_parse_param_imp @ 162 NONAME
|
||||
pjsip_parse_rdata @ 163 NONAME
|
||||
pjsip_parse_status_line @ 164 NONAME
|
||||
pjsip_parse_uri @ 165 NONAME
|
||||
pjsip_parse_uri_param_imp @ 166 NONAME
|
||||
pjsip_parser_const @ 167 NONAME
|
||||
pjsip_print_text_body @ 168 NONAME
|
||||
pjsip_process_route_set @ 169 NONAME
|
||||
pjsip_proxy_authenticate_hdr_create @ 170 NONAME
|
||||
pjsip_proxy_authorization_hdr_create @ 171 NONAME
|
||||
pjsip_rdata_get_dlg @ 172 NONAME
|
||||
pjsip_rdata_get_tsx @ 173 NONAME
|
||||
pjsip_register_hdr_parser @ 174 NONAME
|
||||
pjsip_register_method @ 175 NONAME
|
||||
pjsip_register_uri_parser @ 176 NONAME
|
||||
pjsip_require_hdr_create @ 177 NONAME
|
||||
pjsip_require_hdr_init @ 178 NONAME
|
||||
pjsip_resolve @ 179 NONAME
|
||||
pjsip_resolver_create @ 180 NONAME
|
||||
pjsip_resolver_destroy @ 181 NONAME
|
||||
pjsip_resolver_get_resolver @ 182 NONAME
|
||||
pjsip_resolver_set_resolver @ 183 NONAME
|
||||
pjsip_retry_after_hdr_create @ 184 NONAME
|
||||
pjsip_retry_after_hdr_init @ 185 NONAME
|
||||
pjsip_role_name @ 186 NONAME
|
||||
pjsip_route_hdr_create @ 187 NONAME
|
||||
pjsip_route_hdr_init @ 188 NONAME
|
||||
pjsip_routing_hdr_set_route @ 189 NONAME
|
||||
pjsip_routing_hdr_set_rr @ 190 NONAME
|
||||
pjsip_rr_hdr_create @ 191 NONAME
|
||||
pjsip_rr_hdr_init @ 192 NONAME
|
||||
pjsip_rx_data_get_info @ 193 NONAME
|
||||
pjsip_sip_uri_assign @ 194 NONAME
|
||||
pjsip_sip_uri_create @ 195 NONAME
|
||||
pjsip_sip_uri_init @ 196 NONAME
|
||||
pjsip_sip_uri_set_secure @ 197 NONAME
|
||||
pjsip_strerror @ 198 NONAME
|
||||
pjsip_supported_hdr_create @ 199 NONAME
|
||||
pjsip_supported_hdr_init @ 200 NONAME
|
||||
pjsip_tcp_transport_start @ 201 NONAME
|
||||
pjsip_tcp_transport_start2 @ 202 NONAME
|
||||
pjsip_tel_nb_cmp @ 203 NONAME
|
||||
pjsip_tel_uri_create @ 204 NONAME
|
||||
pjsip_to_hdr_create @ 205 NONAME
|
||||
pjsip_to_hdr_init @ 206 NONAME
|
||||
pjsip_tpmgr_acquire_transport @ 207 NONAME
|
||||
pjsip_tpmgr_create @ 208 NONAME
|
||||
pjsip_tpmgr_destroy @ 209 NONAME
|
||||
pjsip_tpmgr_dump_transports @ 210 NONAME
|
||||
pjsip_tpmgr_find_local_addr @ 211 NONAME
|
||||
pjsip_tpmgr_get_transport_count @ 212 NONAME
|
||||
pjsip_tpmgr_receive_packet @ 213 NONAME
|
||||
pjsip_tpmgr_register_tpfactory @ 214 NONAME
|
||||
pjsip_tpmgr_send_raw @ 215 NONAME
|
||||
pjsip_tpmgr_unregister_tpfactory @ 216 NONAME
|
||||
pjsip_tpselector_add_ref @ 217 NONAME
|
||||
pjsip_tpselector_dec_ref @ 218 NONAME
|
||||
pjsip_transport_add_ref @ 219 NONAME
|
||||
pjsip_transport_dec_ref @ 220 NONAME
|
||||
pjsip_transport_destroy @ 221 NONAME
|
||||
pjsip_transport_get_default_port_for_type @ 222 NONAME
|
||||
pjsip_transport_get_flag_from_type @ 223 NONAME
|
||||
pjsip_transport_get_type_desc @ 224 NONAME
|
||||
pjsip_transport_get_type_from_flag @ 225 NONAME
|
||||
pjsip_transport_get_type_from_name @ 226 NONAME
|
||||
pjsip_transport_get_type_name @ 227 NONAME
|
||||
pjsip_transport_register @ 228 NONAME
|
||||
pjsip_transport_register_type @ 229 NONAME
|
||||
pjsip_transport_send @ 230 NONAME
|
||||
pjsip_transport_shutdown @ 231 NONAME
|
||||
pjsip_transport_type_get_af @ 232 NONAME
|
||||
pjsip_tsx_create_key @ 233 NONAME
|
||||
pjsip_tsx_create_uac @ 234 NONAME
|
||||
pjsip_tsx_create_uas @ 235 NONAME
|
||||
pjsip_tsx_get_dlg @ 236 NONAME
|
||||
pjsip_tsx_layer_destroy @ 237 NONAME
|
||||
pjsip_tsx_layer_dump @ 238 NONAME
|
||||
pjsip_tsx_layer_find_tsx @ 239 NONAME
|
||||
pjsip_tsx_layer_get_tsx_count @ 240 NONAME
|
||||
pjsip_tsx_layer_init_module @ 241 NONAME
|
||||
pjsip_tsx_layer_instance @ 242 NONAME
|
||||
pjsip_tsx_recv_msg @ 243 NONAME
|
||||
pjsip_tsx_retransmit_no_state @ 244 NONAME
|
||||
pjsip_tsx_send_msg @ 245 NONAME
|
||||
pjsip_tsx_set_transport @ 246 NONAME
|
||||
pjsip_tsx_state_str @ 247 NONAME
|
||||
pjsip_tsx_stop_retransmit @ 248 NONAME
|
||||
pjsip_tsx_terminate @ 249 NONAME
|
||||
pjsip_tx_data_add_ref @ 250 NONAME
|
||||
pjsip_tx_data_create @ 251 NONAME
|
||||
pjsip_tx_data_dec_ref @ 252 NONAME
|
||||
pjsip_tx_data_get_info @ 253 NONAME
|
||||
pjsip_tx_data_invalidate_msg @ 254 NONAME
|
||||
pjsip_tx_data_is_valid @ 255 NONAME
|
||||
pjsip_tx_data_set_transport @ 256 NONAME
|
||||
pjsip_ua_destroy @ 257 NONAME
|
||||
pjsip_ua_dump @ 258 NONAME
|
||||
pjsip_ua_find_dialog @ 259 NONAME
|
||||
pjsip_ua_get_dlg_set_count @ 260 NONAME
|
||||
pjsip_ua_get_endpt @ 261 NONAME
|
||||
pjsip_ua_init_module @ 262 NONAME
|
||||
pjsip_ua_instance @ 263 NONAME
|
||||
pjsip_ua_register_dlg @ 264 NONAME
|
||||
pjsip_ua_unregister_dlg @ 265 NONAME
|
||||
pjsip_udp_transport_attach @ 266 NONAME
|
||||
pjsip_udp_transport_attach2 @ 267 NONAME
|
||||
pjsip_udp_transport_get_socket @ 268 NONAME
|
||||
pjsip_udp_transport_pause @ 269 NONAME
|
||||
pjsip_udp_transport_restart @ 270 NONAME
|
||||
pjsip_udp_transport_start @ 271 NONAME
|
||||
pjsip_udp_transport_start6 @ 272 NONAME
|
||||
pjsip_unsupported_hdr_create @ 273 NONAME
|
||||
pjsip_unsupported_hdr_init @ 274 NONAME
|
||||
pjsip_via_hdr_create @ 275 NONAME
|
||||
pjsip_via_hdr_init @ 276 NONAME
|
||||
pjsip_warning_hdr_create @ 277 NONAME
|
||||
pjsip_warning_hdr_create_from_status @ 278 NONAME
|
||||
pjsip_www_authenticate_hdr_create @ 279 NONAME
|
|
@ -0,0 +1,54 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET pjsip_simple.dll
|
||||
TARGETTYPE dll
|
||||
|
||||
UID 0x0 0xA0000008
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjsip.lib pjsdp.lib pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjsip_simple.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjsip_simple.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjsip\src\pjsip-simple
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
// PJSIP-SIMPLE files
|
||||
|
||||
SOURCE errno.c
|
||||
SOURCE evsub.c
|
||||
SOURCE evsub_msg.c
|
||||
SOURCE iscomposing.c
|
||||
SOURCE mwi.c
|
||||
SOURCE pidf.c
|
||||
SOURCE presence.c
|
||||
SOURCE presence_body.c
|
||||
SOURCE publishc.c
|
||||
SOURCE rpid.c
|
||||
SOURCE xpidf.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjsip\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
EXPORTS
|
||||
pjpidf_create @ 1 NONAME
|
||||
pjpidf_parse @ 2 NONAME
|
||||
pjpidf_pres_add_note @ 3 NONAME
|
||||
pjpidf_pres_add_tuple @ 4 NONAME
|
||||
pjpidf_pres_construct @ 5 NONAME
|
||||
pjpidf_pres_find_tuple @ 6 NONAME
|
||||
pjpidf_pres_get_first_note @ 7 NONAME
|
||||
pjpidf_pres_get_first_tuple @ 8 NONAME
|
||||
pjpidf_pres_get_next_note @ 9 NONAME
|
||||
pjpidf_pres_get_next_tuple @ 10 NONAME
|
||||
pjpidf_pres_remove_tuple @ 11 NONAME
|
||||
pjpidf_print @ 12 NONAME
|
||||
pjpidf_status_construct @ 13 NONAME
|
||||
pjpidf_status_is_basic_open @ 14 NONAME
|
||||
pjpidf_status_set_basic_open @ 15 NONAME
|
||||
pjpidf_tuple_add_note @ 16 NONAME
|
||||
pjpidf_tuple_construct @ 17 NONAME
|
||||
pjpidf_tuple_get_contact @ 18 NONAME
|
||||
pjpidf_tuple_get_contact_prio @ 19 NONAME
|
||||
pjpidf_tuple_get_first_note @ 20 NONAME
|
||||
pjpidf_tuple_get_id @ 21 NONAME
|
||||
pjpidf_tuple_get_next_note @ 22 NONAME
|
||||
pjpidf_tuple_get_status @ 23 NONAME
|
||||
pjpidf_tuple_get_timestamp @ 24 NONAME
|
||||
pjpidf_tuple_set_contact @ 25 NONAME
|
||||
pjpidf_tuple_set_contact_prio @ 26 NONAME
|
||||
pjpidf_tuple_set_id @ 27 NONAME
|
||||
pjpidf_tuple_set_timestamp @ 28 NONAME
|
||||
pjpidf_tuple_set_timestamp_np @ 29 NONAME
|
||||
pjrpid_add_element @ 30 NONAME
|
||||
pjrpid_element_dup @ 31 NONAME
|
||||
pjrpid_get_element @ 32 NONAME
|
||||
pjsip_allow_events_hdr_create @ 33 NONAME
|
||||
pjsip_event_hdr_create @ 34 NONAME
|
||||
pjsip_evsub_accept @ 35 NONAME
|
||||
pjsip_evsub_create_uac @ 36 NONAME
|
||||
pjsip_evsub_create_uas @ 37 NONAME
|
||||
pjsip_evsub_current_notify @ 38 NONAME
|
||||
pjsip_evsub_get_allow_events_hdr @ 39 NONAME
|
||||
pjsip_evsub_get_mod_data @ 40 NONAME
|
||||
pjsip_evsub_get_state @ 41 NONAME
|
||||
pjsip_evsub_get_state_name @ 42 NONAME
|
||||
pjsip_evsub_init_module @ 43 NONAME
|
||||
pjsip_evsub_init_parser @ 44 NONAME
|
||||
pjsip_evsub_initiate @ 45 NONAME
|
||||
pjsip_evsub_instance @ 46 NONAME
|
||||
pjsip_evsub_notify @ 47 NONAME
|
||||
pjsip_evsub_register_pkg @ 48 NONAME
|
||||
pjsip_evsub_send_request @ 49 NONAME
|
||||
pjsip_evsub_set_mod_data @ 50 NONAME
|
||||
pjsip_evsub_terminate @ 51 NONAME
|
||||
pjsip_get_notify_method @ 52 NONAME
|
||||
pjsip_get_subscribe_method @ 53 NONAME
|
||||
pjsip_iscomposing_create_body @ 54 NONAME
|
||||
pjsip_iscomposing_create_xml @ 55 NONAME
|
||||
pjsip_iscomposing_parse @ 56 NONAME
|
||||
pjsip_notify_method @ 57 NONAME
|
||||
pjsip_pres_accept @ 58 NONAME
|
||||
pjsip_pres_create_pidf @ 59 NONAME
|
||||
pjsip_pres_create_uac @ 60 NONAME
|
||||
pjsip_pres_create_uas @ 61 NONAME
|
||||
pjsip_pres_create_xpidf @ 62 NONAME
|
||||
pjsip_pres_current_notify @ 63 NONAME
|
||||
pjsip_pres_get_status @ 64 NONAME
|
||||
pjsip_pres_init_module @ 65 NONAME
|
||||
pjsip_pres_initiate @ 66 NONAME
|
||||
pjsip_pres_instance @ 67 NONAME
|
||||
pjsip_pres_notify @ 68 NONAME
|
||||
pjsip_pres_parse_pidf @ 69 NONAME
|
||||
pjsip_pres_parse_xpidf @ 70 NONAME
|
||||
pjsip_pres_send_request @ 71 NONAME
|
||||
pjsip_pres_set_status @ 72 NONAME
|
||||
pjsip_pres_terminate @ 73 NONAME
|
||||
pjsip_publishc_create @ 74 NONAME
|
||||
pjsip_publishc_destroy @ 75 NONAME
|
||||
pjsip_publishc_get_pool @ 76 NONAME
|
||||
pjsip_publishc_init @ 77 NONAME
|
||||
pjsip_publishc_init_module @ 78 NONAME
|
||||
pjsip_publishc_publish @ 79 NONAME
|
||||
pjsip_publishc_send @ 80 NONAME
|
||||
pjsip_publishc_set_credentials @ 81 NONAME
|
||||
pjsip_publishc_set_route_set @ 82 NONAME
|
||||
pjsip_publishc_unpublish @ 83 NONAME
|
||||
pjsip_publishc_update_expires @ 84 NONAME
|
||||
pjsip_sub_state_hdr_create @ 85 NONAME
|
||||
pjsip_subscribe_method @ 86 NONAME
|
||||
pjsip_tsx_get_evsub @ 87 NONAME
|
||||
pjsipsimple_strerror @ 88 NONAME
|
||||
pjxpidf_create @ 89 NONAME
|
||||
pjxpidf_get_status @ 90 NONAME
|
||||
pjxpidf_get_uri @ 91 NONAME
|
||||
pjxpidf_parse @ 92 NONAME
|
||||
pjxpidf_print @ 93 NONAME
|
||||
pjxpidf_set_status @ 94 NONAME
|
||||
pjxpidf_set_uri @ 95 NONAME
|
|
@ -0,0 +1,52 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET pjsip_ua.dll
|
||||
TARGETTYPE dll
|
||||
|
||||
UID 0x0 0xA0000009
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjsip_simple.lib pjsip.lib pjsdp.lib pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjsip_ua.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjsip_ua.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjsip\src\pjsip-ua
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
|
||||
// PJSIP-UA files
|
||||
|
||||
SOURCE sip_inv.c
|
||||
SOURCE sip_reg.c
|
||||
SOURCE sip_replaces.c
|
||||
SOURCE sip_xfer.c
|
||||
SOURCE sip_100rel.c
|
||||
SOURCE sip_timer.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjsip\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
EXPORTS
|
||||
pjsip_100rel_attach @ 1 NONAME
|
||||
pjsip_100rel_create_prack @ 2 NONAME
|
||||
pjsip_100rel_end_session @ 3 NONAME
|
||||
pjsip_100rel_init_module @ 4 NONAME
|
||||
pjsip_100rel_is_reliable @ 5 NONAME
|
||||
pjsip_100rel_on_rx_prack @ 6 NONAME
|
||||
pjsip_100rel_send_prack @ 7 NONAME
|
||||
pjsip_100rel_tx_response @ 8 NONAME
|
||||
pjsip_create_sdp_body @ 9 NONAME
|
||||
pjsip_dlg_get_inv_session @ 10 NONAME
|
||||
pjsip_get_prack_method @ 11 NONAME
|
||||
pjsip_get_refer_method @ 12 NONAME
|
||||
pjsip_inv_answer @ 13 NONAME
|
||||
pjsip_inv_create_ack @ 14 NONAME
|
||||
pjsip_inv_create_uac @ 15 NONAME
|
||||
pjsip_inv_create_uas @ 16 NONAME
|
||||
pjsip_inv_end_session @ 17 NONAME
|
||||
pjsip_inv_initial_answer @ 18 NONAME
|
||||
pjsip_inv_invite @ 19 NONAME
|
||||
pjsip_inv_reinvite @ 20 NONAME
|
||||
pjsip_inv_send_msg @ 21 NONAME
|
||||
pjsip_inv_set_sdp_answer @ 22 NONAME
|
||||
pjsip_inv_state_name @ 23 NONAME
|
||||
pjsip_inv_terminate @ 24 NONAME
|
||||
pjsip_inv_update @ 25 NONAME
|
||||
pjsip_inv_usage_init @ 26 NONAME
|
||||
pjsip_inv_usage_instance @ 27 NONAME
|
||||
pjsip_inv_verify_request @ 28 NONAME
|
||||
pjsip_prack_method @ 29 NONAME
|
||||
pjsip_refer_method @ 30 NONAME
|
||||
pjsip_regc_add_headers @ 31 NONAME
|
||||
pjsip_regc_create @ 32 NONAME
|
||||
pjsip_regc_destroy @ 33 NONAME
|
||||
pjsip_regc_get_info @ 34 NONAME
|
||||
pjsip_regc_get_pool @ 35 NONAME
|
||||
pjsip_regc_init @ 36 NONAME
|
||||
pjsip_regc_register @ 37 NONAME
|
||||
pjsip_regc_send @ 38 NONAME
|
||||
pjsip_regc_set_credentials @ 39 NONAME
|
||||
pjsip_regc_set_prefs @ 40 NONAME
|
||||
pjsip_regc_set_route_set @ 41 NONAME
|
||||
pjsip_regc_set_transport @ 42 NONAME
|
||||
pjsip_regc_unregister @ 43 NONAME
|
||||
pjsip_regc_unregister_all @ 44 NONAME
|
||||
pjsip_regc_update_contact @ 45 NONAME
|
||||
pjsip_regc_update_expires @ 46 NONAME
|
||||
pjsip_replaces_hdr_create @ 47 NONAME
|
||||
pjsip_replaces_init_module @ 48 NONAME
|
||||
pjsip_replaces_verify_request @ 49 NONAME
|
||||
pjsip_xfer_accept @ 50 NONAME
|
||||
pjsip_xfer_create_uac @ 51 NONAME
|
||||
pjsip_xfer_create_uas @ 52 NONAME
|
||||
pjsip_xfer_current_notify @ 53 NONAME
|
||||
pjsip_xfer_init_module @ 54 NONAME
|
||||
pjsip_xfer_initiate @ 55 NONAME
|
||||
pjsip_xfer_notify @ 56 NONAME
|
||||
pjsip_xfer_send_request @ 57 NONAME
|
|
@ -0,0 +1,41 @@
|
|||
TARGET pjstun_client.exe
|
||||
TARGETTYPE exe
|
||||
UID 0x0 0xA000000A
|
||||
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
SOURCEPATH ..\pjnath\src\pjstun-client
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// PJSTUN-CLIENT files
|
||||
|
||||
SOURCE client_main.c
|
||||
|
||||
//SOURCE main_symbian.cpp
|
||||
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjnath\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
#if defined(PJ_BUILD_DLL)
|
||||
MACRO PJ_DLL
|
||||
LIBRARY pjnath.lib pjlib_util.lib pjlib.lib
|
||||
#else
|
||||
STATICLIBRARY pjnath.lib pjlib_util.lib pjlib.lib
|
||||
#endif
|
||||
|
||||
LIBRARY esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
|
||||
#ifdef WINSCW
|
||||
STATICLIBRARY eexe.lib ecrt0.lib
|
||||
#endif
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET pjsua_lib.dll
|
||||
TARGETTYPE dll
|
||||
|
||||
UID 0x0 0xA000000B
|
||||
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjsip_ua.lib pjsip_simple.lib pjsip.lib pjmedia.lib null_audio.lib pjsdp.lib pjnath.lib pjlib_util.lib pjlib.lib esock.lib insock.lib charconv.lib euser.lib estlib.lib
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\pjsua_lib.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET pjsua_lib.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjsip\src\pjsua-lib
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Must compile as C++, otherwise exception would not work
|
||||
OPTION CW -lang c++
|
||||
OPTION ARMCC --cpp --gnu
|
||||
OPTION GCC -x c++
|
||||
OPTION GCCE -x c++
|
||||
|
||||
// PJLIB-UTIL files
|
||||
|
||||
SOURCE pjsua_acc.c
|
||||
SOURCE pjsua_aud.c
|
||||
SOURCE pjsua_call.c
|
||||
SOURCE pjsua_core.c
|
||||
SOURCE pjsua_dump.c
|
||||
SOURCE pjsua_im.c
|
||||
SOURCE pjsua_media.c
|
||||
SOURCE pjsua_pres.c
|
||||
SOURCE pjsua_vid.c
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjlib-util\include
|
||||
SYSTEMINCLUDE ..\pjnath\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
SYSTEMINCLUDE ..\pjsip\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
EXPORTS
|
||||
pjsua_acc_add @ 1 NONAME
|
||||
pjsua_acc_add_local @ 2 NONAME
|
||||
pjsua_acc_config_default @ 3 NONAME
|
||||
pjsua_acc_config_dup @ 4 NONAME
|
||||
pjsua_acc_create_request @ 5 NONAME
|
||||
pjsua_acc_create_uac_contact @ 6 NONAME
|
||||
pjsua_acc_create_uas_contact @ 7 NONAME
|
||||
pjsua_acc_del @ 8 NONAME
|
||||
pjsua_acc_enum_info @ 9 NONAME
|
||||
pjsua_acc_find_for_incoming @ 10 NONAME
|
||||
pjsua_acc_find_for_outgoing @ 11 NONAME
|
||||
pjsua_acc_get_count @ 12 NONAME
|
||||
pjsua_acc_get_default @ 13 NONAME
|
||||
pjsua_acc_get_info @ 14 NONAME
|
||||
pjsua_acc_is_valid @ 15 NONAME
|
||||
pjsua_acc_modify @ 16 NONAME
|
||||
pjsua_acc_set_default @ 17 NONAME
|
||||
pjsua_acc_set_online_status @ 18 NONAME
|
||||
pjsua_acc_set_online_status2 @ 19 NONAME
|
||||
pjsua_acc_set_registration @ 20 NONAME
|
||||
pjsua_acc_set_transport @ 21 NONAME
|
||||
pjsua_buddy_add @ 22 NONAME
|
||||
pjsua_buddy_config_default @ 23 NONAME
|
||||
pjsua_buddy_del @ 24 NONAME
|
||||
pjsua_buddy_get_info @ 25 NONAME
|
||||
pjsua_buddy_is_valid @ 26 NONAME
|
||||
pjsua_buddy_subscribe_pres @ 27 NONAME
|
||||
pjsua_buddy_update_pres @ 28 NONAME
|
||||
pjsua_call_answer @ 29 NONAME
|
||||
pjsua_call_dial_dtmf @ 30 NONAME
|
||||
pjsua_call_dump @ 31 NONAME
|
||||
pjsua_call_get_conf_port @ 32 NONAME
|
||||
pjsua_call_get_count @ 33 NONAME
|
||||
pjsua_call_get_info @ 34 NONAME
|
||||
pjsua_call_get_max_count @ 35 NONAME
|
||||
pjsua_call_get_rem_nat_type @ 36 NONAME
|
||||
pjsua_call_get_user_data @ 37 NONAME
|
||||
pjsua_call_hangup @ 38 NONAME
|
||||
pjsua_call_hangup_all @ 39 NONAME
|
||||
pjsua_call_has_media @ 40 NONAME
|
||||
pjsua_call_is_active @ 41 NONAME
|
||||
pjsua_call_make_call @ 42 NONAME
|
||||
pjsua_call_reinvite @ 43 NONAME
|
||||
pjsua_call_send_im @ 44 NONAME
|
||||
pjsua_call_send_request @ 45 NONAME
|
||||
pjsua_call_send_typing_ind @ 46 NONAME
|
||||
pjsua_call_set_hold @ 47 NONAME
|
||||
pjsua_call_set_user_data @ 48 NONAME
|
||||
pjsua_call_update @ 49 NONAME
|
||||
pjsua_call_xfer @ 50 NONAME
|
||||
pjsua_call_xfer_replaces @ 51 NONAME
|
||||
pjsua_codec_get_param @ 52 NONAME
|
||||
pjsua_codec_set_param @ 53 NONAME
|
||||
pjsua_codec_set_priority @ 54 NONAME
|
||||
pjsua_conf_add_port @ 55 NONAME
|
||||
pjsua_conf_adjust_rx_level @ 56 NONAME
|
||||
pjsua_conf_adjust_tx_level @ 57 NONAME
|
||||
pjsua_conf_connect @ 58 NONAME
|
||||
pjsua_conf_disconnect @ 59 NONAME
|
||||
pjsua_conf_get_active_ports @ 60 NONAME
|
||||
pjsua_conf_get_max_ports @ 61 NONAME
|
||||
pjsua_conf_get_port_info @ 62 NONAME
|
||||
pjsua_conf_get_signal_level @ 63 NONAME
|
||||
pjsua_conf_remove_port @ 64 NONAME
|
||||
pjsua_config_default @ 65 NONAME
|
||||
pjsua_config_dup @ 66 NONAME
|
||||
pjsua_create @ 67 NONAME
|
||||
pjsua_destroy @ 68 NONAME
|
||||
pjsua_detect_nat_type @ 69 NONAME
|
||||
pjsua_dump @ 70 NONAME
|
||||
pjsua_enum_accs @ 71 NONAME
|
||||
pjsua_enum_buddies @ 72 NONAME
|
||||
pjsua_enum_calls @ 73 NONAME
|
||||
pjsua_enum_codecs @ 74 NONAME
|
||||
pjsua_enum_conf_ports @ 75 NONAME
|
||||
pjsua_enum_snd_devs @ 76 NONAME
|
||||
pjsua_enum_transports @ 77 NONAME
|
||||
pjsua_get_buddy_count @ 78 NONAME
|
||||
pjsua_get_ec_tail @ 79 NONAME
|
||||
pjsua_get_nat_type @ 80 NONAME
|
||||
pjsua_get_pjmedia_endpt @ 81 NONAME
|
||||
pjsua_get_pjsip_endpt @ 82 NONAME
|
||||
pjsua_get_pool_factory @ 83 NONAME
|
||||
pjsua_get_snd_dev @ 84 NONAME
|
||||
pjsua_get_var @ 85 NONAME
|
||||
pjsua_handle_events @ 86 NONAME
|
||||
pjsua_im_send @ 87 NONAME
|
||||
pjsua_im_typing @ 88 NONAME
|
||||
pjsua_init @ 89 NONAME
|
||||
pjsua_logging_config_default @ 90 NONAME
|
||||
pjsua_logging_config_dup @ 91 NONAME
|
||||
pjsua_media_config_default @ 92 NONAME
|
||||
pjsua_media_transports_create @ 93 NONAME
|
||||
pjsua_msg_data_init @ 94 NONAME
|
||||
pjsua_perror @ 95 NONAME
|
||||
pjsua_player_create @ 96 NONAME
|
||||
pjsua_player_destroy @ 97 NONAME
|
||||
pjsua_player_get_conf_port @ 98 NONAME
|
||||
pjsua_player_get_port @ 99 NONAME
|
||||
pjsua_player_set_pos @ 100 NONAME
|
||||
pjsua_playlist_create @ 101 NONAME
|
||||
pjsua_pool_create @ 102 NONAME
|
||||
pjsua_pres_dump @ 103 NONAME
|
||||
pjsua_reconfigure_logging @ 104 NONAME
|
||||
pjsua_recorder_create @ 105 NONAME
|
||||
pjsua_recorder_destroy @ 106 NONAME
|
||||
pjsua_recorder_get_conf_port @ 107 NONAME
|
||||
pjsua_recorder_get_port @ 108 NONAME
|
||||
pjsua_set_ec @ 109 NONAME
|
||||
pjsua_set_no_snd_dev @ 110 NONAME
|
||||
pjsua_set_null_snd_dev @ 111 NONAME
|
||||
pjsua_set_snd_dev @ 112 NONAME
|
||||
pjsua_start @ 113 NONAME
|
||||
pjsua_transport_close @ 114 NONAME
|
||||
pjsua_transport_config_default @ 115 NONAME
|
||||
pjsua_transport_config_dup @ 116 NONAME
|
||||
pjsua_transport_create @ 117 NONAME
|
||||
pjsua_transport_get_info @ 118 NONAME
|
||||
pjsua_transport_register @ 119 NONAME
|
||||
pjsua_transport_set_enable @ 120 NONAME
|
||||
pjsua_verify_sip_url @ 121 NONAME
|
|
@ -0,0 +1,47 @@
|
|||
#if defined(PJ_BUILD_DLL)
|
||||
|
||||
TARGET symbian_audio.dll
|
||||
TARGETTYPE dll
|
||||
UID 0x0 0xA000000C
|
||||
|
||||
CAPABILITY None
|
||||
LIBRARY pjlib.lib charconv.lib euser.lib estlib.lib
|
||||
LIBRARY mediaclientaudiostream.lib
|
||||
LIBRARY mediaclientaudioinputstream.lib
|
||||
|
||||
MACRO PJ_DLL
|
||||
MACRO PJ_EXPORTING
|
||||
|
||||
DEFFILE .\symbian_audio.def
|
||||
|
||||
#else
|
||||
|
||||
TARGET symbian_audio.lib
|
||||
TARGETTYPE lib
|
||||
|
||||
#endif
|
||||
|
||||
SOURCEPATH ..\pjmedia\src\pjmedia
|
||||
|
||||
OPTION CW -lang c++
|
||||
OPTION GCCE -O2 -fno-unit-at-a-time
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
SOURCE nullsound.c
|
||||
SOURCE symbian_sound.cpp
|
||||
SOURCE symbian_sound_aps.cpp
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\server
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\common
|
||||
SYSTEMINCLUDE \epoc32\include\mda\common
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include\mmf\plugin
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
EXPORTS
|
||||
pjmedia_snd_deinit @ 1 NONAME
|
||||
pjmedia_snd_get_dev_count @ 2 NONAME
|
||||
pjmedia_snd_get_dev_info @ 3 NONAME
|
||||
pjmedia_snd_init @ 4 NONAME
|
||||
pjmedia_snd_open @ 5 NONAME
|
||||
pjmedia_snd_open_player @ 6 NONAME
|
||||
pjmedia_snd_open_rec @ 7 NONAME
|
||||
pjmedia_snd_stream_close @ 8 NONAME
|
||||
pjmedia_snd_stream_get_info @ 9 NONAME
|
||||
pjmedia_snd_stream_start @ 10 NONAME
|
||||
pjmedia_snd_stream_stop @ 11 NONAME
|
|
@ -0,0 +1,51 @@
|
|||
#define SND_USE_APS 0
|
||||
#define SND_USE_VAS 0
|
||||
|
||||
TARGET symsndtest.exe
|
||||
TARGETTYPE exe
|
||||
UID 0x0 0xA000000E
|
||||
|
||||
OPTION ARMCC --gnu
|
||||
|
||||
SOURCEPATH ..\pjsip-apps\src\symsndtest
|
||||
|
||||
MACRO PJ_M_I386=1
|
||||
MACRO PJ_SYMBIAN=1
|
||||
|
||||
// Test files
|
||||
|
||||
SOURCE app_main.cpp
|
||||
SOURCE main_symbian.cpp
|
||||
|
||||
START RESOURCE symsndtest_reg.rss
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
END
|
||||
|
||||
SYSTEMINCLUDE ..\pjlib\include
|
||||
SYSTEMINCLUDE ..\pjmedia\include
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
LIBRARY charconv.lib euser.lib estlib.lib
|
||||
LIBRARY esock.lib insock.lib
|
||||
STATICLIBRARY pjmedia_audiodev.lib
|
||||
STATICLIBRARY pjmedia.lib
|
||||
STATICLIBRARY pjlib.lib
|
||||
STATICLIBRARY libresample.lib
|
||||
|
||||
#if SND_USE_APS
|
||||
LIBRARY APSSession2.lib
|
||||
CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD
|
||||
#elif SND_USE_VAS
|
||||
LIBRARY VoIPAudioIntfc.lib
|
||||
CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD
|
||||
#else
|
||||
LIBRARY mediaclientaudiostream.lib
|
||||
LIBRARY mediaclientaudioinputstream.lib
|
||||
CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment
|
||||
#endif
|
||||
|
||||
#ifdef WINSCW
|
||||
STATICLIBRARY eexe.lib ecrt0.lib
|
||||
#endif
|
|
@ -0,0 +1,19 @@
|
|||
; symsndtest.pkg
|
||||
|
||||
; Languages
|
||||
&EN
|
||||
|
||||
; Header
|
||||
#{"symsndtest"},(0xA000000E), 0, 1, 1
|
||||
|
||||
; Platform compatibility
|
||||
[0x101F7961], *, *, *, {"Series60ProductID"}
|
||||
|
||||
; vendor
|
||||
%{"PJSIP"}
|
||||
:"PJSIP"
|
||||
|
||||
; Target
|
||||
"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\symsndtest.exe"-"!:\sys\bin\symsndtest.exe"
|
||||
"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\symsndtest_reg.rSC"-"!:\private\10003a3f\import\apps\symsndtest_reg.rSC"
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
export CC = @CC@
|
||||
export CXX = @CXX@
|
||||
export AR = @AR@
|
||||
export AR_FLAGS = @AR_FLAGS@
|
||||
export LD = @LD@
|
||||
export LDOUT = -o
|
||||
export RANLIB = @RANLIB@
|
||||
|
||||
export OBJEXT := .@OBJEXT@
|
||||
export LIBEXT := .@LIBEXT@
|
||||
export LIBEXT2 := @LIBEXT2@
|
||||
|
||||
export CC_OUT := @CC_OUT@
|
||||
export CC_INC := @CC_INC@
|
||||
export CC_DEF := @CC_DEF@
|
||||
export CC_OPTIMIZE := @CC_OPTIMIZE@
|
||||
export CC_LIB := -l
|
||||
|
||||
export CC_SOURCES :=
|
||||
export CC_CFLAGS := @CC_CFLAGS@
|
||||
export CC_LDFLAGS :=
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
export CC = $(CROSS_COMPILE)gcc -c
|
||||
export AR = $(CROSS_COMPILE)ar rv
|
||||
export LD = $(CROSS_COMPILE)gcc
|
||||
export LDOUT = -o
|
||||
export RANLIB = $(CROSS_COMPILE)ranlib
|
||||
|
||||
export OBJEXT := .o
|
||||
export LIBEXT := .a
|
||||
export LIBEXT2 :=
|
||||
|
||||
export CC_OUT := -o
|
||||
export CC_INC := -I
|
||||
export CC_DEF := -D
|
||||
export CC_OPTIMIZE := -O2
|
||||
export CC_LIB := -l
|
||||
|
||||
export CC_SOURCES :=
|
||||
export CC_CFLAGS := -Wall
|
||||
#export CC_CFLAGS += -Wdeclaration-after-statement
|
||||
#export CC_CXXFLAGS := -Wdeclaration-after-statement
|
||||
export CC_LDFLAGS :=
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
export CC := cl /c /nologo
|
||||
export AR := lib /NOLOGO /OUT:
|
||||
export LD := cl /nologo
|
||||
export LDOUT := /Fe
|
||||
export RANLIB := echo ranlib
|
||||
|
||||
export OBJEXT := .obj
|
||||
export LIBEXT := .lib
|
||||
export LIBEXT2 := .LIB
|
||||
|
||||
export CC_OUT := /Fo
|
||||
export CC_INC := /I
|
||||
export CC_DEF := /D
|
||||
export CC_OPTIMIZE := /Ox
|
||||
export CC_LIB :=
|
||||
|
||||
export CC_SOURCES :=
|
||||
export CC_CFLAGS := /W4 /MT
|
||||
export CC_CXXFLAGS := /GX
|
||||
export CC_LDFLAGS := /MT
|
|
@ -0,0 +1,63 @@
|
|||
#
|
||||
# Include host/target/compiler selection.
|
||||
# This will export CC_NAME, MACHINE_NAME, OS_NAME, and HOST_NAME variables.
|
||||
#
|
||||
include $(PJDIR)/build.mak
|
||||
|
||||
#
|
||||
# Include global compiler specific definitions
|
||||
#
|
||||
include $(PJDIR)/build/cc-$(CC_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include compiler specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include cc-$(CC_NAME).mak
|
||||
|
||||
#
|
||||
# Include auto configured compiler specification.
|
||||
# This will override the compiler settings above.
|
||||
# Currently this is made OPTIONAL, to prevent people
|
||||
# from getting errors because they don't re-run ./configure
|
||||
# after downloading new PJSIP.
|
||||
#
|
||||
-include $(PJDIR)/build/cc-auto.mak
|
||||
|
||||
#
|
||||
# Include global machine specific definitions
|
||||
#
|
||||
include $(PJDIR)/build/m-$(MACHINE_NAME).mak
|
||||
-include m-$(MACHINE_NAME).mak
|
||||
|
||||
#
|
||||
# Include target OS specific definitions
|
||||
#
|
||||
include $(PJDIR)/build/os-$(OS_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include target OS specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include os-$(OS_NAME).mak
|
||||
|
||||
#
|
||||
# Include host specific definitions
|
||||
#
|
||||
include $(PJDIR)/build/host-$(HOST_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include host specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include host-$(HOST_NAME).mak
|
||||
|
||||
#
|
||||
# Include global user configuration, if any
|
||||
#
|
||||
-include $(PJDIR)/user.mak
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
export HOST_MV := mv
|
||||
export HOST_RM := rm -f @@
|
||||
export HOST_RMR := rm -rf @@
|
||||
export HOST_RMDIR := rm -rf @@
|
||||
export HOST_MKDIR := mkdir @@
|
||||
export HOST_EXE := .exe
|
||||
export HOST_PSEP := /
|
||||
|
||||
export HOST_SOURCES :=
|
||||
export HOST_CFLAGS :=
|
||||
export HOST_CXXFLAGS :=
|
||||
export HOST_LDFLAGS := $(CC_LIB)stdc++$(LIBEXT2)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
export HOST_MV := mv
|
||||
export HOST_RM := rm -f @@
|
||||
export HOST_RMR := rm -rf @@
|
||||
export HOST_RMDIR := rm -rf @@
|
||||
export HOST_MKDIR := mkdir -p @@
|
||||
export HOST_EXE := $(HOST_EXE)
|
||||
export HOST_PSEP := /
|
||||
|
||||
export HOST_SOURCES :=
|
||||
export HOST_CFLAGS :=
|
||||
export HOST_CXXFLAGS :=
|
||||
export HOST_LDFLAGS :=
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
export HOST_MV := ren
|
||||
export HOST_RM := if exist @@; del /F /Q @@
|
||||
export HOST_RMR := if exist @@; del /F /Q @@
|
||||
export HOST_RMDIR := if exist @@; rmdir @@
|
||||
export HOST_MKDIR := if not exist @@; mkdir @@
|
||||
export HOST_EXE := .exe
|
||||
export HOST_PSEP := \\
|
||||
|
||||
export HOST_SOURCES :=
|
||||
export HOST_CFLAGS :=
|
||||
export HOST_CXXFLAGS :=
|
||||
export HOST_LDFLAGS :=
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_ALPHA=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_ARMV4=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1 @@
|
|||
# Nothing needs to be defined here
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_I386=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_M68K=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# PowerPC MPC860 specific.
|
||||
# It's a PowerPC without floating point support.
|
||||
#
|
||||
export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1 $(CC_DEF)PJ_HAS_FLOATING_POINT=0 -mcpu=860
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS := -mcpu=860
|
||||
export M_SOURCES :=
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_SPARC=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,4 @@
|
|||
export M_CFLAGS := $(CC_DEF)PJ_M_X86_64=1
|
||||
export M_CXXFLAGS :=
|
||||
export M_LDFLAGS :=
|
||||
export M_SOURCES :=
|
|
@ -0,0 +1,11 @@
|
|||
# @configure_input@
|
||||
|
||||
export OS_CFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CFLAGS@
|
||||
|
||||
export OS_CXXFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CXXFLAGS@
|
||||
|
||||
export OS_LDFLAGS := @LDFLAGS@ @LIBS@
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
export OS_CFLAGS := $(CC_DEF)PJ_DARWINOS=1
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) -framework CoreAudio -lm
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
export OS_CFLAGS := $(CC_DEF)PJ_LINUX=1
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS := -lportaudio-$(TARGET_NAME) -lgsmcodec-$(TARGET_NAME) -lilbccodec-$(TARGET_NAME) -lspeex-$(TARGET_NAME) -lresample-$(TARGET_NAME) $(CC_LIB)pthread$(LIBEXT2) -lm
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# make-mingw.inc: Mingw specific compilation switches.
|
||||
#
|
||||
PALM_OS_SDK_VER := 0x06000000
|
||||
PALM_OS_TARGET_HOST := TARGET_HOST_PALMOS
|
||||
PALM_OS_TARGET_PLATFORM := TARGET_PLATFORM_PALMSIM_WIN32
|
||||
PALM_OS_BUILD_TYPE := BUILD_TYPE_DEBUG
|
||||
PALM_OS_TRACE_OUTPUT := TRACE_OUTPUT_ON
|
||||
PALM_OS_CPU_TYPE := CPU_ARM
|
||||
|
||||
export CROSS_COMPILE :=
|
||||
|
||||
ifeq ($(CC_NAME),gcc)
|
||||
export CFLAGS += -mno-cygwin -fexceptions -frtti
|
||||
endif
|
||||
|
||||
export OS_CFLAGS := $(CC_DEF)PJ_PALMOS=1 \
|
||||
$(CC_DEF)__PALMOS_KERNEL__=1 \
|
||||
$(CC_DEF)__PALMOS__=$(PALM_OS_SDK_VER) \
|
||||
$(CC_DEF)BUILD_TYPE=$(PALM_OS_BUILD_TYPE) \
|
||||
$(CC_DEF)TRACE_OUTPUT=$(PALM_OS_TRACE_OUTPUT) \
|
||||
$(CC_DEF)_SUPPORTS_NAMESPACE=0 \
|
||||
$(CC_DEF)_SUPPORTS_RTTI=0 \
|
||||
$(CC_DEF)TARGET_HOST=$(PALM_OS_TRAGET_HOST) \
|
||||
$(CC_DEF)TARGET_PLATFORM=$(PALM_OS_TARGET_PLATFORM)
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS :=
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# Global OS specific configurations for RTEMS OS.
|
||||
#
|
||||
# Thanks Zetron, Inc and Phil Torre <ptorre@zetron.com> for donating PJLIB
|
||||
# port to RTEMS.
|
||||
#
|
||||
export RTEMS_DEBUG := -ggdb3 -DRTEMS_DEBUG -DDEBUG -qrtems_debug
|
||||
|
||||
export OS_CFLAGS := $(CC_DEF)PJ_RTEMS=1 \
|
||||
-B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS := -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems -lm
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
export OS_CFLAGS := $(CC_DEF)PJ_SUNOS=1
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) \
|
||||
$(CC_LIB)socket$(LIBEXT2) \
|
||||
$(CC_LIB)rt$(LIBEXT2) \
|
||||
$(CC_LIB)nsl$(LIBEXT2) \
|
||||
$(CC_LIB)m$(LIBEXT2)
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
export OS_CFLAGS := $(CC_DEF)PJ_WIN32=1
|
||||
|
||||
export OS_CXXFLAGS :=
|
||||
|
||||
export OS_LDFLAGS := $(CC_LIB)wsock32$(LIBEXT2) \
|
||||
$(CC_LIB)ws2_32$(LIBEXT2)\
|
||||
$(CC_LIB)ole32$(LIBEXT2)\
|
||||
$(CC_LIB)m$(LIBEXT2)
|
||||
|
||||
export OS_SOURCES :=
|
||||
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
ifeq ($(LIBDIR),)
|
||||
LIBDIR = ../lib
|
||||
endif
|
||||
ifeq ($(BINDIR),)
|
||||
BINDIR = ../bin
|
||||
endif
|
||||
|
||||
#
|
||||
# The name(s) of output lib file(s) (e.g. libapp.a).
|
||||
#
|
||||
LIB := $($(APP)_LIB)
|
||||
SHLIB = $($(APP)_SHLIB)
|
||||
SONAME = $($(APP)_SONAME)
|
||||
|
||||
ifeq ($(SHLIB_SUFFIX),so)
|
||||
SHLIB_OPT := -shared -Wl,-soname,$(SHLIB)
|
||||
else ifeq ($(SHLIB_SUFFIX),dylib)
|
||||
SHLIB_OPT := -dynamiclib -undefined dynamic_lookup -flat_namespace
|
||||
else ifeq ($(SHLIB_SUFFIX),dll)
|
||||
SHLIB_OPT := -shared -Wl,-soname,$(SHLIB)
|
||||
else
|
||||
SHLIB_OPT :=
|
||||
endif
|
||||
|
||||
#
|
||||
# The name of output executable file (e.g. app.exe).
|
||||
#
|
||||
EXE = $($(APP)_EXE)
|
||||
|
||||
#
|
||||
# Source directory
|
||||
#
|
||||
SRCDIR = $($(APP)_SRCDIR)
|
||||
|
||||
#
|
||||
# Output directory for object files (i.e. output/target)
|
||||
#
|
||||
OBJDIR = output/$(app)-$(TARGET_NAME)
|
||||
|
||||
ifeq ($(OS_NAME),linux-kernel)
|
||||
export $(APP)_CFLAGS += -DKBUILD_MODNAME=$(app) -DKBUILD_BASENAME=$(app)
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# OBJS is ./output/target/file.o
|
||||
#
|
||||
OBJS = $(foreach file, $($(APP)_OBJS), $(OBJDIR)/$(file))
|
||||
OBJDIRS := $(sort $(dir $(OBJS)))
|
||||
|
||||
#
|
||||
# FULL_SRCS is ../src/app/file1.c ../src/app/file1.S
|
||||
#
|
||||
FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).cc $(SRCDIR)/$(basename $(file)).S)
|
||||
|
||||
#
|
||||
# When generating dependency (gcc -MM), ideally we use only either
|
||||
# CFLAGS or CXXFLAGS (not both). But I just couldn't make if/ifeq to work.
|
||||
#
|
||||
#DEPFLAGS = $($(APP)_CXXFLAGS) $($(APP)_CFLAGS)
|
||||
DEPCFLAGS = $($(APP)_CFLAGS)
|
||||
DEPCXXFLAGS = $($(APP)_CXXFLAGS)
|
||||
|
||||
# Dependency file
|
||||
DEP_FILE := .$(app)-$(TARGET_NAME).depend
|
||||
|
||||
|
||||
print_common:
|
||||
@echo "###"
|
||||
@echo "### DUMPING MAKE VARIABLES (I WON'T DO ANYTHING ELSE):"
|
||||
@echo "###"
|
||||
@echo APP=$(APP)
|
||||
@echo OBJDIR=$(OBJDIR)
|
||||
@echo OBJDIRS=$(OBJDIRS)
|
||||
@echo OBJS=$(OBJS)
|
||||
@echo SRCDIR=$(SRCDIR)
|
||||
@echo FULL_SRCS=$(FULL_SRCS)
|
||||
@echo $(APP)_CFLAGS=$($(APP)_CFLAGS)
|
||||
@echo $(APP)_CXXFLAGS=$($(APP)_CXXFLAGS)
|
||||
@echo $(APP)_LDFLAGS=$($(APP)_LDFLAGS)
|
||||
# @echo DEPFLAGS=$(DEPFLAGS)
|
||||
@echo CC=$(CC)
|
||||
@echo AR=$(AR)
|
||||
@echo AR_FLAGS=$(AR_FLAGS)
|
||||
@echo RANLIB=$(RANLIB)
|
||||
|
||||
print_bin: print_common
|
||||
@echo EXE=$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE))
|
||||
@echo BINDIR=$(BINDIR)
|
||||
|
||||
print_lib: print_common
|
||||
ifneq ($(LIB),)
|
||||
@echo LIB=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB))
|
||||
endif
|
||||
ifneq ($(SHLIB),)
|
||||
@echo SHLIB=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB))
|
||||
endif
|
||||
ifneq ($(SONAME),)
|
||||
@echo SONAME=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME))
|
||||
endif
|
||||
@echo LIBDIR=$(LIBDIR)
|
||||
|
||||
ifneq ($(LIB),)
|
||||
$(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
|
||||
if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi
|
||||
$(AR) $(AR_FLAGS) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
|
||||
ifneq ($(SHLIB),)
|
||||
$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
|
||||
if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi
|
||||
$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) $(SHLIB_OPT)
|
||||
endif
|
||||
|
||||
ifneq ($(SONAME),)
|
||||
$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME)): $(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB))
|
||||
ln -sf $(SHLIB) $@
|
||||
endif
|
||||
|
||||
ifneq ($(EXE),)
|
||||
$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
|
||||
if test ! -d $(BINDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)); fi
|
||||
$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)) \
|
||||
$(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/$(app).o: $(OBJDIRS) $(OBJS)
|
||||
$(CROSS_COMPILE)ld -r -o $@ $(OBJS)
|
||||
|
||||
$(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o | $(OBJDIRS)
|
||||
@echo Creating kbuild Makefile...
|
||||
@echo "# Our module name:" > $(OBJDIR)/Makefile
|
||||
@echo 'obj-m += $(app).o' >> $(OBJDIR)/Makefile
|
||||
@echo >> $(OBJDIR)/Makefile
|
||||
@echo "# Object members:" >> $(OBJDIR)/Makefile
|
||||
@echo -n '$(app)-objs += ' >> $(OBJDIR)/Makefile
|
||||
@for file in $($(APP)_OBJS); do \
|
||||
echo -n "$$file " >> $(OBJDIR)/Makefile; \
|
||||
done
|
||||
@echo >> $(OBJDIR)/Makefile
|
||||
@echo >> $(OBJDIR)/Makefile
|
||||
@echo "# Prevent .o files to be built by kbuild:" >> $(OBJDIR)/Makefile
|
||||
@for file in $($(APP)_OBJS); do \
|
||||
echo ".PHONY: `pwd`/$(OBJDIR)/$$file" >> $(OBJDIR)/Makefile; \
|
||||
done
|
||||
@echo >> $(OBJDIR)/Makefile
|
||||
@echo all: >> $(OBJDIR)/Makefile
|
||||
@echo -e "\tmake -C $(KERNEL_DIR) M=`pwd`/$(OBJDIR) modules $(KERNEL_ARCH)" >> $(OBJDIR)/Makefile
|
||||
@echo Invoking kbuild...
|
||||
$(MAKE) -C $(OBJDIR)
|
||||
|
||||
../lib/$(app).ko: $(LIB) $(OBJDIR)/$(app).ko
|
||||
cp $(OBJDIR)/$(app).ko ../lib
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.m | $(OBJDIRS)
|
||||
$(CC) $($(APP)_CFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c | $(OBJDIRS)
|
||||
$(CC) $($(APP)_CFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S | $(OBJDIRS)
|
||||
$(CC) $($(APP)_CFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/dshowclasses.o: $(SRCDIR)/dshowclasses.cpp | $(OBJDIRS)
|
||||
$(CXX) $($(APP)_CXXFLAGS) -I$(SRCDIR)/../../../third_party/BaseClasses -fpermissive \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp | $(OBJDIRS)
|
||||
$(CXX) $($(APP)_CXXFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cc | $(OBJDIRS)
|
||||
$(CXX) $($(APP)_CXXFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIRS):
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
|
||||
|
||||
$(LIBDIR):
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
|
||||
|
||||
$(BINDIR):
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
|
||||
|
||||
clean:
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR))
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR))
|
||||
ifeq ($(OS_NAME),linux-kernel)
|
||||
rm -f ../lib/$(app).o
|
||||
endif
|
||||
|
||||
gcov-report:
|
||||
for file in $(FULL_SRCS); do \
|
||||
gcov $$file -n -o $(OBJDIR); \
|
||||
done
|
||||
|
||||
realclean: clean
|
||||
ifneq ($(LIB),)
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB)),$(HOST_RM))
|
||||
endif
|
||||
ifneq ($(SHLIB),)
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)),$(HOST_RM))
|
||||
endif
|
||||
ifneq ($(SONAME),)
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME)),$(HOST_RM))
|
||||
endif
|
||||
ifneq ($(EXE),)
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)),$(HOST_RM))
|
||||
endif
|
||||
$(subst @@,$(DEP_FILE),$(HOST_RM))
|
||||
ifeq ($(OS_NAME),linux-kernel)
|
||||
rm -f ../lib/$(app).ko
|
||||
endif
|
||||
|
||||
depend:
|
||||
$(subst @@,$(DEP_FILE),$(HOST_RM))
|
||||
for F in $(FULL_SRCS); do \
|
||||
if test -f $$F; then \
|
||||
echo "$(OBJDIR)/" | tr -d '\n' >> $(DEP_FILE); \
|
||||
if echo $$F | grep -q "\.c[c|pp]"; then \
|
||||
dep="$(CXX) -M $(DEPCXXFLAGS) $$F"; \
|
||||
else \
|
||||
dep="$(CC) -M $(DEPCFLAGS) $$F"; \
|
||||
fi; \
|
||||
if eval $$dep | sed '/^#/d' >> $(DEP_FILE); then \
|
||||
true; \
|
||||
else \
|
||||
echo 'err:' >> $(DEP_FILE); \
|
||||
rm -f $(DEP_FILE); \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
dep: depend
|
||||
|
||||
-include $(DEP_FILE)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue