diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-09-26 17:30:30 +0200 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-07 09:09:51 -0400 |
| commit | 1bf9f0270c889d1131dcc01b1ea20ad054b60b85 (patch) | |
| tree | 978675c599272decb6b3714305fdf1e96c83efe9 /lib/command.c | |
| parent | 1ba2a97af940168a4ca7673287272000f27f93ca (diff) | |
lib: add "qobj" object-ID infrastructure
This adds 64-bit random identifiers as "safe pointers" which are also
type-tracked / can have type-specific extension methods.
This will be used by both the CLI (to keep safe references while in
config editing mode) as well as the Cap'n Proto code (to hand out
pointers to the user in a safe way and add per-type handlers)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index fa3a782a91..9d8bd46580 100644 --- a/lib/command.c +++ b/lib/command.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "command.h" #include "workqueue.h" #include "vrf.h" +#include "qobj.h" DEFINE_MTYPE( LIB, HOST, "Host config") DEFINE_MTYPE( LIB, STRVEC, "String vector") @@ -4179,6 +4180,8 @@ install_default (enum node_type node) void cmd_init (int terminal) { + qobj_init (); + command_cr = XSTRDUP(MTYPE_CMD_TOKENS, "<cr>"); token_cr.type = TOKEN_TERMINAL; token_cr.terminal = TERMINAL_LITERAL; |
