\doxysection{VTY (Virtual TTY) interface}
\label{group__vty}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ vty.\+h}
\end{DoxyCompactItemize}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ vty}
\begin{DoxyCompactList}\small\item\em Internal representation of a single VTY. \end{DoxyCompactList}\item 
struct \textbf{ vty\+\_\+app\+\_\+info}
\begin{DoxyCompactList}\small\item\em Information an application registers with the VTY. \end{DoxyCompactList}\item 
struct \textbf{ vty\+\_\+signal\+\_\+data}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ VTY\+\_\+\+PRINTF\+\_\+\+ATTRIBUTE}(a,  b)
\item 
\#define \textbf{ ERRNO\+\_\+\+IO\+\_\+\+RETRY}(EN)~ (((EN) == EAGAIN) $\vert$$\vert$ ((EN) == EWOULDBLOCK) $\vert$$\vert$ ((EN) == EINTR))
\item 
\#define \textbf{ VTY\+\_\+\+READ\+\_\+\+BUFSIZ}~512
\item 
\#define \textbf{ VTY\+\_\+\+BUFSIZ}~512
\item 
\#define \textbf{ VTY\+\_\+\+MAXHIST}~20
\item 
\#define \textbf{ VTY\+\_\+\+CMD\+\_\+\+USR\+\_\+\+ATTR\+\_\+\+NUM}~32
\item 
\#define \textbf{ VTY\+\_\+\+CMD\+\_\+\+ATTR\+\_\+\+FLAGS\+\_\+\+RESERVED}~ \{ \textquotesingle{}.\textquotesingle{}, \textquotesingle{}!\textquotesingle{}, \textquotesingle{}@\textquotesingle{}, \textquotesingle{}$^\wedge$\textquotesingle{} \}
\item 
\#define \textbf{ VTY\+\_\+\+NEWLINE}~((\textbf{ vty}-\/$>$\textbf{ type} == \textbf{ VTY\+\_\+\+TERM}) ? \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{} \+: \char`\"{}\textbackslash{}\textbf{ n}\char`\"{})
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ event} \{ \newline
\textbf{ VTY\+\_\+\+SERV}
, \newline
\textbf{ VTY\+\_\+\+READ}
, \newline
\textbf{ VTY\+\_\+\+WRITE}
, \newline
\textbf{ VTY\+\_\+\+CLOSED}
, \newline
\textbf{ VTY\+\_\+\+TIMEOUT\+\_\+\+RESET}
 \}
\begin{DoxyCompactList}\small\item\em VTY events. \end{DoxyCompactList}\item 
enum \textbf{ vty\+\_\+type} \{ \newline
\textbf{ VTY\+\_\+\+TERM}
, \newline
\textbf{ VTY\+\_\+\+FILE}
, \newline
\textbf{ VTY\+\_\+\+SHELL}
, \newline
\textbf{ VTY\+\_\+\+SHELL\+\_\+\+SERV}
 \}
\item 
enum \textbf{ signal\+\_\+vty} \{ \textbf{ S\+\_\+\+VTY\+\_\+\+EVENT}
 \}
