#include <stddef.h>
#include <freeradius-devel/token.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Export the minimum amount of information about these structs
*/
*/
int cf_section_migrate(CONF_SECTION *dst, CONF_SECTION *src);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CONFFILE_H */
#include <freeradius-devel/ident.h>
RCSIDH(detail_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum detail_state_t {
STATE_UNOPENED = 0,
STATE_UNLOCKED,
int detail_decode(UNUSED rad_listen_t *this, UNUSED REQUEST *request);
int detail_parse(CONF_SECTION *cs, rad_listen_t *this);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* DETAIL_H */
#include <freeradius-devel/ident.h>
RCSIDH(dhcp_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Not for production use.
*/
#define DHCP_BASE_ATTR(x) (x & 0xff)
#define DHCP_UNPACK_OPTION1(x) (((x) & 0xff00) >> 8)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_DHCP_H */
#include <freeradius-devel/ident.h>
RCSIDH(event_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct fr_event_list_t fr_event_list_t;
typedef struct fr_event_t fr_event_t;
int fr_event_loop(fr_event_list_t *el);
void fr_event_loop_exit(fr_event_list_t *el, int code);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_HASH_H */
#include <freeradius-devel/ident.h>
RCSIDH(hash_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Fast hash, which isn't too bad. Don't use for cryptography,
* just for hashing internal data.
int fr_hash_table_walk(fr_hash_table_t *ht,
fr_hash_table_walk_t callback,
void *ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_HASH_H */
#include <freeradius-devel/ident.h>
RCSIDH(heap_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef int (*fr_heap_cmp_t)(const void *, const void *);
typedef struct fr_heap_t fr_heap_t;
void *fr_heap_peek(fr_heap_t *hp);
int fr_heap_num_elements(fr_heap_t *hp);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LRAD_HEAP_H */
#ifndef IDENT_H
#define IDENT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined(__GNUC__)
/* force inclusion of ident keywords in the face of optimization */
#define RCSID(id) static const char rcsid[] __attribute__ ((used)) = id;
#define RCSIDH(h, id)
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* IDENT_H */
#define WITH_TCP (1)
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define EAP_START 2
#define AUTH_VECTOR_LEN 16
unsigned int vendor;
int type;
size_t length; /* of data */
+#ifdef __cplusplus
+ /*
+ * C++ hackery. The server and modules are all C, so
+ * the defs here don't affect them. But any C++ code
+ * gets excited over "operator", so we change the name.
+ */
+ FR_TOKEN op_token;
+#else
FR_TOKEN operator;
+#endif
ATTR_FLAGS flags;
struct value_pair *next;
uint32_t lvalue;
void *fr_fifo_peek(fr_fifo_t *fi);
int fr_fifo_num_elements(fr_fifo_t *fi);
+#ifdef __cplusplus
+}
+#endif
+
#include <freeradius-devel/packet.h>
#ifdef WITH_TCP
#include <string.h>
+#ifdef WITH_OPENSSL_MD4
+#include <openssl/md4.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void fr_md4_calc (unsigned char *, const unsigned char *, unsigned int);
#ifndef WITH_OPENSSL_MD4
uint8_t buffer[MD4_BLOCK_LENGTH]; /* input buffer */
} FR_MD4_CTX;
-/*#include <sys/cdefs.h>*/
-
/*__BEGIN_DECLS*/
void fr_MD4Init(FR_MD4_CTX *);
void fr_MD4Update(FR_MD4_CTX *, const uint8_t *, size_t)
/*__END_DECLS*/
#else /* WITH_OPENSSL_MD4 */
-#include <openssl/md4.h>
-
#define FR_MD4_CTX MD4_CTX
#define fr_MD4Init MD4_Init
#define fr_MD4Update MD4_Update
#define fr_MD4Transform MD4_Transform
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FR_MD4_H */
#include <string.h>
+#ifdef WITH_OPENSSL_MD5
+#include <openssl/md5.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef WITH_OPENSSL_MD5
/* The below was retrieved from
* http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/crypto/md5.h?rev=1.1
#else /* WITH_OPENSSL_HASH */
-#include <openssl/md5.h>
-
#define FR_MD5_CTX MD5_CTX
#define fr_MD5Init MD5_Init
#define fr_MD5Update MD5_Update
#define fr_MD5Transform MD5_Transform
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FR_MD5_H */
#include <unistd.h>
#endif
+#ifndef HAVE_VSNPRINTF
+#include <stdarg.h>
+#endif
+
+#ifdef HAVE_SYS_LOCKING_H
+#include <sys/locking.h>
+#endif
+
/*
* Check for inclusion of <time.h>, versus <sys/time.h>
* Taken verbatim from the autoconf manual.
#define DARWIN (1)
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Functions from missing.c
*/
*/
#ifndef HAVE_VSNPRINTF
-#include <stdarg.h>
extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
#endif
#endif
#ifdef HAVE_SYS_LOCKING_H
-#include <sys/locking.h>
-
#define lockf _locking
#define F_ULOCK _LK_UNLCK /* Unlock locked sections. */
void timeval2ntp(const struct timeval *tv, uint8_t *ntp);
void ntp2timeval(struct timeval *tv, const char *ntp);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FR_MISSING_H */
+#ifndef FR_MODCALL_H
+#define FR_MODCALL_H
+
/* modcall.h: the outside interface to the module-calling tree. Includes
* functions to build the tree from the config file, and to call it by
* feeding it REQUESTs.
#include <freeradius-devel/conffile.h> /* Need CONF_* definitions */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* For each authorize/authtype/etc, we have an ordered
* tree of instances to call. This data structure keeps track
/* Free a tree returned by compile_modgroup or compile_modsingle */
void modcallable_free(modcallable **pc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
#ifndef WITHOUT_LIBLTDL
#include "ltdl.h"
-#else
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WITHOUT_LIBLTDL
typedef void *lt_dlhandle;
lt_dlhandle lt_dlopenext(const char *name);
module_instance_t *find_module_instance(CONF_SECTION *, const char *instname,
int do_link);
int module_hup_module(CONF_SECTION *cs, module_instance_t *node, time_t when);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_MODPRIV_H */
#include <freeradius-devel/conffile.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef int (*packetmethod)(void *instance, REQUEST *request);
enum {
int virtual_servers_load(CONF_SECTION *config);
void virtual_servers_free(time_t when);
+#ifdef __cplusplus
+}
+#endif
#endif /* RADIUS_MODULES_H */
#include <freeradius-devel/ident.h>
RCSIDH(packet_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
uint32_t fr_request_packet_hash(const RADIUS_PACKET *packet);
uint32_t fr_reply_packet_hash(const RADIUS_PACKET *packet);
int fr_packet_cmp(const RADIUS_PACKET *a, const RADIUS_PACKET *b);
* required type.
*/
# define fr_packet2myptr(TYPE, MEMBER, PTR) (TYPE *) (((char *)PTR) - offsetof(TYPE, MEMBER))
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_PACKET_H */
#include <freeradius-devel/ident.h>
RCSIDH(rad_assert_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void rad_assert_fail (const char *file, unsigned int line, const char *expr);
#ifdef NDEBUG
#define rad_assert assert
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <freeradius-devel/stats.h>
#include <freeradius-devel/realms.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* See util.c
VALUE_PAIR *input_vps, const char *name);
void radius_pairmove(REQUEST *request, VALUE_PAIR **to, VALUE_PAIR *from);
int radius_get_vp(REQUEST *request, const char *name, VALUE_PAIR **vp_p);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /*RADIUSD_H*/
#include <freeradius-devel/ident.h>
RCSIDH(radutmp_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Types of connection.
*/
#define RUT_NAMESIZE sizeof(((struct radutmp *) NULL)->login)
#define RUT_SESSSIZE sizeof(((struct radutmp *) NULL)->session_id)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RADUTMP_H */
#include <freeradius-devel/ident.h>
RCSIDH(realms_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define HOME_TYPE_INVALID (0)
#define HOME_TYPE_AUTH (1)
#define HOME_TYPE_ACCT (2)
#endif
home_pool_t *home_pool_byname(const char *name, int type);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* REALMS_H */
#ifndef _FR_SHA1_H
#define _FR_SHA1_H
+#ifdef WITH_OPENSSL_SHA1
+#include <openssl/sha.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef WITH_OPENSSL_SHA1
typedef struct {
uint32_t state[5];
#else /* WITH_OPENSSL_SHA1 */
-#include <openssl/sha.h>
-
#define fr_SHA1_CTX SHA_CTX
#define fr_SHA1Init SHA1_Init
#define fr_SHA1Update SHA1_Update
*/
extern void fips186_2prf(uint8_t mk[20], uint8_t finalkey[160]);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FR_SHA1_H */
#include <freeradius-devel/libradius.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int soh_verify(VALUE_PAIR *sohvp, const uint8_t *data, unsigned int data_len);
uint16_t soh_pull_be_16(const uint8_t *p);
uint32_t soh_pull_be_24(const uint8_t *p);
uint32_t soh_pull_be_32(const uint8_t *p);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <freeradius-devel/ident.h>
RCSIDH(stats_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef WITH_STATS_64BIT
typedef uint64_t fr_uint_t;
#else
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_STATS_H */
# include <utmp.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __osf__
# define UT_NAMESIZE 32
# define UT_LINESIZE 32
#endif /* HAVE_UTMP_H */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* SYSUTMP_H_INCLUDED */
#include <freeradius-devel/ident.h>
RCSIDH(token_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum fr_token_t {
T_OP_INVALID = 0, /* invalid token */
T_EOL, /* end of line */
FR_TOKEN gettoken(const char **ptr, char *buf, int buflen);
FR_TOKEN getstring(const char **ptr, char *buf, int buflen);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_TOKEN_H */
#include <freeradius-devel/autoconf.h>
#include <freeradius-devel/libradius.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef WITH_UDPFROMTO
int udpfromto_init(int s);
int recvfromto(int s, void *buf, size_t len, int flags,
struct sockaddr *to, socklen_t tolen);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <freeradius-devel/ident.h>
RCSIDH(vmps_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int vqp_socket_recv(rad_listen_t *listener,
RAD_REQUEST_FUNP *pfun, REQUEST **prequest);
int vqp_socket_send(rad_listen_t *listener, REQUEST *request);
int vqp_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request);
int vmps_process(REQUEST *request);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* VMPS_H */
#include <freeradius-devel/ident.h>
RCSIDH(vqp_h, "$Id$")
+#ifdef __cplusplus
+extern "C" {
+#endif
+
RADIUS_PACKET *vqp_recv(int sockfd);
int vqp_send(RADIUS_PACKET *packet);
int vqp_decode(RADIUS_PACKET *packet);
int vqp_encode(RADIUS_PACKET *packet, RADIUS_PACKET *original);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FR_VQP_H */