#include <lb/lb.api_enum.h>
#include <lb/lb.api_types.h>
-#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define REPLY_MSG_ID_BASE lbm->msg_id_base
#include <vlibapi/api_helper_macros.h>
-/* Macro to finish up custom dump fns */
-#define FINISH \
- vec_add1 (s, 0); \
- vl_print (handle, (char *)s); \
- vec_free (s); \
- return handle;
+#define FINISH \
+ vec_add1 (s, 0); \
+ vlib_cli_output (handle, (char *) s); \
+ vec_free (s); \
+ return handle;
static void
vl_api_lb_conf_t_handler
lb_vip_t *vip = 0;
/* construct vip list */
- pool_foreach(vip, lbm->vips, {
+ pool_foreach (vip, lbm->vips) {
/* Hide placeholder VIP */
if (vip != lbm->vips) {
msg_size = sizeof (*rmp);
vl_api_send_msg (reg, (u8 *) rmp);
}
- });
+ }
}
lb_main_t *lbm = &lb_main;
int msg_size = 0;
u32 *as_index;
- u32 asindex = 0;
/* construct as list under this vip */
lb_as_t *as;
- pool_foreach(as_index, vip->as_indexes, {
+ pool_foreach (as_index, vip->as_indexes) {
/* Hide placeholder As for specific VIP */
if (*as_index != 0) {
as = &lbm->ass[*as_index];
rmp->in_use_since = htonl(as->last_used);
vl_api_send_msg (reg, (u8 *) rmp);
- asindex++;
}
- });
+ }
}
dump_all = (prefix.ip6.as_u64[0] == 0) && (prefix.ip6.as_u64[1] == 0);
/* *INDENT-OFF* */
- pool_foreach(vip, lbm->vips,
- ({
+ pool_foreach (vip, lbm->vips)
+ {
if ( dump_all
|| ((prefix.as_u64[0] == vip->prefix.as_u64[0])
&& (prefix.as_u64[1] == vip->prefix.as_u64[1])
{
send_lb_as_details(reg, mp->context, vip);
}
- }));
+ }
/* *INDENT-ON* */
}