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

Function table_show_list

tools/ipfw/tables.c:1760–1779  ·  view source on GitHub ↗

* Shows all entries from @oh in human-readable format */

Source from the content-addressed store, hash-verified

1758 * Shows all entries from @oh in human-readable format
1759 */
1760static void
1761table_show_list(ipfw_obj_header *oh, int need_header)
1762{
1763 ipfw_obj_tentry *tent;
1764 uint32_t count;
1765 ipfw_xtable_info *i;
1766
1767 i = (ipfw_xtable_info *)(oh + 1);
1768 tent = (ipfw_obj_tentry *)(i + 1);
1769
1770 if (need_header)
1771 printf("--- table(%s), set(%u) ---\n", i->tablename, i->set);
1772
1773 count = i->count;
1774 while (count > 0) {
1775 table_show_entry(i, tent);
1776 tent = (ipfw_obj_tentry *)((caddr_t)tent + tent->head.length);
1777 count--;
1778 }
1779}
1780
1781static void
1782table_show_value(char *buf, size_t bufsize, ipfw_table_value *v,

Callers 1

table_show_oneFunction · 0.85

Calls 2

table_show_entryFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected