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 39 #define dhcpv6_proxy_error(n,s) DHCPV6_PROXY_ERROR_##n, 41 #undef dhcpv6_proxy_error 114 #define DHCP_N_PROTOS (FIB_PROTOCOL_IP6 + 1) 174 ip46_address_t *
addr,
175 ip46_address_t *src_address,
177 u32 server_table_id);
185 ip46_address_t *
addr,
186 u32 server_table_id);
276 ip46_address_t *src_addr,
281 ip46_address_t *src_addr,
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.
struct dhcp_proxy_t_ dhcp_proxy_t
A DHCP proxy represenation fpr per-client VRF config.
struct dhcp_server_t_ dhcp_server_t
A representation of a single DHCP Server within a given VRF config.
dhcp_server_t * dhcp_servers
The set of DHCP servers to which messages are relayed.
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.
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)
ip46_address_t dhcp_src_address
The source address to use in relayed messaes.
The Virtual Sub-net Selection information for a given RX FIB.
u32 * dhcp_server_index_by_rx_fib_index[DHCP_N_PROTOS]
u32 rx_fib_index
The FIB index (not the external Table-ID) in which the client is resides.
u32 error_drop_node_index
u32 oui
?? RFC doesn't say
void dhcp_proxy_lock(dhcp_proxy_t *server)
Lock a proxy object to prevent simultaneous access of its pending store.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
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.
u32 * vss_index_by_rx_fib_index[DHCP_N_PROTOS]
dhcp_proxy_t * dhcp_servers[DHCP_N_PROTOS]
int dhcp_proxy_set_vss(fib_protocol_t proto, u32 vrf_id, u32 oui, u32 fib_id, int is_del)
Configure/set a new VSS info.
u32 server_fib_index
The FIB index (not the external Table-ID) in which the server is reachable.
Collection of global DHCP proxy data.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
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...
int lock
A lock for the pending request DB.
void dhcp_vss_walk(fib_protocol_t proto, dhcp_vss_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy VSS.
A representation of a single DHCP Server within a given VRF config.
struct dhcp_vss_t_ dhcp_vss_t
The Virtual Sub-net Selection information for a given RX FIB.
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...
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.
ip46_address_t dhcp_server
The address of the DHCP server to which to relay the client's messages.
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)
uword * dhcp_pending
Hash table of pending requets key'd on the clients MAC address.
void dhcp_proxy_walk(fib_protocol_t proto, dhcp_proxy_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy server.
dhcp_proxy_main_t dhcp_proxy_main
Shard 4/6 instance of DHCP main.
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.
A DHCP proxy represenation fpr per-client VRF config.
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.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
dhcp_vss_t * vss[DHCP_N_PROTOS]
u32 dhcp_proxy_rx_table_get_table_id(fib_protocol_t proto, u32 fib_index)
void dhcp_proxy_unlock(dhcp_proxy_t *server)
Lock a proxy object to prevent simultaneous access of its pending store.