|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef included_dhcp_proxy_h
19 #define included_dhcp_proxy_h
32 #define dhcp_proxy_error(n,s) DHCP_PROXY_ERROR_##n,
34 #undef dhcp_proxy_error
40 #define dhcpv6_proxy_error(n,s) DHCPV6_PROXY_ERROR_##n,
42 #undef dhcpv6_proxy_error
65 #define VSS_TYPE_ASCII 0
66 #define VSS_TYPE_VPN_ID 1
67 #define VSS_TYPE_INVALID 123
68 #define VSS_TYPE_DEFAULT 255
134 #define DHCP_N_PROTOS (FIB_PROTOCOL_IP6 + 1)
187 u8 * vpn_ascii_id,
u32 oui,
u32 vpn_index,
u8 is_del);
200 ip46_address_t *
addr,
202 u32 rx_fib_iindex,
u32 server_table_id);
210 ip46_address_t *
addr,
u32 server_table_id);
231 u32 rx_table_id,
void *
ctx);
292 u32 rx_table_id,
u32 server_table_id,
int is_del);
295 u32 rx_table_id,
u32 server_table_id,
int is_del);
u8 vss_type
VSS type as defined in RFC 6607: 0 for NVT ASCII VPN Identifier 1 for RFC 2685 VPN-ID of 7 octects - ...
A representation of a single DHCP Server within a given VRF config.
static dhcp_proxy_t * dhcp_get_proxy(dhcp_proxy_main_t *dm, u32 rx_fib_index, fib_protocol_t proto)
Get the DHCP proxy server data for the FIB index.
int dhcp_proxy_server_del(fib_protocol_t proto, u32 rx_fib_index, ip46_address_t *addr, u32 server_table_id)
Delete a DHCP proxy config.
u8 * vpn_ascii_id
Type 0 ASCII VPN Identifier.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
void dhcp_proxy_unlock(dhcp_proxy_t *server)
Lock a proxy object to prevent simultaneous access of its pending store.
void dhcp_proxy_walk(fib_protocol_t proto, dhcp_proxy_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy server.
A DHCP proxy representation fpr per-client VRF config.
The Virtual Sub-net Selection information for a given RX FIB.
u32 * dhcp_server_index_by_rx_fib_index[DHCP_N_PROTOS]
int dhcp4_proxy_set_server(ip46_address_t *addr, ip46_address_t *src_addr, u32 rx_table_id, u32 server_table_id, int is_del)
Collection of global DHCP proxy data.
static dhcp_vss_t * dhcp_get_vss_info(dhcp_proxy_main_t *dm, u32 rx_fib_index, fib_protocol_t proto)
Get the VSS data for the FIB index.
void dhcp_proxy_dump(fib_protocol_t proto, void *opaque, u32 context)
Dump the proxy configs to the API.
void dhcp_vss_walk(fib_protocol_t proto, dhcp_vss_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy VSS.
int(* dhcp_vss_walk_fn_t)(dhcp_vss_t *server, u32 rx_table_id, void *ctx)
Callback function invoked for each DHCP VSS entry return 0 to break the walk, non-zero otherwise.
struct dhcp_server_t_ dhcp_server_t
A representation of a single DHCP Server within a given VRF config.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int dhcp_proxy_set_vss(fib_protocol_t proto, u32 tbl_id, u8 vss_type, u8 *vpn_ascii_id, u32 oui, u32 vpn_index, u8 is_del)
Configure/set a new VSS info.
int lock
A lock for the pending request DB.
vl_api_mac_address_t src_addr
dhcp_proxy_t * dhcp_servers[DHCP_N_PROTOS]
u32 rx_fib_index
The FIB index (not the external Table-ID) in which the client is resides.
void dhcp_proxy_lock(dhcp_proxy_t *server)
Lock a proxy object to prevent simultaneous access of its pending store.
u32 server_fib_index
The FIB index (not the external Table-ID) in which the server is reachable.
int(* dhcp_proxy_walk_fn_t)(dhcp_proxy_t *server, void *ctx)
Callback function invoked for each DHCP proxy entry return 0 to break the walk, non-zero otherwise.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void dhcp_send_details(fib_protocol_t proto, void *opaque, u32 context, dhcp_proxy_t *proxy)
Send the details of a proxy session to the API client during a dump.
ip46_address_t dhcp_server
The address of the DHCP server to which to relay the client's messages.
u32 error_drop_node_index
struct dhcp_proxy_t_ dhcp_proxy_t
A DHCP proxy representation fpr per-client VRF config.
u8 vpn_id[7]
Type 1 VPN-ID.
struct dhcp_vss_t_ dhcp_vss_t
The Virtual Sub-net Selection information for a given RX FIB.
dhcp_vss_t * vss[DHCP_N_PROTOS]
u32 dhcp_proxy_rx_table_get_table_id(fib_protocol_t proto, u32 fib_index)
int dhcp6_proxy_set_server(ip46_address_t *addr, ip46_address_t *src_addr, u32 rx_table_id, u32 server_table_id, int is_del)
int dhcp_vss_show_walk(dhcp_vss_t *vss, u32 rx_table_id, void *ctx)
Show (on CLI) a VSS config during a show walk.
dhcp_proxy_main_t dhcp_proxy_main
Shard 4/6 instance of DHCP main.
dhcp_server_t * dhcp_servers
The set of DHCP servers to which messages are relayed.
int dhcp_proxy_server_add(fib_protocol_t proto, ip46_address_t *addr, ip46_address_t *src_address, u32 rx_fib_iindex, u32 server_table_id)
Add a new DHCP proxy server configuration.
ip46_address_t dhcp_src_address
The source address to use in relayed messaes.
vl_api_address_union_t src_address
void dhcp_maybe_register_udp_ports(dhcp_port_reg_flags_t ports)
Register the dhcp client and/or server ports, if not already done.
u32 * vss_index_by_rx_fib_index[DHCP_N_PROTOS]
uword * dhcp_pending
Hash table of pending requets key'd on the clients MAC address.