Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ipfreely-uk committed Jun 18, 2024
1 parent 5dfd43a commit 12135c0
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IP addresses as mathematical types</title>
<title>IP addresses (v4/v6) as mathematical types with arithmetic, bitwise ops, iteration, and arbitrary sets and ranges.</title>
<meta name="description" content="Niche IP address libraries for Java and Go">
<link rel="icon" href="assets/icons/favicon.png">
<link rel="stylesheet" href="assets/css/styles.css" type="text/css">
Expand All @@ -12,11 +12,12 @@

<h1 id="ipfreely">IPFreely.uk <img src="assets/icons/favicon.png" alt="logo"></h1>

<p>Niche open source software libraries that treat IP addresses as mathematical types.</p>
<p><strong>Niche open source software libraries that treat IP addresses as mathematical types.</strong></p>

<p>
Use for arithmetic, bitwise operations, iteration, and arbitrary sets and ranges of IP addresses.
Useful for implementing network element management systems, DOCSIS provisioning systems, etc.
Supports IPv4 &amp; IPv6.
</p>

<p>These libraries do not perform any network I/O but enable conversion to/from standard types that do.
Expand All @@ -36,10 +37,9 @@ <h2 id="example">Example <a href="#example" class="link-symbol" title="implement
netAddr := b.First()
f := netAddr.Family()
inverseMask := netBlock.Mask().Not()

return random(f).And(inverseMask).Or(netAddr)
}

func random[A ip.Address[A]](f ip.Family[A]) (addr A) {
slice := make([]byte, f.Width()/8)
_, _ = rand.Read(slice)
Expand Down Expand Up @@ -114,11 +114,13 @@ <h3>Go</h3>

<p></p>

<nav>
<ul>
<li><a href="https://github.com/ipfreely-uk/docs/blob/main/LICENSE">COPYRIGHT</a></li>
</ul>
</nav>
<footer>
<nav>
<ul>
<li><a href="https://github.com/ipfreely-uk/docs/blob/main/LICENSE">COPYRIGHT</a></li>
</ul>
</nav>
</footer>

</body>
</html>

0 comments on commit 12135c0

Please sign in to comment.