Changeset 1877 for pjproject/trunk/pjnath/include/pjnath/stun_session.h
- Timestamp:
- Mar 19, 2008 11:00:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/stun_session.h
r1862 r1877 46 46 /** Forward declaration for pj_stun_tx_data */ 47 47 typedef struct pj_stun_tx_data pj_stun_tx_data; 48 49 /** Forward declaration for pj_stun_rx_data */ 50 typedef struct pj_stun_rx_data pj_stun_rx_data; 48 51 49 52 /** Forward declaration for pj_stun_session */ … … 86 89 * @param pkt Pointer to the original STUN packet. 87 90 * @param pkt_len Length of the STUN packet. 88 * @param msg The parsed STUN request.91 * @param rdata Data containing incoming request message. 89 92 * @param src_addr Source address of the packet. 90 93 * @param src_addr_len Length of the source address. … … 97 100 const pj_uint8_t *pkt, 98 101 unsigned pkt_len, 99 const pj_stun_ msg *msg,102 const pj_stun_rx_data *rdata, 100 103 const pj_sockaddr_t *src_addr, 101 104 unsigned src_addr_len); … … 145 148 146 149 /** 150 * This structure describes incoming request message. 151 */ 152 struct pj_stun_rx_data 153 { 154 /** 155 * The parsed request message. 156 */ 157 pj_stun_msg *msg; 158 159 /** 160 * Credential information that is found and used to authenticate 161 * incoming request. Application may use this information when 162 * generating authentication for the outgoing response. 163 */ 164 pj_stun_req_cred_info info; 165 }; 166 167 168 /** 147 169 * This structure describe the outgoing STUN transmit data to carry the 148 170 * message to be sent. … … 162 184 pj_uint8_t msg_key[12]; /**< Message/transaction key. */ 163 185 164 pj_st r_t auth_key; /**< Auth key.*/186 pj_stun_req_cred_info auth_info; /**< Credential info */ 165 187 166 188 void *pkt; /**< The STUN packet. */ … … 260 282 * 261 283 * @param sess The STUN session instance. 284 * @param auth_type Type of authentication. 262 285 * @param cred The credential to be used by this session. If NULL 263 286 * is specified, authentication will be disabled. … … 265 288 * @return PJ_SUCCESS on success, or the appropriate error code. 266 289 */ 267 PJ_DECL(void) pj_stun_session_set_credential(pj_stun_session *sess, 268 const pj_stun_auth_cred *cred); 290 PJ_DECL(pj_status_t) pj_stun_session_set_credential(pj_stun_session *sess, 291 pj_stun_auth_type auth_type, 292 const pj_stun_auth_cred *cred); 269 293 270 294 /** … … 329 353 */ 330 354 PJ_DECL(pj_status_t) pj_stun_session_create_res(pj_stun_session *sess, 331 const pj_stun_ msg *req,355 const pj_stun_rx_data *rdata, 332 356 unsigned err_code, 333 357 const pj_str_t *err_msg, … … 363 387 * 364 388 * @param sess The STUN session instance. 365 * @param r eqThe STUN request message to be responded.389 * @param rdata The STUN request message to be responded. 366 390 * @param err_code Error code to be set in the response, if error response 367 391 * is to be created, according to pj_stun_status enumeration. … … 383 407 */ 384 408 PJ_DECL(pj_status_t) pj_stun_session_respond(pj_stun_session *sess, 385 const pj_stun_ msg *req,409 const pj_stun_rx_data *rdata, 386 410 unsigned code, 387 411 const char *err_msg,
Note: See TracChangeset
for help on using the changeset viewer.