summaryrefslogtreecommitdiffstats
path: root/lib/command.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2019-10-22 17:06:03 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2019-10-31 14:02:47 +0100
commit19d61463df7b08828dde99ef290cc8c62fda3530 (patch)
treec4d529fd716a34175196c25cebe5521c447780d3 /lib/command.h
parentMerge pull request #5213 from mjstapp/fix_sysctl_h (diff)
downloadfrr-19d61463df7b08828dde99ef290cc8c62fda3530.tar.xz
frr-19d61463df7b08828dde99ef290cc8c62fda3530.zip
vtysh: Add an option to set banner motd from an input
This allows to set motd from an input instead of creating a file. Example: root@exit2-debian-9:~/frr# telnet 127.0.0.1 2605 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Hello, this is bgpd User Access Verification Password: exit2-debian-9> enable exit2-debian-9# sh run Current configuration: ! frr version 7.3-dev-MyOwnFRRVersion frr defaults traditional ! hostname exit2-debian-9 password belekas log file /var/log/frr/labas.log log syslog informational banner motd line Hello, this is bgpd ! ! ! line vty ! end exit2-debian-9# Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.h b/lib/command.h
index d5dc129c7..73c15469e 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -78,7 +78,7 @@ struct host {
int encrypt;
/* Banner configuration. */
- const char *motd;
+ char *motd;
char *motdfile;
};
@@ -499,6 +499,7 @@ extern void host_config_set(const char *);
extern void print_version(const char *);
extern int cmd_banner_motd_file(const char *);
+extern void cmd_banner_motd_line(const char *line);
/* struct host global, ick */
extern struct host host;