\begin{DoxyCompactList}\small\item\em signal handling \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ \textbf{ vty\+\_\+newline} (struct \textbf{ vty} $\ast$\textbf{ vty})
\item 
void \textbf{ vty\+\_\+init} (struct \textbf{ vty\+\_\+app\+\_\+info} $\ast$app\+\_\+info)
\begin{DoxyCompactList}\small\item\em Initialize VTY layer. \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+read\+\_\+config\+\_\+file} (const char $\ast$file\+\_\+name, void $\ast$priv)
\begin{DoxyCompactList}\small\item\em Read the configuration file using the VTY code. \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+read\+\_\+config\+\_\+filep} (FILE $\ast$confp, void $\ast$priv)
\begin{DoxyCompactList}\small\item\em Read up VTY configuration from a file stream. \end{DoxyCompactList}\item 
void \textbf{ vty\+\_\+init\+\_\+vtysh} (void)
\item 
void \textbf{ vty\+\_\+reset} (void)
\begin{DoxyCompactList}\small\item\em Reset all VTY status. \end{DoxyCompactList}\item 
struct \textbf{ vty} $\ast$ \textbf{ vty\+\_\+new} (void)
\begin{DoxyCompactList}\small\item\em Allocate a new vty interface structure. \end{DoxyCompactList}\item 
struct \textbf{ vty} $\ast$ \textbf{ vty\+\_\+create} (int vty\+\_\+sock, void $\ast$priv)
\begin{DoxyCompactList}\small\item\em Create new vty structure. \end{DoxyCompactList}\item 
bool \textbf{ vty\+\_\+is\+\_\+active} (struct \textbf{ vty} $\ast$\textbf{ vty})
\item 
int \textbf{ vty\+\_\+out} (struct \textbf{ vty} $\ast$, const char $\ast$,...) \textbf{ VTY\+\_\+\+PRINTF\+\_\+\+ATTRIBUTE}(2
\item 
int int \textbf{ vty\+\_\+out\+\_\+va} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$format, va\+\_\+list ap)
\item 
int \textbf{ vty\+\_\+out\+\_\+newline} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em print a newline on the given VTY \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+out\+\_\+uptime} (struct \textbf{ vty} $\ast$\textbf{ vty}, const struct timespec $\ast$\textbf{ starttime})
\begin{DoxyCompactList}\small\item\em calculates the time difference of a give timespec to the current time and prints in a human readable format (days, hours, minutes, seconds). \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+read} (struct \textbf{ vty} $\ast$\textbf{ vty})
\begin{DoxyCompactList}\small\item\em Read data via vty socket. \end{DoxyCompactList}\item 
void \textbf{ vty\+\_\+close} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em Close a given vty interface. \end{DoxyCompactList}\item 
void \textbf{ vty\+\_\+flush} (struct \textbf{ vty} $\ast$\textbf{ vty})
\item 
char $\ast$ \textbf{ vty\+\_\+get\+\_\+cwd} (void)
\item 
void \textbf{ vty\+\_\+log} (const char $\ast$\textbf{ level}, const char $\ast$\textbf{ proto}, const char $\ast$fmt, va\+\_\+list)
\item 
int \textbf{ vty\+\_\+config\+\_\+lock} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em Lock the configuration to a given VTY. \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+config\+\_\+unlock} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em Unlock the configuration from a given VTY. \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+shell} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em Return if this VTY is a shell or not. \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+shell\+\_\+serv} (struct \textbf{ vty} $\ast$)
\item 
void \textbf{ vty\+\_\+hello} (struct \textbf{ vty} $\ast$)
\item 
void $\ast$ \textbf{ vty\+\_\+current\+\_\+index} (struct \textbf{ vty} $\ast$)
\begin{DoxyCompactList}\small\item\em return the current index of a given VTY \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+current\+\_\+node} (struct \textbf{ vty} $\ast$\textbf{ vty})
\begin{DoxyCompactList}\small\item\em return the current node of a given VTY \end{DoxyCompactList}\item 
int \textbf{ vty\+\_\+go\+\_\+parent} (struct \textbf{ vty} $\ast$\textbf{ vty})
\item 
const char $\ast$ \textbf{ vty\+\_\+get\+\_\+bind\+\_\+addr} (void)
\item 
int \textbf{ vty\+\_\+get\+\_\+bind\+\_\+port} (int default\+\_\+port)
\begin{DoxyCompactList}\small\item\em Returns configured port passed to the \textquotesingle{}line vty\textquotesingle{}/\textquotesingle{}bind\textquotesingle{} command or default\+\_\+port. \end{DoxyCompactList}\item 
static int \textbf{ handle\+\_\+counter} (struct \textbf{ osmo\+\_\+counter} $\ast$counter, void $\ast$vctx\+\_\+)
\item 
void \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial2} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix, int max\+\_\+level, bool skip\+\_\+zero)
\item 
void \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix, int max\+\_\+level)
\item 
void \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+full2} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix, bool skip\+\_\+zero)
\item 
void \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+full} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix)
\item 
char $\ast$ \textbf{ vty\+\_\+cmd\+\_\+string\+\_\+from\+\_\+valstr} (void $\ast$ctx, const struct \textbf{ value\+\_\+string} $\ast$vals, const char $\ast$prefix, const char $\ast$sep, const char $\ast$end, int do\+\_\+lower)
\begin{DoxyCompactList}\small\item\em Generate a VTY command string from \textbf{ value\+\_\+string}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \textbf{ tall\+\_\+vty\+\_\+ctx}
\item 
struct \textbf{ cmd\+\_\+element} \textbf{ cfg\+\_\+description\+\_\+cmd}
\item 
struct \textbf{ cmd\+\_\+element} \textbf{ cfg\+\_\+no\+\_\+description\+\_\+cmd}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{group__vty_ga45b38a31650d3cee8087360351384d9e}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!ERRNO\_IO\_RETRY@{ERRNO\_IO\_RETRY}}
\index{ERRNO\_IO\_RETRY@{ERRNO\_IO\_RETRY}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{ERRNO\_IO\_RETRY}
{\footnotesize\ttfamily \#define ERRNO\+\_\+\+IO\+\_\+\+RETRY(\begin{DoxyParamCaption}\item[{}]{EN }\end{DoxyParamCaption})~ (((EN) == EAGAIN) $\vert$$\vert$ ((EN) == EWOULDBLOCK) $\vert$$\vert$ ((EN) == EINTR))}

\mbox{\label{group__vty_ga2d026199530c8617fbb5e0d89ab6cac1}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_BUFSIZ@{VTY\_BUFSIZ}}
\index{VTY\_BUFSIZ@{VTY\_BUFSIZ}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_BUFSIZ}
{\footnotesize\ttfamily \#define VTY\+\_\+\+BUFSIZ~512}

\mbox{\label{group__vty_ga136405bc8e5c82554437f301aeab4105}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_CMD\_ATTR\_FLAGS\_RESERVED@{VTY\_CMD\_ATTR\_FLAGS\_RESERVED}}
\index{VTY\_CMD\_ATTR\_FLAGS\_RESERVED@{VTY\_CMD\_ATTR\_FLAGS\_RESERVED}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_CMD\_ATTR\_FLAGS\_RESERVED}
{\footnotesize\ttfamily \#define VTY\+\_\+\+CMD\+\_\+\+ATTR\+\_\+\+FLAGS\+\_\+\+RESERVED~ \{ \textquotesingle{}.\textquotesingle{}, \textquotesingle{}!\textquotesingle{}, \textquotesingle{}@\textquotesingle{}, \textquotesingle{}$^\wedge$\textquotesingle{} \}}

\mbox{\label{group__vty_ga414e2ed56a8379dc97a3e78f07598be0}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_CMD\_USR\_ATTR\_NUM@{VTY\_CMD\_USR\_ATTR\_NUM}}
\index{VTY\_CMD\_USR\_ATTR\_NUM@{VTY\_CMD\_USR\_ATTR\_NUM}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_CMD\_USR\_ATTR\_NUM}
{\footnotesize\ttfamily \#define VTY\+\_\+\+CMD\+\_\+\+USR\+\_\+\+ATTR\+\_\+\+NUM~32}

\mbox{\label{group__vty_ga2c7bf19140857545865be759c8960bc4}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_MAXHIST@{VTY\_MAXHIST}}
\index{VTY\_MAXHIST@{VTY\_MAXHIST}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_MAXHIST}
{\footnotesize\ttfamily \#define VTY\+\_\+\+MAXHIST~20}

\mbox{\label{group__vty_ga3be8ca867e2953936a95c68dc64824b6}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_NEWLINE@{VTY\_NEWLINE}}
\index{VTY\_NEWLINE@{VTY\_NEWLINE}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_NEWLINE}
{\footnotesize\ttfamily \#define VTY\+\_\+\+NEWLINE~((\textbf{ vty}-\/$>$\textbf{ type} == \textbf{ VTY\+\_\+\+TERM}) ? \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{} \+: \char`\"{}\textbackslash{}\textbf{ n}\char`\"{})}

\mbox{\label{group__vty_ga6c606a1c44a152c58f36b43ea8cf8ff8}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_PRINTF\_ATTRIBUTE@{VTY\_PRINTF\_ATTRIBUTE}}
\index{VTY\_PRINTF\_ATTRIBUTE@{VTY\_PRINTF\_ATTRIBUTE}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_PRINTF\_ATTRIBUTE}
{\footnotesize\ttfamily \#define VTY\+\_\+\+PRINTF\+\_\+\+ATTRIBUTE(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})}

\mbox{\label{group__vty_ga79b1a7ad718c49feb5febb6a5be6f5e8}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_READ\_BUFSIZ@{VTY\_READ\_BUFSIZ}}
\index{VTY\_READ\_BUFSIZ@{VTY\_READ\_BUFSIZ}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{VTY\_READ\_BUFSIZ}
{\footnotesize\ttfamily \#define VTY\+\_\+\+READ\+\_\+\+BUFSIZ~512}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{group__vty_ga3b65133bb9997cd1ccf311af0927fc9e}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!event@{event}}
\index{event@{event}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{event}
{\footnotesize\ttfamily enum \textbf{ event}}



VTY events. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_SERV@{VTY\_SERV}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_SERV@{VTY\_SERV}}}\mbox{\label{group__vty_gga3b65133bb9997cd1ccf311af0927fc9ea8fd18ac65705a12e09a38d18e47d12ec}} 
VTY\+\_\+\+SERV&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_READ@{VTY\_READ}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_READ@{VTY\_READ}}}\mbox{\label{group__vty_gga3b65133bb9997cd1ccf311af0927fc9ea9ed3db9f85ae6bdc30382d62bc01a807}} 
VTY\+\_\+\+READ&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_WRITE@{VTY\_WRITE}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_WRITE@{VTY\_WRITE}}}\mbox{\label{group__vty_gga3b65133bb9997cd1ccf311af0927fc9ea73e4d70c7cc9c2560723e639332d7f2d}} 
VTY\+\_\+\+WRITE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_CLOSED@{VTY\_CLOSED}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_CLOSED@{VTY\_CLOSED}}}\mbox{\label{group__vty_gga3b65133bb9997cd1ccf311af0927fc9eacef50477b2533b5c7bbc01c3acc81e04}} 
VTY\+\_\+\+CLOSED&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_TIMEOUT\_RESET@{VTY\_TIMEOUT\_RESET}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_TIMEOUT\_RESET@{VTY\_TIMEOUT\_RESET}}}\mbox{\label{group__vty_gga3b65133bb9997cd1ccf311af0927fc9eada5cbc98f077a6a603d7c200d654042c}} 
VTY\+\_\+\+TIMEOUT\+\_\+\+RESET&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{group__vty_gaf1eadea24b78381e8a0dd8bd1a0cc609}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!signal\_vty@{signal\_vty}}
\index{signal\_vty@{signal\_vty}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{signal\_vty}
{\footnotesize\ttfamily enum \textbf{ signal\+\_\+vty}}



signal handling 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{S\_VTY\_EVENT@{S\_VTY\_EVENT}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!S\_VTY\_EVENT@{S\_VTY\_EVENT}}}\mbox{\label{group__vty_ggaf1eadea24b78381e8a0dd8bd1a0cc609acbe6256e67c6be52cfeacef3258d1e12}} 
S\+\_\+\+VTY\+\_\+\+EVENT&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{group__vty_ga169d41356fc25c0959adaadc3e3eabfe}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_type@{vty\_type}}
\index{vty\_type@{vty\_type}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_type}
{\footnotesize\ttfamily enum \textbf{ vty\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_TERM@{VTY\_TERM}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_TERM@{VTY\_TERM}}}\mbox{\label{group__vty_gga169d41356fc25c0959adaadc3e3eabfea907f7939ab201bf65eac488d558840f3}} 
VTY\+\_\+\+TERM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_FILE@{VTY\_FILE}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_FILE@{VTY\_FILE}}}\mbox{\label{group__vty_gga169d41356fc25c0959adaadc3e3eabfea281cf95ff4c45ed4481d0df43228400f}} 
VTY\+\_\+\+FILE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_SHELL@{VTY\_SHELL}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_SHELL@{VTY\_SHELL}}}\mbox{\label{group__vty_gga169d41356fc25c0959adaadc3e3eabfea77bc83deb21566343583abca727446e2}} 
VTY\+\_\+\+SHELL&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VTY\_SHELL\_SERV@{VTY\_SHELL\_SERV}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!VTY\_SHELL\_SERV@{VTY\_SHELL\_SERV}}}\mbox{\label{group__vty_gga169d41356fc25c0959adaadc3e3eabfea7a09b233acbda74ed6f71ef5270705cf}} 
VTY\+\_\+\+SHELL\+\_\+\+SERV&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{group__vty_ga6a6404bc1e63b30ddde52ad577830ca7}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!handle\_counter@{handle\_counter}}
\index{handle\_counter@{handle\_counter}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{handle\_counter()}
{\footnotesize\ttfamily static int handle\+\_\+counter (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+counter} $\ast$}]{counter,  }\item[{void $\ast$}]{vctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+counter\+::description}, \textbf{ osmo\+\_\+counter\+::name}, \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, \textbf{ vty\+\_\+out\+\_\+context\+::skip\+\_\+zero}, \textbf{ vty\+\_\+out\+\_\+context\+::vty}, \textbf{ VTY\+\_\+\+NEWLINE}, and \textbf{ vty\+\_\+out()}.



