diff options
Diffstat (limited to 'pjnath/include/pjnath/stun_msg.h')
-rw-r--r-- | pjnath/include/pjnath/stun_msg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjnath/include/pjnath/stun_msg.h b/pjnath/include/pjnath/stun_msg.h index 15114808..5cf0f6c9 100644 --- a/pjnath/include/pjnath/stun_msg.h +++ b/pjnath/include/pjnath/stun_msg.h @@ -872,11 +872,17 @@ typedef struct pj_stun_uint_attr pj_stun_channel_number_attr; /** * Get 16bit channel number from 32bit integral value. + * Note that uint32 attributes are always stored in host byte order + * after they have been parsed from the PDU, so no need to do ntohs() + * here. */ #define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16)) /** * Convert 16bit channel number into 32bit integral value. + * Note that uint32 attributes will be converted to network byte order + * when the attribute is written to packet, so no need to do htons() + * here. */ #define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16) |