More ticket #485: fixed TURN transport code point and REQUESTED-TRANSPORT attribute encoding

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1880 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2008-03-20 18:26:26 +00:00
parent 9e6d60a564
commit 4d5931ec04
2 changed files with 3 additions and 3 deletions

View File

@ -1024,13 +1024,13 @@ typedef struct pj_stun_uint_attr pj_stun_req_transport_attr;
/**
* Get protocol value from 32bit TURN REQUESTED-TRANSPORT attribute.
*/
#define PJ_STUN_GET_RT_PROTO(u32) (u32 >> 24)
#define PJ_STUN_GET_RT_PROTO(u32) (pj_ntohl(u32) >> 24)
/**
* Convert protocol value to be placed in 32bit TURN REQUESTED-TRANSPORT
* attribute.
*/
#define PJ_STUN_SET_RT_PROTO(proto) (((pj_uint32_t)(proto)) << 24)
#define PJ_STUN_SET_RT_PROTO(proto) pj_htonl(((pj_uint32_t)(proto)) << 24)

View File

@ -58,7 +58,7 @@ typedef struct pj_turn_session pj_turn_session;
/** TURN transport types */
typedef enum pj_turn_tp_type
{
PJ_TURN_TP_UDP = 16, /**< UDP. */
PJ_TURN_TP_UDP = 17, /**< UDP. */
PJ_TURN_TP_TCP = 6, /**< TCP. */
PJ_TURN_TP_TLS = 256 /**< TLS. */
} pj_turn_tp_type;