From 46b48b330269c82afb19eaa224df701cc5d221f9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 22 Jan 2022 08:15:42 -0500 Subject: lib: Add more information to `show version` Add to lib/command.c the ability to remember the release/version/system information and to allow `show version` to dump some of it. Signed-off-by: Donald Sharp --- lib/command.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/command.h') diff --git a/lib/command.h b/lib/command.h index c888356d61..a540bdc5c5 100644 --- a/lib/command.h +++ b/lib/command.h @@ -55,6 +55,13 @@ struct host { /* Domainname of this router */ char *domainname; + /* + * Some extra system data that is useful + */ + char *system; + char *release; + char *version; + /* Password for vty interface. */ char *password; char *password_encrypt; @@ -600,6 +607,9 @@ extern int cmd_domainname_set(const char *domainname); extern int cmd_hostname_set(const char *hostname); extern const char *cmd_hostname_get(void); extern const char *cmd_domainname_get(void); +extern const char *cmd_system_get(void); +extern const char *cmd_release_get(void); +extern const char *cmd_version_get(void); /* NOT safe for general use; call this only if DEV_BUILD! */ extern void grammar_sandbox_init(void); -- cgit v1.2.3