]>
git.proxmox.com Git - mirror_iproute2.git/blob - tipc/cmdl.h
2 * cmdl.h Framework for handling command line options.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 * Authors: Richard Alpe <richard.alpe@ericsson.com>
15 #include <libmnl/libmnl.h>
21 OPT_KEYVAL
= (1 << 1),
30 struct tipc_sup_media
{
33 void (*help
)(struct cmdl
*cmdl
, char *media
);
38 int (*func
)(struct nlmsghdr
*nlh
, const struct cmd
*cmd
,
39 struct cmdl
*cmdl
, void *data
);
40 void (*help
)(struct cmdl
*cmdl
);
49 struct opt
*get_opt(struct opt
*opts
, char *key
);
50 bool has_opt(struct opt
*opts
, char *key
);
51 int parse_opts(struct opt
*opts
, struct cmdl
*cmdl
);
52 char *shift_cmdl(struct cmdl
*cmdl
);
54 int run_cmd(struct nlmsghdr
*nlh
, const struct cmd
*caller
,
55 const struct cmd
*cmds
, struct cmdl
*cmdl
, void *data
);