From 284a60cf65523b3a868a58cf2edc97d190a95608 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 27 Apr 2018 00:39:19 +0200 Subject: wip --- slides/images/udp-packet.pgf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 slides/images/udp-packet.pgf (limited to 'slides/images/udp-packet.pgf') diff --git a/slides/images/udp-packet.pgf b/slides/images/udp-packet.pgf new file mode 100644 index 0000000..405f805 --- /dev/null +++ b/slides/images/udp-packet.pgf @@ -0,0 +1,32 @@ +\scalebox{0.5}{ + +\begin{tikzpicture}[ +every node/.style={font=\bfseries} +] + +\path +(-6.5em, 2em) node[draw, rectangle, minimum width=5em, minimum height=2em] {Offsets} +(-6.5em, 0em) node[draw, rectangle, minimum width=5em, minimum height=2em] {Octet} +(-2em, 2em) node[draw, rectangle, minimum width=4em, minimum height=2em] {Octet} +(-2em, 0em) node[draw, rectangle, minimum width=4em, minimum height=2em] {Bit} + +(16em, -2em) node[draw, rectangle, minimum width=32em, minimum height=2em] {source port} +(48em, -2em) node[draw, rectangle, minimum width=32em, minimum height=2em] {destination port} +(16em, -4em) node[draw, rectangle, minimum width=32em, minimum height=2em] {length} +(48em, -4em) node[draw, rectangle, minimum width=32em, minimum height=2em] {checksum} +; + +\foreach \x in {0,...,3} + \node[draw, rectangle, minimum width=16em, minimum height=2em] at (\x * 16em + 8em, 2em) {\scriptsize \x}; +\foreach \x in {0,...,31} + \node[draw, rectangle, minimum width=2em, minimum height=2em] at (\x * 2em + 1em, 0em) {\scriptsize \x}; + +\node[draw, rectangle, minimum width=4em, minimum height=2em] at (-2em, -2em) {\scriptsize 0}; +\node[draw, rectangle, minimum width=4em, minimum height=2em] at (-2em, -4em) {\scriptsize 32}; + +\node[draw, rectangle, minimum width=5em, minimum height=2em] at (-6.5em, -2em) {\scriptsize 0}; +\node[draw, rectangle, minimum width=5em, minimum height=2em] at (-6.5em, -4em) {\scriptsize 4}; + +\end{tikzpicture} + +} -- cgit v1.2.3