Data Structures | Functions | Variables
ibmgmt_cmd.c File Reference

Infiniband device management commands. More...

#include <stdio.h>
#include <errno.h>
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/infiniband.h>
#include <usr/ibmgmt.h>

Go to the source code of this file.

Data Structures

struct  ibstat_options
 "ibstat" options More...


static int ibstat_exec (int argc, char **argv)
 The "ibstat" command. More...


static struct option_descriptor ibstat_opts [] = {}
 "ibstat" option list More...
static struct command_descriptor ibstat_cmd
 "ibstat" command descriptor More...
struct command ibmgmt_commands [] __command
 Infiniband commands. More...

Detailed Description

Infiniband device management commands.

Definition in file ibmgmt_cmd.c.

Function Documentation



◆ ibstat_exec()

static int ibstat_exec ( int  argc,
char **  argv 

The "ibstat" command.

argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 57 of file ibmgmt_cmd.c.

57  {
58  struct ibstat_options opts;
59  struct ib_device *ibdev;
60  int rc;
62  /* Parse options */
63  if ( ( rc = parse_options ( argc, argv, &ibstat_cmd, &opts ) ) != 0 )
64  return rc;
66  /* Show all Infiniband devices */
67  for_each_ibdev ( ibdev )
68  ibstat ( ibdev );
70  return 0;
71 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
void ibstat(struct ib_device *ibdev)
Print status of Infiniband device.
Definition: ibmgmt.c:44
static union @424 opts
"cert<xxx>" option list
static struct command_descriptor ibstat_cmd
"ibstat" command descriptor
Definition: ibmgmt_cmd.c:47
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
Definition: parseopt.c:447
An Infiniband device.
Definition: infiniband.h:398
"ibstat" options
Definition: ibmgmt_cmd.c:41
#define for_each_ibdev(ibdev)
Iterate over all network devices.
Definition: infiniband.h:554

References for_each_ibdev, ibstat(), ibstat_cmd, opts, parse_options(), and rc.

Variable Documentation

◆ ibstat_opts

struct option_descriptor ibstat_opts[] = {}

"ibstat" option list

Definition at line 44 of file ibmgmt_cmd.c.

◆ ibstat_cmd

struct command_descriptor ibstat_cmd
Initial value:
COMMAND_DESC ( struct ibstat_options, ibstat_opts, 0, 0, "" )
static struct option_descriptor ibstat_opts[]
"ibstat" option list
Definition: ibmgmt_cmd.c:44
"ibstat" options
Definition: ibmgmt_cmd.c:41
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Definition: parseopt.h:107

"ibstat" command descriptor

Definition at line 47 of file ibmgmt_cmd.c.

Referenced by ibstat_exec().

◆ __command

struct command ibmgmt_commands [] __command
Initial value:
= {
.name = "ibstat",
.exec = ibstat_exec,
static int ibstat_exec(int argc, char **argv)
The "ibstat" command.
Definition: ibmgmt_cmd.c:57

Infiniband commands.

Definition at line 74 of file ibmgmt_cmd.c.