Referenced by \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial2()}.

\mbox{\label{group__vty_gaaa36e4b5f82f62e8c904b45a1630a19f}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_close@{vty\_close}}
\index{vty\_close@{vty\_close}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_close()}
{\footnotesize\ttfamily void vty\+\_\+close (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



Close a given vty interface. 



References \textbf{ buf}, \textbf{ buffer\+\_\+flush\+\_\+all()}, \textbf{ buffer\+\_\+free()}, \textbf{ fd}, \textbf{ hist}, \textbf{ obuf}, \textbf{ vector\+\_\+unset()}, \textbf{ VTY\+\_\+\+CLOSED}, \textbf{ vty\+\_\+config\+\_\+unlock()}, \textbf{ vty\+\_\+event()}, \textbf{ VTY\+\_\+\+MAXHIST}, and \textbf{ vtyvec}.



Referenced by \textbf{ vty\+\_\+create()}, \textbf{ vty\+\_\+read()}, \textbf{ vty\+\_\+read\+\_\+config\+\_\+filep()}, \textbf{ vty\+\_\+reset()}, and \textbf{ write\+\_\+config\+\_\+file()}.

\mbox{\label{group__vty_ga148901bf4513637b346ad8452d04b5af}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_cmd\_string\_from\_valstr@{vty\_cmd\_string\_from\_valstr}}
\index{vty\_cmd\_string\_from\_valstr@{vty\_cmd\_string\_from\_valstr}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_cmd\_string\_from\_valstr()}
{\footnotesize\ttfamily char $\ast$ vty\+\_\+cmd\+\_\+string\+\_\+from\+\_\+valstr (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const struct \textbf{ value\+\_\+string} $\ast$}]{vals,  }\item[{const char $\ast$}]{prefix,  }\item[{const char $\ast$}]{sep,  }\item[{const char $\ast$}]{end,  }\item[{int}]{do\+\_\+lower }\end{DoxyParamCaption})}



Generate a VTY command string from \textbf{ value\+\_\+string}. 



References \textbf{ len()}, \textbf{ name}, \textbf{ OSMO\+\_\+\+SNPRINTF\+\_\+\+RET}, \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, \textbf{ value\+\_\+string\+::str}, and \textbf{ value\+\_\+string\+::value}.

\mbox{\label{group__vty_ga0a03a6ecf793cea8d20bd829fcd3fbb4}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_config\_lock@{vty\_config\_lock}}
\index{vty\_config\_lock@{vty\_config\_lock}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_config\_lock()}
{\footnotesize\ttfamily int vty\+\_\+config\+\_\+lock (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



Lock the configuration to a given VTY. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em vty} & VTY to which the config shall be locked \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 on error
\end{DoxyReturn}
This shall be used to make sure only one VTY at a given time has access to modify the configuration 

References \textbf{ config}, and \textbf{ vty\+\_\+config}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{group__vty_gab7fcdcad544e949350edbf205748e694}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_config\_unlock@{vty\_config\_unlock}}
\index{vty\_config\_unlock@{vty\_config\_unlock}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_config\_unlock()}
{\footnotesize\ttfamily int vty\+\_\+config\+\_\+unlock (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



Unlock the configuration from a given VTY. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em vty} & VTY from which the configuration shall be unlocked \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ config}, and \textbf{ vty\+\_\+config}.



Referenced by \textbf{ g\+DEFUN()}, \textbf{ vty\+\_\+close()}, and \textbf{ vty\+\_\+end\+\_\+config()}.

\mbox{\label{group__vty_gabf8858cccf89750e0267a72d2868ae0e}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_create@{vty\_create}}
\index{vty\_create@{vty\_create}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_create()}
{\footnotesize\ttfamily struct \textbf{ vty} $\ast$ vty\+\_\+create (\begin{DoxyParamCaption}\item[{int}]{vty\+\_\+sock,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



Create new vty structure. 



References \textbf{ host\+::advanced}, \textbf{ AUTH\+\_\+\+NODE}, \textbf{ cp}, \textbf{ ENABLE\+\_\+\+NODE}, \textbf{ fail}, \textbf{ fd}, \textbf{ hindex}, \textbf{ hist}, \textbf{ hp}, \textbf{ length}, \textbf{ host\+::lines}, \textbf{ lines}, \textbf{ node}, \textbf{ host\+::password}, \textbf{ password\+\_\+check}, \textbf{ host\+::password\+\_\+encrypt}, \textbf{ priv}, \textbf{ status}, \textbf{ type}, \textbf{ vector\+\_\+set\+\_\+index()}, \textbf{ VIEW\+\_\+\+NODE}, \textbf{ vty}, \textbf{ vty\+\_\+clear\+\_\+buf()}, \textbf{ vty\+\_\+close()}, \textbf{ vty\+\_\+do\+\_\+window\+\_\+size()}, \textbf{ vty\+\_\+dont\+\_\+linemode()}, \textbf{ vty\+\_\+event()}, \textbf{ vty\+\_\+hello()}, \textbf{ vty\+\_\+new()}, \textbf{ VTY\+\_\+\+NEWLINE}, \textbf{ VTY\+\_\+\+NORMAL}, \textbf{ vty\+\_\+out()}, \textbf{ vty\+\_\+prompt()}, \textbf{ VTY\+\_\+\+READ}, \textbf{ VTY\+\_\+\+TERM}, \textbf{ vty\+\_\+will\+\_\+echo()}, \textbf{ vty\+\_\+will\+\_\+suppress\+\_\+go\+\_\+ahead()}, \textbf{ VTY\+\_\+\+WRITE}, and \textbf{ vtyvec}.



Referenced by \textbf{ telnet\+\_\+new\+\_\+connection()}.

\mbox{\label{group__vty_gad87ef05754aa81fad2d8b402019c1bbd}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_current\_index@{vty\_current\_index}}
\index{vty\_current\_index@{vty\_current\_index}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_current\_index()}
{\footnotesize\ttfamily void $\ast$ vty\+\_\+current\+\_\+index (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



return the current index of a given VTY 



References \textbf{ index}.

\mbox{\label{group__vty_ga9883ee27da7ca53d0274180ecbded66f}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_current\_node@{vty\_current\_node}}
\index{vty\_current\_node@{vty\_current\_node}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_current\_node()}
{\footnotesize\ttfamily int vty\+\_\+current\+\_\+node (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



return the current node of a given VTY 



References \textbf{ node}.

\mbox{\label{group__vty_gaae8b72f7202dc324fe5b4143d0a4aab4}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_flush@{vty\_flush}}
\index{vty\_flush@{vty\_flush}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_flush()}
{\footnotesize\ttfamily void vty\+\_\+flush (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



References \textbf{ buffer\+\_\+flush\+\_\+all()}, \textbf{ fd}, and \textbf{ obuf}.

\mbox{\label{group__vty_gab6cc2523b7b35b84ca2ebfc877126d7c}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_get\_bind\_addr@{vty\_get\_bind\_addr}}
\index{vty\_get\_bind\_addr@{vty\_get\_bind\_addr}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_get\_bind\_addr()}
{\footnotesize\ttfamily const char $\ast$ vty\+\_\+get\+\_\+bind\+\_\+addr (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ vty\+\_\+bind\+\_\+addr}, and \textbf{ VTY\+\_\+\+BIND\+\_\+\+ADDR\+\_\+\+DEFAULT}.



Referenced by \textbf{ telnet\+\_\+init\+\_\+default()}.

\mbox{\label{group__vty_gaaaca795c1d44b2292cca8cdf4382285c}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_get\_bind\_port@{vty\_get\_bind\_port}}
\index{vty\_get\_bind\_port@{vty\_get\_bind\_port}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_get\_bind\_port()}
{\footnotesize\ttfamily int vty\+\_\+get\+\_\+bind\+\_\+port (\begin{DoxyParamCaption}\item[{int}]{default\+\_\+port }\end{DoxyParamCaption})}



Returns configured port passed to the \textquotesingle{}line vty\textquotesingle{}/\textquotesingle{}bind\textquotesingle{} command or default\+\_\+port. 



References \textbf{ vty\+\_\+bind\+\_\+port}.



Referenced by \textbf{ telnet\+\_\+init\+\_\+default()}.

\mbox{\label{group__vty_ga9f56f90fa8a5984891a080b3198c18f6}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_get\_cwd@{vty\_get\_cwd}}
\index{vty\_get\_cwd@{vty\_get\_cwd}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_get\_cwd()}
{\footnotesize\ttfamily char $\ast$ vty\+\_\+get\+\_\+cwd (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ vty\+\_\+cwd}.

\mbox{\label{group__vty_ga069d4a4fcf70add3c3e149e8ca03708f}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_go\_parent@{vty\_go\_parent}}
\index{vty\_go\_parent@{vty\_go\_parent}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_go\_parent()}
{\footnotesize\ttfamily int vty\+\_\+go\+\_\+parent (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



References \textbf{ host\+::app\+\_\+info}, \textbf{ AUTH\+\_\+\+ENABLE\+\_\+\+NODE}, \textbf{ AUTH\+\_\+\+NODE}, \textbf{ CONFIG\+\_\+\+NODE}, \textbf{ ENABLE\+\_\+\+NODE}, \textbf{ vty\+\_\+app\+\_\+info\+::go\+\_\+parent\+\_\+cb}, \textbf{ node}, \textbf{ VIEW\+\_\+\+NODE}, \textbf{ vty\+\_\+clear\+\_\+parents()}, and \textbf{ vty\+\_\+pop\+\_\+parent()}.



Referenced by \textbf{ config\+\_\+from\+\_\+file()}, \textbf{ g\+DEFUN()}, and \textbf{ vty\+\_\+down\+\_\+level()}.

\mbox{\label{group__vty_gaaab50d4738f1884d8b3d115b5465b29c}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_hello@{vty\_hello}}
\index{vty\_hello@{vty\_hello}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_hello()}
{\footnotesize\ttfamily void vty\+\_\+hello (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



References \textbf{ host\+::app\+\_\+info}, \textbf{ vty\+\_\+app\+\_\+info\+::copyright}, \textbf{ host\+::motd}, \textbf{ host\+::motdfile}, \textbf{ vty\+\_\+app\+\_\+info\+::name}, \textbf{ VTY\+\_\+\+NEWLINE}, and \textbf{ vty\+\_\+out()}.



Referenced by \textbf{ vty\+\_\+create()}.

\mbox{\label{group__vty_gaeb51fa4048ac5560182553393a0b223a}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_init@{vty\_init}}
\index{vty\_init@{vty\_init}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_init()}
{\footnotesize\ttfamily void vty\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ vty\+\_\+app\+\_\+info} $\ast$}]{app\+\_\+info }\end{DoxyParamCaption})}



Initialize VTY layer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em app\+\_\+info} & application information \\
\hline
\end{DoxyParams}


References \textbf{ host\+::app\+\_\+info}, \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ cmd\+\_\+init()}, \textbf{ CONFIG\+\_\+\+NODE}, \textbf{ ENABLE\+\_\+\+NODE}, \textbf{ install\+\_\+lib\+\_\+element()}, \textbf{ install\+\_\+lib\+\_\+element\+\_\+ve()}, \textbf{ install\+\_\+node()}, \textbf{ tall\+\_\+vty\+\_\+cmd\+\_\+ctx}, \textbf{ tall\+\_\+vty\+\_\+ctx}, \textbf{ tall\+\_\+vty\+\_\+vec\+\_\+ctx}, \textbf{ vty\+\_\+app\+\_\+info\+::usr\+\_\+attr\+\_\+letters}, \textbf{ vector\+\_\+init()}, \textbf{ VECTOR\+\_\+\+MIN\+\_\+\+SIZE}, \textbf{ VTY\+\_\+\+CMD\+\_\+\+ATTR\+\_\+\+FLAGS\+\_\+\+RESERVED}, \textbf{ vty\+\_\+config\+\_\+write()}, \textbf{ VTY\+\_\+\+NODE}, \textbf{ vty\+\_\+node}, \textbf{ vty\+\_\+save\+\_\+cwd()}, and \textbf{ vtyvec}.

\mbox{\label{group__vty_ga82800309da29029c5ab98f2adfcd6baa}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_init\_vtysh@{vty\_init\_vtysh}}
\index{vty\_init\_vtysh@{vty\_init\_vtysh}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_init\_vtysh()}
{\footnotesize\ttfamily void vty\+\_\+init\+\_\+vtysh (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ vector\+\_\+init()}, \textbf{ VECTOR\+\_\+\+MIN\+\_\+\+SIZE}, and \textbf{ vtyvec}.

\mbox{\label{group__vty_gaa21e381fcf6fee8ea325375401b4b82c}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_is\_active@{vty\_is\_active}}
\index{vty\_is\_active@{vty\_is\_active}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_is\_active()}
{\footnotesize\ttfamily bool vty\+\_\+is\+\_\+active (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



References \textbf{ entry}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, and \textbf{ telnet\+\_\+connection\+::vty}.

\mbox{\label{group__vty_ga8d7438ae847024da079ea135f736f55b}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_log@{vty\_log}}
\index{vty\_log@{vty\_log}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_log()}
{\footnotesize\ttfamily void vty\+\_\+log (\begin{DoxyParamCaption}\item[{const char $\ast$}]{level,  }\item[{const char $\ast$}]{proto,  }\item[{const char $\ast$}]{fmt,  }\item[{va\+\_\+list}]{ }\end{DoxyParamCaption})}

\mbox{\label{group__vty_ga2b938058222849e374befc1085857718}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_new@{vty\_new}}
\index{vty\_new@{vty\_new}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_new()}
{\footnotesize\ttfamily struct \textbf{ vty} $\ast$ vty\+\_\+new (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Allocate a new vty interface structure. 



References \textbf{ buffer\+\_\+free()}, \textbf{ buffer\+\_\+new()}, \textbf{ INIT\+\_\+\+LLIST\+\_\+\+HEAD}, \textbf{ tall\+\_\+vty\+\_\+ctx}, and \textbf{ VTY\+\_\+\+BUFSIZ}.



Referenced by \textbf{ vty\+\_\+create()}, \textbf{ vty\+\_\+read\+\_\+config\+\_\+filep()}, and \textbf{ write\+\_\+config\+\_\+file()}.

\mbox{\label{group__vty_gaa209bddbae8f2b57316e5bb3451db3fd}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_newline@{vty\_newline}}
\index{vty\_newline@{vty\_newline}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_newline()}
{\footnotesize\ttfamily static const char $\ast$ vty\+\_\+newline (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ VTY\+\_\+\+NEWLINE}.



Referenced by \textbf{ vty\+\_\+out\+\_\+newline()}.

\mbox{\label{group__vty_gae8f16c68278d5bfe8d00ade3c4323e88}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out@{vty\_out}}
\index{vty\_out@{vty\_out}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out()}
{\footnotesize\ttfamily int vty\+\_\+out (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{,  }\item[{const char $\ast$}]{,  }\item[{}]{... }\end{DoxyParamCaption})}



Referenced by \textbf{ \+\_\+vty\+\_\+output()}, \textbf{ asciidoc\+\_\+counter\+\_\+generate()}, \textbf{ asciidoc\+\_\+handle\+\_\+counter()}, \textbf{ asciidoc\+\_\+osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler()}, \textbf{ asciidoc\+\_\+osmo\+\_\+stat\+\_\+item\+\_\+handler()}, \textbf{ asciidoc\+\_\+rate\+\_\+ctr\+\_\+group\+\_\+handler()}, \textbf{ asciidoc\+\_\+rate\+\_\+ctr\+\_\+handler()}, \textbf{ config\+\_\+write\+\_\+log\+\_\+single()}, \textbf{ config\+\_\+write\+\_\+sched()}, \textbf{ config\+\_\+write\+\_\+stats()}, \textbf{ config\+\_\+write\+\_\+stats\+\_\+reporter()}, \textbf{ DEFUN()}, \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ DEFUN\+\_\+\+DEPRECATED()}, \textbf{ g\+DEFUN()}, \textbf{ handle\+\_\+counter()}, \textbf{ log\+\_\+deprecated\+\_\+func()}, \textbf{ osmo\+\_\+log\+\_\+vty2tgt()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+all\+\_\+va()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+one\+\_\+va()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+parse\+\_\+\+T\+\_\+arg()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+set\+\_\+cmd()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+write()}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+handler()}, \textbf{ rate\+\_\+ctr\+\_\+handler()}, \textbf{ rate\+\_\+ctr\+\_\+handler\+\_\+fmt()}, \textbf{ set\+\_\+srep\+\_\+parameter\+\_\+int()}, \textbf{ set\+\_\+srep\+\_\+parameter\+\_\+str()}, \textbf{ talloc\+\_\+ctx\+\_\+walk\+\_\+cb()}, \textbf{ vty\+\_\+out\+\_\+fsm2()}, \textbf{ vty\+\_\+out\+\_\+fsm\+\_\+inst2()}, \textbf{ vty\+\_\+out\+\_\+rate\+\_\+ctr\+\_\+group2()}, \textbf{ vty\+\_\+out\+\_\+stat\+\_\+item\+\_\+group2()}, \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial2()}, and \textbf{ vty\+\_\+print\+\_\+logtarget()}.

\mbox{\label{group__vty_gabbf98fe074114bf2fa75aba7b2140d23}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_newline@{vty\_out\_newline}}
\index{vty\_out\_newline@{vty\_out\_newline}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_newline()}
{\footnotesize\ttfamily int vty\+\_\+out\+\_\+newline (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



print a newline on the given VTY 



References \textbf{ buffer\+\_\+put()}, \textbf{ obuf}, and \textbf{ vty\+\_\+newline()}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{group__vty_gaac192c4dfd1b32cf177f875aaabc5986}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_statistics\_full@{vty\_out\_statistics\_full}}
\index{vty\_out\_statistics\_full@{vty\_out\_statistics\_full}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_statistics\_full()}
{\footnotesize\ttfamily void vty\+\_\+out\+\_\+statistics\+\_\+full (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const char $\ast$}]{prefix }\end{DoxyParamCaption})}



References \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, and \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+full2()}.

\mbox{\label{group__vty_gaef5369aca10b0b4fac3d3981a443bd46}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_statistics\_full2@{vty\_out\_statistics\_full2}}
\index{vty\_out\_statistics\_full2@{vty\_out\_statistics\_full2}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_statistics\_full2()}
{\footnotesize\ttfamily void vty\+\_\+out\+\_\+statistics\+\_\+full2 (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const char $\ast$}]{prefix,  }\item[{bool}]{skip\+\_\+zero }\end{DoxyParamCaption})}



References \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, \textbf{ vty\+\_\+out\+\_\+context\+::skip\+\_\+zero}, and \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial2()}.



Referenced by \textbf{ DEFUN()}, and \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+full()}.

\mbox{\label{group__vty_gad52b640266cda96e99df7681b8528205}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_statistics\_partial@{vty\_out\_statistics\_partial}}
\index{vty\_out\_statistics\_partial@{vty\_out\_statistics\_partial}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_statistics\_partial()}
{\footnotesize\ttfamily void vty\+\_\+out\+\_\+statistics\+\_\+partial (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const char $\ast$}]{prefix,  }\item[{int}]{max\+\_\+level }\end{DoxyParamCaption})}



References \textbf{ vty\+\_\+out\+\_\+context\+::max\+\_\+level}, \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, and \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial2()}.

\mbox{\label{group__vty_ga25a2338bbc94f83e25ad9fffcd94593f}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_statistics\_partial2@{vty\_out\_statistics\_partial2}}
\index{vty\_out\_statistics\_partial2@{vty\_out\_statistics\_partial2}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_statistics\_partial2()}
{\footnotesize\ttfamily void vty\+\_\+out\+\_\+statistics\+\_\+partial2 (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const char $\ast$}]{prefix,  }\item[{int}]{max\+\_\+level,  }\item[{bool}]{skip\+\_\+zero }\end{DoxyParamCaption})}



References \textbf{ handle\+\_\+counter()}, \textbf{ vty\+\_\+out\+\_\+context\+::max\+\_\+level}, \textbf{ osmo\+\_\+counters\+\_\+for\+\_\+each()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+for\+\_\+each\+\_\+group()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler()}, \textbf{ vty\+\_\+out\+\_\+context\+::prefix}, \textbf{ rate\+\_\+ctr\+\_\+for\+\_\+each\+\_\+group()}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+handler()}, \textbf{ vty\+\_\+out\+\_\+context\+::skip\+\_\+zero}, \textbf{ vty}, \textbf{ VTY\+\_\+\+NEWLINE}, and \textbf{ vty\+\_\+out()}.



Referenced by \textbf{ DEFUN()}, \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+full2()}, and \textbf{ vty\+\_\+out\+\_\+statistics\+\_\+partial()}.

\mbox{\label{group__vty_ga714f1aefde9052f29834c2f6ac8fa1e0}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_uptime@{vty\_out\_uptime}}
\index{vty\_out\_uptime@{vty\_out\_uptime}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_uptime()}
{\footnotesize\ttfamily int vty\+\_\+out\+\_\+uptime (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const struct timespec $\ast$}]{starttime }\end{DoxyParamCaption})}



calculates the time difference of a give timespec to the current time and prints in a human readable format (days, hours, minutes, seconds). 



References \textbf{ h}, \textbf{ osmo\+\_\+clock\+\_\+gettime()}, \textbf{ starttime}, \textbf{ timespecsub}, and \textbf{ vty\+\_\+out()}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{group__vty_gad69c2d9c1f72d97740a90f190eba74c9}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_out\_va@{vty\_out\_va}}
\index{vty\_out\_va@{vty\_out\_va}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_out\_va()}
{\footnotesize\ttfamily int int vty\+\_\+out\+\_\+va (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{const char $\ast$}]{format,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}



References \textbf{ buf}, \textbf{ buffer\+\_\+put()}, \textbf{ fd}, \textbf{ len()}, \textbf{ obuf}, \textbf{ vty\+\_\+event()}, \textbf{ vty\+\_\+shell()}, and \textbf{ VTY\+\_\+\+WRITE}.



Referenced by \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+one\+\_\+va()}, \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+write()}, \textbf{ print\+\_\+func\+\_\+vty()}, and \textbf{ vty\+\_\+out()}.

