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

Function ipfw_list_ta

tools/ipfw/tables.c:1980–2004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1978}
1979
1980void
1981ipfw_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 */

Callers 1

ipfw_internal_handlerFunction · 0.85

Calls 4

table_do_get_algolistFunction · 0.85
match_valueFunction · 0.85
printfFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected