/* covered by the GNU Public License. */
/**************************************************************************/
#include <ul_log.h>
+#include <ul_logreg.h>
#include <fra_generic.h>
#include <fwp.h>
//#include <fwp_fna.h>
UL_LOG_CUST(ulogd_fra_fwp);
ul_log_domain_t ulogd_fra_fwp = {UL_LOGL_MSG, "fra_fwp"};
+UL_LOGREG_SINGLE_DOMAIN_INIT_FUNCTION(fra_fwp_logreg_domains, ulogd_fra_fwp);
static int create_vres(fres_vres_t *vres, void *priv)
{
#include <forb.h>
#include <error.h>
#include <errno.h>
+#include <getopt.h>
#include <fres_sa_scenario.h>
#include <stdbool.h>
#include <ul_log.h>
+#include <ul_logreg.h>
#include <fwp_res.h>
#include <stdio.h>
#include "fwp_admctrl.h"
.priv = NULL
};
+static struct option long_opts[] = {
+ { "loglevel", 1, 0, 'l' },
+ { 0, 0, 0, 0}
+};
+
+static void
+usage(void)
+{
+ printf("usage: fwpmngr [ options ]\n");
+ printf(" -l, --loglevel <number>|<domain>=<number>,...\n");
+}
+
int main(int argc, char *argv[])
{
forb_orb orb;
int ret;
-
forb_init_attr_t attr = { .orb_id = "org.frescor.frm.fwp" };
+ int opt;
+
+ while ((opt = getopt_long(argc, argv, "l:", &long_opts[0], NULL)) != EOF) {
+ switch (opt) {
+ case 'l':
+ ul_log_domain_arg2levels(optarg);
+ break;
+ case 'h':
+ /*default:*/
+ usage();
+ exit(opt == 'h' ? 0 : 1);
+ }
+ }
+
orb = forb_init(&argc, &argv, &attr);
if (!orb) error(1, errno, "forb_init");