#include "dns.h"
#include "rspamd.h"
#include "utlist.h"
+#include "contrib/libev/ev.h"
#include "contrib/librdns/rdns.h"
#include "contrib/librdns/dns_private.h"
#include "contrib/librdns/rdns_ev.h"
-/*-
- * Copyright 2016 Vsevolod Stakhov
+/*
+ * Copyright 2023 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
struct rspamd_config;
struct rspamd_task;
+struct event_loop;
struct rspamd_dns_resolver {
struct rdns_resolver *r;
struct ev_loop *event_loop;
rspamd_lru_hash_t *fails_cache;
void *uidna;
- ev_tstamp fails_cache_time;
+ double fails_cache_time;
struct upstream_list *ups;
struct rspamd_config *cfg;
gdouble request_timeout;
-/*-
- * Copyright 2016 Vsevolod Stakhov
+/*
+ * Copyright 2023 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
#include "rdns.h"
#include "cryptobox.h"
#include "utlist.h"
+#include "contrib/libev/ev.h"
#include "logger.h"
#include "contrib/librdns/rdns.h"
#include "contrib/mumhash/mum.h"
+/*
+ * Copyright 2023 Vsevolod Stakhov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef UPSTREAM_H
#define UPSTREAM_H
extern "C" {
#endif
+/* Forward declaration */
+struct ev_loop;
+
enum rspamd_upstream_rotation {
RSPAMD_UPSTREAM_RANDOM = 0,
RSPAMD_UPSTREAM_HASHED,
#include "ottery.h"
#include "cryptobox.h"
+#include "contrib/libev/ev.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
+/*
+ * Copyright 2023 Vsevolod Stakhov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef RSPAMD_UTIL_H
#define RSPAMD_UTIL_H
#include <netdb.h>
#endif
-#include "contrib/libev/ev.h"
#include <time.h>
#ifdef __cplusplus