Menu

#71 how the ip was stored in database?

version 0.8
closed
nobody
None
1
2014-04-11
2014-04-04
Anonymous
No

hi,

how the ip was stored in database?
I want to clone a virtual machine, and assign a free IP address automatically.
but when I look in the database given ip are not written clearly but via code numbers,
for example 3334445555.
can you explain to me how is the information stored? or how to translate it?
or better yet, how to list the free ip to a text file;-)

thks in advance

remi

Discussion

  • Anonymous

    Anonymous - 2014-04-07

    Hi, it is written in decimal. Mysql has native functions inet_aton and inet_ntoa to convert, but I believe ipv6 is not supported.

    You can use ip2long/long2ip as Orkhan suggested in php, but they are also only for ipv4.

    brm

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-04-11
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.