Data Structures | Functions | Variables
neighbour_cmd.c File Reference

Neighbour management commands. More...

#include <getopt.h>
#include <ipxe/parseopt.h>
#include <ipxe/command.h>
#include <usr/neighmgmt.h>

Go to the source code of this file.

Data Structures

struct  nstat_options
 "nstat" options More...


static int nstat_exec (int argc, char **argv)
 The "nstat" command. More...


static struct option_descriptor nstat_opts [] = {}
 "nstat" option list More...
static struct command_descriptor nstat_cmd
 "nstat" command descriptor More...
struct command neighbour_commands [] __command
 Neighbour management commands. More...

Detailed Description

Neighbour management commands.

Definition in file neighbour_cmd.c.

Function Documentation



◆ nstat_exec()

static int nstat_exec ( int  argc,
char **  argv 

The "nstat" command.

argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 54 of file neighbour_cmd.c.

54  {
55  struct nstat_options opts;
56  int rc;
58  /* Parse options */
59  if ( ( rc = parse_options ( argc, argv, &nstat_cmd, &opts ) ) != 0)
60  return rc;
62  nstat();
64  return 0;
65 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
static union @424 opts
"cert<xxx>" option list
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
Definition: parseopt.c:447
"nstat" options
Definition: neighbour_cmd.c:38
void nstat(void)
Print neighbour table.
Definition: neighmgmt.c:40
static struct command_descriptor nstat_cmd
"nstat" command descriptor
Definition: neighbour_cmd.c:44

References nstat(), nstat_cmd, opts, parse_options(), and rc.

Variable Documentation

◆ nstat_opts

struct option_descriptor nstat_opts[] = {}

"nstat" option list

Definition at line 41 of file neighbour_cmd.c.

◆ nstat_cmd

struct command_descriptor nstat_cmd
Initial value:
"nstat" options
Definition: neighbour_cmd.c:38
static struct option_descriptor nstat_opts[]
"nstat" option list
Definition: neighbour_cmd.c:41
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Definition: parseopt.h:107
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

"nstat" command descriptor

Definition at line 44 of file neighbour_cmd.c.

Referenced by nstat_exec().

◆ __command

struct command neighbour_commands [] __command
Initial value:
= {
.name = "nstat",
.exec = nstat_exec,
static int nstat_exec(int argc, char **argv)
The "nstat" command.
Definition: neighbour_cmd.c:54

Neighbour management commands.

Definition at line 68 of file neighbour_cmd.c.