Moved detail structure defs to a public header file
[freeradius.git] / src / include / detail.h
1 #ifndef DETAIL_H
2 #define DETAIL_H
3 /*
4  *      detail.h        Routines to handle detail files.
5  *
6  * Version:     $Id$
7  *
8  */
9
10 #include <freeradius-devel/ident.h>
11 RCSIDH(detail_h, "$Id$")
12
13 typedef enum detail_state_t {
14   STATE_UNOPENED = 0,
15   STATE_UNLOCKED,
16   STATE_HEADER,
17   STATE_READING,
18   STATE_QUEUED,
19   STATE_RUNNING,
20   STATE_NO_REPLY,
21   STATE_REPLIED
22 } detail_state_t;
23
24 typedef struct listen_detail_t {
25         fr_event_t      *ev;    /* has to be first entry (ugh) */
26         int             delay_time;
27         char            *filename;
28         char            *filename_work;
29         VALUE_PAIR      *vps;
30         FILE            *fp;
31         detail_state_t  state;
32         time_t          timestamp;
33         time_t          running;
34         fr_ipaddr_t     client_ip;
35         int             load_factor; /* 1..100 */
36         int             signal;
37         int             poll_interval;
38         int             retry_interval;
39
40         int             has_rtt;
41         int             srtt;
42         int             rttvar;
43         struct timeval  last_packet;
44         RADCLIENT       detail_client;
45 } listen_detail_t;
46
47 int detail_recv(rad_listen_t *listener,
48                 RAD_REQUEST_FUNP *pfun, REQUEST **prequest);
49 int detail_send(rad_listen_t *listener, REQUEST *request);
50 void detail_free(rad_listen_t *this);
51 int detail_print(rad_listen_t *this, char *buffer, size_t bufsize);
52 int detail_encode(UNUSED rad_listen_t *this, UNUSED REQUEST *request);
53 int detail_decode(UNUSED rad_listen_t *this, UNUSED REQUEST *request);
54 int detail_parse(CONF_SECTION *cs, rad_listen_t *this);
55
56 #endif /* DETAIL_H */