| 1 | /* SAMHAIN file system integrity testing */
|
|---|
| 2 | /* Copyright (C) 1999 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_FORWARD_H
|
|---|
| 21 | #define SH_FORWARD_H
|
|---|
| 22 |
|
|---|
| 23 | #ifndef SH_STANDALONE
|
|---|
| 24 | int sh_forward_set_strip (const char * str);
|
|---|
| 25 |
|
|---|
| 26 | #endif
|
|---|
| 27 |
|
|---|
| 28 | /* generate a random password
|
|---|
| 29 | */
|
|---|
| 30 | int sh_forward_create_password (const char * dummy);
|
|---|
| 31 |
|
|---|
| 32 | /* set timeout for active client connections
|
|---|
| 33 | */
|
|---|
| 34 | int sh_forward_set_timeout (const char * c);
|
|---|
| 35 |
|
|---|
| 36 | /* set time limit after which client is reported dead
|
|---|
| 37 | */
|
|---|
| 38 | int sh_forward_set_time_limit(const char * str);
|
|---|
| 39 |
|
|---|
| 40 | /* error level for lookup failure
|
|---|
| 41 | */
|
|---|
| 42 | int sh_forward_lookup_level (const char * c);
|
|---|
| 43 |
|
|---|
| 44 | /* create client entry for given password
|
|---|
| 45 | */
|
|---|
| 46 | int sh_forward_make_client (const char * str);
|
|---|
| 47 |
|
|---|
| 48 | /* set port to which we connect
|
|---|
| 49 | */
|
|---|
| 50 | int sh_forward_server_port (const char * str);
|
|---|
| 51 |
|
|---|
| 52 | #ifdef SH_WITH_SERVER
|
|---|
| 53 |
|
|---|
| 54 | #ifdef INET_SYSLOG
|
|---|
| 55 | int set_syslog_active(const char * c);
|
|---|
| 56 | #endif
|
|---|
| 57 |
|
|---|
| 58 | /* create socket and start listening
|
|---|
| 59 | */
|
|---|
| 60 | void create_server_tcp_socket (void);
|
|---|
| 61 |
|
|---|
| 62 | /* whether to use client address as known to the communication layer
|
|---|
| 63 | * and set by accept()
|
|---|
| 64 | */
|
|---|
| 65 | int set_socket_peer (const char * c);
|
|---|
| 66 |
|
|---|
| 67 | /* whether to use client severity
|
|---|
| 68 | */
|
|---|
| 69 | int sh_forward_use_clt_sev (const char * c);
|
|---|
| 70 |
|
|---|
| 71 | /* whether to use client class
|
|---|
| 72 | */
|
|---|
| 73 | int sh_forward_use_clt_class (const char * c);
|
|---|
| 74 |
|
|---|
| 75 | /* server port
|
|---|
| 76 | */
|
|---|
| 77 | int sh_forward_set_port(const char * c);
|
|---|
| 78 |
|
|---|
| 79 | /* server interface
|
|---|
| 80 | */
|
|---|
| 81 | int sh_forward_set_interface(const char * c);
|
|---|
| 82 |
|
|---|
| 83 | /* a wrapper function
|
|---|
| 84 | */
|
|---|
| 85 | void sh_forward_html_write(void);
|
|---|
| 86 |
|
|---|
| 87 | /* register a client
|
|---|
| 88 | */
|
|---|
| 89 | int sh_forward_register_client (const char * str);
|
|---|
| 90 |
|
|---|
| 91 | /* start server
|
|---|
| 92 | */
|
|---|
| 93 | void sh_receive(void);
|
|---|
| 94 |
|
|---|
| 95 | /* free() everything
|
|---|
| 96 | */
|
|---|
| 97 | void sh_forward_free_all (void);
|
|---|
| 98 |
|
|---|
| 99 | #endif
|
|---|
| 100 |
|
|---|
| 101 | #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
|
|---|
| 102 | /* talk to server
|
|---|
| 103 | */
|
|---|
| 104 | long sh_forward (char * errmsg);
|
|---|
| 105 |
|
|---|
| 106 | /* set log server
|
|---|
| 107 | */
|
|---|
| 108 | int sh_forward_setlogserver (const char * address);
|
|---|
| 109 | void reset_count_dev_server(void);
|
|---|
| 110 | #endif
|
|---|
| 111 |
|
|---|
| 112 | #ifdef SH_WITH_CLIENT
|
|---|
| 113 |
|
|---|
| 114 | /* Throttle file download
|
|---|
| 115 | */
|
|---|
| 116 | int sh_forward_set_throttle_delay (const char * c);
|
|---|
| 117 |
|
|---|
| 118 | /* request file from server. file may be "CONF" or "DATA".
|
|---|
| 119 | */
|
|---|
| 120 | long sh_forward_req_file (char * file);
|
|---|
| 121 |
|
|---|
| 122 | #endif
|
|---|
| 123 |
|
|---|
| 124 | #endif
|
|---|
| 125 |
|
|---|