Skip to content

Commit

Permalink
Add IPToARPA() functions to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Robinson committed May 12, 2019
1 parent 8672c03 commit 3581251
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func main() {

fmt.Println(iplib.IP4ToUint32(ipa)) // 3232235777
ipd := iplib.Uint32ToIP4(iplib.IP4ToUint32(ipa)+20) // ipd is 192.168.1.21
fmt.Println(iplib.IP4ToARPA(ipa)) // 1.1.168.192.in-addr.arpa
}
```

Expand Down Expand Up @@ -116,6 +117,7 @@ func main() {
ipd := iplib.IncrementIP6By(ipa, m) // ipd is 2001:db8::1:0:0

fmt.Println(iplib.DeltaIP6(ipb, ipd)) // 4294967274
fmt.Println(iplib.IP6ToARPA(ipa)) // 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
}

```
Expand Down

0 comments on commit 3581251

Please sign in to comment.