Ignore:
Timestamp:
Oct 25, 2009 9:02:07 AM (15 years ago)
Author:
bennylp
Message:

Initial commit for ticket #950: QoS support:

  • implementation:
    • PJLIB (sock_qos*.*)
  • added QoS support in:
    • SIP UDP transport,
    • SIP TCP transport,
    • media UDP transport (done in pjsua-lib),
    • pjnath ICE stream transport,
    • pjnath STUN socket,
    • pjnath TURN client
  • added QoS options in pjsua-lib:
    • QoS fields in pjsua_transport_config
  • added "--set-qos" parameter in pjsua

Notes:

  • QoS in TLS transport is not yet implemented, waiting for #957
  • build ok on VS6, VS2005 (multiple targets), Carbide, and Mingw
  • no run-time testing yet
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/turn_sock.h

    r2642 r2966  
    2626 */ 
    2727#include <pjnath/turn_session.h> 
     28#include <pj/sock_qos.h> 
    2829 
    2930 
     
    99100 
    100101} pj_turn_sock_cb; 
     102 
     103 
     104/** 
     105 * This structure describes options that can be specified when creating 
     106 * the TURN socket. Application should call #pj_turn_sock_cfg_default() 
     107 * to initialize this structure with its default values before using it. 
     108 */ 
     109typedef struct pj_turn_sock_cfg 
     110{ 
     111    /** 
     112     * QoS traffic type to be set on this transport. When application wants 
     113     * to apply QoS tagging to the transport, it's preferable to set this 
     114     * field rather than \a qos_param fields since this is more portable. 
     115     * 
     116     * Default value is PJ_QOS_TYPE_BEST_EFFORT. 
     117     */ 
     118    pj_qos_type qos_type; 
     119 
     120    /** 
     121     * Set the low level QoS parameters to the transport. This is a lower 
     122     * level operation than setting the \a qos_type field and may not be 
     123     * supported on all platforms. 
     124     * 
     125     * By default all settings in this structure are not set. 
     126     */ 
     127    pj_qos_params qos_params; 
     128 
     129    /** 
     130     * Specify if STUN socket should ignore any errors when setting the QoS 
     131     * traffic type/parameters. 
     132     * 
     133     * Default: PJ_TRUE 
     134     */ 
     135    pj_bool_t qos_ignore_error; 
     136 
     137} pj_turn_sock_cfg; 
     138 
     139 
     140/** 
     141 * Initialize pj_turn_sock_cfg structure with default values. 
     142 */ 
     143PJ_DECL(void) pj_turn_sock_cfg_default(pj_turn_sock_cfg *cfg); 
    101144 
    102145 
     
    115158 *                      UDP are supported. 
    116159 * @param cb            Callback to receive events from the TURN transport. 
    117  * @param options       Option flags, currently this value must be zero. 
     160 * @param setting       Optional settings to be specified to the transport. 
     161 *                      If this parameter is NULL, default values will be 
     162 *                      used. 
    118163 * @param user_data     Arbitrary application data to be associated with 
    119164 *                      this transport. 
     
    128173                                         pj_turn_tp_type conn_type, 
    129174                                         const pj_turn_sock_cb *cb, 
    130                                          unsigned options, 
     175                                         const pj_turn_sock_cfg *setting, 
    131176                                         void *user_data, 
    132177                                         pj_turn_sock **p_turn_sock); 
Note: See TracChangeset for help on using the changeset viewer.