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

Functions

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

Variables

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

Detailed Description

Routing table management commands.

Definition in file route_cmd.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static int route_exec ( int  argc,
char **  argv 
) [static]

The "route" command.

Parameters:
argcArgument count
argvArgument list
Return values:
rcReturn status code

Definition at line 55 of file route_cmd.c.

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

                                                {
        struct route_options opts;
        int rc;

        /* Parse options */
        if ( ( rc = parse_options ( argc, argv, &route_cmd, &opts ) ) != 0 )
                return rc;

        route();

        return 0;
}

Variable Documentation

struct option_descriptor route_opts[] = {} [static]

"route" option list

Definition at line 42 of file route_cmd.c.

struct command_descriptor route_cmd [static]
Initial value:

"route" command descriptor

Definition at line 45 of file route_cmd.c.

struct command route_commands [] __command
Initial value:
 {
        {
                .name = "route",
                .exec = route_exec,
        },
}

Routing table management commands.

Definition at line 69 of file route_cmd.c.