2021-01-29 14:45:21 +00:00
|
|
|
%!TEX root = ../thesis.tex
|
|
|
|
% ********************** Thesis Appendix A - Language Samples *************************
|
|
|
|
|
|
|
|
\chapter{Language Samples}
|
|
|
|
\label{appendix:language-samples}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\inputminted[firstline=1,lastline=48]{cpp}{Preparation/Samples/main.cpp}
|
|
|
|
\caption{A sample script written in C++ to collect packets from a TUN interface and print them from multiple threads}
|
|
|
|
\label{fig:cpp-tun-sample}
|
|
|
|
\end{figure}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\ContinuedFloat
|
2021-01-29 17:44:39 +00:00
|
|
|
\inputminted[firstline=49]{cpp}{Preparation/Samples/main.cpp}
|
2021-01-29 14:45:21 +00:00
|
|
|
\end{figure}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\inputminted{rust}{Preparation/Samples/main.rs}
|
|
|
|
\caption{A sample script written in Rust to collect packets from a TUN interface and print them from multiple threads}
|
|
|
|
\label{fig:rust-tun-sample}
|
|
|
|
\end{figure}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\inputminted{go}{Preparation/Samples/main.go}
|
|
|
|
\caption{A sample script written in Go to collect packets from a TUN interface and print them from multiple threads}
|
|
|
|
\label{fig:go-tun-sample}
|
|
|
|
\end{figure}
|