Fixing a compilation issue, wherein two global vars, conf and chan, were defined...
[revinetd.git] / misc.h
blob82eed84fecdc21f34d401232d057a24a64899bad
1 /*
2 * getopt.h
4 * This file is a part of the revinetd project
6 * Revinetd is copyright (c) 2003-2008 by Steven M. Gill
7 * and distributed under the GPL.
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 * USA.
24 * */
26 /* $Id: misc.h,v 1.14 2008/08/28 03:24:59 necrotaur Exp $ */
28 #ifndef __MISC_H__
29 #define __MISC_H__
31 #define SZ_READ_BUFFER 2048
33 /* COMM Messages */
35 /* Server commands RA to bring up target */
36 #define RA_TARGET_UP 1
38 /* RA commands server to acknowledge that it's alive. */
39 #define SV_HEART_BEAT 2
41 /* Server confirms that it's alive. */
42 #define RA_SERVER_ALIVE 3
44 int make_socket_IPv4(const char *, unsigned short);
45 int make_socket_IPv6(const char *, unsigned short);
46 int detect_address_family(const char *, char *);
47 int init_sockaddr(struct sockaddr_in *, const char *, unsigned short);
48 int read_from_client(int);
49 int copy_between_ports(int, int, void *);
50 void register_sock(int);
51 int unregister_sock(int);
52 int send_comm_message(int, int);
53 int get_comm_message(int);
55 #endif