| 1978 | } |
| 1979 | |
| 1980 | void |
| 1981 | ipfw_list_ta(int ac __unused, char *av[] __unused) |
| 1982 | { |
| 1983 | ipfw_obj_lheader *olh; |
| 1984 | ipfw_ta_info *info; |
| 1985 | const char *atype; |
| 1986 | uint32_t i; |
| 1987 | int error; |
| 1988 | |
| 1989 | error = table_do_get_algolist(&olh); |
| 1990 | if (error != 0) |
| 1991 | err(EX_OSERR, "Unable to request algorithm list"); |
| 1992 | |
| 1993 | info = (ipfw_ta_info *)(olh + 1); |
| 1994 | for (i = 0; i < olh->count; i++) { |
| 1995 | if ((atype = match_value(tabletypes, info->type)) == NULL) |
| 1996 | atype = "unknown"; |
| 1997 | printf("--- %s ---\n", info->algoname); |
| 1998 | printf(" type: %s\n refcount: %u\n", atype, info->refcnt); |
| 1999 | |
| 2000 | info = (ipfw_ta_info *)((caddr_t)info + olh->objsize); |
| 2001 | } |
| 2002 | |
| 2003 | free(olh); |
| 2004 | } |
| 2005 | |
| 2006 | |
| 2007 | /* Copy of current kernel table_value structure */ |
no test coverage detected