\doxysection{src/ctrl/control\+\_\+vty.c File Reference}
\label{control__vty_8c}\index{src/ctrl/control\_vty.c@{src/ctrl/control\_vty.c}}


VTY configuration for Control interface.  


{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/ctrl/control\+\_\+vty.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/vty/command.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ DEFUN} (cfg\+\_\+ctrl\+\_\+bind\+\_\+addr, cfg\+\_\+ctrl\+\_\+bind\+\_\+addr\+\_\+cmd, \char`\"{}bind A.\+B.\+C.\+D [$<$0-\/65535$>$]\char`\"{}, \char`\"{}Set bind address to listen \textbf{ for} Control \textbf{ connections\textbackslash{}n}\char`\"{} \char`\"{}Local IP address (default 127.\+0.\+0.\+1)\textbackslash{}\textbf{ n}\char`\"{} \char`\"{}Local TCP port \textbf{ number\textbackslash{}n}\char`\"{})
\item 
const char $\ast$ \textbf{ ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+addr} (void)
\item 
uint16\+\_\+t \textbf{ ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+port} (uint16\+\_\+t default\+\_\+port)
\item 
\textbf{ DEFUN} (cfg\+\_\+ctrl, cfg\+\_\+ctrl\+\_\+cmd, \char`\"{}ctrl\char`\"{}, \char`\"{}Configure the Control Interface\char`\"{})
\item 
static int \textbf{ config\+\_\+write\+\_\+ctrl} (struct \textbf{ vty} $\ast$\textbf{ vty})
\item 
int \textbf{ ctrl\+\_\+vty\+\_\+init} (void $\ast$ctx)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static void $\ast$ \textbf{ ctrl\+\_\+vty\+\_\+ctx} = NULL
\item 
static const char $\ast$ \textbf{ ctrl\+\_\+vty\+\_\+bind\+\_\+addr} = NULL
\item 
static int \textbf{ ctrl\+\_\+bind\+\_\+port} = -\/1
\item 
static struct \textbf{ cmd\+\_\+node} \textbf{ ctrl\+\_\+node}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
VTY configuration for Control interface. 



\doxysubsection{Function Documentation}
\mbox{\label{control__vty_8c_a4b517a75e5bc1a63132932497873163d}} 
\index{control\_vty.c@{control\_vty.c}!config\_write\_ctrl@{config\_write\_ctrl}}
\index{config\_write\_ctrl@{config\_write\_ctrl}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{config\_write\_ctrl()}
{\footnotesize\ttfamily static int config\+\_\+write\+\_\+ctrl (\begin{DoxyParamCaption}\item[{struct \textbf{ vty} $\ast$}]{vty }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ CMD\+\_\+\+SUCCESS}, \textbf{ ctrl\+\_\+vty\+\_\+bind\+\_\+addr}, \textbf{ VTY\+\_\+\+NEWLINE}, and \textbf{ vty\+\_\+out()}.



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

\mbox{\label{control__vty_8c_a9ebb9783d7204a1ada74b0ce6fca09f1}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_vty\_get\_bind\_addr@{ctrl\_vty\_get\_bind\_addr}}
\index{ctrl\_vty\_get\_bind\_addr@{ctrl\_vty\_get\_bind\_addr}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_vty\_get\_bind\_addr()}
{\footnotesize\ttfamily const char $\ast$ ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+addr (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ ctrl\+\_\+vty\+\_\+bind\+\_\+addr}.



Referenced by \textbf{ ctrl\+\_\+interface\+\_\+setup2()}.

\mbox{\label{control__vty_8c_a9b5e46bb696d1fcf274cdca15fbfd076}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_vty\_get\_bind\_port@{ctrl\_vty\_get\_bind\_port}}
\index{ctrl\_vty\_get\_bind\_port@{ctrl\_vty\_get\_bind\_port}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_vty\_get\_bind\_port()}
{\footnotesize\ttfamily uint16\+\_\+t ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+port (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{default\+\_\+port }\end{DoxyParamCaption})}



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



Referenced by \textbf{ ctrl\+\_\+interface\+\_\+setup2()}.

\mbox{\label{control__vty_8c_a5855906a0c3e10b0ab6a5bcbacac0cc7}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_vty\_init@{ctrl\_vty\_init}}
\index{ctrl\_vty\_init@{ctrl\_vty\_init}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_vty\_init()}
{\footnotesize\ttfamily int ctrl\+\_\+vty\+\_\+init (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}



References \textbf{ CONFIG\+\_\+\+NODE}, \textbf{ config\+\_\+write\+\_\+ctrl()}, \textbf{ ctrl\+\_\+node}, \textbf{ ctrl\+\_\+vty\+\_\+ctx}, \textbf{ install\+\_\+lib\+\_\+element()}, \textbf{ install\+\_\+node()}, and \textbf{ L\+\_\+\+CTRL\+\_\+\+NODE}.

\mbox{\label{control__vty_8c_a87fd8d83eebbdeeac851636677e676b6}} 
\index{control\_vty.c@{control\_vty.c}!DEFUN@{DEFUN}}
\index{DEFUN@{DEFUN}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{DEFUN()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily DEFUN (\begin{DoxyParamCaption}\item[{cfg\+\_\+ctrl}]{,  }\item[{cfg\+\_\+ctrl\+\_\+cmd}]{,  }\item[{\char`\"{}ctrl\char`\"{}}]{,  }\item[{\char`\"{}Configure the Control Interface\char`\"{}}]{ }\end{DoxyParamCaption})}



References \textbf{ CMD\+\_\+\+SUCCESS}, \textbf{ vty\+::index}, \textbf{ L\+\_\+\+CTRL\+\_\+\+NODE}, and \textbf{ vty\+::node}.

\mbox{\label{control__vty_8c_a0e715e32acbd15dc1c3191aaaad5311b}} 
\index{control\_vty.c@{control\_vty.c}!DEFUN@{DEFUN}}
\index{DEFUN@{DEFUN}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{DEFUN()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily DEFUN (\begin{DoxyParamCaption}\item[{cfg\+\_\+ctrl\+\_\+bind\+\_\+addr}]{,  }\item[{cfg\+\_\+ctrl\+\_\+bind\+\_\+addr\+\_\+cmd}]{,  }\item[{\char`\"{}bind A.\+B.\+C.\+D \char`\"{}}]{[$<$ 0-\/65535 $>$],  }\item[{\char`\"{}Set bind address to listen \textbf{ for} Control \textbf{ connections\textbackslash{}n}\char`\"{} \char`\"{}Local IP address (default 127.\+0.\+0.\+1)\textbackslash{}\textbf{ n}\char`\"{} \char`\"{}Local TCP port \textbf{ number\textbackslash{}n}\char`\"{}}]{ }\end{DoxyParamCaption})}



References \textbf{ argc}, \textbf{ argv}, \textbf{ CMD\+\_\+\+SUCCESS}, \textbf{ ctrl\+\_\+bind\+\_\+port}, \textbf{ ctrl\+\_\+vty\+\_\+bind\+\_\+addr}, and \textbf{ ctrl\+\_\+vty\+\_\+ctx}.



\doxysubsection{Variable Documentation}
\mbox{\label{control__vty_8c_aa0c344022a2bcb086deb378d36f87b99}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_bind\_port@{ctrl\_bind\_port}}
\index{ctrl\_bind\_port@{ctrl\_bind\_port}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_bind\_port}
{\footnotesize\ttfamily int ctrl\+\_\+bind\+\_\+port = -\/1\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+port()}, and \textbf{ DEFUN()}.

\mbox{\label{control__vty_8c_a50c433e185d494b4b7dce60ccbfb4e00}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_node@{ctrl\_node}}
\index{ctrl\_node@{ctrl\_node}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_node}
{\footnotesize\ttfamily struct \textbf{ cmd\+\_\+node} ctrl\+\_\+node\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        L\_CTRL\_NODE,}
\DoxyCodeLine{        \textcolor{stringliteral}{"{}\%s(config-\/ctrl)\# "{}},}
\DoxyCodeLine{        1,}
\DoxyCodeLine{\}}

\end{DoxyCode}


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

\mbox{\label{control__vty_8c_afc278944c73bc7315b6a1310ffe360bb}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_vty\_bind\_addr@{ctrl\_vty\_bind\_addr}}
\index{ctrl\_vty\_bind\_addr@{ctrl\_vty\_bind\_addr}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_vty\_bind\_addr}
{\footnotesize\ttfamily const char$\ast$ ctrl\+\_\+vty\+\_\+bind\+\_\+addr = NULL\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ config\+\_\+write\+\_\+ctrl()}, \textbf{ ctrl\+\_\+vty\+\_\+get\+\_\+bind\+\_\+addr()}, and \textbf{ DEFUN()}.

\mbox{\label{control__vty_8c_aa4ac0902596531468fd99fa35c200f82}} 
\index{control\_vty.c@{control\_vty.c}!ctrl\_vty\_ctx@{ctrl\_vty\_ctx}}
\index{ctrl\_vty\_ctx@{ctrl\_vty\_ctx}!control\_vty.c@{control\_vty.c}}
\doxysubsubsection{ctrl\_vty\_ctx}
{\footnotesize\ttfamily void$\ast$ ctrl\+\_\+vty\+\_\+ctx = NULL\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ ctrl\+\_\+vty\+\_\+init()}, and \textbf{ DEFUN()}.

