\section{util/dll-src/keepalive.c File Reference}
\label{keepalive_8c}\index{util/dll-src/keepalive.c@{util/dll-src/keepalive.c}}
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$termios.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$sys/time.h$>$}\par
{\tt \#include $<$sys/types.h$>$}\par
{\tt \#include $<$signal.h$>$}\par
{\tt \#include \char`\"{}rcxtty.h\char`\"{}}\par
{\tt \#include \char`\"{}keepalive.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf KEEPALIVE\_\-TIMEOUT\_\-S}\ 3
\item 
\#define {\bf KEEPALIVE\_\-TIMEOUT\_\-US}\ 700000
\item 
\#define {\bf KEEPALIVE\_\-BYTE}\ 0xff
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf keepalive\-Renew} ()
\begin{CompactList}\small\item\em renew keepalive timer \item\end{CompactList}\item 
void {\bf keepalive\-Send} (FILEDESCR fd)
\begin{CompactList}\small\item\em send keepalive byte \& renew keepalive \item\end{CompactList}\item 
void {\bf keepalive\-Handler} (int arg)
\begin{CompactList}\small\item\em keepalive signal handler \item\end{CompactList}\item 
void {\bf keepalive\-Init} (void)
\begin{CompactList}\small\item\em initialize keepalive \item\end{CompactList}\item 
void {\bf keepalive\-Shutdown} ()
\begin{CompactList}\small\item\em shutdown keepalive \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
int {\bf verbose\_\-flag}
\begin{CompactList}\small\item\em display some diagnostics if non-zero \item\end{CompactList}\item 
const char {\bf keepalive\-Byte} = KEEPALIVE\_\-BYTE
\begin{CompactList}\small\item\em the keepalive byte (same as tower power on) \item\end{CompactList}\end{CompactItemize}


\subsection{Define Documentation}
\index{keepalive.c@{keepalive.c}!KEEPALIVE_BYTE@{KEEPALIVE\_\-BYTE}}
\index{KEEPALIVE_BYTE@{KEEPALIVE\_\-BYTE}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define KEEPALIVE\_\-BYTE\ 0xff}\label{keepalive_8c_a2}




Definition at line 46 of file keepalive.c.\index{keepalive.c@{keepalive.c}!KEEPALIVE_TIMEOUT_S@{KEEPALIVE\_\-TIMEOUT\_\-S}}
\index{KEEPALIVE_TIMEOUT_S@{KEEPALIVE\_\-TIMEOUT\_\-S}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define KEEPALIVE\_\-TIMEOUT\_\-S\ 3}\label{keepalive_8c_a0}




Definition at line 44 of file keepalive.c.\index{keepalive.c@{keepalive.c}!KEEPALIVE_TIMEOUT_US@{KEEPALIVE\_\-TIMEOUT\_\-US}}
\index{KEEPALIVE_TIMEOUT_US@{KEEPALIVE\_\-TIMEOUT\_\-US}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define KEEPALIVE\_\-TIMEOUT\_\-US\ 700000}\label{keepalive_8c_a1}




Definition at line 45 of file keepalive.c.

Referenced by keepalive\-Renew().

\subsection{Function Documentation}
\index{keepalive.c@{keepalive.c}!keepaliveHandler@{keepaliveHandler}}
\index{keepaliveHandler@{keepaliveHandler}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void keepalive\-Handler (int {\em arg})\hspace{0.3cm}{\tt  [static]}}\label{keepalive_8c_a7}


keepalive signal handler 



Definition at line 78 of file keepalive.c.

References keepalive\-Send(), and rcx\-FD().

Referenced by keepalive\-Init().\index{keepalive.c@{keepalive.c}!keepaliveInit@{keepaliveInit}}
\index{keepaliveInit@{keepaliveInit}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void keepalive\-Init (void)}\label{keepalive_8c_a8}


initialize keepalive 



Definition at line 86 of file keepalive.c.

References keepalive\-Handler(), keepalive\-Send(), and rcx\-FD().

Referenced by LNPinit().\index{keepalive.c@{keepalive.c}!keepaliveRenew@{keepaliveRenew}}
\index{keepaliveRenew@{keepaliveRenew}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void keepalive\-Renew ()}\label{keepalive_8c_a5}


renew keepalive timer 



Definition at line 54 of file keepalive.c.

References KEEPALIVE\_\-TIMEOUT\_\-US, and NULL.

Referenced by keepalive\-Send(), and lnp\_\-logical\_\-write().\index{keepalive.c@{keepalive.c}!keepaliveSend@{keepaliveSend}}
\index{keepaliveSend@{keepaliveSend}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void keepalive\-Send (FILEDESCR {\em fd})\hspace{0.3cm}{\tt  [static]}}\label{keepalive_8c_a6}


send keepalive byte \& renew keepalive 



Definition at line 65 of file keepalive.c.

References exit(), keepalive\-Byte, keepalive\-Renew(), myperror(), and mywrite().

Referenced by keepalive\-Handler(), and keepalive\-Init().\index{keepalive.c@{keepalive.c}!keepaliveShutdown@{keepaliveShutdown}}
\index{keepaliveShutdown@{keepaliveShutdown}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void keepalive\-Shutdown ()}\label{keepalive_8c_a9}


shutdown keepalive 



Definition at line 94 of file keepalive.c.

\subsection{Variable Documentation}
\index{keepalive.c@{keepalive.c}!keepaliveByte@{keepaliveByte}}
\index{keepaliveByte@{keepaliveByte}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char {\bf keepalive\-Byte} = KEEPALIVE\_\-BYTE\hspace{0.3cm}{\tt  [static]}}\label{keepalive_8c_a4}


the keepalive byte (same as tower power on) 



Definition at line 51 of file keepalive.c.

Referenced by keepalive\-Send().\index{keepalive.c@{keepalive.c}!verbose_flag@{verbose\_\-flag}}
\index{verbose_flag@{verbose\_\-flag}!keepalive.c@{keepalive.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf verbose\_\-flag}}\label{keepalive_8c_a3}


display some diagnostics if non-zero 



Definition at line 70 of file convert.c.