#include <freeradius-devel/server/client.h>
#include <freeradius-devel/server/process.h>
#include <freeradius-devel/server/dependency.h>
-
+#include <freeradius-devel/server/paircmp.h>
/*
* Let any external program building against the library know what
* features the library was built with.
#define DEAD_TIME 120
#define EXEC_TIMEOUT 10
-/* for paircmp_register */
-typedef int (*RAD_COMPARE_FUNC)(void *instance, REQUEST *,VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
-
typedef enum request_fail {
REQUEST_FAIL_UNKNOWN = 0,
REQUEST_FAIL_NO_THREADS, //!< No threads to handle it.
void trigger_exec_free(void);
VALUE_PAIR *trigger_args_afrom_server(TALLOC_CTX *ctx, char const *server, uint16_t port);
-/* paircmp.c */
-int paircmp_pairs(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp);
-
-int paircmp(REQUEST *request, VALUE_PAIR *req_list, VALUE_PAIR *check, VALUE_PAIR **rep_list);
-
-int paircmp_find(fr_dict_attr_t const *da);
-
-int paircmp_register_by_name(char const *name, fr_dict_attr_t const *from,
- bool first_only, RAD_COMPARE_FUNC func, void *instance);
-
-int paircmp_register(fr_dict_attr_t const *attribute, fr_dict_attr_t const *from,
- bool first_only, RAD_COMPARE_FUNC func, void *instance);
-
-void paircmp_unregister(fr_dict_attr_t const *attr, RAD_COMPARE_FUNC func);
-
-void paircmp_unregister_instance(void *instance);
-
-int paircmp_init(void);
-
-void paircmp_free(void);
-
/** Allocate a VALUE_PAIR in the request list
*
* @param[in] _attr allocated.
--- /dev/null
+#pragma once
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/**
+ * $Id$
+ *
+ * @file lib/server/paircmp.h
+ * @brief Legacy paircomparison function
+ *
+ * @copyright 2000,2006 The FreeRADIUS server project
+ * @copyright 2000 Alan DeKok <aland@ox.org>
+ */
+RCSIDH(paircmp_h, "$Id$")
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <freeradius-devel/server/request.h>
+#include <freeradius-devel/util/dict.h>
+#include <freeradius-devel/util/pair.h>
+
+/* for paircmp_register */
+typedef int (*RAD_COMPARE_FUNC)(void *instance, REQUEST *,VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
+
+int paircmp_pairs(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp);
+
+int paircmp(REQUEST *request, VALUE_PAIR *req_list, VALUE_PAIR *check, VALUE_PAIR **rep_list);
+
+int paircmp_find(fr_dict_attr_t const *da);
+
+int paircmp_register_by_name(char const *name, fr_dict_attr_t const *from,
+ bool first_only, RAD_COMPARE_FUNC func, void *instance);
+
+int paircmp_register(fr_dict_attr_t const *attribute, fr_dict_attr_t const *from,
+ bool first_only, RAD_COMPARE_FUNC func, void *instance);
+
+void paircmp_unregister(fr_dict_attr_t const *attr, RAD_COMPARE_FUNC func);
+
+void paircmp_unregister_instance(void *instance);
+
+int paircmp_init(void);
+
+void paircmp_free(void);
+
+#ifdef __cplusplus
+}
+#endif