2 % Typographic conventions (already applied)
3 % * Each \caption{} should end with a dot
4 % * "Linux traffic control" will be written with lowercase T and C
6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 \documentclass[11pt,abstract]{scrreprt}
9 \usepackage[utf8]{inputenc}
10 % \usepackage[T1]{fontenc}
11 \usepackage[right]{lineno}
14 \usepackage{longtable}
28 \usepackage[draft]{fixme}
36 %\usepackage{multicol}
38 breaklinks = true, %allow links to break over lines
39 pdffitwindow = true, %resize document window to fit document size
41 % linkcolor = darkblue,
42 % citecolor = darkblue,
43 % urlcolor = darkblue,
51 \RecustomVerbatimEnvironment{Verbatim}{Verbatim}{frame=single,framesep=4pt}
54 \setlength{\columnsep}{8mm}
55 \providecommand{\alert}[1]{\textbf{#1}}
57 \title{Linux-Based CAN-Ethernet Gateway}
58 \author{R. Matějka, M. Sojka\\
59 Czech Technical University in Prague}
60 \providecommand{\version}{???}
61 \date{\today\\Version \version}
63 \newcommand{\superscript}[1]{\ensuremath{^{\mathrm{#1}}}}
64 \newcommand{\subscript}[1]{\ensuremath{_{\mathrm{#1}}}}
65 \renewcommand{\th}[0]{\superscript{th}}
66 \renewcommand{\st}[0]{\superscript{st}}
67 \newcommand{\nd}[0]{\superscript{nd}}
68 \newcommand{\rd}[0]{\superscript{rd}}
71 {\begin{vertbar}\begin{itshape}}
72 {\end{itshape}\end{vertbar}}
75 \lstset{language=sh,frame=single,basicstyle=\tt,commentstyle=\itshape\color{gray},columns=flexible}
86 \label{cha:assignment}
88 The goal is to implement CAN-Ethernet gateway based on Linux's AF\_CAN
89 subsystem with the following features:
91 \item Both user- and kernel-space implementations will be developed.
92 User-space one will contain only the most basic functionality.
93 \item Ethernet side will use UDP datagrams to carry the CAN messages.
94 Later it will be extended to support also TCP.
95 \item Initial version will route all CAN frames to Ethernet side and
96 all received UDP datagrams to CAN messages. Later, filtering
97 capabilities will be added.
98 \item UDP frames will contain timestamps of the time when the CAN
100 \item For kernel-based gateway, implement a user-space configuration
101 tool, similar to \texttt{cangw} tool from \texttt{can-utils}.
104 \chapter{Solution design}
106 The canethgw is comprised of CAN and Ethernet interfaces. Both of these
107 interfaces allow to read and write to realize the gateway functionality.
108 But there is a difference in these interfaces from kernel point of view.
110 The CAN part of the gateway is build on can\_rx\_register(...) function,
111 therefore it is receiving events from kernel whenever CAN frame is
112 received on desired netdevice. Sending frames to CAN is implemented
114 \section{Ethernet part}
115 The Ethernet side of the gateway is however implemented using kernel sockets.
116 Kernel thread is created to listen for UDP/TCP messages. The socket interface
117 is also used for sending.
118 \section{Ethernet message format}
119 As there is no standard on how to carry CAN messages over TCP or UDP,
120 the UDP/TCP message format has to be defined.
122 \includegraphics[scale=0.5]{img/eth_msg.pdf}
123 \captionof{figure}{UDP/TCP message.}\label{fig:eth_msg}
125 % \bibliography{can-eth-gw}
126 % \bibliographystyle{IEEEtran}
133 %%% ispell-local-dictionary: american