Skip to content

dotemacs/ipcalc.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP calculator in Emacs Lisp

https://melpa.org/packages/ipcalc-badge.svg

Usage

(ipcalc "192.168.0.23/21")

produces a new buffer with:

Address:   192.168.0.23         11000000101010000000000000010111
Netmask:   255.255.248.0 = 21   11111111111111111111100000000000
Wildcard:  0.0.7.255            00000000000000000000011111111111
=>
Network:   192.168.0.0          11000000101010000000000000000000
HostMin:   192.168.0.1          11000000101010000000000000000001
HostMax:   192.168.7.254        11000000101010000000011111111110
Broadcast: 192.168.7.255        11000000101010000000011111111111
Hosts/Net: 2046

Install

The package is to be found on MELPA.

If using use-package:

(use-package ipcalc
  :ensure t)

Test

To execute tests, either open the file ./ipcalc-tests.el and execute an (eval-buffer), or run them in batch mode with the command make test