iPXE
Data Structures | Functions | Variables
ipstat_cmd.c File Reference

IP statistics commands. More...

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

Go to the source code of this file.

Data Structures

struct  ipstat_options
 "ipstat" options More...
 

Functions

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

Variables

static struct option_descriptor ipstat_opts [] = {}
 "ipstat" option list More...
 
static struct command_descriptor ipstat_cmd
 "ipstat" command descriptor More...
 
struct command ipstat_commands [] __command
 Routing table management commands. More...
 

Detailed Description

IP statistics commands.

Definition in file ipstat_cmd.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ ipstat_exec()

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

The "ipstat" command.

Parameters
argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 55 of file ipstat_cmd.c.

55  {
56  struct ipstat_options opts;
57  int rc;
58 
59  /* Parse options */
60  if ( ( rc = parse_options ( argc, argv, &ipstat_cmd, &opts ) ) != 0 )
61  return rc;
62 
63  ipstat();
64 
65  return 0;
66 }
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
static struct command_descriptor ipstat_cmd
"ipstat" command descriptor
Definition: ipstat_cmd.c:45
"ipstat" options
Definition: ipstat_cmd.c:39
void ipstat(void)
Print IP statistics.
Definition: ipstat.c:40

References ipstat(), ipstat_cmd, opts, parse_options(), and rc.

Variable Documentation

◆ ipstat_opts

struct option_descriptor ipstat_opts[] = {}
static

"ipstat" option list

Definition at line 42 of file ipstat_cmd.c.

◆ ipstat_cmd

struct command_descriptor ipstat_cmd
static
Initial value:
=
static struct option_descriptor ipstat_opts[]
"ipstat" option list
Definition: ipstat_cmd.c:42
"ipstat" options
Definition: ipstat_cmd.c:39
#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

"ipstat" command descriptor

Definition at line 45 of file ipstat_cmd.c.

Referenced by ipstat_exec().

◆ __command

struct command ipstat_commands [] __command
Initial value:
= {
{
.name = "ipstat",
.exec = ipstat_exec,
},
}
static int ipstat_exec(int argc, char **argv)
The "ipstat" command.
Definition: ipstat_cmd.c:55

Routing table management commands.

Definition at line 69 of file ipstat_cmd.c.