aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ifconfig/ifconfig.h')
-rw-r--r--sbin/ifconfig/ifconfig.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index 555e7dbaca64..672020443b8c 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -67,6 +67,7 @@ typedef struct ifconfig_context if_ctx;
typedef void c_func(if_ctx *ctx, const char *cmd, int arg);
typedef void c_func2(if_ctx *ctx, const char *arg1, const char *arg2);
typedef void c_func3(if_ctx *ctx, const char *cmd, const char *arg);
+typedef int c_funcv(if_ctx *ctx, int argc, const char *const *argv);
struct cmd {
const char *c_name;
@@ -75,11 +76,13 @@ struct cmd {
#define NEXTARG2 0xfffffe /* has 2 following args */
#define OPTARG 0xfffffd /* has optional following arg */
#define SPARAM 0xfffffc /* parameter is string c_sparameter */
+#define ARGVECTOR 0xfffffb /* takes argument vector */
const char *c_sparameter;
union {
c_func *c_func;
c_func2 *c_func2;
c_func3 *c_func3;
+ c_funcv *c_funcv;
} c_u;
int c_iscloneop;
struct cmd *c_next;
@@ -121,6 +124,13 @@ void callback_register(callback_func *, void *);
.c_iscloneop = 0, \
.c_next = NULL, \
}
+#define DEF_CMD_VARG(name, func) { \
+ .c_name = (name), \
+ .c_parameter = ARGVECTOR, \
+ .c_u = { .c_funcv = (func) }, \
+ .c_iscloneop = 0, \
+ .c_next = NULL, \
+}
#define DEF_CMD_SARG(name, sparam, func) { \
.c_name = (name), \
.c_parameter = SPARAM, \
@@ -239,7 +249,6 @@ struct ifconfig_args {
const char *matchgroup; /* Group name to match */
const char *nogroup; /* Group name to exclude */
const struct afswtch *afp; /* AF we're operating on */
- const char *jail_name; /* Jail name or jail id specified */
};
struct option {