You can find L2 bridging related APIs from the file src/vnet/l2/l2.api. The
API to get bridge domain state is bridge_domain_dump and the response info
provided is bridge_domain_details. The API to change bridge domain attributes
is bridge_flags. The API to set bridge domain aging interval is
bridge_domain_set_mac_age.
Following are the spec of these APIs from the file l2.api:
/** \brief L2 bridge domain request operational state details
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param bd_id - the bridge domain id desired or ~0 to request all bds
*/
define bridge_domain_dump
{
u32 client_index;
u32 context;
u32 bd_id;
};
/** \brief L2 bridge domain sw interface operational state response
@param bd_id - the bridge domain id
@param sw_if_index - sw_if_index in the domain
@param shg - split horizon group for the interface
*/
typeonly manual_print manual_endian define bridge_domain_sw_if
{
u32 context;
u32 sw_if_index;
u8 shg;
};
/** \brief L2 bridge domain operational state response
@param bd_id - the bridge domain id
@param flood - bcast/mcast flooding state on all interfaces in the bd
@param uu_flood - uknown unicast flooding state on all interfaces in the bd
@param forward - forwarding state on all interfaces in the bd
@param learn - learning state on all interfaces in the bd
@param arp_term - arp termination state on all interfaces in the bd
@param mac_age - mac aging time in min, 0 for disabled
@param bd_tag - optional textual tag for the bridge domain
@param n_sw_ifs - number of sw_if_index's in the domain
*/
manual_print manual_endian define bridge_domain_details
{
u32 context;
u32 bd_id;
u8 flood;
u8 uu_flood;
u8 forward;
u8 learn;
u8 arp_term;
u8 mac_age;
u8 bd_tag[64];
u32 bvi_sw_if_index;
u32 n_sw_ifs;
vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs];
/** \brief Set interface L2 flags (such as L2_LEARN, L2_FWD,
L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used
to disable one or more of the features represented by the
flag bits on an interface to override what is set as default
for all interfaces in the bridge domain
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param sw_if_index - interface
@param is_set - if non-zero, set the bits, else clear them
@param feature_bitmap - non-zero bits (as above) to set or clear
*/
define l2_flags
{
u32 client_index;
u32 context;
u32 sw_if_index;
u8 is_set;
u32 feature_bitmap;
};
/** \brief Set interface L2 flags response
@param context - sender context, to match reply w/ request
@param retval - return code for the set l2 bits request
@param resulting_feature_bitmap - the internal l2 feature bitmap after the
request is implemented
*/
define l2_flags_reply
{
u32 context;
i32 retval;
u32 resulting_feature_bitmap;
};
/** \brief L2 bridge domain set mac age
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param bd_id - the bridge domain to create
@param mac_age - mac aging time in min, 0 for disabled
*/
autoreply define bridge_domain_set_mac_age
{
u32 client_index;
u32 context;
u32 bd_id;
u8 mac_age;
};
Regards,
John
From: [email protected] <[email protected]> On Behalf Of Gudimetla, Leela
Sankar
Sent: Thursday, June 14, 2018 3:32 PM
To: [email protected]
Subject: [vpp-dev] GET/SET support for each feature entity from VPP client
Hello,
We are writing a client for VPP to configure it over the shared-memory
interface (similar to what VAT does).
We are trying to find the GET for each entity so that we can handle ‘UPDATE’ of
an existing configuration inside VPP.
For example, we have created a bridge-domain with id say ‘10’ by using
“BRIDGE_DOMAIN_ADD_DEL”.
And if I want to modify some attribute of the same bridge-domain, I need to be
able to get the entry from VPP so that I can modify the attribute and set it.
But I don’t see the specific GET/SET client calls from VPP.
Please let me know how to handle this.
Thanks,
Leela sankar
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9616): https://lists.fd.io/g/vpp-dev/message/9616
Mute This Topic: https://lists.fd.io/mt/22189926/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-