MCPcopy Create free account
hub / github.com/F-Stack/f-stack / table_show_tainfo

Function table_show_tainfo

tools/ipfw/tables.c:734–765  ·  view source on GitHub ↗

* Print global/per-AF table @i algorithm info. */

Source from the content-addressed store, hash-verified

732 * Print global/per-AF table @i algorithm info.
733 */
734static void
735table_show_tainfo(ipfw_xtable_info *i __unused, struct ta_cldata *d,
736 const char *af, const char *taclass)
737{
738
739 switch (d->taclass) {
740 case IPFW_TACLASS_HASH:
741 case IPFW_TACLASS_ARRAY:
742 printf(" %salgorithm %s info\n", af, taclass);
743 if (d->itemsize == d->itemsize6)
744 printf(" size: %u items: %u itemsize: %u\n",
745 d->size, d->count, d->itemsize);
746 else
747 printf(" size: %u items: %u "
748 "itemsize4: %u itemsize6: %u\n",
749 d->size, d->count,
750 d->itemsize, d->itemsize6);
751 break;
752 case IPFW_TACLASS_RADIX:
753 printf(" %salgorithm %s info\n", af, taclass);
754 if (d->itemsize == d->itemsize6)
755 printf(" items: %u itemsize: %u\n",
756 d->count, d->itemsize);
757 else
758 printf(" items: %u "
759 "itemsize4: %u itemsize6: %u\n",
760 d->count, d->itemsize, d->itemsize6);
761 break;
762 default:
763 printf(" algo class: %s\n", taclass);
764 }
765}
766
767static void
768table_print_valheader(char *buf, size_t bufsize, uint32_t vmask)

Callers 1

table_show_infoFunction · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected