Ignore:
Timestamp:
Aug 7, 2012 2:18:15 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1412: Account specific NAT settings: STUN, ICE, and TURN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_transport.h

    r4173 r4218  
    10771077 * the transport type in the request. 
    10781078 * 
     1079 * @see pjsip_tpmgr_find_local_addr2() 
     1080 * 
    10791081 * @param tpmgr     The transport manager. 
    10801082 * @param pool      Pool to allocate memory for the IP address. 
     
    10921094                                                  pj_str_t *ip_addr, 
    10931095                                                  int *port); 
     1096 
     1097/** 
     1098 * Parameter for pjsip_tpmgr_find_local_addr2() function. 
     1099 */ 
     1100typedef struct pjsip_tpmgr_fla2_param 
     1101{ 
     1102    /** 
     1103     * Specify transport type to use. This must be set. 
     1104     */ 
     1105    pjsip_transport_type_e       tp_type; 
     1106 
     1107    /** 
     1108     * Optional pointer to preferred transport, if any. 
     1109     */ 
     1110    const pjsip_tpselector      *tp_sel; 
     1111 
     1112    /** 
     1113     * Destination host, if known. The destination host is needed 
     1114     * if \a local_if field below is set. 
     1115     */ 
     1116    pj_str_t                     dst_host; 
     1117 
     1118    /** 
     1119     * Specify if the function should return which local interface 
     1120     * to use for the specified destination in \a dst_host. By definition, 
     1121     * the returned address will always be local interface address. 
     1122     */ 
     1123    pj_bool_t                    local_if; 
     1124 
     1125    /** 
     1126     * The returned address. 
     1127     */ 
     1128    pj_str_t                     ret_addr; 
     1129 
     1130    /** 
     1131     * The returned port. 
     1132     */ 
     1133    pj_uint16_t                  ret_port; 
     1134 
     1135    /** 
     1136     * Returned pointer to the transport. Only set if local_if is set. 
     1137     */ 
     1138    const void                  *ret_tp; 
     1139 
     1140} pjsip_tpmgr_fla2_param; 
     1141 
     1142/** 
     1143 * Initialize with default values. 
     1144 * 
     1145 * @param prm       The parameter to be initialized. 
     1146 */ 
     1147PJ_DECL(void) pjsip_tpmgr_fla2_param_default(pjsip_tpmgr_fla2_param *prm); 
     1148 
     1149/** 
     1150 * Find out the appropriate local address info (IP address and port) to 
     1151 * advertise in Contact or Via header header based on the remote address 
     1152 * to be contacted. The local address info would be the address name of the 
     1153 * transport or listener which will be used to send the request. 
     1154 * 
     1155 * @see pjsip_tpmgr_find_local_addr() 
     1156 * 
     1157 * @param tpmgr     The transport manager. 
     1158 * @param pool      Pool to allocate memory for the IP address. 
     1159 * @param param     Function input and output parameters. 
     1160 * 
     1161 * @return          PJ_SUCCESS, or the appropriate error code. 
     1162 */ 
     1163PJ_DECL(pj_status_t) pjsip_tpmgr_find_local_addr2(pjsip_tpmgr *tpmgr, 
     1164                                                  pj_pool_t *pool, 
     1165                                                  pjsip_tpmgr_fla2_param *prm); 
    10941166 
    10951167/** 
Note: See TracChangeset for help on using the changeset viewer.