Skip to content

Instantly share code, notes, and snippets.

@marian-pritsak
Last active January 28, 2021 01:34
Show Gist options
  • Save marian-pritsak/df72abbd09be2190d8ce6ce40baaad71 to your computer and use it in GitHub Desktop.
Save marian-pritsak/df72abbd09be2190d8ce6ce40baaad71 to your computer and use it in GitHub Desktop.
vxlan_rif.c
sx_status_t get_vxlan_tunnel_rif(sx_api_handle_t *handle, sx_router_interface_t *rif)
{
sx_tunnel_id_t vxlan_tunnel_id = 0x8c00000;
sx_tunnel_attribute_t vxlan_attribs;
sx_status_t rc = sx_api_tunnel_get(*handle, vxlan_tunnel_id, &vxlan_attribs);
if (rc != SX_STATUS_SUCCESS) {
return rc;
}
*rif = vxlan_attribs.attributes.vxlan.decap.underlay_rif;
return rc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment