2 ******************************************************************************
6 * Author: Damien Stuart
8 * Purpose: Header file for fwknopd command line options.
10 * Copyright 2010 Damien Stuart (dstuart@dstuart.org)
12 * License (GNU Public License):
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 ******************************************************************************
34 /* The config entry indexes are defined in the fwknopd_common.h, and now we
35 * create a config entry name map as well (too lazy to make a hash table).
37 * Note: It is very important this list matches the enum in fwknopd_common.h
40 static char *config_map[NUMBER_OF_CONFIG_ENTRIES] = {
45 "ENABLE_PCAP_PROMISC",
47 "PCAP_DISPATCH_COUNT",
50 "ENABLE_SPA_PACKET_AGING",
52 "ENABLE_DIGEST_PERSISTENCE",
55 "ENABLE_SPA_OVER_HTTP",
61 //"ENABLE_EXTERNAL_CMDS",
62 //"EXTERNAL_CMD_OPEN",
63 //"EXTERNAL_CMD_CLOSE",
64 //"EXTERNAL_CMD_ALARM",
65 //"ENABLE_EXT_CMD_PREFIX",
68 "ENABLE_IPT_FORWARDING",
69 "ENABLE_IPT_LOCAL_NAT",
80 "IPT_MASQUERADE_ACCESS",
81 "ENABLE_IPT_COMMENT_CHECK",
85 "IPFW_START_RULE_NUM",
87 "IPFW_ACTIVE_SET_NUM",
88 "IPFW_EXPIRE_SET_NUM",
89 "IPFW_EXPIRE_PURGE_INTERVAL",
90 "IPFW_ADD_CHECK_STATE",
95 /* --DSS Place-holder */
96 #endif /* FIREWALL type */
111 /* Long options values (for those that may not have a short option).
119 NOOP /* Just to be a marker for the end */
122 /* Our getopt_long options string.
124 #define GETOPTS_OPTION_STRING "a:c:C:d:Dfhi:Kl:O:p:P:RSvV"
126 /* Our program command-line options...
128 static struct option cmd_opts[] =
130 {"access-file", 1, NULL, 'a'},
131 {"config-file", 1, NULL, 'c'},
132 {"packet-limit", 1, NULL, 'C'},
133 {"digest-file", 1, NULL, 'd'},
134 {"dump-config", 0, NULL, 'D'},
135 {"foreground", 0, NULL, 'f'},
136 {"help", 0, NULL, 'h'},
137 {"interface", 1, NULL, 'i'},
138 {"kill", 0, NULL, 'K'},
139 {"fw-flush", 0, NULL, FW_FLUSH },
140 {"fw-list", 0, NULL, FW_LIST },
141 {"fw-list-all", 0, NULL, FW_LIST_ALL },
142 {"gpg-home-dir", 1, NULL, GPG_HOME_DIR },
143 {"locale", 1, NULL, 'l' },
144 {"rotate-digest-cache", 0, NULL, ROTATE_DIGEST_CACHE },
145 {"override-config", 1, NULL, 'O' },
146 {"pcap-filter", 1, NULL, 'P'},
147 {"pid-file", 1, NULL, 'p'},
148 {"restart", 0, NULL, 'R'},
149 {"status", 0, NULL, 'S'},
150 {"verbose", 0, NULL, 'v'},
151 {"version", 0, NULL, 'V'},
155 #endif /* CMD_OPTS_H */