40 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 47 #define foreach_vpe_api_msg \ 48 _(DHCP_PROXY_CONFIG,dhcp_proxy_config) \ 49 _(DHCP_PROXY_DUMP,dhcp_proxy_dump) \ 50 _(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss) \ 51 _(DHCP_CLIENT_CONFIG, dhcp_client_config) 57 vl_api_dhcp_proxy_set_vss_reply_t *rmp;
74 vl_api_dhcp_proxy_set_vss_reply_t *rmp;
75 ip46_address_t src, server;
140 mp->_vl_msg_id = ntohs (VL_API_DHCP_PROXY_DETAILS);
190 u8 mask_width,
u8 is_ipv6,
u8 * host_address,
191 u8 * router_address,
u8 * host_mac)
212 if (
NULL != host_mac)
215 mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
224 vl_api_dhcp_client_config_reply_t *rmp;
247 #define vl_msg_name_crc_list 249 #undef vl_msg_name_crc_list 254 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 255 foreach_vl_msg_name_crc_dhcp;
265 vl_msg_api_set_handlers(VL_API_##N, #n, \ 266 vl_api_##n##_t_handler, \ 268 vl_api_##n##_t_endian, \ 269 vl_api_##n##_t_print, \ 270 sizeof(vl_api_##n##_t), 1); DHCP Proxy set / unset vss request.
int dhcp_client_config(vlib_main_t *vm, u32 sw_if_index, u8 *hostname, u8 *client_id, u32 is_add, u32 client_index, void *event_callback, u32 pid)
#define vec_foreach_index(var, v)
Iterate over vector indices.
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.
static clib_error_t * dhcp_api_hookup(vlib_main_t *vm)
dhcp_server_t * dhcp_servers
The set of DHCP servers to which messages are relayed.
dhcp_proxy_main_t dhcp_proxy_main
Shard 4/6 instance of DHCP main.
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)
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.
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.
u32 rx_fib_index
The FIB index (not the external Table-ID) in which the client is resides.
u32 oui
?? RFC doesn't say
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void dhcp_proxy_dump(fib_protocol_t proto, void *opaque, u32 context)
Dump the proxy configs to the API.
vl_api_dhcp_server_t servers[count]
static void vl_api_dhcp_proxy_config_t_handler(vl_api_dhcp_proxy_config_t *mp)
#define foreach_vpe_api_msg
void * vl_msg_api_alloc(int nbytes)
u32 server_fib_index
The FIB index (not the external Table-ID) in which the server is reachable.
static void vl_api_dhcp_proxy_dump_t_handler(vl_api_dhcp_proxy_dump_t *mp)
API main structure, used by both vpp and binary API clients.
#define BAD_SW_IF_INDEX_LABEL
u32 ft_table_id
Table ID (hash key) for this FIB.
#define clib_memcpy(a, b, c)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
void dhcp_compl_event_callback(u32 client_index, u32 pid, u8 *hostname, u8 mask_width, u8 is_ipv6, u8 *host_address, u8 *router_address, u8 *host_mac)
A representation of a single DHCP Server within a given VRF config.
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_server
The address of the DHCP server to which to relay the client's messages.
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
VLIB_API_INIT_FUNCTION(dhcp_api_hookup)
static vlib_main_t * vlib_get_main(void)
int dhcp_proxy_set_vss(fib_protocol_t proto, u32 tbl_id, u32 oui, u32 fib_id, int is_del)
Configure/set a new VSS info.
Tell client about a DHCP completion event.
#define ip46_address_reset(ip46)
A DHCP proxy represenation fpr per-client VRF config.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void setup_message_id_table(api_main_t *am)
static void vl_api_dhcp_client_config_t_handler(vl_api_dhcp_client_config_t *mp)
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
static void vl_api_dhcp_proxy_set_vss_t_handler(vl_api_dhcp_proxy_set_vss_t *mp)
u32 dhcp_proxy_rx_table_get_table_id(fib_protocol_t proto, u32 fib_index)
Tell client about a DHCP completion event.
DHCP Client config add / del request.
DHCP Proxy config add / del request.
#define VALIDATE_SW_IF_INDEX(mp)
A protocol Independent FIB table.
struct _unix_shared_memory_queue unix_shared_memory_queue_t