IP Math anyone?

Remco Gerlich scarblac at pino.selwerd.nl
Tue Feb 27 09:08:09 CET 2001


Erno Kuusela <erno-news at erno.iki.fi> wrote in comp.lang.python:
> In article <mailman.983221028.6007.python-list at python.org>, Timothy
> Grant <tjg at exceptionalminds.com> writes:
> 
> | Hi all,
> | I checked Parnassus, but couldn't find anything, so I'll ask
> | here. Has anyone done anything with IP math (e.g.,
> | 192.168.0.254 + 1 = 192.168.1.1).
> 
> assuming you actually mean 192.168.0.254 + 1 = 192.168.0.255,

He doesn't; .0.255 and .1.0 are not IP addresses you could give to a machine.
I've never seen existing code for this, seems to need some custom hacking.

(I don't know if .255 and .0 are the only exceptions, probably not).

-- 
Remco Gerlich




More information about the Python-list mailing list