Mailinglist Archive: yast-devel (105 mails)

< Previous Next >
Re: [yast-devel] IP netmask broadcast address calculator
  • From: Lukas Ocilka <lukas.ocilka@xxxxxxx>
  • Date: Fri, 26 Sep 2008 09:43:03 +0200
  • Message-id: <48DC9287.3010306@xxxxxxx>
Johannes Meixner wrote:


I am looking for a "IP address calculator" in YCP.

For example when I have IP address and netmask
I like to get the resulting broadcast address
(not only for 8 16 24 bit netmasks).

Or when I have only a IP host or network address,
I like to get the usual netmask for it
depending on the address block, e.g.
127.x.x.x ->
10.x.x.x ->
192.168.x.x -> (or ?)

What about this:

In particular it would be nice if it accepts the various
ways to specify the netmask, e.g. nnn.nnn.nnn.nnn/mm
versus nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm

I guess there is already code in whatever YCP module
but where is it?



< Previous Next >