aboutsummaryrefslogtreecommitdiff
path: root/summary/src/ctga/img/parser.tex
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2024-10-15 16:08:16 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2024-10-15 16:08:16 +0200
commit385cc92bc91e1a6c3724085c060e76bf40c13ed3 (patch)
tree26d0a8f81f2caa472830fd40a51844bb202c1355 /summary/src/ctga/img/parser.tex
Import PhD thesis
Diffstat (limited to 'summary/src/ctga/img/parser.tex')
-rw-r--r--summary/src/ctga/img/parser.tex66
1 files changed, 66 insertions, 0 deletions
diff --git a/summary/src/ctga/img/parser.tex b/summary/src/ctga/img/parser.tex
new file mode 100644
index 0000000..dba221b
--- /dev/null
+++ b/summary/src/ctga/img/parser.tex
@@ -0,0 +1,66 @@
+\resizebox{\columnwidth}{!}{%
+\begin{tikzpicture}[%
+ -latex,
+ sibling distance=10em,
+ level distance=22pt,
+ parser/.style = {%
+ draw,
+ shape=rectangle,
+ rounded corners,
+ align=center,
+ top color=white,
+ bottom color=mydblue!20,
+ },
+ label/.style = {%
+ draw=none,
+ align=center,
+ text=mydblue,
+ font=\scriptsize,
+ },
+ arrow/.style = {%
+ draw,
+ -latex,
+ rounded corners,
+ },
+]
+
+ \node[parser](eth){Ethernet};
+ \node[parser,right=of eth](udp){UDP};
+ \coordinate(ip) at ($ (eth) !.5! (udp) $);
+ \node[parser,above=of ip](ipv4){IPv4};
+ \node[parser,below=of ip](ipv6){IPv6};
+
+ \node[parser,right=of udp](dns){DNS};
+ \node[parser](dnsp) at ($ (dns) + (1,1.1) $){preamble};
+ \node[parser](dnsq) at ($ (dns) + (2.25,.45) $){domain name};
+ \node[parser](dnst) at ($ (dns) + (2.25,-.45) $){query type};
+ \node[parser](dnsc) at ($ (dns) + (1,-1.1) $){query class};
+
+ \path[arrow] ($ (eth) + (-1.25,0) $) -- node[left,pos=0]{\texttt{pkt\_in}} (eth);
+
+ \path[arrow] (eth) |- node[label,above left,pos=1]{\texttt{type=0x0800}} (ipv4);
+ \path[arrow] (eth) |- node[label,below left,pos=1]{\texttt{type=0x86DD}} (ipv6);
+ \path[arrow] (ipv4) -| node[label,above right, pos=0]{\texttt{proto=0x17}} (udp);
+ \path[arrow] (ipv6) -| node[label,below right, pos=0]{\texttt{proto=0x17}} (udp);
+ \path[arrow] (udp) -- node[label,above]{\texttt{sport=53}} (dns);
+
+ \path[arrow,dashed] (dns) |- (dnsp);
+ \path[arrow,dashed] (dnsp) -| node[label,above right,pos=0]{\texttt{qd=an=1}} (dnsq);
+ \path[arrow,dashed] (dnsq) -- node[label,right]{\texttt{known log}} (dnst);
+ \path[arrow,dashed] (dnst) |- node[label,below right,pos=1]{\texttt{TXT}} (dnsc);
+ \path[arrow,dashed]
+ (dnsq) edge[out=5, in=355, looseness=8]
+ node[label,right]{
+ \begin{tabular}{c}
+ variable \\
+ length
+ \end{tabular}
+ }
+ (dnsq);
+ \path[arrow,dashed]
+ (dnsc) --
+ node[label,below right,pos=.8]{\texttt{IN}}
+ node[pos=1.2,rotate=90]{\texttt{clone}}
+ ($ (dnsc) + (-1.5,0) $);
+\end{tikzpicture}
+}