static void display_init_screens(void) { if (n_screens) return; display_add_screen(display_tasks()); display_add_screen(display_ports()); display_add_screen(display_mempools()); display_add_screen(display_latency()); display_add_screen(display_rings()); display_add_screen(display_l4gen()); display_add_screen(display_pkt_len()); display_add_screen(display_priority()); }
int main(int argc, char **argv) { struct options_t opts; struct store_t *store; memset(&opts, 0, sizeof(opts)); set_portsdir(&opts); parse_opts(argc, argv, &opts); if (opts.update_db) mkdb(&opts); else if (opts.search_crit) { if (!s_exists()) errx(EX_USAGE, "Database does not exist, please create it first using the -u option"); if (!ISSET(SEARCH_BY_PFILE, opts.search_crit) && strstr(opts.outflds, "rawfiles") != NULL) errx(EX_USAGE, "-o rawfiles is specified without -f or -b"); parse_outflds(opts.outflds, opts.outflds_parsed); alloc_store(&store); s_search_start(store); filter_ports(store, &opts); display_ports(get_ports(store), &opts); s_search_end(store); free_store(store); } return 0; }