\hypertarget{lirc__client_8c}{}\section{/home/mk/tmp/lirc/lib/lirc\+\_\+client.c File Reference}
\label{lirc__client_8c}\index{/home/mk/tmp/lirc/lib/lirc\+\_\+client.\+c(c8c0320 2017-\/01-\/23 04\+:20\+:18 +0100)@{/home/mk/tmp/lirc/lib/lirc\+\_\+client.\+c(c8c0320 2017-\/01-\/23 04\+:20\+:18 +0100)}}


Implements \hyperlink{lirc__client_8h}{lirc\+\_\+client.\+h}.  


{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$libgen.\+h$>$}\newline
{\ttfamily \#include $<$limits.\+h$>$}\newline
{\ttfamily \#include $<$netdb.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$strings.\+h$>$}\newline
{\ttfamily \#include $<$sys/param.\+h$>$}\newline
{\ttfamily \#include $<$sys/socket.\+h$>$}\newline
{\ttfamily \#include $<$sys/stat.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$sys/time.\+h$>$}\newline
{\ttfamily \#include $<$sys/wait.\+h$>$}\newline
{\ttfamily \#include $<$sys/un.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include \char`\"{}lirc\+\_\+client.\+h\char`\"{}}\newline
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{lirc__client_8c_ae521ac23108a443e4d2c7a59a0d8f04b}{}\label{lirc__client_8c_ae521ac23108a443e4d2c7a59a0d8f04b} 
\#define {\bfseries logprintf}(level,  fmt,  args ...)~syslog(level, fmt, \#\# args)
\item 
\hypertarget{lirc__client_8c_a49ef8059bbf3cba1d8f19d556e094cf2}{}\label{lirc__client_8c_a49ef8059bbf3cba1d8f19d556e094cf2} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+W\+A\+R\+N\+I\+NG}~L\+O\+G\+\_\+\+W\+A\+R\+N\+I\+NG
\item 
\hypertarget{lirc__client_8c_af5357380e149299d3a1e0a9093099ae7}{}\label{lirc__client_8c_af5357380e149299d3a1e0a9093099ae7} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+D\+E\+B\+UG}~L\+O\+G\+\_\+\+D\+E\+B\+UG
\item 
\hypertarget{lirc__client_8c_ac88335e77f628f6ef9ed4c19e602e3d3}{}\label{lirc__client_8c_ac88335e77f628f6ef9ed4c19e602e3d3} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+N\+O\+T\+I\+CE}~L\+O\+G\+\_\+\+N\+O\+T\+I\+CE
\item 
\hypertarget{lirc__client_8c_a1bebef4e51d33fdcec21c23f92d2a1ce}{}\label{lirc__client_8c_a1bebef4e51d33fdcec21c23f92d2a1ce} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+E\+R\+R\+OR}~L\+O\+G\+\_\+\+E\+RR
\item 
\hypertarget{lirc__client_8c_a5319bb0b2d15e5b98751faa7c92cc1cf}{}\label{lirc__client_8c_a5319bb0b2d15e5b98751faa7c92cc1cf} 
\#define {\bfseries M\+A\+X\+\_\+\+I\+N\+C\+L\+U\+D\+ES}~10
\item 
\hypertarget{lirc__client_8c_ac6e57f9be3794a5dcd438d17f33ab29a}{}\label{lirc__client_8c_ac6e57f9be3794a5dcd438d17f33ab29a} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+R\+E\+AD}~255
\item 
\hypertarget{lirc__client_8c_a07d195aee7fdaff04b0c355c73df87d7}{}\label{lirc__client_8c_a07d195aee7fdaff04b0c355c73df87d7} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+I\+ZE}~255
\item 
\hypertarget{lirc__client_8c_a636447c3c5d66db20560d4c4334908e8}{}\label{lirc__client_8c_a636447c3c5d66db20560d4c4334908e8} 
\#define {\bfseries L\+I\+R\+C\+\_\+\+T\+I\+M\+E\+O\+UT}~3
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{lirc__client_8c_aacdc622aa02a946d7a3d67c361199733}{packet\+\_\+state} \{ \newline
{\bfseries P\+\_\+\+B\+E\+G\+IN}, 
{\bfseries P\+\_\+\+M\+E\+S\+S\+A\+GE}, 
{\bfseries P\+\_\+\+S\+T\+A\+T\+US}, 
{\bfseries P\+\_\+\+D\+A\+TA}, 
\newline
{\bfseries P\+\_\+N}, 
{\bfseries P\+\_\+\+D\+A\+T\+A\+\_\+N}, 
{\bfseries P\+\_\+\+E\+ND}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{lirc__client_8c_accf091efd8c192e8437cb2d6d62029c6}{}\label{lirc__client_8c_accf091efd8c192e8437cb2d6d62029c6} 
unsigned int {\bfseries lirc\+\_\+flags} (char $\ast$string)
\item 
int \hyperlink{group__lirc__client_ga3787c58d32391a5b7c40337fdbee95fc}{lirc\+\_\+command\+\_\+init} (\hyperlink{structlirc__cmd__ctx}{lirc\+\_\+cmd\+\_\+ctx} $\ast$ctx, const char $\ast$fmt,...)
\item 
void \hyperlink{group__lirc__client_gace4d40f00918d8bdf9a4f6df0fb0155d}{lirc\+\_\+command\+\_\+reply\+\_\+to\+\_\+stdout} (\hyperlink{structlirc__cmd__ctx}{lirc\+\_\+cmd\+\_\+ctx} $\ast$ctx)
\item 
int \hyperlink{group__lirc__client_ga888d275e1b0cf4988e44fb15f24d2a99}{lirc\+\_\+command\+\_\+run} (\hyperlink{structlirc__cmd__ctx}{lirc\+\_\+cmd\+\_\+ctx} $\ast$ctx, int fd)
\item 
int \hyperlink{group__lirc__client_gaf92c865f0895259aa40e2aed51c71001}{lirc\+\_\+init} (const char $\ast$prog, int verbose)
\item 
int \hyperlink{group__lirc__client_ga50999022b09857ba43aa2f3f29c72b9e}{lirc\+\_\+deinit} (void)
\item 
\hypertarget{lirc__client_8c_a11bbfdf6cf44a0b747d83632ffb83d01}{}\label{lirc__client_8c_a11bbfdf6cf44a0b747d83632ffb83d01} 
int {\bfseries lirc\+\_\+mode} (char $\ast$token, char $\ast$token2, char $\ast$$\ast$mode, struct \hyperlink{structlirc__config__entry}{lirc\+\_\+config\+\_\+entry} $\ast$$\ast$new\+\_\+config, struct \hyperlink{structlirc__config__entry}{lirc\+\_\+config\+\_\+entry} $\ast$$\ast$first\+\_\+config, struct \hyperlink{structlirc__config__entry}{lirc\+\_\+config\+\_\+entry} $\ast$$\ast$last\+\_\+config, int(check)(char $\ast$s), const char $\ast$name, int line)
\item 
\hypertarget{lirc__client_8c_a709e5f7e03d61cdd952cef662ea676ab}{}\label{lirc__client_8c_a709e5f7e03d61cdd952cef662ea676ab} 
int {\bfseries lirc\+\_\+identify} (int sockfd)
\item 
int \hyperlink{group__lirc__client_ga62e50c43a39bd8858d42bc11adf40972}{lirc\+\_\+readconfig} (const char $\ast$file, struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$$\ast$config, int(check)(char $\ast$s))
\item 
int \hyperlink{group__lirc__client_ga94642edfbd32527a6a9b9c761be9ad90}{lirc\+\_\+readconfig\+\_\+only} (const char $\ast$file, struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$$\ast$config, int(check)(char $\ast$s))
\item 
void \hyperlink{group__lirc__client_ga771f0592a8d378bc2ea314fdf4efa233}{lirc\+\_\+freeconfig} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config)
\item 
char $\ast$ \hyperlink{group__lirc__client_gab9031bb1af5f068bacb1fe0d1fc6ca81}{lirc\+\_\+ir2char} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config, char $\ast$code)
\item 
int \hyperlink{group__lirc__client_ga8cb15780179dec56adc42559ee964a68}{lirc\+\_\+code2char} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config, char $\ast$code, char $\ast$$\ast$string)
\item 
int {\bfseries lirc\+\_\+code2charprog} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config, char $\ast$code, char $\ast$$\ast$string, char $\ast$$\ast$prog)
\item 
char $\ast$ \hyperlink{group__lirc__client_gafab5b5f56fb8bfb65b67d56d8426c2e1}{lirc\+\_\+nextir} (void)
\item 
int \hyperlink{group__lirc__client_gaf352dc9bb17d32c0f867ce5ca8a2f2d3}{lirc\+\_\+nextcode} (char $\ast$$\ast$code)
\item 
size\+\_\+t \hyperlink{group__lirc__client_gac572a64d1d7abbe776957c4fc7273bb7}{lirc\+\_\+getsocketname} (const char $\ast$id, char $\ast$buf, size\+\_\+t size)
\item 
const char $\ast$ \hyperlink{group__lirc__client_ga5161b44df0f73abbc48db605c98c9279}{lirc\+\_\+getmode} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config)
\item 
const char $\ast$ \hyperlink{group__lirc__client_ga28252340557d024ff5238c69f3875a38}{lirc\+\_\+setmode} (struct \hyperlink{structlirc__config}{lirc\+\_\+config} $\ast$config, const char $\ast$mode)
\item 
int \hyperlink{group__lirc__client_ga0e86e3a29c14dc8047651e0bb9c49b31}{lirc\+\_\+send\+\_\+one} (int fd, const char $\ast$remote, const char $\ast$keysym)
\item 
int \hyperlink{group__lirc__client_gad5d41d33e0c1fc3002cdf8c0d9aa43d5}{lirc\+\_\+simulate} (int fd, const char $\ast$remote, const char $\ast$keysym, int scancode, int repeat)
\item 
int \hyperlink{group__lirc__client_ga13cf4c784df60143d2b171645f4e84c1}{lirc\+\_\+get\+\_\+local\+\_\+socket} (const char $\ast$path, int quiet)
\item 
int \hyperlink{group__lirc__client_ga81b8a02fdab2ef6d21930bbefabedf30}{lirc\+\_\+get\+\_\+remote\+\_\+socket} (const char $\ast$address, int port, int quiet)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{lirc__client_8c_acc6113e98e7cd24d9dcfa520749a5d3f}{}\label{lirc__client_8c_acc6113e98e7cd24d9dcfa520749a5d3f} 
char $\ast$ {\bfseries prog}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implements \hyperlink{lirc__client_8h}{lirc\+\_\+client.\+h}. 

\begin{DoxyAuthor}{Author}
Christoph Bartelmus, Trent Piepho, Michal Svec 
\end{DoxyAuthor}


\subsection{Enumeration Type Documentation}
\hypertarget{lirc__client_8c_aacdc622aa02a946d7a3d67c361199733}{}\label{lirc__client_8c_aacdc622aa02a946d7a3d67c361199733} 
\index{lirc\+\_\+client.\+c@{lirc\+\_\+client.\+c}!packet\+\_\+state@{packet\+\_\+state}}
\index{packet\+\_\+state@{packet\+\_\+state}!lirc\+\_\+client.\+c@{lirc\+\_\+client.\+c}}
\subsubsection{\texorpdfstring{packet\+\_\+state}{packet\_state}}
{\footnotesize\ttfamily enum \hyperlink{lirc__client_8c_aacdc622aa02a946d7a3d67c361199733}{packet\+\_\+state}}

protocol state. 

Definition at line 71 of file lirc\+\_\+client.\+c.

