According to http://www.openser.org/docs/OpenSER_Database_Structure.html the ip_addr column of the gw table is int.
Am I missing something obvious? How does the IP address (e.g. 127.0.0.1) get stored in such a column?
Regards
Cameron
Check the openserctl script. And the structure evolved between 1.2 and 1.3.
Regards, Ovidiu Sas
On Dec 27, 2007 10:23 PM, CSB kjcsb@xnet.co.nz wrote:
According to http://www.openser.org/docs/OpenSER_Database_Structure.html the ip_addr column of the gw table is int.
Am I missing something obvious? How does the IP address (e.g. 127.0.0.1) get stored in such a column?
Regards
Cameron _______________________________________________ Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Check the openserctl script. And the structure evolved between 1.2 and 1.3.
Thanks for the tip
I'm on 1.1 and the IP needs to be converted to integer format for storage in the database. Curiously this seems to be done in reverse order. For example the IP 127.0.0.1 is stored as 16777343 i.e. (1 * 256^3) + (0 * 256^2) + (0 * 256) + (127) rather than 2130706433 (127 * 256^3) + (0 * 256^2) + (0 * 256) + (1) see http://www.aboutmyip.com/AboutMyXApp/IP2Integer.jsp
Cameron