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

Function table_swap

tools/ipfw/tables.c:667–685  ·  view source on GitHub ↗

* Swaps given table with @second one. */

Source from the content-addressed store, hash-verified

665 * Swaps given table with @second one.
666 */
667static int
668table_swap(ipfw_obj_header *oh, char *second)
669{
670
671 if (table_check_name(second) != 0)
672 errx(EX_USAGE, "table name %s is invalid", second);
673
674 if (table_do_swap(oh, second) == 0)
675 return (0);
676
677 switch (errno) {
678 case EINVAL:
679 errx(EX_USAGE, "Unable to swap table: check types");
680 case EFBIG:
681 errx(EX_USAGE, "Unable to swap table: check limits");
682 }
683
684 return (0);
685}
686
687
688/*

Callers 1

ipfw_table_handlerFunction · 0.85

Calls 2

table_check_nameFunction · 0.85
table_do_swapFunction · 0.85

Tested by

no test coverage detected