65 for ( i =
optind ; i < argc ; i++ ) {
225 opts->timeout ) ) != 0 ) {
324 .name =
"iflinkwait",
struct arbelprm_rc_send_wqe rc
int ifconf(struct net_device *netdev, struct net_device_configurator *configurator, unsigned long timeout)
Perform network device configuration.
static int ifopen_exec(int argc, char **argv)
The "ifopen" command.
static struct option_descriptor ifstat_opts[]
"ifstat" option list
int optind
Current option index.
int parse_netdev_configurator(char *text, struct net_device_configurator **configurator)
Parse network device configurator name.
static int ifopen_payload(struct net_device *netdev, struct ifopen_options *opts __unused)
"ifopen" payload
static struct option_descriptor iflinkwait_opts[]
"iflinkwait" option list
int parse_timeout(char *text, unsigned long *value)
Parse timeout value (in ms)
static struct option_descriptor ifconf_opts[]
"ifconf" option list
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.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
An "if<xxx>" command descriptor.
int ifconf_exec(int argc, char **argv)
The "ifconf" command.
static struct ifcommon_command_descriptor iflinkwait_cmd
"iflinkwait" command descriptor
void ifclose(struct net_device *netdev)
Close network device.
int iflinkwait(struct net_device *netdev, unsigned long timeout, int verbose)
Wait for link-up, with status indication.
static struct ifcommon_command_descriptor ifconf_cmd
"ifconf" command descriptor
static int ifstat_exec(int argc, char **argv)
The "ifstat" command.
static int ifconf_payload(struct net_device *netdev, struct ifconf_options *opts)
"ifconf" payload
Parse command-line options.
struct command ifmgmt_commands [] __command
Interface management commands.
#define __unused
Declare a variable or data structure as unused.
static int iflinkwait_payload(struct net_device *netdev, struct iflinkwait_options *opts)
"iflinkwait" payload
#define MAX_ARGUMENTS
No maximum number of arguments.
static struct net_device * netdev
#define for_each_netdev(netdev)
Iterate over all network devices.
static struct option_descriptor ifopen_opts[]
"ifopen" option list
Command line option parsing.
#define ENODEV
No such device.
static struct ifcommon_command_descriptor ifclose_cmd
"ifclose" command descriptor
int ifopen(struct net_device *netdev)
Open network device.
void netdev_close(struct net_device *netdev)
Close network device.
const char * name
Name of the command.
Network device management.
static struct ifcommon_command_descriptor ifopen_cmd
"ifopen" command descriptor
static struct ifcommon_command_descriptor ifstat_cmd
"ifstat" command descriptor
int ifcommon_exec(int argc, char **argv, struct ifcommon_command_descriptor *ifcmd)
Execute if<xxx> command.
unsigned long timeout
Link timeout.
static struct option_descriptor ifclose_opts[]
"ifclose" option list
static int iflinkwait_exec(int argc, char **argv)
The "iflinkwait" command.
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
A network device configurator.
A command-line option descriptor.
int stop_on_first_success
Stop on first success.
Network interface management.
void ifstat(struct net_device *netdev)
Print status of network device.
struct net_device_configurator * configurator
Configurator.
static union @438 opts
"cert<xxx>" option list
#define IFCOMMON_COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage, _payload, _stop_on_first_success)
Construct "if<xxx>" command descriptor.
static int ifstat_payload(struct net_device *netdev, struct ifstat_options *opts __unused)
"ifstat" payload
static int ifclose_payload(struct net_device *netdev, struct ifclose_options *opts __unused)
"ifclose" payload
unsigned long timeout
Configuration timeout.
static int ifclose_exec(int argc, char **argv)
The "ifclose" command.
struct command_descriptor cmd
Command descriptor.
int parse_netdev(char *text, struct net_device **netdev)
Parse network device name.