summaryrefslogtreecommitdiffstats
path: root/include/sh_html.h
blob: eee0b470ce08e0101f723543dc6f13d6d2f45c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef SH_HTML_H
#define SH_HTML_H

#ifdef SH_WITH_SERVER


#define CLT_INACTIVE 0
#define CLT_STARTED  1
#define CLT_ILLEGAL  2
#define CLT_FAILED   3
#define CLT_EXITED   4
#define CLT_PANIC    5
#define CLT_POLICY   6
#define CLT_FILE     7
#define CLT_MSG      8
#define CLT_TOOLONG  9
#define CLT_SUSPEND  10
#define CLT_CHECK    11
#define CLT_MAX      12

/************************
char * clt_stat[] = {
  N_("Inactive"),
  N_("Started"),
  N_("ILLEGAL"),
  N_("FAILED"),
  N_("Exited"),
  N_("PANIC"),
  N_("POLICY"),
  N_("File transfer"),
  N_("Message"),
  N_("TIMEOUT_EXCEEDED"),
};
**************************/

extern char * clt_stat[];

#ifdef SH_ENCRYPT
#include "rijndael-api-fst.h"
#endif
 
/* --- client status ---
 */
typedef struct client_entry {
  char                  * hostname;
  char                  * salt;
  char                  * verifier;
  char                    session_key[KEY_LEN+1];
  time_t                  session_key_timer;
  time_t                  last_connect;
  int                     exit_flag;
  int                     dead_flag;
  int                     encf_flag;
  int                     ency_flag;
  int                     ivst_flag;
  int                     status_now;
  int                     status_arr[CLT_MAX];
  char                    timestamp[CLT_MAX][TIM_MAX];
#ifdef SH_ENCRYPT
  keyInstance             keyInstE;
  keyInstance             keyInstD;
#endif
} client_t;

/* --- server status ---
 */
typedef struct _s_stat {
  time_t  start;
  time_t  last;
  int     conn_open;
  int     conn_max;
  long    conn_total;
} s_stat;

extern s_stat  server_status;

/* write html report. Expects (client_t *) inptr.
 */
int sh_html_write(void * inptr);

#endif

#endif