Ignore:
Timestamp:
Nov 20, 2007 9:47:32 AM (16 years ago)
Author:
bennylp
Message:

Ticket #419: initial support for DNS AAAA resolution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/include/pjlib-util/srv_resolver.h

    r1357 r1587  
    7676 
    7777/** 
     78 * Flags to be specified when starting the DNS SRV query. 
     79 */ 
     80enum pj_dns_srv_option 
     81{ 
     82    /** 
     83     * Specify if the resolver should fallback with DNS A 
     84     * resolution when the SRV resolution fails. This option may 
     85     * be specified together with PJ_DNS_SRV_FALLBACK_AAAA to 
     86     * make the resolver fallback to AAAA if SRV resolution fails, 
     87     * and then to DNS A resolution if the AAAA resolution fails. 
     88     */ 
     89    PJ_DNS_SRV_FALLBACK_A       = 1, 
     90 
     91    /** 
     92     * Specify if the resolver should fallback with DNS AAAA 
     93     * resolution when the SRV resolution fails. This option may 
     94     * be specified together with PJ_DNS_SRV_FALLBACK_A to 
     95     * make the resolver fallback to AAAA if SRV resolution fails, 
     96     * and then to DNS A resolution if the AAAA resolution fails. 
     97     */ 
     98    PJ_DNS_SRV_FALLBACK_AAAA    = 2, 
     99 
     100    /** 
     101     * Specify if the resolver should try to resolve with DNS AAAA 
     102     * resolution first of each targets in the DNS SRV record. If 
     103     * this option is not specified, the SRV resolver will query 
     104     * the DNS A record for the target instead. 
     105     */ 
     106    PJ_DNS_SRV_RESOLVE_AAAA     = 4 
     107 
     108} pj_dns_srv_option; 
     109 
     110 
     111/** 
    78112 * This structure represents DNS SRV records as the result of DNS SRV 
    79113 * resolution using #pj_dns_srv_resolve(). 
     
    86120    /** Address records. */ 
    87121    struct 
    88 v    { 
     122    { 
    89123        /** Server priority (the lower the higher the priority). */ 
    90124        unsigned                priority; 
     
    126160 * @param pool          Memory pool used to allocate memory for the query. 
    127161 * @param resolver      The resolver instance. 
    128  * @param fallback_a    Specify if the resolver should fallback with DNS A 
    129  *                      resolution when the SRV resolution fails. 
     162 * @param option        Option flags, which can be constructed from 
     163 *                      #pj_dns_srv_option bitmask. Note that this argument 
     164 *                      was called "fallback_a" in pjsip version 0.8.0 and 
     165 *                      older, but the new option should be backward  
     166 *                      compatible with existing applications. If application 
     167 *                      specifies PJ_TRUE as "fallback_a" value, it will 
     168 *                      correspond to PJ_DNS_SRV_FALLBACK_A option. 
    130169 * @param token         Arbitrary data to be associated with this query when 
    131170 *                      the calback is called. 
     
    143182                                        pj_pool_t *pool, 
    144183                                        pj_dns_resolver *resolver, 
    145                                         pj_bool_t fallback_a, 
     184                                        unsigned option, 
    146185                                        void *token, 
    147186                                        pj_dns_srv_resolver_cb *cb, 
Note: See TracChangeset for help on using the changeset viewer.