vlib_cli_output (vm, "Socket clients");
vlib_cli_output (vm, "%20s %8s", "Name", "Fildesc");
/* *INDENT-OFF* */
- pool_foreach (reg, sm->registration_pool,
- ({
+ pool_foreach (reg, sm->registration_pool)
+ {
if (reg->registration_type == REGISTRATION_TYPE_SOCKET_SERVER) {
f = vl_api_registration_file (reg);
vlib_cli_output (vm, "%20s %8d", reg->name, f->file_descriptor);
}
- }));
+ }
/* *INDENT-ON* */
}
template.write_function = vl_socket_write_ready;
template.error_function = vl_socket_error_ready;
template.file_descriptor = fd;
+ template.description = format (0, "socksrv");
template.private_data = rp - socket_main.registration_pool;
rp->registration_type = REGISTRATION_TYPE_SOCKET_SERVER;
template.read_function = socksvr_accept_ready;
template.write_function = socksvr_bogus_write;
template.file_descriptor = sock->fd;
+ template.description = format (0, "socksvr %s", sock->config);
template.private_data = rp - sm->registration_pool;
rp->clib_file_index = clib_file_add (fm, &template);
{
u32 index;
/* *INDENT-OFF* */
- pool_foreach (rp, sm->registration_pool, ({
+ pool_foreach (rp, sm->registration_pool) {
vl_api_registration_del_file (rp);
index = rp->vl_api_registration_pool_index;
vl_socket_free_registration_index (index);
- }));
+ }
/* *INDENT-ON* */
}