FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
proxy_node.c File Reference
+ Include dependency graph for proxy_node.c:

Go to the source code of this file.

Data Structures

struct  dhcp_proxy_trace_t
 

Macros

#define dhcp_proxy_error(n, s)   s,
 
#define foreach_dhcp_proxy_to_server_input_next
 
#define VPP_DHCP_OPTION82_SUB1_SIZE   6
 
#define VPP_DHCP_OPTION82_SUB5_SIZE   6
 
#define VPP_DHCP_OPTION82_VSS_SIZE   12
 
#define VPP_DHCP_OPTION82_SIZE
 

Enumerations

enum  dhcp_proxy_to_server_input_next_t { DHCP_PROXY_TO_SERVER_INPUT_N_NEXT }
 

Functions

u8format_dhcp_proxy_trace (u8 *s, va_list *args)
 
u8format_dhcp_proxy_header_with_length (u8 *s, va_list *args)
 
static uword dhcp_proxy_to_server_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword dhcp_proxy_to_client_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
clib_error_tdhcp_proxy_init (vlib_main_t *vm)
 
int dhcp_proxy_set_server_2 (ip4_address_t *addr, ip4_address_t *src_address, u32 rx_fib_id, u32 server_fib_id, int insert_option_82, int is_del)
 
int dhcp_proxy_set_server (ip4_address_t *addr, ip4_address_t *src_address, u32 fib_id, int insert_option_82, int is_del)
 
static clib_error_tdhcp_proxy_set_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_dhcp_proxy_server (u8 *s, va_list *args)
 
static clib_error_tdhcp_proxy_show_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int dhcp_proxy_set_option82_vss (u32 vrf_id, u32 oui, u32 fib_id, int is_del)
 
static clib_error_tdhcp_option_82_vss_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tdhcp_vss_show_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tdhcp_option_82_address_show_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static char * dhcp_proxy_error_strings []
 
vlib_node_registration_t dhcp_proxy_to_server_node
 (constructor) VLIB_REGISTER_NODE (dhcp_proxy_to_server_node) More...
 
vlib_node_registration_t dhcp_proxy_to_client_node
 (constructor) VLIB_REGISTER_NODE (dhcp_proxy_to_client_node) More...
 
static vlib_cli_command_t dhcp_proxy_set_command
 (constructor) VLIB_CLI_COMMAND (dhcp_proxy_set_command) More...
 
static vlib_cli_command_t dhcp_proxy_show_command
 (constructor) VLIB_CLI_COMMAND (dhcp_proxy_show_command) More...
 
static vlib_cli_command_t dhcp_proxy_vss_command
 (constructor) VLIB_CLI_COMMAND (dhcp_proxy_vss_command) More...
 
static vlib_cli_command_t dhcp_proxy_vss_show_command
 (constructor) VLIB_CLI_COMMAND (dhcp_proxy_vss_show_command) More...
 
static vlib_cli_command_t dhcp_proxy_address_show_command
 (constructor) VLIB_CLI_COMMAND (dhcp_proxy_address_show_command) More...
 

Macro Definition Documentation

#define dhcp_proxy_error (   n,
 
)    s,
#define foreach_dhcp_proxy_to_server_input_next
Value:
_ (DROP, "error-drop") \
_ (LOOKUP, "ip4-lookup") \
_ (SEND_TO_CLIENT, "dhcp-proxy-to-client")
DROP
Definition: error.def:41

Definition at line 29 of file proxy_node.c.

#define VPP_DHCP_OPTION82_SIZE
Value:
#define VPP_DHCP_OPTION82_VSS_SIZE
Definition: proxy_node.c:52
#define VPP_DHCP_OPTION82_SUB5_SIZE
Definition: proxy_node.c:51
#define VPP_DHCP_OPTION82_SUB1_SIZE
Definition: proxy_node.c:50

Definition at line 53 of file proxy_node.c.

#define VPP_DHCP_OPTION82_SUB1_SIZE   6

