* Shows all entries from @oh in human-readable format */
| 1758 | * Shows all entries from @oh in human-readable format |
| 1759 | */ |
| 1760 | static void |
| 1761 | table_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 | |
| 1781 | static void |
| 1782 | table_show_value(char *buf, size_t bufsize, ipfw_table_value *v, |
no test coverage detected