32#include "cmdhandler.h"
37#include "clientpipe.h"
38#include "longgetopt.h"
56 "List all policies in the database.\n\n"
61run(cmdhandler_ctx_type* context,
int argc,
char* argv[])
63 int sockfd = context->sockfd;
64 const char *fmt =
"%-31s %-48s\n";
75 client_printf(sockfd, fmt,
"Policy:",
"Description:");
88 "policy list", &usage, &help, NULL, NULL, &run, NULL
db_connection_t * getconnectioncontext(cmdhandler_ctx_type *context)
void policy_list_free(policy_list_t *policy_list)
const policy_t * policy_list_next(policy_list_t *policy_list)
policy_list_t * policy_list_new_get(const db_connection_t *connection)
const char * policy_name(const policy_t *policy)
const char * policy_description(const policy_t *policy)
struct cmd_func_block policy_list_funcblock