addr_resolution_t *ar;
index_t *indexes = 0, *ari;
/* *INDENT-OFF* */
- pool_foreach (ar, tr_resolutions, ({
+ pool_foreach (ar, tr_resolutions) {
if ((cti == INDEX_INVALID || ar->cti == cti) &&
(ar->type == type || CNAT_RESOLV_ADDR_ANY == type))
vec_add1(indexes, ar - tr_resolutions);
- }));
+ }
/* *INDENT-ON* */
vec_foreach (ari, indexes) pool_put_index (tr_resolutions, *ari);
u32 api;
/* *INDENT-OFF* */
- pool_foreach_index(api, cnat_translation_pool,
- ({
+ pool_foreach_index (api, cnat_translation_pool)
+ {
if (!cb(api, ctx))
break;
- }));
+ }
/* *INDENT-ON* */
}
if (INDEX_INVALID == cti)
{
/* *INDENT-OFF* */
- pool_foreach_index(cti, cnat_translation_pool,
- ({
+ pool_foreach_index (cti, cnat_translation_pool)
+ {
ct = pool_elt_at_index (cnat_translation_pool, cti);
vlib_cli_output(vm, "%U", format_cnat_translation, ct);
- }));
+ }
/* *INDENT-ON* */
}
else
index_t tri, *trp, *trs = NULL;
/* *INDENT-OFF* */
- pool_foreach_index(tri, cnat_translation_pool,
- ({
+ pool_foreach_index (tri, cnat_translation_pool)
+ {
vec_add1(trs, tri);
- }));
+ }
/* *INDENT-ON* */
vec_foreach (trp, trs) cnat_translation_delete (*trp);
{
addr_resolution_t *ar;
/* *INDENT-OFF* */
- pool_foreach (ar, tr_resolutions, ({
+ pool_foreach (ar, tr_resolutions) {
if (ar->sw_if_index != sw_if_index)
continue;
if (ar->af != ip_addr_version (address))
continue;
cnat_if_addr_add_cbs[ar->type] (ar, address, is_del);
- }));
+ }
/* *INDENT-ON* */
}