+static int validate_pausemode(const struct config_state attribute((unused)) *cs,
+ int nvec,
+ char **vec) {
+ if(nvec == 1 && (!strcmp(vec[0], "silence") || !strcmp(vec[0], "suspend")))
+ return 0;
+ error(0, "%s:%d: invalid pause mode", cs->path, cs->line);
+ return -1;
+}
+
+static int validate_destaddr(const struct config_state attribute((unused)) *cs,
+ int nvec,
+ char **vec) {
+ struct netaddress na[1];
+
+ if(netaddress_parse(na, nvec, vec)) {
+ error(0, "%s:%d: invalid network address", cs->path, cs->line);
+ return -1;
+ }
+ if(!na->address) {
+ error(0, "%s:%d: destination address required", cs->path, cs->line);
+ return -1;
+ }
+ return 0;
+}
+