diff --git a/docs/book/SUMMARY.md b/docs/book/SUMMARY.md index 80f7df5..762be81 100644 --- a/docs/book/SUMMARY.md +++ b/docs/book/SUMMARY.md @@ -1,7 +1,8 @@ # Summary -- [Introduction](./introduction.md) -- [Libraries](./libraries.md) +# Getting Started + +- [What is NAT64?](./learning/nat64.md) # User Guides diff --git a/docs/book/binaries/protomask.md b/docs/book/binaries/protomask.md index 34749b4..f17dce2 100644 --- a/docs/book/binaries/protomask.md +++ b/docs/book/binaries/protomask.md @@ -1 +1,3 @@ # `protomask` User Guide + +The `protomask` binary is a NAT64 implementation. diff --git a/docs/book/introduction.md b/docs/book/introduction.md deleted file mode 100644 index c6820ff..0000000 --- a/docs/book/introduction.md +++ /dev/null @@ -1,11 +0,0 @@ -# Introduction - -Protomask is a user space [NAT64](https://en.wikipedia.org/wiki/NAT64) implementation geared towards networks that need fast and reliable inter-protocol packet translation. Behind the scenes, protomask uses the [Universal TUN/TAP Device Driver](https://docs.kernel.org/networking/tuntap.html) to translate incoming packets from IPv4 to IPv6 and vice-versa. - -For an overview of the project, see the [website](https://protomask.ewpratten.com) or [GitHub repository](https://github.com/ewpratten/protomask). - -## Table of Contents - -- [Protomask library suite documentation](./libraries.html) -- [Using `protomask`](./binaries/protomask.html) -- [Using `protomask-clat`](./binaries/protomask-clat.html) diff --git a/docs/book/learning/nat64.md b/docs/book/learning/nat64.md new file mode 100644 index 0000000..15e1506 --- /dev/null +++ b/docs/book/learning/nat64.md @@ -0,0 +1,11 @@ +# What is NAT64? + +IPv4 and IPv6 are two different versions of the Internet Protocol that, while being similar in many ways, are not directly compatible (largely due to their differing header structure). + + +## Addressing + +IPv4 addresses are 32-bit numbers (represented as `xxx.xxx.xxx.xxx`), while IPv6 addresses are 128-bit numbers (represented as `xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`). + +When an IPv4 packet is sent from one host to another, the sender embeds both the sending and receiving address into the packet header (just like a destination and return address on physical mail). This means that a packet traveling from `192.0.2.1` to `192.0.2.2` would be marked as such in the packet header: + diff --git a/docs/book/libraries.md b/docs/book/libraries.md deleted file mode 100644 index fa697ca..0000000 --- a/docs/book/libraries.md +++ /dev/null @@ -1,11 +0,0 @@ -# Libraries - -The protomask library suite is a collection of libraries that were originally developed for use in the protomask tool suite, but are also quite useful outside of the scope of this project. - -These libraries are thoroughly documented in their respective docs.rs crate pages: - -- [`easy-tun`: A minimal TUN interface library](https://docs.rs/easy-tun) -- [`fast-nat`: A library designed for highly efficient mapping and lookup of IP address pairs](https://docs.rs/fast-nat) -- [`interproto`: A library for translating packets between protocols](https://docs.rs/interproto) -- [`rfc6052`: A Rust implementation of RFC6052](https://docs.rs/rfc6052) -- [`rtnl`: A high-level wrapper around `rtnetlink`](https://docs.rs/rtnl) \ No newline at end of file