Definition at line 50 of file proxy_node.c.

#define VPP_DHCP_OPTION82_SUB5_SIZE   6

Definition at line 51 of file proxy_node.c.

#define VPP_DHCP_OPTION82_VSS_SIZE   12

Definition at line 52 of file proxy_node.c.

Enumeration Type Documentation

Enumerator
DHCP_PROXY_TO_SERVER_INPUT_N_NEXT 

Definition at line 34 of file proxy_node.c.

Function Documentation

static clib_error_t* dhcp_option_82_address_show_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1066 of file proxy_node.c.

+ Here is the call graph for this function:

static clib_error_t* dhcp_option_82_vss_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 976 of file proxy_node.c.

+ Here is the call graph for this function:

clib_error_t* dhcp_proxy_init ( vlib_main_t vm)

Definition at line 669 of file proxy_node.c.

+ Here is the call graph for this function:

static clib_error_t* dhcp_proxy_set_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 786 of file proxy_node.c.

+ Here is the call graph for this function:

int dhcp_proxy_set_option82_vss ( u32  vrf_id,
u32  oui,
u32  fib_id,
int  is_del 
)

Definition at line 930 of file proxy_node.c.

+ Here is the caller graph for this function:

int dhcp_proxy_set_server ( ip4_address_t addr,
ip4_address_t src_address,
u32  fib_id,
int  insert_option_82,
int  is_del 
)

Definition at line 776 of file proxy_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dhcp_proxy_set_server_2 ( ip4_address_t addr,
ip4_address_t src_address,
u32  rx_fib_id,
u32  server_fib_id,
int  insert_option_82,
int  is_del 
)

Definition at line 697 of file proxy_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* dhcp_proxy_show_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 895 of file proxy_node.c.

+ Here is the call graph for this function:

static uword dhcp_proxy_to_client_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 422 of file proxy_node.c.

+ Here is the call graph for this function:

static uword dhcp_proxy_to_server_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 98 of file proxy_node.c.

+ Here is the call graph for this function:

static clib_error_t* dhcp_vss_show_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1034 of file proxy_node.c.

+ Here is the call graph for this function:

u8* format_dhcp_proxy_header_with_length ( u8 s,
va_list *  args 
)

Definition at line 82 of file proxy_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_dhcp_proxy_server ( u8 s,
va_list *  args 
)

Definition at line 861 of file proxy_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_dhcp_proxy_trace ( u8 s,
va_list *  args 
)

Definition at line 60 of file proxy_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t dhcp_proxy_address_show_command
static
Initial value:
= {
.path = "show dhcp option-82-address interface",
.short_help = "show dhcp option-82-address interface <interface>",
}
static clib_error_t * dhcp_option_82_address_show_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy_node.c:1066

(constructor) VLIB_CLI_COMMAND (dhcp_proxy_address_show_command)

Definition at line 1110 of file proxy_node.c.

char* dhcp_proxy_error_strings[]
static
Initial value:
= {
#define dhcp_proxy_error(n,s)
dhcp_proxy_error (NONE, "no error")
dhcp_proxy_error (NO_SERVER, "no dhcp server configured")
dhcp_proxy_error (RELAY_TO_SERVER, "DHCP packets relayed to the server")
dhcp_proxy_error (RELAY_TO_CLIENT, "DHCP packets relayed to clients")
dhcp_proxy_error (OPTION_82_ERROR, "DHCP failed to insert option 82")
dhcp_proxy_error (NO_OPTION_82, "DHCP option 82 missing")
dhcp_proxy_error (BAD_OPTION_82, "Bad DHCP option 82 value")
dhcp_proxy_error (BAD_FIB_ID, "DHCP option 82 fib-id to fib-index map failure")
dhcp_proxy_error (NO_INTERFACE_ADDRESS, "DHCP no interface address")
dhcp_proxy_error (OPTION_82_VSS_NOT_PROCESSED, "DHCP VSS not processed by DHCP server")
dhcp_proxy_error (BAD_YIADDR, "DHCP packets with bad your_ip_address fields")
dhcp_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCP packets not from DHCP server or server FIB.")
dhcp_proxy_error (PKT_TOO_BIG, "DHCP packets which are too big.")
}
#define dhcp_proxy_error(n, s)

