Lines Matching defs:optarg
111 static int parse_mode(struct xt_hashlimit_info *r, char *optarg)
114 char *arg = strdup(optarg);
165 if (!parse_rate(optarg, &r->cfg.avg))
167 "bad rate `%s'", optarg);
173 if (string_to_number(optarg, 0, 10000, &num) == -1)
175 "bad --hashlimit-burst `%s'", optarg);
181 if (string_to_number(optarg, 0, 0xffffffff, &num) == -1)
183 "bad --hashlimit-htable-size: `%s'", optarg);
189 if (string_to_number(optarg, 0, 0xffffffff, &num) == -1)
191 "bad --hashlimit-htable-max: `%s'", optarg);
197 if (string_to_number(optarg, 0, 0xffffffff, &num) == -1)
200 optarg);
206 if (string_to_number(optarg, 0, 0xffffffff, &num) == -1)
208 "bad --hashlimit-htable-expire: `%s'", optarg);
214 if (parse_mode(r, optarg) < 0)
216 "bad --hashlimit-mode: `%s'\n", optarg);
221 if (strlen(optarg) == 0)
223 strncpy(r->name, optarg, sizeof(r->name));