On 09/11/18 12:32, Steve Litt wrote:
On Tue, 11 Sep 2018 15:28:09 +0000 (UTC)
Stuart Henderson <s...@spacehopper.org> wrote:
On 2018-09-11, Steve Litt <sl...@troubleshooters.com> wrote:
> I've created a downloadable CIDR (Classless Inter-Domain Routing)
> network calculator, whose sole dependency is Python3. It runs in any
> terminal or terminal emulator on any Linux or presumably BSD
> machine.
>
> http://troubleshooters.com/linux/cidr_calc.htm
Doesn't seem to work with the current version of IP ..
$ python3 cidr_calc.py.txt
2a02:8011:7003:1:fab1:56ff:feac:3276/64
IP address (2a02:8011:7003:1:fab1:56ff:feac:3276) not numeric.
USAGE: subnet_calc ipaddr/maskbits
EXAMPLE: subnet_calc 192.168.100.128/28
Yes, it's IPV4 only.
If lots of people want it, I might make it work for IPV6 too.
Thanks,
SteveT
Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
FWIW: a small network calculator without a python dependency is already
in packages.
$> pkg_info ipcalc
Information for inst:ipcalc-1.4p0
Comment:
small network calculator
Description: ipcalc is a small tool that operates on IPv4 networks. It
can operate in one of four modes: network describing, netmask
describing, finding or splitting.
Maintainer: The OpenBSD ports mailing-list <po...@openbsd.org>
WWW: https://github.com/pyr/ipcalc