Re: About the Radius protocol source code

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

 



Please imagine that you are building a RADIUS server. You are receiving
attributes from two different hosts - let's say Intel x86 and SPARC.
If we do not perform the byte ordering, the server would receive two different
attributes for the same integer value.
Besides the RADIUS standard defines clearly that it expects integers in big-endian
order.
If you want to send integer in the natural order for a given machine, just use something
like:

RadiusAttr( type, &myint, sizeof(myint) )

and pass raw data pointer to the constructor.

----- Original Message ----- 
From: "Kevin Cai" <googol4u@yahoo.com.cn>
Sent: Thursday, November 27, 2003 4:10 AM


> Something about the source code in radproto.cxx
[CUT]
> Is it necessary to do a byte-ordering change (htonl)  to the value "intValue" in this function? why? 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
List: Openh323gk-users@lists.sourceforge.net
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

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

  Powered by Linux