* Delete pipe, queue or scheduler i */
| 660 | * Delete pipe, queue or scheduler i |
| 661 | */ |
| 662 | int |
| 663 | ipfw_delete_pipe(int do_pipe, int i) |
| 664 | { |
| 665 | struct { |
| 666 | struct dn_id oid; |
| 667 | uintptr_t a[1]; /* add more if we want a list */ |
| 668 | } cmd; |
| 669 | oid_fill((void *)&cmd, sizeof(cmd), DN_CMD_DELETE, DN_API_VERSION); |
| 670 | cmd.oid.subtype = (do_pipe == 1) ? DN_LINK : |
| 671 | ( (do_pipe == 2) ? DN_FS : DN_SCH); |
| 672 | cmd.a[0] = i; |
| 673 | i = do_cmd(IP_DUMMYNET3, &cmd, cmd.oid.len); |
| 674 | if (i) { |
| 675 | i = 1; |
| 676 | warn("rule %u: setsockopt(IP_DUMMYNET_DEL)", i); |
| 677 | } |
| 678 | return i; |
| 679 | } |
| 680 | |
| 681 | /* |
| 682 | * Code to parse delay profiles. |
no test coverage detected