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

Function table_lock

tools/ipfw/tables.c:590–602  ·  view source on GitHub ↗

* Locks or unlocks given table */

Source from the content-addressed store, hash-verified

588 * Locks or unlocks given table
589 */
590static void
591table_lock(ipfw_obj_header *oh, int lock)
592{
593 ipfw_xtable_info xi;
594
595 memset(&xi, 0, sizeof(xi));
596
597 xi.mflags |= IPFW_TMFLAGS_LOCK;
598 xi.flags |= (lock != 0) ? IPFW_TGFLAGS_LOCKED : 0;
599
600 if (table_do_modify(oh, &xi) != 0)
601 err(EX_OSERR, "Table %s failed", lock != 0 ? "lock" : "unlock");
602}
603
604/*
605 * Destroys given table specified by @oh->ntlv.

Callers 1

ipfw_table_handlerFunction · 0.85

Calls 2

memsetFunction · 0.85
table_do_modifyFunction · 0.85

Tested by

no test coverage detected