nanog mailing list archives
Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications"....
From: Måns Nilsson <mansaxel () besserwisser org>
Date: Thu, 29 Nov 2012 18:26:26 +0100
Subject: Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Date: Thu, Nov 29, 2012 at 09:55:19AM -0500 Quoting William Herrin (bill () herrin us):
On Thu, Nov 29, 2012 at 9:01 AM, Ray Soucy <rps () maine edu> wrote:You should store IPv6 as a pair of 64-bit integers. While PHP lacks the function set to do this on its own, it's not very difficult to do.Hi Ray, I have to disagree. In your SQL database you should store addresses as a fixed length character string containing a zero-padded hexadecimal representation of the IPv4 or IPv6 address with A through F forced to the consistent case of your choice. Expand :: and optionally strip the colons entirely. If you want to store a block of addresses, store it as two character strings: start and end of the range.
No, you are both worng. The answer is simple and practical: Use a database that has a modern IP adress database type. Like Postgres. Its IP-adress data types understand and parse both adress strings and network strings (and, of course -- a network with the proper netmask set might be interpreted like a host.) The 32-bit integer trick might, just might make do for IPv4, but a proper data type is so much simpler to use. <non-technical ranting part> Also, stepping away from MySQL or Oracle makes Larry less powerful. </non-technical ranting part> -- Måns Nilsson primary/secondary/besserwisser/machina MN-1334-RIPE +46 705 989668 I am covered with pure vegetable oil and I am writing a best seller!
Attachment:
signature.asc
Description: Digital signature
Current thread:
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications"...., (continued)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Dobbins, Roland (Nov 28)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Bjørn Mork (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Dobbins, Roland (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Bjørn Mork (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Dobbins, Roland (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... . (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Jeroen Massar (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Ray Soucy (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... William Herrin (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Blake Dunlap (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Måns Nilsson (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Ray Soucy (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Steve Clark (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Randy (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... William Herrin (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Mark Andrews (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... William Herrin (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... William Herrin (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Owen DeLong (Nov 30)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Mark Andrews (Nov 29)
- Re: "Programmers can't get IPv6 thus that is why they do not have IPv6 in their applications".... Owen DeLong (Nov 29)