iPXE
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...
 

Functions

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

Variables

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

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ nstat_exec()

static int nstat_exec ( int  argc,
char **  argv 
)
static

The "nstat" command.

Parameters
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;
57 
58  /* Parse options */
59  if ( ( rc = parse_options ( argc, argv, &nstat_cmd, &opts ) ) != 0)
60  return rc;
61 
62  nstat();
63 
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[] = {}
static

"nstat" option list

Definition at line 41 of file neighbour_cmd.c.

◆ nstat_cmd

struct command_descriptor nstat_cmd
static
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.