[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
|
---|
| 24 | int sh_xfer_set_strip (const char * str);
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
| 27 | /* generate a random password
|
---|
| 28 | */
|
---|
| 29 | int sh_xfer_create_password (const char * dummy);
|
---|
| 30 |
|
---|
| 31 | /* set timeout for active client connections
|
---|
| 32 | */
|
---|
| 33 | int sh_xfer_set_timeout (const char * c);
|
---|
| 34 |
|
---|
| 35 | /* set time limit after which client is reported dead
|
---|
| 36 | */
|
---|
| 37 | int sh_xfer_set_time_limit(const char * str);
|
---|
| 38 |
|
---|
| 39 | /* error level for lookup failure
|
---|
| 40 | */
|
---|
| 41 | int sh_xfer_lookup_level (const char * c);
|
---|
| 42 |
|
---|
| 43 | /* create client entry for given password
|
---|
| 44 | */
|
---|
| 45 | int sh_xfer_make_client (const char * str);
|
---|
| 46 |
|
---|
| 47 | /* set port to which we connect
|
---|
| 48 | */
|
---|
| 49 | int sh_xfer_server_port (const char * str);
|
---|
| 50 |
|
---|
| 51 | #ifdef SH_WITH_SERVER
|
---|
| 52 |
|
---|
| 53 | #ifdef INET_SYSLOG
|
---|
| 54 | int set_syslog_active(const char * c);
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 | /* create socket and start listening
|
---|
| 58 | */
|
---|
| 59 | void create_server_tcp_socket (void);
|
---|
| 60 |
|
---|
| 61 | /* whether to use client address as known to the communication layer
|
---|
| 62 | * and set by accept()
|
---|
| 63 | */
|
---|
| 64 | int set_socket_peer (const char * c);
|
---|
| 65 |
|
---|
| 66 | /* whether to use client severity
|
---|
| 67 | */
|
---|
| 68 | int sh_xfer_use_clt_sev (const char * c);
|
---|
| 69 |
|
---|
| 70 | /* whether to use client class
|
---|
| 71 | */
|
---|
| 72 | int sh_xfer_use_clt_class (const char * c);
|
---|
| 73 |
|
---|
| 74 | /* server port
|
---|
| 75 | */
|
---|
| 76 | int sh_xfer_set_port(const char * c);
|
---|
| 77 |
|
---|
| 78 | /* server interface
|
---|
| 79 | */
|
---|
| 80 | int sh_xfer_set_interface(const char * c);
|
---|
| 81 |
|
---|
| 82 | /* a wrapper function
|
---|
| 83 | */
|
---|
| 84 | void sh_xfer_html_write(void);
|
---|
| 85 |
|
---|
[577] | 86 | /* register an alias
|
---|
| 87 | */
|
---|
| 88 | int sh_xfer_register_alias (const char * str);
|
---|
| 89 |
|
---|
[481] | 90 | /* register a client
|
---|
| 91 | */
|
---|
| 92 | int sh_xfer_register_client (const char * str);
|
---|
| 93 |
|
---|
| 94 | /* start server
|
---|
| 95 | */
|
---|
| 96 | void sh_xfer_start_server(void);
|
---|
| 97 |
|
---|
| 98 | /* free() everything
|
---|
| 99 | */
|
---|
| 100 | void sh_xfer_free_all (void);
|
---|
| 101 |
|
---|
| 102 | #endif
|
---|
| 103 |
|
---|
| 104 | #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
|
---|
| 105 | /* talk to server
|
---|
| 106 | */
|
---|
| 107 | long sh_xfer_report (char * errmsg);
|
---|
| 108 |
|
---|
| 109 | /* set log server
|
---|
| 110 | */
|
---|
| 111 | int sh_xfer_set_logserver (const char * address);
|
---|
| 112 | void reset_count_dev_server(void);
|
---|
| 113 | #endif
|
---|
| 114 |
|
---|
| 115 | #ifdef SH_WITH_CLIENT
|
---|
| 116 |
|
---|
| 117 | /* Throttle file download
|
---|
| 118 | */
|
---|
| 119 | int sh_xfer_set_throttle_delay (const char * c);
|
---|
| 120 |
|
---|
| 121 | /* request file from server. file may be "CONF" or "DATA" or a UUID.
|
---|
| 122 | */
|
---|
| 123 | long sh_xfer_request_file (const char * file);
|
---|
| 124 |
|
---|
| 125 | #endif
|
---|
| 126 |
|
---|
| 127 | #endif
|
---|
| 128 |
|
---|