source: trunk/include/sh_xfer.h@ 578

Last change on this file since 578 was 577, checked in by katerina, 3 years ago

Implement ticket #465 (server option to register alias for hostname).

File size: 3.4 KB
RevLine 
[481]1/* SAMHAIN file system integrity testing */
2/* Copyright (C) 1999, 2015 Rainer Wichmann */
3/* */
4/* This program is free software; you can redistribute it */
5/* and/or modify */
6/* it under the terms of the GNU General Public License as */
7/* published by */
8/* the Free Software Foundation; either version 2 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* This program is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU General Public License */
17/* along with this program; if not, write to the Free Software */
18/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20#ifndef SH_XFER_H
21#define SH_XFER_H
22
23#ifndef SH_STANDALONE
24int sh_xfer_set_strip (const char * str);
25#endif
26
27/* generate a random password
28 */
29int sh_xfer_create_password (const char * dummy);
30
31/* set timeout for active client connections
32 */
33int sh_xfer_set_timeout (const char * c);
34
35/* set time limit after which client is reported dead
36 */
37int sh_xfer_set_time_limit(const char * str);
38
39/* error level for lookup failure
40 */
41int sh_xfer_lookup_level (const char * c);
42
43/* create client entry for given password
44 */
45int sh_xfer_make_client (const char * str);
46
47/* set port to which we connect
48 */
49int sh_xfer_server_port (const char * str);
50
51#ifdef SH_WITH_SERVER
52
53#ifdef INET_SYSLOG
54int set_syslog_active(const char * c);
55#endif
56
57/* create socket and start listening
58 */
59void create_server_tcp_socket (void);
60
61/* whether to use client address as known to the communication layer
62 * and set by accept()
63 */
64int set_socket_peer (const char * c);
65
66/* whether to use client severity
67 */
68int sh_xfer_use_clt_sev (const char * c);
69
70/* whether to use client class
71 */
72int sh_xfer_use_clt_class (const char * c);
73
74/* server port
75 */
76int sh_xfer_set_port(const char * c);
77
78/* server interface
79 */
80int sh_xfer_set_interface(const char * c);
81
82/* a wrapper function
83 */
84void sh_xfer_html_write(void);
85
[577]86/* register an alias
87 */
88int sh_xfer_register_alias (const char * str);
89
[481]90/* register a client
91 */
92int sh_xfer_register_client (const char * str);
93
94/* start server
95 */
96void sh_xfer_start_server(void);
97
98/* free() everything
99 */
100void sh_xfer_free_all (void);
101
102#endif
103
104#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
105/* talk to server
106 */
107long sh_xfer_report (char * errmsg);
108
109/* set log server
110 */
111int sh_xfer_set_logserver (const char * address);
112void reset_count_dev_server(void);
113#endif
114
115#ifdef SH_WITH_CLIENT
116
117/* Throttle file download
118 */
119int sh_xfer_set_throttle_delay (const char * c);
120
121/* request file from server. file may be "CONF" or "DATA" or a UUID.
122 */
123long sh_xfer_request_file (const char * file);
124
125#endif
126
127#endif
128
Note: See TracBrowser for help on using the repository browser.