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

Function table_do_get_stdlist

tools/ipfw/tables.c:1939–1964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1937}
1938
1939static int
1940table_do_get_stdlist(uint16_t opcode, ipfw_obj_lheader **polh)
1941{
1942 ipfw_obj_lheader req, *olh;
1943 size_t sz;
1944
1945 memset(&req, 0, sizeof(req));
1946 sz = sizeof(req);
1947
1948 if (do_get3(opcode, &req.opheader, &sz) != 0)
1949 if (errno != ENOMEM)
1950 return (errno);
1951
1952 sz = req.size;
1953 if ((olh = calloc(1, sz)) == NULL)
1954 return (ENOMEM);
1955
1956 olh->size = sz;
1957 if (do_get3(opcode, &olh->opheader, &sz) != 0) {
1958 free(olh);
1959 return (errno);
1960 }
1961
1962 *polh = olh;
1963 return (0);
1964}
1965
1966static int
1967table_do_get_algolist(ipfw_obj_lheader **polh)

Callers 2

table_do_get_algolistFunction · 0.85
table_do_get_vlistFunction · 0.85

Calls 4

memsetFunction · 0.85
do_get3Function · 0.85
callocFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected