summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/iptables.c b/iptables.c
index 7cc2448f..0300027c 100644
--- a/iptables.c
+++ b/iptables.c
@@ -99,38 +99,38 @@ static const char optflags[NUMBER_OF_OPT]
= { 'n', 's', 'd', 'p', 'j', 'v', 'x', 'i', 'o', 'f', '0', 'c'};
static struct option original_opts[] = {
- { "append", 1, NULL, 'A' },
- { "delete", 1, NULL, 'D' },
- { "insert", 1, NULL, 'I' },
- { "replace", 1, NULL, 'R' },
- { "list", 2, NULL, 'L' },
- { "flush", 2, NULL, 'F' },
- { "zero", 2, NULL, 'Z' },
- { "new-chain", 1, NULL, 'N' },
- { "delete-chain", 2, NULL, 'X' },
- { "rename-chain", 1, NULL, 'E' },
- { "policy", 1, NULL, 'P' },
- { "source", 1, NULL, 's' },
- { "destination", 1, NULL, 'd' },
- { "src", 1, NULL, 's' }, /* synonym */
- { "dst", 1, NULL, 'd' }, /* synonym */
- { "protocol", 1, NULL, 'p' },
- { "in-interface", 1, NULL, 'i' },
- { "jump", 1, NULL, 'j' },
- { "table", 1, NULL, 't' },
- { "match", 1, NULL, 'm' },
- { "numeric", 0, NULL, 'n' },
- { "out-interface", 1, NULL, 'o' },
- { "verbose", 0, NULL, 'v' },
- { "exact", 0, NULL, 'x' },
- { "fragments", 0, NULL, 'f' },
- { "version", 0, NULL, 'V' },
- { "help", 2, NULL, 'h' },
- { "line-numbers", 0, NULL, '0' },
- { "modprobe", 1, NULL, 'M' },
- { "set-counters", 1, NULL, 'c' },
- { "goto", 1, NULL, 'g' },
- { }
+ {.name = "append", .has_arg = 1, .val = 'A'},
+ {.name = "delete", .has_arg = 1, .val = 'D'},
+ {.name = "insert", .has_arg = 1, .val = 'I'},
+ {.name = "replace", .has_arg = 1, .val = 'R'},
+ {.name = "list", .has_arg = 2, .val = 'L'},
+ {.name = "flush", .has_arg = 2, .val = 'F'},
+ {.name = "zero", .has_arg = 2, .val = 'Z'},
+ {.name = "new-chain", .has_arg = 1, .val = 'N'},
+ {.name = "delete-chain", .has_arg = 2, .val = 'X'},
+ {.name = "rename-chain", .has_arg = 1, .val = 'E'},
+ {.name = "policy", .has_arg = 1, .val = 'P'},
+ {.name = "source", .has_arg = 1, .val = 's'},
+ {.name = "destination", .has_arg = 1, .val = 'd'},
+ {.name = "src", .has_arg = 1, .val = 's'}, /* synonym */
+ {.name = "dst", .has_arg = 1, .val = 'd'}, /* synonym */
+ {.name = "protocol", .has_arg = 1, .val = 'p'},
+ {.name = "in-interface", .has_arg = 1, .val = 'i'},
+ {.name = "jump", .has_arg = 1, .val = 'j'},
+ {.name = "table", .has_arg = 1, .val = 't'},
+ {.name = "match", .has_arg = 1, .val = 'm'},
+ {.name = "numeric", .has_arg = 0, .val = 'n'},
+ {.name = "out-interface", .has_arg = 1, .val = 'o'},
+ {.name = "verbose", .has_arg = 0, .val = 'v'},
+ {.name = "exact", .has_arg = 0, .val = 'x'},
+ {.name = "fragments", .has_arg = 0, .val = 'f'},
+ {.name = "version", .has_arg = 0, .val = 'V'},
+ {.name = "help", .has_arg = 2, .val = 'h'},
+ {.name = "line-numbers", .has_arg = 0, .val = '0'},
+ {.name = "modprobe", .has_arg = 1, .val = 'M'},
+ {.name = "set-counters", .has_arg = 1, .val = 'c'},
+ {.name = "goto", .has_arg = 1, .val = 'g'},
+ {NULL},
};
/* we need this for iptables-restore. iptables-restore.c sets line to the