\mbox{\label{group__vty_ga851a24025f8e48103264b4cc800a4cbb}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_read@{vty\_read}}
\index{vty\_read@{vty\_read}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_read()}
{\footnotesize\ttfamily int vty\+\_\+read (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



Read data via vty socket. 



References \textbf{ AUTH\+\_\+\+ENABLE\+\_\+\+NODE}, \textbf{ AUTH\+\_\+\+NODE}, \textbf{ buf}, \textbf{ buffer\+\_\+reset()}, \textbf{ CONTROL}, \textbf{ ERRNO\+\_\+\+IO\+\_\+\+RETRY}, \textbf{ escape}, \textbf{ fd}, \textbf{ iac}, \textbf{ iac\+\_\+sb\+\_\+in\+\_\+progress}, \textbf{ length}, \textbf{ node}, \textbf{ obuf}, \textbf{ sb\+\_\+buf}, \textbf{ sb\+\_\+len}, \textbf{ status}, \textbf{ vty\+\_\+backward\+\_\+char()}, \textbf{ vty\+\_\+backward\+\_\+kill\+\_\+word()}, \textbf{ vty\+\_\+backward\+\_\+word()}, \textbf{ vty\+\_\+beginning\+\_\+of\+\_\+line()}, \textbf{ vty\+\_\+buffer\+\_\+reset()}, \textbf{ vty\+\_\+clear\+\_\+screen()}, \textbf{ vty\+\_\+close()}, \textbf{ vty\+\_\+complete\+\_\+command()}, \textbf{ vty\+\_\+delete\+\_\+backward\+\_\+char()}, \textbf{ vty\+\_\+delete\+\_\+char()}, \textbf{ vty\+\_\+describe\+\_\+command()}, \textbf{ vty\+\_\+end\+\_\+config()}, \textbf{ vty\+\_\+end\+\_\+of\+\_\+line()}, \textbf{ VTY\+\_\+\+ESCAPE}, \textbf{ vty\+\_\+escape\+\_\+map()}, \textbf{ vty\+\_\+event()}, \textbf{ vty\+\_\+execute()}, \textbf{ vty\+\_\+forward\+\_\+char()}, \textbf{ vty\+\_\+forward\+\_\+kill\+\_\+word()}, \textbf{ vty\+\_\+forward\+\_\+word()}, \textbf{ vty\+\_\+kill\+\_\+line()}, \textbf{ vty\+\_\+kill\+\_\+line\+\_\+from\+\_\+beginning()}, \textbf{ VTY\+\_\+\+NEWLINE}, \textbf{ vty\+\_\+next\+\_\+line()}, \textbf{ VTY\+\_\+\+NORMAL}, \textbf{ vty\+\_\+out()}, \textbf{ VTY\+\_\+\+PRE\+\_\+\+ESCAPE}, \textbf{ vty\+\_\+previous\+\_\+line()}, \textbf{ VTY\+\_\+\+READ}, \textbf{ VTY\+\_\+\+READ\+\_\+\+BUFSIZ}, \textbf{ vty\+\_\+self\+\_\+insert()}, \textbf{ vty\+\_\+stop\+\_\+input()}, \textbf{ vty\+\_\+telnet\+\_\+option()}, \textbf{ vty\+\_\+transpose\+\_\+chars()}, and \textbf{ VTY\+\_\+\+WRITE}.



Referenced by \textbf{ client\+\_\+data()}.

\mbox{\label{group__vty_ga86c13e43fd9a6564e0efb1000abd7afe}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_read\_config\_file@{vty\_read\_config\_file}}
\index{vty\_read\_config\_file@{vty\_read\_config\_file}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_read\_config\_file()}
{\footnotesize\ttfamily int vty\+\_\+read\+\_\+config\+\_\+file (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file\+\_\+name,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



Read the configuration file using the VTY code. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em file\+\_\+name} & file name of the configuration file \\
\hline
\mbox{\texttt{ in}}  & {\em priv} & private data to be passed to vty\+\_\+read\+\_\+file \\
\hline
\end{DoxyParams}


References \textbf{ host\+\_\+config\+\_\+set()}, and \textbf{ vty\+\_\+read\+\_\+config\+\_\+filep()}.

\mbox{\label{group__vty_ga58a4d737b6b4a73c7d551c5ca0c2ec7d}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_read\_config\_filep@{vty\_read\_config\_filep}}
\index{vty\_read\_config\_filep@{vty\_read\_config\_filep}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_read\_config\_filep()}
{\footnotesize\ttfamily int vty\+\_\+read\+\_\+config\+\_\+filep (\begin{DoxyParamCaption}\item[{FILE $\ast$}]{confp,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



Read up VTY configuration from a file stream. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em confp} & file pointer of the stream for the configuration file \\
\hline
\mbox{\texttt{ in}}  & {\em priv} & private data to be passed to vty\+\_\+read\+\_\+file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero on success, non-\/zero on error 
\end{DoxyReturn}


References \textbf{ buf}, \textbf{ CMD\+\_\+\+ERR\+\_\+\+AMBIGUOUS}, \textbf{ CMD\+\_\+\+ERR\+\_\+\+INVALID\+\_\+\+INDENT}, \textbf{ CMD\+\_\+\+ERR\+\_\+\+NO\+\_\+\+MATCH}, \textbf{ CMD\+\_\+\+SUCCESS}, \textbf{ config\+\_\+from\+\_\+file()}, \textbf{ CONFIG\+\_\+\+NODE}, \textbf{ fd}, \textbf{ node}, \textbf{ priv}, \textbf{ type}, \textbf{ vty}, \textbf{ vty\+\_\+close()}, \textbf{ VTY\+\_\+\+FILE}, and \textbf{ vty\+\_\+new()}.



Referenced by \textbf{ vty\+\_\+read\+\_\+config\+\_\+file()}.

\mbox{\label{group__vty_ga2c45f9113ebc6f73172cdd2758fd0761}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_reset@{vty\_reset}}
\index{vty\_reset@{vty\_reset}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_reset()}
{\footnotesize\ttfamily void vty\+\_\+reset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Reset all VTY status. 



References \textbf{ buffer\+\_\+reset()}, \textbf{ obuf}, \textbf{ status}, \textbf{ vector\+\_\+active}, \textbf{ vector\+\_\+slot}, \textbf{ vty}, \textbf{ vty\+\_\+close()}, \textbf{ vtyvec}, and \textbf{ Vvty\+\_\+serv\+\_\+thread}.

\mbox{\label{group__vty_ga9b1edcfb420884aeca1b7bdd29ccaced}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_shell@{vty\_shell}}
\index{vty\_shell@{vty\_shell}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_shell()}
{\footnotesize\ttfamily int vty\+\_\+shell (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



Return if this VTY is a shell or not. 



References \textbf{ type}, and \textbf{ VTY\+\_\+\+SHELL}.



Referenced by \textbf{ vty\+\_\+out\+\_\+va()}.

\mbox{\label{group__vty_ga3237e741f1477116d22636f36555d563}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!vty\_shell\_serv@{vty\_shell\_serv}}
\index{vty\_shell\_serv@{vty\_shell\_serv}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{vty\_shell\_serv()}
{\footnotesize\ttfamily int vty\+\_\+shell\+\_\+serv (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})}



References \textbf{ type}, and \textbf{ VTY\+\_\+\+SHELL\+\_\+\+SERV}.



\doxysubsection{Variable Documentation}
\mbox{\label{group__vty_ga7efd4d2a7848641646e7f76e6120cc21}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!cfg\_description\_cmd@{cfg\_description\_cmd}}
\index{cfg\_description\_cmd@{cfg\_description\_cmd}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{cfg\_description\_cmd}
{\footnotesize\ttfamily struct \textbf{ cmd\+\_\+element} cfg\+\_\+description\+\_\+cmd\hspace{0.3cm}{\ttfamily [extern]}}

\mbox{\label{group__vty_gac05c47a999a17b71f7f45b80fa04ed64}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!cfg\_no\_description\_cmd@{cfg\_no\_description\_cmd}}
\index{cfg\_no\_description\_cmd@{cfg\_no\_description\_cmd}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{cfg\_no\_description\_cmd}
{\footnotesize\ttfamily struct \textbf{ cmd\+\_\+element} cfg\+\_\+no\+\_\+description\+\_\+cmd\hspace{0.3cm}{\ttfamily [extern]}}

\mbox{\label{group__vty_gafa161eda8b0404157b41cac53a429f6d}} 
\index{VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}!tall\_vty\_ctx@{tall\_vty\_ctx}}
\index{tall\_vty\_ctx@{tall\_vty\_ctx}!VTY (Virtual TTY) interface@{VTY (Virtual TTY) interface}}
\doxysubsubsection{tall\_vty\_ctx}
{\footnotesize\ttfamily void$\ast$ tall\+\_\+vty\+\_\+ctx\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ buffer\+\_\+getstr()}.

