About the Radius protocol source code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Something about the source code in radproto.cxx

RadiusAttr::RadiusAttr(
        unsigned char attrType, /// Attribute Type (see #enum AttrTypes#)
        int intValue /// 32 bit integer to be stored in the attribute Value
        )
{
        data[0] = attrType;
        data[1] = FixedHeaderLength + 4;

        if( attrType == VendorSpecific )
                PAssertAlways( PInvalidParameter );

        data[FixedHeaderLength+0] = (BYTE)((intValue>>24) & 0xff);
        data[FixedHeaderLength+1] = (BYTE)((intValue>>16) & 0xff);
        data[FixedHeaderLength+2] = (BYTE)((intValue>>8) & 0xff);
        data[FixedHeaderLength+3] = (BYTE)(intValue & 0xff);
}

Is it necessary to do a byte-ordering change (htonl)  to the value "intValue" in this function? why? 
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÓ†+ù޵隊X¬²š'²ŠÞu¼ÿH_çzÑ¢½æÚrCë¢Ú›ðèzĨº·Šà{ùÞ¶¥§*.m騭êk¡Ûœ¶+Þü:²+azZr¢ç+y«^mëmz·(uïÒDLq9QÿjwazZn²¥¥ƒ”ü)brAÞ­ïá¶Úÿÿû(º·~Šà{ùÞ·÷h?«^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.+-üê^žöÞ	ÿºÇ«³ùb²Ûÿ²‹«qçè®ÿ?ë@­Èb½ïá¶Úÿÿû(º·~Šà{ùÞ·ùšŠV«r¯{÷è®éÿ¦ÿ~Šî›ø?ôz&z– {øm¶Ÿÿÿ0þ	î‚Oè


[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux