Skip to content

Commit

Permalink
Allow ipaddr.IPv4.subnetMaskFromPrefixLength(32)
Browse files Browse the repository at this point in the history
Fixes #73
Fixes #64
  • Loading branch information
JamesMGreene authored and whitequark committed Aug 21, 2017
1 parent c2bcc6f commit 7dcaf18
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 70 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ ipaddr.IPv4.parse('255.192.164.0').prefixLengthFromSubnetMask() == null
`subnetMaskFromPrefixLength()` will return an IPv4 netmask for a valid CIDR prefix length.

```js
ipaddr.IPv4.subnetMaskFromPrefixLength("24") == "255.255.255.0"
ipaddr.IPv4.subnetMaskFromPrefixLength("29") == "255.255.255.248"
ipaddr.IPv4.subnetMaskFromPrefixLength(24) == "255.255.255.0"
ipaddr.IPv4.subnetMaskFromPrefixLength(29) == "255.255.255.248"
```

`broadcastAddressFromCIDR()` will return the broadcast address for a given IPv4 interface and netmask in CIDR notation.
Expand Down
2 changes: 1 addition & 1 deletion ipaddr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7dcaf18

Please sign in to comment.