- name = ipset->name;
-
- fw3_pr(" -m set %s--match-set %s", invert ? "! " : "", name);
-
- list_for_each_entry(type, &ipset->datatypes, list)
- {
- fw3_pr("%c%s", first ? ' ' : ',', type->dest ? "dst" : "src");
- first = false;
- }
-}
-
-void
-fw3_format_time(struct fw3_time *time)
-{
- int i;
- struct tm empty = { 0 };
- char buf[sizeof("9999-99-99T23:59:59\0")];
- bool d1 = memcmp(&time->datestart, &empty, sizeof(empty));
- bool d2 = memcmp(&time->datestop, &empty, sizeof(empty));
- bool first;
-
- if (!d1 && !d2 && !time->timestart && !time->timestop &&
- !(time->monthdays & 0xFFFFFFFE) && !(time->weekdays & 0xFE))
- {
- return;
- }
-
- fw3_pr(" -m time");
-
- if (time->utc)
- fw3_pr(" --utc");
-
- if (d1)
- {
- strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S", &time->datestart);
- fw3_pr(" --datestart %s", buf);
- }
-
- if (d2)
- {
- strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S", &time->datestop);
- fw3_pr(" --datestop %s", buf);
- }
-
- if (time->timestart)