Data Structures | Functions | Variables
route_cmd.c File Reference

Routing table management commands. More...

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

Go to the source code of this file.

Data Structures

struct  route_options
 "route" options More...


static int route_exec (int argc, char **argv)
 The "route" command. More...


static struct option_descriptor route_opts [] = {}
 "route" option list More...
static struct command_descriptor route_cmd
 "route" command descriptor More...
struct command route_commands [] __command
 Routing table management commands. More...

Detailed Description

Routing table management commands.

Definition in file route_cmd.c.

Function Documentation



◆ route_exec()

static int route_exec ( int  argc,
char **  argv 

The "route" command.

argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 55 of file route_cmd.c.

55  {
56  struct route_options opts;
57  int rc;
59  /* Parse options */
60  if ( ( rc = parse_options ( argc, argv, &route_cmd, &opts ) ) != 0 )
61  return rc;
63  route();
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
void route(void)
Print routing table.
Definition: route.c:39
static struct command_descriptor route_cmd
"route" command descriptor
Definition: route_cmd.c:45
"route" options
Definition: route_cmd.c:39

References opts, parse_options(), rc, route(), and route_cmd.

Variable Documentation

◆ route_opts

struct option_descriptor route_opts[] = {}

"route" option list

Definition at line 42 of file route_cmd.c.

◆ route_cmd

struct command_descriptor route_cmd
Initial value:
static struct option_descriptor route_opts[]
"route" option list
Definition: route_cmd.c:42
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Definition: parseopt.h:107
"route" options
Definition: route_cmd.c:39
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

"route" command descriptor

Definition at line 45 of file route_cmd.c.

Referenced by route_exec().

◆ __command

struct command route_commands [] __command
Initial value:
= {
.name = "route",
.exec = route_exec,
static int route_exec(int argc, char **argv)
The "route" command.
Definition: route_cmd.c:55

Routing table management commands.

Definition at line 69 of file route_cmd.c.