* Creates new table * * Request: [ ipfw_obj_header ipfw_xtable_info ] * * Returns 0 on success. */
| 515 | * Returns 0 on success. |
| 516 | */ |
| 517 | static int |
| 518 | table_do_create(ipfw_obj_header *oh, ipfw_xtable_info *i) |
| 519 | { |
| 520 | char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info)]; |
| 521 | int error; |
| 522 | |
| 523 | memcpy(tbuf, oh, sizeof(*oh)); |
| 524 | memcpy(tbuf + sizeof(*oh), i, sizeof(*i)); |
| 525 | oh = (ipfw_obj_header *)tbuf; |
| 526 | |
| 527 | error = do_set3(IP_FW_TABLE_XCREATE, &oh->opheader, sizeof(tbuf)); |
| 528 | |
| 529 | return (error); |
| 530 | } |
| 531 | |
| 532 | /* |
| 533 | * Modifies existing table |
no test coverage detected