|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
76 if (~0 == server_index)
81 if (!fn (server,
ctx))
123 ip46_address_t *
addr,
u32 server_table_id)
146 ip46_address_t *
addr,
u32 server_table_id)
185 ip46_address_t *
addr,
187 u32 rx_fib_index,
u32 server_table_id)
270 rx_table_id, oui, fib_id);
298 v->
vpn_id[0] = (oui >> 16) & 0xff;
299 v->
vpn_id[1] = (oui >> 8) & 0xff;
300 v->
vpn_id[2] = (oui >> 0) & 0xff;
301 v->
vpn_id[3] = (vpn_index >> 24) & 0xff;
302 v->
vpn_id[4] = (vpn_index >> 16) & 0xff;
303 v->
vpn_id[5] = (vpn_index >> 8) & 0xff;
304 v->
vpn_id[6] = (vpn_index >> 0) & 0xff;
312 u8 * vpn_ascii_id,
u32 oui,
u32 vpn_index,
u8 is_del)
347 rc = VNET_API_ERROR_NO_SUCH_ENTRY;
void update_vss(dhcp_vss_t *v, u8 vss_type, u8 *vpn_ascii_id, u32 oui, u32 vpn_index)
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 - ...
static void dhcp_proxy_rx_table_lock(fib_protocol_t proto, u32 fib_index)
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.
u8 * vpn_ascii_id
Type 0 ASCII VPN Identifier.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, mfib_source_t src)
Get the index of the FIB for a Table-ID.
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.
A DHCP proxy representation fpr per-client VRF config.
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
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.
The Virtual Sub-net Selection information for a given RX FIB.
u32 * dhcp_server_index_by_rx_fib_index[DHCP_N_PROTOS]
dhcp_proxy_main_t dhcp_proxy_main
Shard 4/6 instance of DHCP main.
A protocol Independent IP multicast FIB table.
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.
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.
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.
A protocol Independent FIB table.
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
u32 ft_table_id
Table ID (hash key) for this FIB.
u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, fib_source_t src)
Get the index of the FIB for a Table-ID.
dhcp_proxy_t * dhcp_servers[DHCP_N_PROTOS]
#define vec_foreach_index(var, v)
Iterate over vector indices.
u32 rx_fib_index
The FIB index (not the external Table-ID) in which the client is resides.
u32 server_fib_index
The FIB index (not the external Table-ID) in which the server is reachable.
struct dhcp4_proxy_dump_walk_ctx_t_ dhcp_proxy_dump_walk_cxt_t
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void dhcp_proxy_dump(fib_protocol_t proto, void *opaque, u32 context)
Dump the proxy configs to the API.
static int dhcp_proxy_dump_walk(dhcp_proxy_t *proxy, void *arg)
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_proxy_walk(fib_protocol_t proto, dhcp_proxy_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy server.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
ip46_address_t dhcp_server
The address of the DHCP server to which to relay the client's messages.
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
#define vec_free(V)
Free vector's memory (no header).
static u32 dhcp_proxy_server_find(dhcp_proxy_t *proxy, fib_protocol_t proto, ip46_address_t *addr, u32 server_table_id)
u8 vpn_id[7]
Type 1 VPN-ID.
dhcp_vss_t * vss[DHCP_N_PROTOS]
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
u32 mft_table_id
Table ID (hash key) for this FIB.
u32 dhcp_proxy_rx_table_get_table_id(fib_protocol_t proto, u32 fib_index)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
void dhcp_vss_walk(fib_protocol_t proto, dhcp_vss_walk_fn_t fn, void *ctx)
Walk/Visit each DHCP proxy VSS.
dhcp_server_t * dhcp_servers
The set of DHCP servers to which messages are relayed.
ip46_address_t dhcp_src_address
The source address to use in relayed messaes.
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.
vl_api_address_union_t src_address
static void dhcp_proxy_rx_table_unlock(fib_protocol_t proto, u32 fib_index)
int dhcp_proxy_server_add(fib_protocol_t proto, ip46_address_t *addr, ip46_address_t *src_address, u32 rx_fib_index, u32 server_table_id)
Add a new DHCP proxy server configuration.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
#define vec_del1(v, i)
Delete the element at index I.
u32 * vss_index_by_rx_fib_index[DHCP_N_PROTOS]