Go to the source code of this file.
|
#define | IFCOMMON_COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage, _payload, _stop_on_first_success) |
| Construct "if<xxx>" command descriptor. More...
|
|
◆ IFCOMMON_COMMAND_DESC
#define IFCOMMON_COMMAND_DESC |
( |
|
_struct, |
|
|
|
_options, |
|
|
|
_min_args, |
|
|
|
_max_args, |
|
|
|
_usage, |
|
|
|
_payload, |
|
|
|
_stop_on_first_success |
|
) |
| |
Value:{ \
_max_args, _usage ), \
? _payload : _payload ) ), \
.stop_on_first_success = _stop_on_first_success, \
}
static struct net_device * netdev
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
typeof(acpi_finder=acpi_find)
ACPI table finder.
static union @438 opts
"cert<xxx>" option list
#define NULL
NULL pointer (VOID *)
Construct "if<xxx>" command descriptor.
- Parameters
-
_struct | Options structure type |
_options | Option descriptor array |
_check_args | Remaining argument checker |
_usage | Command usage |
- Return values
-
_command | Command descriptor |
Definition at line 57 of file ifmgmt_cmd.h.
◆ FILE_LICENCE()
FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ ifcommon_exec()
Execute if<xxx> command.
- Parameters
-
argc | Argument count |
argv | Argument list |
cmd | Command descriptor |
payload | Command to execute |
verb | Verb describing the action of the command |
- Return values
-
Definition at line 51 of file ifmgmt_cmd.c.
65 for ( i =
optind ; i < argc ; i++ ) {
struct arbelprm_rc_send_wqe rc
int optind
Current option index.
int(* payload)(struct net_device *netdev, void *opts)
Payload.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
static struct net_device * netdev
#define for_each_netdev(netdev)
Iterate over all network devices.
#define ENODEV
No such device.
int stop_on_first_success
Stop on first success.
static union @438 opts
"cert<xxx>" option list
struct command_descriptor cmd
Command descriptor.
int parse_netdev(char *text, struct net_device **netdev)
Parse network device name.
References cmd, ifcommon_command_descriptor::cmd, ENODEV, for_each_netdev, netdev, optind, opts, parse_netdev(), parse_options(), ifcommon_command_descriptor::payload, rc, and ifcommon_command_descriptor::stop_on_first_success.
Referenced by autoboot_exec(), ifclose_exec(), ifconf_exec(), iflinkwait_exec(), ifopen_exec(), ifstat_exec(), iwlist_exec(), iwstat_exec(), and startpxe_exec().
◆ ifconf_exec()
int ifconf_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
The "ifconf" command.
- Parameters
-
argc | Argument count |
argv | Argument list |
- Return values
-
Definition at line 249 of file ifmgmt_cmd.c.
static struct ifcommon_command_descriptor ifconf_cmd
"ifconf" command descriptor
int ifcommon_exec(int argc, char **argv, struct ifcommon_command_descriptor *ifcmd)
Execute if<xxx> command.
References ifcommon_exec(), and ifconf_cmd.