% file miscwork-bm.tex, which is \input from bismon-doc.tex
\section{Miscellanous work}
\label{sec:miscwork}

\subsection{Contributions to other free software projects}

\label{subsec:contribfree}
This is related to subtask ST1.3.2 of \textsc{Chariot} GA.

\subsubsection{Aborted contribution to \texttt{libonion}}
\label{subsubsec:contriblibonion}
The \texttt{libonion} library is a free software HTTP server library
(LGPLv3 licensed) that is used in \texttt{bismon} for its web service
feature. See its web site \bmurl{https://www.coralbits.com/libonion/}
for a description, and its source repository
\bmurl{https://github.com/davidmoreno/onion} for more.

The handling of \texttt{SIGTERM} signal (and others) is deemed
unsatifactory. See the opened issue 229 {\relsize{-1}{(on
    \bmurl{https://github.com/davidmoreno/onion/issues/229})}} in
\texttt{libonion}.  We discussed that issue on google group with the
\emph{libonion} community, and came to a disagreement (our design was
considered too complex, but we believe that such a complexity is
needed to avoid bugs in the rare cases of a multi ``\texttt{onion}''
application, which \texttt{bismon} is not).

Independently of that issue, we improved our \texttt{bismon} to avoid
needing or depending on that \texttt{SIGTERM} feature in
\texttt{libonion} (by using \texttt{signalfd} Linux specific
facilities in \texttt{bismon} itself and passing the
\texttt{O\_NO\_SIGTERM} flag to \texttt{onion\_new}...).

So the effort on improving \texttt{SIGTERM} handling in
\texttt{libonion} was concluded.

\subsubsection{Contribution to \emph{GCC}}
\label{subsubsec:contribgcc}
There is no contribution yet to \emph{GCC}, because it is not yet
needed in october 2018. We reserve some effort for future such
contributions, when our \emph{GCC} plugin generator would require
them. In the lucky case where no adaptation of \emph{GCC} plugin
infrastructure is necessary, the effort could be moved to other work
in T1.3 (notably ST1.3.3).

\subsection{Design and implementation of the compiler and linker extension}

\label{subsec:compilinkext}
This is related to subtask ST1.3.4 (and also ST1.3.1) of \textsc{Chariot} GA 

The compiler extensions will be \emph{generated} GCC plugins.

The linker extension will compute some ``cryptographic quality'' hash
code of the C or C++ translation units of the IoT software. Then it
will interact with the blockchain, according to the \emph{\S 6 API for
  Private key related transactions} of the \emph{D1.2 Method for
  coupling preprogrammed private keys on IoT devices with a Blockchain
  system}. That API is a Web API and a C or C++ compatible plain API
or library should be developed, following the tutorial code example of
D1.2.

This chapter will be updated and completed in the upcoming and final
version (in D1.3~\textsuperscript{v2}).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Local Variables: ;;
%% compile-command: "cd ..; ./build-bismon-doc.sh" ;;
%% End: ;;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
