Changeset 1988 for pjproject/trunk/pjnath/include/pjnath/ice_session.h
- Timestamp:
- Jun 6, 2008 2:47:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/ice_session.h
r1654 r1988 130 130 131 131 /** 132 * Forward declaration for checklist. 133 */ 134 typedef struct pj_ice_sess_checklist pj_ice_sess_checklist; 135 136 /** 132 137 * This enumeration describes the type of an ICE candidate. 133 138 */ … … 192 197 193 198 } pj_ice_sess_comp; 199 200 201 /** 202 * Data structure to be attached to internal message processing. 203 */ 204 typedef struct pj_ice_msg_data 205 { 206 unsigned transport_id; 207 pj_bool_t has_req_data; 208 209 union data { 210 struct request_data { 211 pj_ice_sess *ice; 212 pj_ice_sess_checklist *clist; 213 unsigned ckid; 214 } req; 215 } data; 216 } pj_ice_msg_data; 194 217 195 218 … … 205 228 { 206 229 /** 230 * The candidate type, as described in #pj_ice_cand_type enumeration. 231 */ 232 pj_ice_cand_type type; 233 234 /** 235 * Status of this candidate. The value will be PJ_SUCCESS if candidate 236 * address has been resolved successfully, PJ_EPENDING when the address 237 * resolution process is in progress, or other value when the address 238 * resolution has completed with failure. 239 */ 240 pj_status_t status; 241 242 /** 207 243 * The component ID of this candidate. Note that component IDs starts 208 244 * with one for RTP and two for RTCP. In other words, it's not zero 209 245 * based. 210 246 */ 211 pj_uint32_t comp_id; 212 213 /** 214 * The candidate type, as described in #pj_ice_cand_type enumeration. 215 */ 216 pj_ice_cand_type type; 247 pj_uint8_t comp_id; 248 249 /** 250 * Transport ID to be used to send packets for this candidate. 251 */ 252 pj_uint8_t transport_id; 253 254 /** 255 * Local preference value, which typically is 65535. 256 */ 257 pj_uint16_t local_pref; 217 258 218 259 /** … … 384 425 * candidate pairs that an agent will use to generate checks. 385 426 */ 386 typedefstruct pj_ice_sess_checklist427 struct pj_ice_sess_checklist 387 428 { 388 429 /** … … 406 447 pj_timer_entry timer; 407 448 408 } pj_ice_sess_checklist;449 }; 409 450 410 451 … … 431 472 * @param ice The ICE session. 432 473 * @param comp_id ICE component ID. 474 * @param transport_id Transport ID. 433 475 * @param pkt The STUN packet. 434 476 * @param size The size of the packet. … … 437 479 */ 438 480 pj_status_t (*on_tx_pkt)(pj_ice_sess *ice, unsigned comp_id, 481 unsigned transport_id, 439 482 const void *pkt, pj_size_t size, 440 483 const pj_sockaddr_t *dst_addr, … … 447 490 * @param ice The ICE session. 448 491 * @param comp_id ICE component ID. 492 * @param transport_id Transport ID. 449 493 * @param pkt The whole packet. 450 494 * @param size Size of the packet. … … 454 498 */ 455 499 void (*on_rx_data)(pj_ice_sess *ice, unsigned comp_id, 500 unsigned transport_id, 456 501 void *pkt, pj_size_t size, 457 502 const pj_sockaddr_t *src_addr, … … 497 542 498 543 unsigned comp_id; /**< Component ID. */ 544 unsigned transport_id; /**< Transport ID. */ 499 545 500 546 pj_sockaddr src_addr; /**< Source address of request */ … … 553 599 unsigned rcand_cnt; /**< # of remote cand. */ 554 600 pj_ice_sess_cand rcand[PJ_ICE_MAX_CAND]; /**< Array of cand. */ 601 602 /* Array of transport datas */ 603 pj_ice_msg_data tp_data[4]; 555 604 556 605 /* List of eearly checks */ … … 580 629 */ 581 630 PJ_DECL(const char*) pj_ice_get_cand_type_name(pj_ice_cand_type type); 631 632 633 /** 634 * This is a utility function to retrieve the string name for the 635 * particular role type. 636 * 637 * @param role Role type. 638 * 639 * @return The string representation of the role. 640 */ 641 PJ_DECL(const char*) pj_ice_sess_role_name(pj_ice_sess_role role); 582 642 583 643 … … 686 746 * @param ice ICE session instance. 687 747 * @param comp_id Component ID of this candidate. 748 * @param transport_id Transport ID to be used to send packets for this 749 * candidate. 688 750 * @param type Candidate type. 689 751 * @param local_pref Local preference for this candidate, which … … 700 762 PJ_DECL(pj_status_t) pj_ice_sess_add_cand(pj_ice_sess *ice, 701 763 unsigned comp_id, 764 unsigned transport_id, 702 765 pj_ice_cand_type type, 703 766 pj_uint16_t local_pref, … … 798 861 * @param ice The ICE session. 799 862 * @param comp_id Component ID. 863 * @param transport_id Number to identify where this packet was received 864 * from. This parameter will be returned back to 865 * application in \a on_tx_pkt() callback. 800 866 * @param pkt Incoming packet. 801 867 * @param pkt_size Size of incoming packet. … … 807 873 PJ_DECL(pj_status_t) pj_ice_sess_on_rx_pkt(pj_ice_sess *ice, 808 874 unsigned comp_id, 875 unsigned transport_id, 809 876 void *pkt, 810 877 pj_size_t pkt_size,
Note: See TracChangeset
for help on using the changeset viewer.