\doxysection{control\+\_\+cmd.\+h}
\label{control__cmd_8h_source}\index{include/osmocom/ctrl/control\_cmd.h@{include/osmocom/ctrl/control\_cmd.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/core/talloc.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/write\_queue.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/core/logging.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/core/utils.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/vty/vector.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{preprocessor}{\#define CTRL\_CMD\_ERROR          -\/1}}
\DoxyCodeLine{13 \textcolor{preprocessor}{\#define CTRL\_CMD\_HANDLED        0}}
\DoxyCodeLine{14 \textcolor{preprocessor}{\#define CTRL\_CMD\_REPLY          1}}
\DoxyCodeLine{15 \textcolor{preprocessor}{\#define CTRL\_CMD\_TRAP\_ID        "{}0"{}}}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keyword}{struct }ctrl\_handle;}
\DoxyCodeLine{18 }
\DoxyCodeLine{20 \textcolor{keyword}{enum} ctrl\_node\_type \{}
\DoxyCodeLine{21         CTRL\_NODE\_ROOT,   \textcolor{comment}{/* Root elements */}}
\DoxyCodeLine{22         CTRL\_NODE\_BTS,     \textcolor{comment}{/* BTS specific (net.btsN.) */}}
\DoxyCodeLine{23         CTRL\_NODE\_TRX,     \textcolor{comment}{/* TRX specific (net.btsN.trxM.) */}}
\DoxyCodeLine{24         CTRL\_NODE\_TS,       \textcolor{comment}{/* TS specific (net.btsN.trxM.tsI.) */}}
\DoxyCodeLine{25         CTRL\_NODE\_FSM,     \textcolor{comment}{/* Finite State Machine (description) */}}
\DoxyCodeLine{26         CTRL\_NODE\_FSM\_INST,   \textcolor{comment}{/* Finite State Machine (instance) */}}
\DoxyCodeLine{27         CTRL\_NODE\_LCHAN, \textcolor{comment}{/* LCHAN specific (net.btsN.trxM.tsI.lchanL) */}}
\DoxyCodeLine{28         \_LAST\_CTRL\_NODE}
\DoxyCodeLine{29 \};}
\DoxyCodeLine{30 }
\DoxyCodeLine{32 \textcolor{keyword}{enum} ctrl\_type \{}
\DoxyCodeLine{33         CTRL\_TYPE\_UNKNOWN,}
\DoxyCodeLine{34         CTRL\_TYPE\_GET,}
\DoxyCodeLine{35         CTRL\_TYPE\_SET,}
\DoxyCodeLine{36         CTRL\_TYPE\_GET\_REPLY,}
\DoxyCodeLine{37         CTRL\_TYPE\_SET\_REPLY,}
\DoxyCodeLine{38         CTRL\_TYPE\_TRAP,}
\DoxyCodeLine{39         CTRL\_TYPE\_ERROR}
\DoxyCodeLine{40 \};}
\DoxyCodeLine{41 }
\DoxyCodeLine{43 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string ctrl\_type\_vals[];}
\DoxyCodeLine{44 }
\DoxyCodeLine{46 \textcolor{keyword}{struct }ctrl\_connection \{}
\DoxyCodeLine{47         \textcolor{keyword}{struct }llist\_head list\_entry;}
\DoxyCodeLine{48 }
\DoxyCodeLine{50         \textcolor{keyword}{struct }osmo\_wqueue write\_queue;}
\DoxyCodeLine{51 }
\DoxyCodeLine{53         \textcolor{keyword}{struct }msgb *pending\_msg;}
\DoxyCodeLine{54 }
\DoxyCodeLine{56         void (*closed\_cb)(\textcolor{keyword}{struct }ctrl\_connection *conn);}
\DoxyCodeLine{57 }
\DoxyCodeLine{59         \textcolor{keyword}{struct }llist\_head cmds;}
\DoxyCodeLine{60 }
\DoxyCodeLine{62         \textcolor{keyword}{struct }llist\_head def\_cmds;}
\DoxyCodeLine{63 \};}
\DoxyCodeLine{64 }
\DoxyCodeLine{65 \textcolor{keyword}{struct }ctrl\_cmd\_def;}
\DoxyCodeLine{66 }
\DoxyCodeLine{68 \textcolor{keyword}{struct }ctrl\_cmd \{}
\DoxyCodeLine{70         \textcolor{keyword}{struct }ctrl\_connection *ccon;}
\DoxyCodeLine{72         \textcolor{keyword}{enum} ctrl\_type type;}
\DoxyCodeLine{73         \textcolor{keywordtype}{char} *id;}
\DoxyCodeLine{75         \textcolor{keywordtype}{void} *node;}
\DoxyCodeLine{77         \textcolor{keywordtype}{char} *variable;}
\DoxyCodeLine{79         \textcolor{keywordtype}{char} *value;}
\DoxyCodeLine{81         \textcolor{keywordtype}{char} *reply;}
\DoxyCodeLine{83         \textcolor{keyword}{struct }ctrl\_cmd\_def *defer;}
\DoxyCodeLine{84 \};}
\DoxyCodeLine{85 }
\DoxyCodeLine{86 \textcolor{preprocessor}{\#define ctrl\_cmd\_reply\_printf(cmd, fmt, args ...) \(\backslash\)}}
\DoxyCodeLine{87 \textcolor{preprocessor}{        osmo\_talloc\_asprintf(cmd, cmd-\/>reply, fmt, \#\# args)}}
\DoxyCodeLine{88 }
\DoxyCodeLine{89 \textcolor{keyword}{struct }ctrl\_cmd\_struct \{}
\DoxyCodeLine{90         \textcolor{keywordtype}{int} nr\_commands;}
\DoxyCodeLine{91         \textcolor{keywordtype}{char} **command;}
\DoxyCodeLine{92 \};}
\DoxyCodeLine{93 }
\DoxyCodeLine{96 \textcolor{keyword}{struct }ctrl\_cmd\_element \{}
\DoxyCodeLine{98         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name;}
\DoxyCodeLine{99         \textcolor{keyword}{struct }ctrl\_cmd\_struct strcmd;}
\DoxyCodeLine{101         int (*set)(\textcolor{keyword}{struct }ctrl\_cmd *cmd, \textcolor{keywordtype}{void} *data);}
\DoxyCodeLine{103         int (*get)(\textcolor{keyword}{struct }ctrl\_cmd *cmd, \textcolor{keywordtype}{void} *data);}
\DoxyCodeLine{105         int (*verify)(\textcolor{keyword}{struct }ctrl\_cmd *cmd, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value, \textcolor{keywordtype}{void} *data);}
\DoxyCodeLine{106 \};}
\DoxyCodeLine{107 }
\DoxyCodeLine{108 \textcolor{keyword}{struct }ctrl\_cmd\_map \{}
\DoxyCodeLine{109         \textcolor{keywordtype}{char} *cmd;}
\DoxyCodeLine{110         \textcolor{keyword}{enum} ctrl\_type type;}
\DoxyCodeLine{111 \};}
\DoxyCodeLine{112 }
\DoxyCodeLine{113 \textcolor{comment}{/* deferred control command, i.e. responded asynchronously */}}
\DoxyCodeLine{114 \textcolor{keyword}{struct }ctrl\_cmd\_def \{}
\DoxyCodeLine{115         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* ctrl\_connection.def\_cmds */}}
\DoxyCodeLine{116         \textcolor{keyword}{struct }ctrl\_cmd *cmd;}
\DoxyCodeLine{117         \textcolor{keywordtype}{void} *data;                 \textcolor{comment}{/* opaque user data */}}
\DoxyCodeLine{118 \};}
\DoxyCodeLine{119 }
\DoxyCodeLine{120 \textcolor{keyword}{struct }ctrl\_cmd\_def *}
\DoxyCodeLine{121 ctrl\_cmd\_def\_make(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} ctrl\_cmd *cmd, \textcolor{keywordtype}{void} *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} secs);}
\DoxyCodeLine{122 \textcolor{keywordtype}{int} ctrl\_cmd\_def\_is\_zombie(\textcolor{keyword}{struct} ctrl\_cmd\_def *cd);}
\DoxyCodeLine{123 \textcolor{keywordtype}{int} ctrl\_cmd\_def\_send(\textcolor{keyword}{struct} ctrl\_cmd\_def *cd);}
\DoxyCodeLine{124 }
\DoxyCodeLine{125 \textcolor{keywordtype}{int} ctrl\_cmd\_exec(vector vline, \textcolor{keyword}{struct} ctrl\_cmd *command, vector node, \textcolor{keywordtype}{void} *data);}
\DoxyCodeLine{126 \textcolor{keywordtype}{int} ctrl\_cmd\_install(\textcolor{keyword}{enum} ctrl\_node\_type node, \textcolor{keyword}{struct} ctrl\_cmd\_element *cmd);}
\DoxyCodeLine{127 \textcolor{comment}{/* ctrl\_cmd\_send is also declared in control\_if.h, but legacy openbsc.git expects it here */}}
\DoxyCodeLine{128 \textcolor{keywordtype}{int} ctrl\_cmd\_send(\textcolor{keyword}{struct} osmo\_wqueue *queue, \textcolor{keyword}{struct} ctrl\_cmd *cmd);}
\DoxyCodeLine{129 \textcolor{keywordtype}{int} ctrl\_cmd\_send\_to\_all(\textcolor{keyword}{struct} ctrl\_handle *ctrl, \textcolor{keyword}{struct} ctrl\_cmd *cmd);}
\DoxyCodeLine{130 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_parse3(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} msgb *msg, \textcolor{keywordtype}{bool} *parse\_failed);}
\DoxyCodeLine{131 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_parse2(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{132 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_parse(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{133 \textcolor{keyword}{struct }msgb *ctrl\_cmd\_make(\textcolor{keyword}{struct} ctrl\_cmd *cmd);}
\DoxyCodeLine{134 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_cpy(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} ctrl\_cmd *cmd);}
\DoxyCodeLine{135 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_create(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{enum} ctrl\_type);}
\DoxyCodeLine{136 \textcolor{keyword}{struct }ctrl\_cmd *ctrl\_cmd\_trap(\textcolor{keyword}{struct} ctrl\_cmd *cmd);}
\DoxyCodeLine{137 }
\DoxyCodeLine{142 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_name) \(\backslash\)}}
\DoxyCodeLine{143 \textcolor{preprocessor}{static struct ctrl\_cmd\_element cmd\_\#\#cmdname = \{ \(\backslash\)}}
\DoxyCodeLine{144 \textcolor{preprocessor}{        .name = cmdstr, \(\backslash\)}}
\DoxyCodeLine{145 \textcolor{preprocessor}{        .get = \&get\_\#\#cmdname, \(\backslash\)}}
\DoxyCodeLine{146 \textcolor{preprocessor}{        .set = \&set\_\#\#cmdname, \(\backslash\)}}
\DoxyCodeLine{147 \textcolor{preprocessor}{        .verify = verify\_name, \(\backslash\)}}
\DoxyCodeLine{148 \textcolor{preprocessor}{\}}}
\DoxyCodeLine{149 }
\DoxyCodeLine{154 \textcolor{preprocessor}{\#define CTRL\_HELPER\_GET\_INT(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{155 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *\_data) \(\backslash\)}}
\DoxyCodeLine{156 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{157 \textcolor{preprocessor}{        dtype *node = cmd-\/>node; \(\backslash\)}}
\DoxyCodeLine{158 \textcolor{preprocessor}{        cmd-\/>reply = talloc\_asprintf(cmd, "{}\%i"{}}, node-\/>element); \(\backslash\)}
\DoxyCodeLine{159         if (!cmd-\/>reply) \{ \(\backslash\)}
\DoxyCodeLine{160                 cmd-\/>reply = "{}OOM"{}; \(\backslash\)}
\DoxyCodeLine{161                 return CTRL\_CMD\_ERROR; \(\backslash\)}
\DoxyCodeLine{162         \} \(\backslash\)}
\DoxyCodeLine{163         return CTRL\_CMD\_REPLY; \(\backslash\)}
\DoxyCodeLine{164 \}}
\DoxyCodeLine{165 }
\DoxyCodeLine{170 \textcolor{preprocessor}{\#define CTRL\_HELPER\_SET\_INT(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{171 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *\_data) \(\backslash\)}}
\DoxyCodeLine{172 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{173 \textcolor{preprocessor}{        dtype *node = cmd-\/>node; \(\backslash\)}}
\DoxyCodeLine{174 \textcolor{preprocessor}{        int tmp = atoi(cmd-\/>value); \(\backslash\)}}
\DoxyCodeLine{175 \textcolor{preprocessor}{        node-\/>element = tmp; \(\backslash\)}}
\DoxyCodeLine{176 \textcolor{preprocessor}{        return get\_\#\#cmdname(cmd, \_data); \(\backslash\)}}
\DoxyCodeLine{177 \textcolor{preprocessor}{\}}}
\DoxyCodeLine{178 }
\DoxyCodeLine{183 \textcolor{preprocessor}{\#define CTRL\_HELPER\_VERIFY\_RANGE(cmdname, min, max) \(\backslash\)}}
\DoxyCodeLine{184 \textcolor{preprocessor}{static int verify\_\#\#cmdname(struct ctrl\_cmd *cmd, const char *value, void *\_data) \(\backslash\)}}
\DoxyCodeLine{185 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{186 \textcolor{preprocessor}{        int tmp = atoi(value); \(\backslash\)}}
\DoxyCodeLine{187 \textcolor{preprocessor}{        if ((tmp >= min)\&\&(tmp <= max)) \{ \(\backslash\)}}
\DoxyCodeLine{188 \textcolor{preprocessor}{                return 0; \(\backslash\)}}
\DoxyCodeLine{189 \textcolor{preprocessor}{        \} \(\backslash\)}}
\DoxyCodeLine{190 \textcolor{preprocessor}{        cmd-\/>reply = "{}Input not within the range"{}}; \(\backslash\)}
\DoxyCodeLine{191         return -\/1; \(\backslash\)}
\DoxyCodeLine{192 \}}
\DoxyCodeLine{193 }
\DoxyCodeLine{201 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_RANGE(cmdname, cmdstr, dtype, element, min, max) \(\backslash\)}}
\DoxyCodeLine{202 \textcolor{preprocessor}{        CTRL\_HELPER\_GET\_INT(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{203 \textcolor{preprocessor}{        CTRL\_HELPER\_SET\_INT(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{204 \textcolor{preprocessor}{        CTRL\_HELPER\_VERIFY\_RANGE(cmdname, min, max) \(\backslash\)}}
\DoxyCodeLine{205 \textcolor{preprocessor}{CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_\#\#cmdname)}}
\DoxyCodeLine{206 }
\DoxyCodeLine{211 \textcolor{preprocessor}{\#define CTRL\_HELPER\_GET\_STRING(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{212 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *\_data) \(\backslash\)}}
\DoxyCodeLine{213 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{214 \textcolor{preprocessor}{        dtype *data = cmd-\/>node; \(\backslash\)}}
\DoxyCodeLine{215 \textcolor{preprocessor}{        cmd-\/>reply = talloc\_asprintf(cmd, "{}\%s"{}}, data-\/>element); \(\backslash\)}
\DoxyCodeLine{216         if (!cmd-\/>reply) \{ \(\backslash\)}
\DoxyCodeLine{217                 cmd-\/>reply = "{}OOM"{}; \(\backslash\)}
\DoxyCodeLine{218                 return CTRL\_CMD\_ERROR; \(\backslash\)}
\DoxyCodeLine{219         \} \(\backslash\)}
\DoxyCodeLine{220         return CTRL\_CMD\_REPLY; \(\backslash\)}
\DoxyCodeLine{221 \}}
\DoxyCodeLine{222 }
\DoxyCodeLine{227 \textcolor{preprocessor}{\#define CTRL\_HELPER\_SET\_STRING(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{228 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *\_data) \(\backslash\)}}
\DoxyCodeLine{229 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{230 \textcolor{preprocessor}{        dtype *data = cmd-\/>node; \(\backslash\)}}
\DoxyCodeLine{231 \textcolor{preprocessor}{        osmo\_talloc\_replace\_string(cmd-\/>node, \&data-\/>element, cmd-\/>value); \(\backslash\)}}
\DoxyCodeLine{232 \textcolor{preprocessor}{        return get\_\#\#cmdname(cmd, \_data); \(\backslash\)}}
\DoxyCodeLine{233 \textcolor{preprocessor}{\}}}
\DoxyCodeLine{234 }
\DoxyCodeLine{240 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_STRING(cmdname, cmdstr, dtype, element) \(\backslash\)}}
\DoxyCodeLine{241 \textcolor{preprocessor}{        CTRL\_HELPER\_GET\_STRING(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{242 \textcolor{preprocessor}{        CTRL\_HELPER\_SET\_STRING(cmdname, dtype, element) \(\backslash\)}}
\DoxyCodeLine{243 \textcolor{preprocessor}{CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, NULL)}}
\DoxyCodeLine{244 }
\DoxyCodeLine{248 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE(cmdname, cmdstr) \(\backslash\)}}
\DoxyCodeLine{249 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data); \(\backslash\)}}
\DoxyCodeLine{250 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data); \(\backslash\)}}
\DoxyCodeLine{251 \textcolor{preprocessor}{static int verify\_\#\#cmdname(struct ctrl\_cmd *cmd, const char *value, void *data); \(\backslash\)}}
\DoxyCodeLine{252 \textcolor{preprocessor}{CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_\#\#cmdname)}}
\DoxyCodeLine{253 }
\DoxyCodeLine{257 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_RO(cmdname, cmdstr) \(\backslash\)}}
\DoxyCodeLine{258 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data);             \(\backslash\)}}
\DoxyCodeLine{259 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data)      \(\backslash\)}}
\DoxyCodeLine{260 \textcolor{preprocessor}{\{                                                                       \(\backslash\)}}
\DoxyCodeLine{261 \textcolor{preprocessor}{        cmd-\/>reply = "{}Read Only attribute"{}};                             \(\backslash\)}
\DoxyCodeLine{262         return CTRL\_CMD\_ERROR;                                          \(\backslash\)}
\DoxyCodeLine{263 \}                                                                       \(\backslash\)}
\DoxyCodeLine{264 static int verify\_\#\#cmdname(struct ctrl\_cmd *cmd, const char *value, void *data) \(\backslash\)}
\DoxyCodeLine{265 \{                                                                       \(\backslash\)}
\DoxyCodeLine{266         cmd-\/>reply = "{}Read Only attribute"{};                             \(\backslash\)}
\DoxyCodeLine{267         return 1;                                                       \(\backslash\)}
\DoxyCodeLine{268 \}                                                                       \(\backslash\)}
\DoxyCodeLine{269 CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_\#\#cmdname)}
\DoxyCodeLine{270 }
\DoxyCodeLine{274 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_WO(cmdname, cmdstr)                                     \(\backslash\)}}
\DoxyCodeLine{275 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data);                     \(\backslash\)}}
\DoxyCodeLine{276 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data)                      \(\backslash\)}}
\DoxyCodeLine{277 \textcolor{preprocessor}{\{                                                                               \(\backslash\)}}
\DoxyCodeLine{278 \textcolor{preprocessor}{        cmd-\/>reply = "{}Write Only attribute"{}};                                    \(\backslash\)}
\DoxyCodeLine{279         return CTRL\_CMD\_ERROR;                                                  \(\backslash\)}
\DoxyCodeLine{280 \}                                                                               \(\backslash\)}
\DoxyCodeLine{281 static int verify\_\#\#cmdname(struct ctrl\_cmd *cmd, const char *val, void *data); \(\backslash\)}
\DoxyCodeLine{282 CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_\#\#cmdname)}
\DoxyCodeLine{283 }
\DoxyCodeLine{287 \textcolor{preprocessor}{\#define CTRL\_CMD\_DEFINE\_WO\_NOVRF(cmdname, cmdstr)                               \(\backslash\)}}
\DoxyCodeLine{288 \textcolor{preprocessor}{static int set\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data);                     \(\backslash\)}}
\DoxyCodeLine{289 \textcolor{preprocessor}{static int get\_\#\#cmdname(struct ctrl\_cmd *cmd, void *data)                      \(\backslash\)}}
\DoxyCodeLine{290 \textcolor{preprocessor}{\{                                                                               \(\backslash\)}}
\DoxyCodeLine{291 \textcolor{preprocessor}{        cmd-\/>reply = "{}Write Only attribute"{}};                                    \(\backslash\)}
\DoxyCodeLine{292         return CTRL\_CMD\_ERROR;                                                  \(\backslash\)}
\DoxyCodeLine{293 \}                                                                               \(\backslash\)}
\DoxyCodeLine{294 static int verify\_\#\#cmdname(struct ctrl\_cmd *cmd, const char *val, void *data)  \(\backslash\)}
\DoxyCodeLine{295 \{                                                                               \(\backslash\)}
\DoxyCodeLine{296         return 0;                                                               \(\backslash\)}
\DoxyCodeLine{297 \}                                                                               \(\backslash\)}
\DoxyCodeLine{298 CTRL\_CMD\_DEFINE\_STRUCT(cmdname, cmdstr, verify\_\#\#cmdname)}
\DoxyCodeLine{299 }
\DoxyCodeLine{300 \textcolor{keyword}{struct }gsm\_network;}

\end{DoxyCode}
