summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifconfig.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-03-31 15:38:07 +0000
committersam <sam@FreeBSD.org>2008-03-31 15:38:07 +0000
commit1cec369535292eab06c22690afab8043336f2e23 (patch)
tree652d2393cae1d93b05ca165ce9b50c9062f9eeeb /sbin/ifconfig/ifconfig.h
parent206a6eb6a9859d0eefd10a748c7910492ce7b058 (diff)
downloadFreeBSD-src-1cec369535292eab06c22690afab8043336f2e23.zip
FreeBSD-src-1cec369535292eab06c22690afab8043336f2e23.tar.gz
Fix handling of create operation together with setting other parameters:
o mark cmds/parameters to indicate they are potential arguments to a clone operation (e.g. vlantag) o when handling a create/clone operation do the callback on seeing the first non-clone cmd line argument so the new device is created and can be used; and re-setup operating state to reflect the newly created device Reviewed by: Eugene Grosbein MFC after: 2 weeks
Diffstat (limited to 'sbin/ifconfig/ifconfig.h')
-rw-r--r--sbin/ifconfig/ifconfig.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index 5ef36c9..70c1cad 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -52,6 +52,7 @@ struct cmd {
c_func *c_func;
c_func2 *c_func2;
} c_u;
+ int c_iscloneop;
struct cmd *c_next;
};
void cmd_register(struct cmd *);
@@ -71,6 +72,8 @@ void callback_register(callback_func *, void *);
#define DEF_CMD_ARG(name, func) { name, NEXTARG, { .c_func = func } }
#define DEF_CMD_OPTARG(name, func) { name, OPTARG, { .c_func = func } }
#define DEF_CMD_ARG2(name, func) { name, NEXTARG2, { .c_func2 = func } }
+#define DEF_CLONE_CMD(name, param, func) { name, param, { .c_func = func }, 1 }
+#define DEF_CLONE_CMD_ARG(name, func) { name, NEXTARG, { .c_func = func }, 1 }
struct ifaddrs;
struct addrinfo;
OpenPOWER on IntegriCloud