Lines Matching refs:cur
244 read_rule(const char **cur, struct rule *rule, bool *eof)
251 if (*cur == NULL)
255 while (**cur == ' ')
256 (*cur)++;
257 rule->syntax_begin = *cur;
261 char *delim = strchr(*cur, ';');
264 rule->syntax_len = (int)(delim - *cur + 1);
267 if (strstr(*cur, "inet6") == *cur) {
269 *cur += strlen("inet6");
270 } else if (strstr(*cur, "inet") == *cur) {
272 *cur += strlen("inet");
273 } else if (strstr(*cur, "ethernet")) {
275 *cur += strlen("ethernet");
279 while (**cur == ' ')
280 (*cur)++;
283 if (strstr(*cur, "in") == *cur) {
285 *cur += strlen("in");
286 } else if (strstr(*cur, "out") == *cur) {
288 *cur += strlen("out");
292 while (**cur == ' ')
293 (*cur)++;
296 char *sp = strchr(*cur, ' ');
299 size_t len = sp - *cur;
302 strncpy(rule->ifname, *cur, len);
304 *cur = sp;
305 while (**cur == ' ')
306 (*cur)++;
309 if (strstr(*cur, "pull-head") == *cur) {
311 *cur += strlen("pull-head");
312 } else if (strstr(*cur, "enlarge") == *cur) {
314 *cur += strlen("enlarge");
318 while (**cur == ' ')
319 (*cur)++;
322 if (*cur > delim)
324 rule->opargs = *cur;
327 *cur = delim + 1;
328 while (**cur == ' ')
329 (*cur)++;
330 *eof = strlen(*cur) == 0;