Definition at line 23 of file proxy_node.c.

vlib_cli_command_t dhcp_proxy_set_command
static
Initial value:
= {
.path = "set dhcp proxy",
.short_help = "set dhcp proxy [del] server <ip-addr> src-address <ip-addr> [add-option-82] [server-fib-id <n>] [rx-fib-id <n>]",
}
static clib_error_t * dhcp_proxy_set_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy_node.c:786

(constructor) VLIB_CLI_COMMAND (dhcp_proxy_set_command)

Definition at line 855 of file proxy_node.c.

vlib_cli_command_t dhcp_proxy_show_command
static
Initial value:
= {
.path = "show dhcp proxy",
.short_help = "Display dhcp proxy server info",
}
static clib_error_t * dhcp_proxy_show_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy_node.c:895

(constructor) VLIB_CLI_COMMAND (dhcp_proxy_show_command)

Definition at line 923 of file proxy_node.c.

vlib_node_registration_t dhcp_proxy_to_client_node
Initial value:
= {
.name = "dhcp-proxy-to-client",
.vector_size = sizeof (u32),
.n_errors = DHCP_PROXY_N_ERROR,
.error_strings = dhcp_proxy_error_strings,
.format_trace = format_dhcp_proxy_trace,
}
u8 * format_dhcp_proxy_header_with_length(u8 *s, va_list *args)
Definition: proxy_node.c:82
static uword dhcp_proxy_to_client_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: proxy_node.c:422
static char * dhcp_proxy_error_strings[]
Definition: proxy_node.c:23
unsigned int u32
Definition: types.h:88
u8 * format_dhcp_proxy_trace(u8 *s, va_list *args)
Definition: proxy_node.c:60

(constructor) VLIB_REGISTER_NODE (dhcp_proxy_to_client_node)

Definition at line 58 of file proxy_node.c.

vlib_node_registration_t dhcp_proxy_to_server_node
Initial value:
= {
.name = "dhcp-proxy-to-server",
.vector_size = sizeof (u32),
.n_errors = DHCP_PROXY_N_ERROR,
.error_strings = dhcp_proxy_error_strings,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_dhcp_proxy_trace,
}
u8 * format_dhcp_proxy_header_with_length(u8 *s, va_list *args)
Definition: proxy_node.c:82
#define foreach_dhcp_proxy_to_server_input_next
Definition: proxy_node.c:29
static uword dhcp_proxy_to_server_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: proxy_node.c:98
static char * dhcp_proxy_error_strings[]
Definition: proxy_node.c:23
unsigned int u32
Definition: types.h:88
u8 * format_dhcp_proxy_trace(u8 *s, va_list *args)
Definition: proxy_node.c:60

(constructor) VLIB_REGISTER_NODE (dhcp_proxy_to_server_node)

Definition at line 57 of file proxy_node.c.

vlib_cli_command_t dhcp_proxy_vss_command
static
Initial value:
= {
.path = "set dhcp option-82 vss",
.short_help = "set dhcp option-82 vss [del] table <table id> oui <oui> vpn-id <vpn-id>",
.function = dhcp_option_82_vss_fn,
}
static clib_error_t * dhcp_option_82_vss_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy_node.c:976

(constructor) VLIB_CLI_COMMAND (dhcp_proxy_vss_command)

Definition at line 1026 of file proxy_node.c.

vlib_cli_command_t dhcp_proxy_vss_show_command
static
Initial value:
= {
.path = "show dhcp vss",
.short_help = "show dhcp VSS",
}
static clib_error_t * dhcp_vss_show_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy_node.c:1034

(constructor) VLIB_CLI_COMMAND (dhcp_proxy_vss_show_command)

Definition at line 1059 of file proxy_node.c.