|
IP addresses are stored in the database as unsigned 32-bit integers. This format allows for more efficient storage as well as complex queries involving network masks. The database schema stores IP addresses in four fields: iphdr.ip_src, iphdr.ip_dst, acid_event.ip_src, acid_event.ip_dst . The following is a description of how to convert a 32-bit unsigned integer representation of an IP address into a human readable 4-byte format. [Theoretical] Let IP = the 32-bit unsigned integer representation of the IP address ip1 = octet 1 of 4 (high-order) ip2 = octet 2 of 4 ip3 = octet 3 of 4 ip4 = octet 4 of 4 (low-order) >> = bitwise shift right operator; takes an operand of the number bits to shift AND = bitwise AND operator Then, ip1 = IP >> 24 ip2 = (IP AND 00000000 11111111 00000000 00000000) >> 16 ip3 = (IP AND 00000000 00000000 11111111 00000000) >> 8 ip4 = (IP AND 00000000 00000000 00000000 11111111) IP = ip1 . ip2 . ip3 . ip4 [MySQL] MySQL provides a native function, inet_ntoa(), which ...
more
|
How are IP addresses stored?
Related Questions
- Yes. Covad also offers an option of 5 fixed IP addresses for Business DSL customers for an additional $10 per ...
- The Rackspace Cloud's all about making your life easier. One way we do that is handling all of the IP address ...
- If you wish to filter out requests for specific profile only you can use an exclude "Host" filter. You can ...
- In order to get reports based on user names, you must you must configure and enable authentication in iPrism. ...
- A ’Static’ IP Address can be provided as an option with any of the ADSL packages, this means that a computer ...