Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Used IP addresses

Name: Anonymous 2009-03-02 18:05

Anyone got some C code that loops over all used IP addresses?  Can you come up with any special optimizations?  (I need to handle them in the "%u.%u.%u.%u"-form; computations are independant and can be run in parallel)

Name: Anonymous 2009-03-02 20:52

[foldr1 ((++).(++".")) $ map show [a,b,c,d] | a <- [0..255], b <- [0..255], c <- [0..255], d <- [0..255]][/code
[code]map (intercalate "." . map show) . sequence . replicate 4 $ [0..255]

I came

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List