Skip to content

Commit

Permalink
wip nat docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewpratten committed Aug 5, 2023
1 parent 32f1447 commit 70a3ddb
Show file tree
Hide file tree
Showing 4 changed files with 1,302 additions and 1 deletion.
8 changes: 7 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ create-missing = true
[output.html]
mathjax-support = true
git-repository-url = "https://github.com/ewpratten/protomask"
site-url = "/book/"
site-url = "/book/"
additional-js = ["docs/book/mermaid/mermaid.min.js", "docs/book/mermaid/mermaid-init.js"]

[preprocessor]

[preprocessor.mermaid]
command = "mdbook-mermaid"
12 changes: 12 additions & 0 deletions docs/book/learning/nat64.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ IPv4 addresses are 32-bit numbers (represented as `xxx.xxx.xxx.xxx`), while IPv6

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:

```mermaid
graph LR
HostA((Host A)) -->|src: 192.0.2.1\ndst: 192.0.2.2| HostB((Host B))
```

And a response to that packet would be marked with the opposite addresses:

```mermaid
graph RL
HostB((Host B)) -->|src: 192.0.2.2\ndst: 192.0.2.1| HostA((Host A))
```

1 change: 1 addition & 0 deletions docs/book/mermaid/mermaid-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mermaid.initialize({startOnLoad:true});
1,282 changes: 1,282 additions & 0 deletions docs/book/mermaid/mermaid.min.js

Large diffs are not rendered by default.

0 comments on commit 70a3ddb

Please sign in to comment.