The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: 0643d1fceaba3a31170f9e75c84b5d2ae3a6028b $
20 *
21 * @brief Function prototypes and datatypes for the REST (HTTP) transport.
22 * @file rlm_unbound/log.h
23 *
24 * @copyright 2019 The FreeRADIUS server project
25 * @copyright 2019 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
26 */
27RCSIDH(rlm_unbound_log_h, "$Id: 0643d1fceaba3a31170f9e75c84b5d2ae3a6028b $")
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <freeradius-devel/server/request.h>
34
35DIAG_OFF_OPTIONAL(documentation)
36#include <unbound.h>
37DIAG_ON_OPTIONAL(documentation)
38
39/** Logging state
40 *
41 */
42typedef struct {
43 request_t *request; //!< Request we're logging to.
44 FILE *stream; //!< Stream we use to interface with the
45 ///< FreeRADIUS logging functions.
47
48int unbound_log_to_request(unbound_log_t *u_log, struct ub_ctx *ub, request_t *request);
49
50int unbound_log_to_global(unbound_log_t *u_log, struct ub_ctx *ub);
51
52int unbound_log_init(TALLOC_CTX *ctx, unbound_log_t **u_log_out, struct ub_ctx *ub);
53
54#ifdef __cplusplus
55}
56#endif
static uint8_t request[4]
#define DIAG_OFF_OPTIONAL(_x)
Definition build.h:577
#define RCSIDH(h, id)
Definition build.h:604
#define DIAG_ON_OPTIONAL(_x)
Definition build.h:578
request_t * request
Request we're logging to.
Definition log.h:43
int unbound_log_to_global(unbound_log_t *u_log, struct ub_ctx *ub)
Switch thread-specific libunbound output to the global log.
Definition log.c:114
FILE * stream
Stream we use to interface with the FreeRADIUS logging functions.
Definition log.h:44
int unbound_log_to_request(unbound_log_t *u_log, struct ub_ctx *ub, request_t *request)
Switch thread-specific libunbound output to the request log destination(s)
Definition log.c:102
int unbound_log_init(TALLOC_CTX *ctx, unbound_log_t **u_log_out, struct ub_ctx *ub)
Setup an unbound context for log, and initialise a u_log struct.
Definition log.c:129
Logging state.
Definition log.h:42