mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 02:34:18 +00:00
5e85c15cd7
Fri Jan 11 09:12:01 EST 2008 Bernhard Suttner <suttner at comdasys.com> * Using # in SOATAG_HOLD to set media as inactive instead of sendonly Fri Jan 11 09:15:18 EST 2008 Pekka.Pessi@nokia.com * soa_tag.c: documented SOATAG_HOLD() inactive mode Fri Jan 11 09:28:46 EST 2008 Pekka.Pessi@nokia.com * su_addrinfo.c: if su_getaddrinfo() service is NULL, try both with "0" and NULL Fri Jan 11 12:11:12 EST 2008 Pekka.Pessi@nokia.com * nta.c: NetModule hack re-prioritizing SRV records Original hack by Stefan Leuenberger <Stefan.Leuenberger@netmodule.com>. The hack reprioritizes the SRV records used with transaction in case a server refuses connection or it does not answer. Thu Jan 17 11:40:46 EST 2008 Pekka Pessi <Pekka.Pessi@nokia.com> * soa_static.c: cleaned inactive hold, added tests Mon Jan 21 14:06:35 EST 2008 Pekka.Pessi@nokia.com * soa.c: using session state in soa_set_activity() The media mode bits are set using (local) session description instead of remote offer/answer when O/A has been completed. Mon Jan 21 14:08:08 EST 2008 Pekka.Pessi@nokia.com * soa_static.c: soa_sdp_mode_set() now includes wanted media state in offer The wanted media state is based on original user SDP and SOATAG_HOLD() content. Removed soa_sdp_mode_set_is_needed(), using dry-run parameter instead. Tue Jan 22 11:15:04 EST 2008 Pekka.Pessi@nokia.com * sip_util.c: updated sip_response_terminates_dialog() as per RFC 5057. Changes handling of 423 in case of SUBSCRIBE. Tue Jan 22 11:35:44 EST 2008 Pekka.Pessi@nokia.com * test_soa.c: testing hold with inactive, offered mode and setting remote activity flags while in hold Tue Jan 22 13:57:38 EST 2008 Pekka.Pessi@nokia.com * sres: added ttl parameter to sres_set_cached_srv_priority() and sres_cache_set_srv_priority(). Tue Jan 22 13:59:44 EST 2008 Pekka.Pessi@nokia.com * nta.c: added NTATAG_GRAYLIST(). Use NTATAG_GRAYLIST() as ttl value for sres_set_cached_srv_priority(). Wed Jan 23 10:07:30 EST 2008 Pekka Pessi <Pekka.Pessi@nokia.com> * soa_static.c: fixed signedness error Wed Jan 23 11:05:23 EST 2008 Pekka.Pessi@nokia.com * nta.c: ignore tags in nta_leg_by_dialog() if they are empty strings Wed Jan 23 11:05:58 EST 2008 Pekka.Pessi@nokia.com * nta.c: asserting in proper place when handling queue tail git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7368 d0543943-73ff-0310-b7d9-9358b9ac24b2
118 lines
3.3 KiB
C
118 lines
3.3 KiB
C
/*
|
|
* This file is part of the Sofia-SIP package
|
|
*
|
|
* Copyright (C) 2005 Nokia Corporation.
|
|
*
|
|
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
* as published by the Free Software Foundation; either version 2.1 of
|
|
* the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
* 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef SOFIA_RESOLV_SRES_CACHE_H
|
|
/** Defined when <sofia-resolv/sres_cache.h> has been included. */
|
|
#define SOFIA_RESOLV_SRES_CACHE_H
|
|
/**
|
|
* @file sofia-resolv/sres_cache.h Sofia DNS Resolver Cache.
|
|
*
|
|
* @author Pekka Pessi <Pekka.Pessi@nokia.com>,
|
|
*
|
|
* @par Include Context
|
|
* @code
|
|
* #include <sys/types.h>
|
|
* #include <sys/socket.h>
|
|
* #include <netinet/in.h>
|
|
* #include <sofia-resolv/sres_cache.h>
|
|
* @endcode
|
|
*
|
|
*/
|
|
|
|
#include "sofia-resolv/sres_config.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifndef SRES_CACHE_T
|
|
#define SRES_CACHE_T
|
|
/** Opaque type of DNS cache object. */
|
|
typedef struct sres_cache sres_cache_t;
|
|
#endif
|
|
|
|
#ifndef SRES_RECORD_T
|
|
#define SRES_RECORD_T
|
|
/** Type representing any DNS record. */
|
|
typedef union sres_record sres_record_t;
|
|
#endif
|
|
|
|
enum {
|
|
/** Cache cleanup interval in seconds. */
|
|
SRES_CACHE_TIMER_INTERVAL = 5,
|
|
#define SRES_CACHE_TIMER_INTERVAL (SRES_CACHE_TIMER_INTERVAL)
|
|
};
|
|
|
|
/** Create a resolver cache object. */
|
|
SRESPUBFUN sres_cache_t *sres_cache_new(int n);
|
|
|
|
/** Increase reference count on a resolver cache object. */
|
|
SRESPUBFUN sres_cache_t *sres_cache_ref(sres_cache_t *);
|
|
|
|
/** Decrease the reference count on a resolver cache object. */
|
|
SRESPUBFUN void sres_cache_unref(sres_cache_t *);
|
|
|
|
/** Get a list of matching records from cache. */
|
|
SRESPUBFUN int sres_cache_get(sres_cache_t *cache,
|
|
uint16_t type,
|
|
char const *domain,
|
|
sres_record_t ***return_cached);
|
|
|
|
/** Free answers not matching with type */
|
|
SRESPUBFUN int sres_cache_filter(sres_cache_t *cache,
|
|
sres_record_t **answers,
|
|
uint16_t type);
|
|
|
|
/** Free the list records. */
|
|
SRESPUBFUN void sres_cache_free_answers(sres_cache_t *, sres_record_t **);
|
|
|
|
/** Free and zero one record. */
|
|
SRESPUBFUN void sres_cache_free_one(sres_cache_t *, sres_record_t *answer);
|
|
|
|
/** Allocate a cache record */
|
|
SRESPUBFUN
|
|
sres_record_t *sres_cache_alloc_record(sres_cache_t *cache,
|
|
sres_record_t const *template,
|
|
size_t extra);
|
|
|
|
/** Free a record that has not been stored. */
|
|
SRESPUBFUN void sres_cache_free_record(sres_cache_t *cache, void *rr);
|
|
|
|
/** Store a record to cache */
|
|
SRESPUBFUN void sres_cache_store(sres_cache_t *, sres_record_t *, time_t now);
|
|
|
|
/** Modify the priority in the specified SRV record */
|
|
SRESPUBFUN int sres_cache_set_srv_priority(sres_cache_t *,
|
|
char const *domain,
|
|
char const *target,
|
|
uint16_t port,
|
|
uint32_t newttl,
|
|
uint16_t newprio);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* SOFIA_RESOLV_SRES_CACHED_H */
|