[1] | 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
|
---|
[20] | 24 | int sh_forward_set_strip (const char * str);
|
---|
[1] | 25 |
|
---|
| 26 | #endif
|
---|
| 27 |
|
---|
| 28 | /* generate a random password
|
---|
| 29 | */
|
---|
[20] | 30 | int sh_forward_create_password (const char * dummy);
|
---|
[1] | 31 |
|
---|
| 32 | /* set time limit
|
---|
| 33 | */
|
---|
| 34 | int sh_forward_set_time_limit(char * str);
|
---|
| 35 |
|
---|
| 36 | /* error level for lookup failure
|
---|
| 37 | */
|
---|
| 38 | int sh_forward_lookup_level (char * c);
|
---|
| 39 |
|
---|
| 40 | /* create client entry for given password
|
---|
| 41 | */
|
---|
[20] | 42 | int sh_forward_make_client (const char * str);
|
---|
[1] | 43 |
|
---|
| 44 | #ifdef SH_WITH_SERVER
|
---|
| 45 |
|
---|
| 46 | #ifdef INET_SYSLOG
|
---|
| 47 | int set_syslog_active(char * c);
|
---|
| 48 | #endif
|
---|
| 49 |
|
---|
| 50 | /* create socket and start listening
|
---|
| 51 | */
|
---|
| 52 | void create_server_tcp_socket ();
|
---|
| 53 |
|
---|
| 54 | /* whether to use client address as known to the communication layer
|
---|
| 55 | * and set by accept()
|
---|
| 56 | */
|
---|
| 57 | int set_socket_peer (char * c);
|
---|
| 58 |
|
---|
| 59 | /* whether to use client severity
|
---|
| 60 | */
|
---|
| 61 | int sh_forward_use_clt_sev (char * c);
|
---|
| 62 |
|
---|
| 63 | /* whether to use client class
|
---|
| 64 | */
|
---|
| 65 | int sh_forward_use_clt_class (char * c);
|
---|
| 66 |
|
---|
| 67 | /* server port
|
---|
| 68 | */
|
---|
| 69 | int sh_forward_set_port(char * c);
|
---|
| 70 |
|
---|
| 71 | /* server interface
|
---|
| 72 | */
|
---|
| 73 | int sh_forward_set_interface(char * c);
|
---|
| 74 |
|
---|
| 75 | /* a wrapper function
|
---|
| 76 | */
|
---|
| 77 | void sh_forward_html_write(void);
|
---|
| 78 |
|
---|
| 79 | /* register a client
|
---|
| 80 | */
|
---|
| 81 | int sh_forward_register_client (char * str);
|
---|
| 82 |
|
---|
| 83 | /* start server
|
---|
| 84 | */
|
---|
| 85 | void sh_receive(void);
|
---|
| 86 |
|
---|
| 87 | /* free() everything
|
---|
| 88 | */
|
---|
| 89 | void sh_forward_free_all (void);
|
---|
| 90 |
|
---|
| 91 | #endif
|
---|
| 92 |
|
---|
| 93 | #ifdef SH_WITH_CLIENT
|
---|
| 94 | /* talk to server
|
---|
| 95 | */
|
---|
| 96 | long sh_forward (char * errmsg);
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | /* request file from server. file may be "CONF" or "DATA".
|
---|
| 100 | */
|
---|
| 101 | long sh_forward_req_file (char * file);
|
---|
| 102 |
|
---|
| 103 | /* set log server
|
---|
| 104 | */
|
---|
| 105 | int sh_forward_setlogserver (char * address);
|
---|
| 106 | void reset_count_dev_server(void);
|
---|
| 107 |
|
---|
| 108 | #endif
|
---|
| 109 |
|
---|
| 110 | #endif
|
---|
| 111 |
|
---|