blob: 2dc873f9146c13de0a735a450c108e1b8c430ef0 [file] [log] [blame]
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +02001/* E1 vty interface */
2/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
3 * All Rights Reserved
4 *
Harald Welte323d39d2017-11-13 01:09:21 +09005 * SPDX-License-Identifier: AGPL-3.0+
6 *
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +02007 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21#include "internal.h"
22
Sylvain Munauteb55e2f2020-05-08 09:42:51 +020023#include <fcntl.h>
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020024#include <stdlib.h>
25#include <unistd.h>
Harald Welted4f8f682011-08-19 13:28:48 +020026#include <string.h>
Sylvain Munauteb55e2f2020-05-08 09:42:51 +020027#include <sys/stat.h>
28#include <sys/types.h>
Stefan Sperlingb24efa52018-08-28 14:03:41 +020029#include <sys/un.h>
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020030
Harald Weltef2737fc2011-08-16 14:30:10 +020031#include <osmocom/core/linuxlist.h>
32#include <osmocom/core/talloc.h>
33#include <osmocom/core/utils.h>
34#include <osmocom/gsm/gsm_utils.h>
35
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020036#include <osmocom/vty/command.h>
37#include <osmocom/vty/buffer.h>
38#include <osmocom/vty/vty.h>
39#include <osmocom/vty/logging.h>
Harald Weltef2737fc2011-08-16 14:30:10 +020040#include <osmocom/vty/misc.h>
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020041#include <osmocom/vty/telnet_interface.h>
42
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020043#include <osmocom/abis/e1_input.h>
Eric Wildef1f3272019-07-10 18:10:31 +020044#include <osmocom/abis/ipa.h>
Harald Weltef2737fc2011-08-16 14:30:10 +020045
46/* CONFIG */
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020047
Sylvain Munautb559a532019-05-09 11:14:26 +020048#define E1_DRIVER_NAMES "(misdn|misdn_lapd|dahdi|e1d|ipa|unixsocket)"
Harald Weltece307b42011-08-21 01:18:05 +020049#define E1_DRIVER_HELP "mISDN supported E1 Card (kernel LAPD)\n" \
50 "mISDN supported E1 Card (userspace LAPD)\n" \
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020051 "DAHDI supported E1/T1/J1 Card\n" \
Harald Welte1f922842020-07-02 11:19:15 +020052 "osmo-e1d supported E1 interface\n" \
Holger Hans Peter Freyther36bac9a2012-07-20 23:49:52 +020053 "IPA TCP/IP input\n" \
Alexander Couzensbeb10ef2016-11-01 22:05:13 +010054 "Unix socket input\n"
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020055
Harald Welte601a9c72011-08-16 14:17:49 +020056#define E1_LINE_HELP "Configure E1/T1/J1 Line\n" "Line Number\n"
57
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020058DEFUN(cfg_e1line_driver, cfg_e1_line_driver_cmd,
59 "e1_line <0-255> driver " E1_DRIVER_NAMES,
Harald Welte601a9c72011-08-16 14:17:49 +020060 E1_LINE_HELP "Set driver for this line\n"
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020061 E1_DRIVER_HELP)
62{
63 struct e1inp_line *line;
64 int e1_nr = atoi(argv[0]);
65
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +020066 line = e1inp_line_find(e1_nr);
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +020067 if (line) {
68 vty_out(vty, "%% Line %d already exists%s", e1_nr, VTY_NEWLINE);
69 return CMD_WARNING;
70 }
71 line = e1inp_line_create(e1_nr, argv[1]);
72 if (!line) {
73 vty_out(vty, "%% Error creating line %d%s", e1_nr, VTY_NEWLINE);
74 return CMD_WARNING;
75 }
76
77 return CMD_SUCCESS;
78}
79
Harald Weltec2889512011-09-13 23:49:04 +010080DEFUN(cfg_e1line_port, cfg_e1_line_port_cmd,
Harald Welte356918f2011-09-26 22:54:51 +020081 "e1_line <0-255> port <0-255>",
82 E1_LINE_HELP "Set physical port/span/card number\n"
Harald Weltec2889512011-09-13 23:49:04 +010083 "E1/T1 Port/Span/Card number\n")
84{
85 struct e1inp_line *line;
86 int e1_nr = atoi(argv[0]);
87
88 line = e1inp_line_find(e1_nr);
89 if (!line) {
90 vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE);
91 return CMD_WARNING;
92 }
93
94 line->port_nr = atoi(argv[1]);
95
96 return CMD_SUCCESS;
97}
98
Alexander Couzensbeb10ef2016-11-01 22:05:13 +010099DEFUN(cfg_e1line_socket, cfg_e1_line_socket_cmd,
100 "e1_line <0-255> socket .SOCKET",
101 E1_LINE_HELP "Set socket path for unixsocket\n"
102 "socket path\n")
103{
104 struct e1inp_line *line;
105 int e1_nr = atoi(argv[0]);
Stefan Sperlingb24efa52018-08-28 14:03:41 +0200106 struct sockaddr_un sun;
107
Stefan Sperling0d7d0b02018-09-20 17:34:31 +0200108 /* Don't exceed the maximum unix socket path length, including a NUL byte. See the unix(7) man page.*/
109 if (strlen(argv[1]) > sizeof(sun.sun_path) - 1) {
Stefan Sperlingb24efa52018-08-28 14:03:41 +0200110 vty_out(vty, "%% Socket path length exceeds %zd bytes: '%s'%s",
Stefan Sperling0d7d0b02018-09-20 17:34:31 +0200111 sizeof(sun.sun_path) - 1, argv[1], VTY_NEWLINE);
Stefan Sperlingb24efa52018-08-28 14:03:41 +0200112 return CMD_WARNING;
113 }
Alexander Couzensbeb10ef2016-11-01 22:05:13 +0100114
115 line = e1inp_line_find(e1_nr);
116 if (!line) {
117 vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE);
118 return CMD_WARNING;
119 }
120
121 line->sock_path = talloc_strdup(line, argv[1]);
122
123 return CMD_SUCCESS;
124}
125
Jacob Erlbeck86dae842014-01-16 18:10:37 +0100126#define KEEPALIVE_HELP "Enable keep-alive probing\n"
127static int set_keepalive_params(struct vty *vty, int e1_nr,
128 int idle, int num_probes, int probe_interval)
129{
130 struct e1inp_line *line = e1inp_line_find(e1_nr);
131
132 if (!line) {
133 vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE);
134 return CMD_WARNING;
135 }
136 if (!line->driver->has_keepalive && num_probes != 0) {
137 vty_out(vty, "%% Driver '%s' does not support keep alive%s",
138 line->driver->name, VTY_NEWLINE);
139 return CMD_WARNING;
140 }
141
142 line->keepalive_idle_timeout = idle;
143 line->keepalive_num_probes = num_probes;
144 line->keepalive_probe_interval = probe_interval;
145
146 return CMD_SUCCESS;
147}
148
149DEFUN(cfg_e1line_keepalive, cfg_e1_line_keepalive_cmd,
150 "e1_line <0-255> keepalive",
151 E1_LINE_HELP KEEPALIVE_HELP)
152{
153 return set_keepalive_params(vty, atoi(argv[0]),
154 E1INP_USE_DEFAULT, E1INP_USE_DEFAULT,
155 E1INP_USE_DEFAULT);
156}
157
158DEFUN(cfg_e1line_keepalive_params, cfg_e1_line_keepalive_params_cmd,
159 "e1_line <0-255> keepalive <1-300> <1-20> <1-300>",
160 E1_LINE_HELP KEEPALIVE_HELP
161 "Idle interval in seconds before probes are sent\n"
162 "Number of probes to sent\n"
163 "Delay between probe packets in seconds\n")
164{
165 return set_keepalive_params(vty, atoi(argv[0]),
166 atoi(argv[1]), atoi(argv[2]), atoi(argv[3]));
167}
168
169DEFUN(cfg_e1line_no_keepalive, cfg_e1_line_no_keepalive_cmd,
170 "no e1_line <0-255> keepalive",
171 NO_STR E1_LINE_HELP KEEPALIVE_HELP)
172{
173 return set_keepalive_params(vty, atoi(argv[0]), 0, 0, 0);
174}
175
Eric Wildef1f3272019-07-10 18:10:31 +0200176#define IPA_KEEPALIVE_HELP "Enable IPA PING/PONG keep-alive\n"
177static int set_ipa_keepalive_params(struct vty *vty, int e1_nr, int interval, int wait_for_resp)
178{
179 struct e1inp_line *line = e1inp_line_find(e1_nr);
180
181 if (!line) {
182 vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE);
183 return CMD_WARNING;
184 }
185
186 if (strcmp(line->driver->name, "ipa") != 0) {
187 vty_out(vty, "%% Line %d doesn't use the ipa driver%s", e1_nr, VTY_NEWLINE);
188 return CMD_WARNING;
189 }
190
191 TALLOC_FREE(line->ipa_kap);
192 if (interval) {
193 line->ipa_kap = talloc_zero(line, struct ipa_keepalive_params);
194 line->ipa_kap->wait_for_resp = wait_for_resp;
195 line->ipa_kap->interval = interval;
196 }
197
198 return CMD_SUCCESS;
199}
200
201DEFUN(cfg_e1line_ipa_keepalive, cfg_e1_line_ipa_keepalive_cmd,
202 "e1_line <0-255> ipa-keepalive <1-300> <1-300>",
203 E1_LINE_HELP IPA_KEEPALIVE_HELP
204 "Idle interval in seconds before probes are sent\n"
205 "Time to wait for PONG response\n")
206{
207 return set_ipa_keepalive_params(vty, atoi(argv[0]), atoi(argv[1]), atoi(argv[2]));
208}
209
210DEFUN(cfg_e1line_no_ipa_keepalive, cfg_e1_line_no_ipa_keepalive_cmd,
211 "no e1_line <0-255> ipa-keepalive",
212 NO_STR E1_LINE_HELP IPA_KEEPALIVE_HELP)
213{
214 return set_ipa_keepalive_params(vty, atoi(argv[0]), 0, 0);
215}
216
Harald Welte601a9c72011-08-16 14:17:49 +0200217DEFUN(cfg_e1line_name, cfg_e1_line_name_cmd,
218 "e1_line <0-255> name .LINE",
219 E1_LINE_HELP "Set name for this line\n" "Human readable name\n")
220{
221 struct e1inp_line *line;
222 int e1_nr = atoi(argv[0]);
223
224 line = e1inp_line_find(e1_nr);
225 if (!line) {
226 vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE);
227 return CMD_WARNING;
228 }
229 if (line->name) {
230 talloc_free((void *)line->name);
231 line->name = NULL;
232 }
233 line->name = talloc_strdup(line, argv[1]);
234
235 return CMD_SUCCESS;
236}
237
Sylvain Munauteb55e2f2020-05-08 09:42:51 +0200238DEFUN(cfg_e1_pcap, cfg_e1_pcap_cmd,
239 "pcap .FILE",
240 "Setup a pcap recording of all E1 traffic\n"
241 "Filename to save the packets to\n")
242{
243 int fd;
244
245 fd = open(argv[0], O_WRONLY | O_CREAT | O_TRUNC, 0660);
246 if (fd < 0) {
247 vty_out(vty, "Failed to setup E1 pcap recording to %s.%s", argv[0], VTY_NEWLINE);
248 return CMD_WARNING;
249 }
250
251 e1_set_pcap_fd(fd);
252
253 return CMD_SUCCESS;
254}
255
256DEFUN(cfg_e1_no_pcap, cfg_e1_no_pcap_cmd,
257 "no pcap",
258 NO_STR "Disable pcap recording of all E1 traffic\n")
259{
260 e1_set_pcap_fd(-1);
261 return CMD_SUCCESS;
262}
263
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200264DEFUN(cfg_e1inp, cfg_e1inp_cmd,
265 "e1_input",
266 "Configure E1/T1/J1 TDM input\n")
267{
Harald Weltecc2241b2011-07-19 16:06:06 +0200268 vty->node = L_E1INP_NODE;
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200269
270 return CMD_SUCCESS;
271}
272
Neels Hofmeyr0db1d432016-02-22 13:29:09 +0100273DEFUN(cfg_ipa_bind,
274 cfg_ipa_bind_cmd,
275 "ipa bind A.B.C.D",
276 "ipa driver config\n"
277 "Set ipa local bind address\n"
278 "Listen on this IP address (default 0.0.0.0)\n")
279{
280 e1inp_ipa_set_bind_addr(argv[0]);
281 return CMD_SUCCESS;
282}
283
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200284static int e1inp_config_write(struct vty *vty)
285{
286 struct e1inp_line *line;
287
288 if (llist_empty(&e1inp_line_list))
289 return CMD_SUCCESS;
290
291 vty_out(vty, "e1_input%s", VTY_NEWLINE);
292
293 llist_for_each_entry(line, &e1inp_line_list, list) {
294 vty_out(vty, " e1_line %u driver %s%s", line->num,
295 line->driver->name, VTY_NEWLINE);
Harald Weltec2889512011-09-13 23:49:04 +0100296 vty_out(vty, " e1_line %u port %u%s", line->num,
297 line->port_nr, VTY_NEWLINE);
Harald Welte601a9c72011-08-16 14:17:49 +0200298 if (line->name)
299 vty_out(vty, " e1_line %u name %s%s", line->num,
300 line->name, VTY_NEWLINE);
Jacob Erlbeck86dae842014-01-16 18:10:37 +0100301 if (!line->keepalive_num_probes)
302 vty_out(vty, " no e1_line %u keepalive%s", line->num,
303 VTY_NEWLINE);
304 else if (line->keepalive_idle_timeout == E1INP_USE_DEFAULT &&
305 line->keepalive_num_probes == E1INP_USE_DEFAULT &&
306 line->keepalive_probe_interval == E1INP_USE_DEFAULT)
307 vty_out(vty, " e1_line %u keepalive%s", line->num,
308 VTY_NEWLINE);
309 else
310 vty_out(vty, " e1_line %u keepalive %d %d %d%s",
311 line->num,
312 line->keepalive_idle_timeout,
313 line->keepalive_num_probes,
314 line->keepalive_probe_interval,
315 VTY_NEWLINE);
Eric Wildef1f3272019-07-10 18:10:31 +0200316 if (line->ipa_kap)
317 vty_out(vty, " e1_line %u ipa-keepalive %d %d%s", line->num,
318 line->ipa_kap->interval, line->ipa_kap->wait_for_resp,
319 VTY_NEWLINE);
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200320 }
Neels Hofmeyr0db1d432016-02-22 13:29:09 +0100321
322 const char *ipa_bind = e1inp_ipa_get_bind_addr();
323 if (ipa_bind && (strcmp(ipa_bind, "0.0.0.0") != 0))
324 vty_out(vty, " ipa bind %s%s",
325 ipa_bind, VTY_NEWLINE);
326
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200327 return CMD_SUCCESS;
328}
329
Harald Weltef2737fc2011-08-16 14:30:10 +0200330/* SHOW */
331
Harald Welte6e37c592011-08-11 12:43:31 +0200332static void e1drv_dump_vty(struct vty *vty, struct e1inp_driver *drv)
333{
334 vty_out(vty, "E1 Input Driver %s%s", drv->name, VTY_NEWLINE);
335}
336
337DEFUN(show_e1drv,
338 show_e1drv_cmd,
339 "show e1_driver",
340 SHOW_STR "Display information about available E1 drivers\n")
341{
342 struct e1inp_driver *drv;
343
344 llist_for_each_entry(drv, &e1inp_driver_list, list)
345 e1drv_dump_vty(vty, drv);
346
347 return CMD_SUCCESS;
348}
349
Harald Weltef2737fc2011-08-16 14:30:10 +0200350static void e1line_dump_vty(struct vty *vty, struct e1inp_line *line,
351 int stats)
Harald Welte6e37c592011-08-11 12:43:31 +0200352{
353 vty_out(vty, "E1 Line Number %u, Name %s, Driver %s%s",
354 line->num, line->name ? line->name : "",
355 line->driver->name, VTY_NEWLINE);
Harald Weltefe05cf52011-09-26 23:18:41 +0200356 if (line->driver->vty_show)
357 line->driver->vty_show(vty, line);
Harald Weltef2737fc2011-08-16 14:30:10 +0200358 if (stats)
359 vty_out_rate_ctr_group(vty, " ", line->rate_ctr);
Harald Welte6e37c592011-08-11 12:43:31 +0200360}
361
362DEFUN(show_e1line,
363 show_e1line_cmd,
Harald Weltef2737fc2011-08-16 14:30:10 +0200364 "show e1_line [line_nr] [stats]",
Harald Welte6e37c592011-08-11 12:43:31 +0200365 SHOW_STR "Display information about a E1 line\n"
Holger Hans Peter Freyther9e8f1c02012-07-21 00:09:52 +0200366 "E1 Line Number\n" "Include statistics\n")
Harald Welte6e37c592011-08-11 12:43:31 +0200367{
368 struct e1inp_line *line;
Harald Weltef2737fc2011-08-16 14:30:10 +0200369 int stats = 0;
Harald Welte6e37c592011-08-11 12:43:31 +0200370
Harald Weltef2737fc2011-08-16 14:30:10 +0200371 if (argc >= 1 && strcmp(argv[0], "stats")) {
Harald Welte6e37c592011-08-11 12:43:31 +0200372 int num = atoi(argv[0]);
Harald Weltef2737fc2011-08-16 14:30:10 +0200373 if (argc >= 2)
374 stats = 1;
Harald Welte6e37c592011-08-11 12:43:31 +0200375 llist_for_each_entry(line, &e1inp_line_list, list) {
376 if (line->num == num) {
Harald Weltef2737fc2011-08-16 14:30:10 +0200377 e1line_dump_vty(vty, line, stats);
Harald Welte6e37c592011-08-11 12:43:31 +0200378 return CMD_SUCCESS;
379 }
380 }
381 return CMD_WARNING;
382 }
383
Harald Weltef2737fc2011-08-16 14:30:10 +0200384 if (argc >= 1 && !strcmp(argv[0], "stats"))
385 stats = 1;
386
Harald Welte6e37c592011-08-11 12:43:31 +0200387 llist_for_each_entry(line, &e1inp_line_list, list)
Harald Weltef2737fc2011-08-16 14:30:10 +0200388 e1line_dump_vty(vty, line, stats);
Harald Welte6e37c592011-08-11 12:43:31 +0200389
390 return CMD_SUCCESS;
391}
392
393static void e1ts_dump_vty(struct vty *vty, struct e1inp_ts *ts)
394{
395 if (ts->type == E1INP_TS_TYPE_NONE)
396 return;
397 vty_out(vty, "E1 Timeslot %2u of Line %u is Type %s%s",
398 ts->num, ts->line->num, e1inp_tstype_name(ts->type),
399 VTY_NEWLINE);
400}
401
402DEFUN(show_e1ts,
403 show_e1ts_cmd,
404 "show e1_timeslot [line_nr] [ts_nr]",
405 SHOW_STR "Display information about a E1 timeslot\n"
406 "E1 Line Number\n" "E1 Timeslot Number\n")
407{
408 struct e1inp_line *line = NULL;
409 struct e1inp_ts *ts;
410 int ts_nr;
411
Holger Hans Peter Freyther8cbd9f42013-07-04 20:00:33 +0200412 if (argc <= 0) {
Harald Welte6e37c592011-08-11 12:43:31 +0200413 llist_for_each_entry(line, &e1inp_line_list, list) {
Harald Weltec2889512011-09-13 23:49:04 +0100414 for (ts_nr = 0; ts_nr < line->num_ts; ts_nr++) {
Harald Welte6e37c592011-08-11 12:43:31 +0200415 ts = &line->ts[ts_nr];
416 e1ts_dump_vty(vty, ts);
417 }
418 }
419 return CMD_SUCCESS;
420 }
421 if (argc >= 1) {
422 int num = atoi(argv[0]);
423 struct e1inp_line *l;
424 llist_for_each_entry(l, &e1inp_line_list, list) {
425 if (l->num == num) {
426 line = l;
427 break;
428 }
429 }
430 if (!line) {
431 vty_out(vty, "E1 line %s is invalid%s",
432 argv[0], VTY_NEWLINE);
433 return CMD_WARNING;
434 }
435 }
436 if (argc >= 2) {
437 ts_nr = atoi(argv[1]);
Harald Weltec2889512011-09-13 23:49:04 +0100438 if (ts_nr >= line->num_ts) {
Harald Welte6e37c592011-08-11 12:43:31 +0200439 vty_out(vty, "E1 timeslot %s is invalid%s",
440 argv[1], VTY_NEWLINE);
441 return CMD_WARNING;
442 }
443 ts = &line->ts[ts_nr];
444 e1ts_dump_vty(vty, ts);
445 return CMD_SUCCESS;
446 } else {
Harald Weltec2889512011-09-13 23:49:04 +0100447 for (ts_nr = 0; ts_nr < line->num_ts; ts_nr++) {
Harald Welte6e37c592011-08-11 12:43:31 +0200448 ts = &line->ts[ts_nr];
449 e1ts_dump_vty(vty, ts);
450 }
451 return CMD_SUCCESS;
452 }
453 return CMD_SUCCESS;
454}
455
456
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200457struct cmd_node e1inp_node = {
Harald Weltecc2241b2011-07-19 16:06:06 +0200458 L_E1INP_NODE,
Jacob Erlbeck1c9dcc12013-11-11 14:13:13 +0100459 "%s(config-e1_input)# ",
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200460 1,
461};
462
463int e1inp_vty_init(void)
464{
Vadim Yanitskiy82ef2a22020-10-04 16:15:52 +0700465 install_lib_element(CONFIG_NODE, &cfg_e1inp_cmd);
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200466 install_node(&e1inp_node, e1inp_config_write);
Jacob Erlbeck37f06952013-11-11 14:13:12 +0100467
Vadim Yanitskiy82ef2a22020-10-04 16:15:52 +0700468 install_lib_element(L_E1INP_NODE, &cfg_e1_pcap_cmd);
469 install_lib_element(L_E1INP_NODE, &cfg_e1_no_pcap_cmd);
Sylvain Munauteb55e2f2020-05-08 09:42:51 +0200470
Vadim Yanitskiy82ef2a22020-10-04 16:15:52 +0700471 install_lib_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd);
472 install_lib_element(L_E1INP_NODE, &cfg_e1_line_port_cmd);
473 install_lib_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd);
474 install_lib_element(L_E1INP_NODE, &cfg_e1_line_name_cmd);
475 install_lib_element(L_E1INP_NODE, &cfg_e1_line_keepalive_cmd);
476 install_lib_element(L_E1INP_NODE, &cfg_e1_line_keepalive_params_cmd);
477 install_lib_element(L_E1INP_NODE, &cfg_e1_line_no_keepalive_cmd);
478 install_lib_element(L_E1INP_NODE, &cfg_e1_line_ipa_keepalive_cmd);
479 install_lib_element(L_E1INP_NODE, &cfg_e1_line_no_ipa_keepalive_cmd);
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200480
Vadim Yanitskiy82ef2a22020-10-04 16:15:52 +0700481 install_lib_element(L_E1INP_NODE, &cfg_ipa_bind_cmd);
Neels Hofmeyr0db1d432016-02-22 13:29:09 +0100482
Vadim Yanitskiy82ef2a22020-10-04 16:15:52 +0700483 install_lib_element_ve(&show_e1drv_cmd);
484 install_lib_element_ve(&show_e1line_cmd);
485 install_lib_element_ve(&show_e1ts_cmd);
Harald Welte6e37c592011-08-11 12:43:31 +0200486
Pablo Neira Ayuso262aee82011-07-05 19:17:08 +0200487 return 0;
488}