home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 14,284 of 14,669   
   Miquel van Smoorenburg to barmar@alum.mit.edu   
   Re: IPv6 prefix-length struggle   
   02 Dec 16 10:22:24   
   
   From: miquels@netscum.invalid   
      
   In article ,   
   Barry Margolin   wrote:   
   >Ranges are useful for databases. In SQL can write   
   >   
   >WHERE addr BETWEEN range_start AND range_end   
      
   That is indeed how I've often seen it used, but you would need 128-bit   
   integer support for IPv6, and I know of no SQL database that supports   
   that. You might get away with 64-bit integers and storing only the   
   first 64 bits of the IPv6 address. Or store the first and last 64   
   bits seperately, but that gets complicated quick.   
      
   Modern databases (well, postgres) support more than just string /   
   integer / date types: it has 'inet' and 'cidr' types, and special   
   operators for them ('<<' = 'in'). So you can simply write   
      
   SELECT range WHERE addr << range   
      
   Mike.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca