Forum Discussion
Ralf_Bruenig_74
Jun 02, 2008Historic F5 Account
workaround for 32 bit integer limitation
Hi all,
I need to extract the IP address out of the insert cookie. For this I found the following example on your page:
http://devcentral.f5.com/wiki/default.aspx/iRules/Persiste...
Deb_Allen_18
Jun 02, 2008Historic F5 Account
I found an interesting post with some suggestions to force from integer to float - Click here
I guess I'd try forcing to scientific notation first:
Hume Smith gave a clever solution in news:comp.lang.tcl :
append i "e0"
makes it look like scientific notation, meaning "multiplied by 10 to the 0th power, which is 1", which forces the string to a floatstring (i.e. that expr interprets as double) with pure string manipulation.
If I understand the recommendation correctly, you might be able to just change these 2 lines of code:
set myIpH [format %08x $myIpE]
set myPortH [format %x $myPortE]
to this:
set myIpH [format %08x $myIpE]
append "e0" myIpH
set myPortH [format %x $myPortE]
append "e0" myPortH
HTH, and please post back your results and/or update the codeshare with a better soluiton.
thx
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects