Experiemntal ascii based device configuration mechanism.
This may or may not survive, decision will be made well before 5.0-R
This commit is contained in:
parent
c886a5d4d2
commit
7095e0970e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62471
@ -265,6 +265,13 @@ static const struct ng_cmdlist ng_generic_cmds[] = {
|
||||
NULL,
|
||||
&ng_generic_typeinfo_type
|
||||
},
|
||||
{
|
||||
NGM_GENERIC_COOKIE,
|
||||
NGM_TEXT_CONFIG,
|
||||
"textconfig",
|
||||
NULL,
|
||||
&ng_parse_string_type
|
||||
},
|
||||
{
|
||||
NGM_GENERIC_COOKIE,
|
||||
NGM_TEXT_STATUS,
|
||||
@ -1589,6 +1596,7 @@ ng_generic_msg(node_p here, struct ng_mesg *msg, const char *retaddr,
|
||||
break;
|
||||
}
|
||||
|
||||
case NGM_TEXT_CONFIG:
|
||||
case NGM_TEXT_STATUS:
|
||||
/*
|
||||
* This one is tricky as it passes the command down to the
|
||||
|
@ -115,6 +115,7 @@ struct ng_mesg {
|
||||
#define NGM_TEXT_STATUS 11 /* (optional) get text status report */
|
||||
#define NGM_BINARY2ASCII 12 /* convert struct ng_mesg to ascii */
|
||||
#define NGM_ASCII2BINARY 13 /* convert ascii to struct ng_mesg */
|
||||
#define NGM_TEXT_CONFIG 14 /* (optional) get/set text config */
|
||||
|
||||
/* Structure used for NGM_MKPEER */
|
||||
struct ngm_mkpeer {
|
||||
|
@ -2,7 +2,7 @@
|
||||
# $Whistle: Makefile,v 1.3 1999/01/16 00:10:11 archie Exp $
|
||||
|
||||
PROG= ngctl
|
||||
SRCS= main.c mkpeer.c connect.c name.c show.c list.c \
|
||||
SRCS= main.c mkpeer.c config.c connect.c name.c show.c list.c \
|
||||
msg.c debug.c shutdown.c rmhook.c status.c types.c
|
||||
MAN8= ngctl.8
|
||||
DPADD+= ${LIBNETGRAPH}
|
||||
|
@ -59,6 +59,7 @@ static int QuitCmd(int ac, char **av);
|
||||
|
||||
/* List of commands */
|
||||
static const struct ngcmd *const cmds[] = {
|
||||
&config_cmd,
|
||||
&connect_cmd,
|
||||
&debug_cmd,
|
||||
&help_cmd,
|
||||
|
@ -75,6 +75,7 @@ struct ngcmd {
|
||||
#define CMDRTN_QUIT 3
|
||||
|
||||
/* Available commands */
|
||||
extern const struct ngcmd config_cmd;
|
||||
extern const struct ngcmd connect_cmd;
|
||||
extern const struct ngcmd debug_cmd;
|
||||
extern const struct ngcmd help_cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user