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

Function do_range_cmd

tools/ipfw/ipfw2.c:2359–2376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2357}
2358
2359static int
2360do_range_cmd(int cmd, ipfw_range_tlv *rt)
2361{
2362 ipfw_range_header rh;
2363 size_t sz;
2364
2365 memset(&rh, 0, sizeof(rh));
2366 memcpy(&rh.range, rt, sizeof(*rt));
2367 rh.range.head.length = sizeof(*rt);
2368 rh.range.head.type = IPFW_TLV_RANGE;
2369 sz = sizeof(rh);
2370
2371 if (do_get3(cmd, &rh.opheader, &sz) != 0)
2372 return (-1);
2373 /* Save number of matched objects */
2374 rt->new_set = rh.range.new_set;
2375 return (0);
2376}
2377
2378/*
2379 * This one handles all set-related commands

Callers 4

ipfw_sets_handlerFunction · 0.85
ipfw_deleteFunction · 0.85
ipfw_zeroFunction · 0.85
ipfw_flushFunction · 0.85

Calls 3

memsetFunction · 0.85
do_get3Function · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected