2009-02-19 16:14:09 +00:00
|
|
|
/*
|
|
|
|
* uhub - A tiny ADC p2p connection hub
|
2010-01-19 13:53:47 +00:00
|
|
|
* Copyright (C) 2007-2010, Jan Vidar Krey
|
2009-02-19 16:14:09 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HAVE_UHUB_COMMON_H
|
|
|
|
#define HAVE_UHUB_COMMON_H
|
|
|
|
|
|
|
|
/* Debugging */
|
|
|
|
/* #define NETWORK_DUMP_DEBUG */
|
|
|
|
/* #define MEMORY_DEBUG */
|
2009-06-21 12:21:34 +00:00
|
|
|
/* #define DEBUG_SENDQ 1 */
|
|
|
|
|
2009-08-28 14:18:18 +00:00
|
|
|
#include "system.h"
|
2009-02-19 16:14:09 +00:00
|
|
|
|
|
|
|
#ifndef WIN32
|
|
|
|
#define SERVER_CONFIG "/etc/uhub/uhub.conf"
|
|
|
|
#define SERVER_ACL_FILE "/etc/uhub/users.conf"
|
|
|
|
#else
|
|
|
|
#define SERVER_CONFIG "uhub.conf"
|
|
|
|
#define SERVER_ACL_FILE "users.conf"
|
|
|
|
#ifndef stderr
|
|
|
|
#define stderr stdout
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define TIMEOUT_CONNECTED 15
|
|
|
|
#define TIMEOUT_HANDSHAKE 30
|
|
|
|
#define TIMEOUT_SENDQ 120
|
2009-03-04 17:36:45 +00:00
|
|
|
#define TIMEOUT_STATS 60
|
2009-02-19 16:14:09 +00:00
|
|
|
|
|
|
|
#define MAX_CID_LEN 39
|
|
|
|
#define MAX_NICK_LEN 64
|
2010-06-06 14:15:15 +00:00
|
|
|
#define MAX_PASS_LEN 64
|
2009-02-19 16:14:09 +00:00
|
|
|
#define MAX_UA_LEN 32
|
|
|
|
#define TIGERSIZE 24
|
|
|
|
|
|
|
|
#define MAX_RECV_BUF 65535
|
2009-05-19 20:57:50 +00:00
|
|
|
#define MAX_SEND_BUF 65535
|
2009-02-19 16:14:09 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-08-28 14:18:18 +00:00
|
|
|
#include "adc/adcconst.h"
|
|
|
|
|
2010-07-10 01:36:47 +00:00
|
|
|
#include "util/config_token.h"
|
2010-07-12 15:00:42 +00:00
|
|
|
#include "util/credentials.h"
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "util/ipcalc.h"
|
|
|
|
#include "util/list.h"
|
2009-07-25 23:38:38 +00:00
|
|
|
#include "util/log.h"
|
|
|
|
#include "util/memory.h"
|
|
|
|
#include "util/misc.h"
|
|
|
|
#include "util/tiger.h"
|
|
|
|
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "adc/sid.h"
|
2009-07-25 23:38:38 +00:00
|
|
|
#include "adc/message.h"
|
2010-07-12 15:00:42 +00:00
|
|
|
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "network/network.h"
|
2009-08-02 19:37:55 +00:00
|
|
|
#include "network/connection.h"
|
2010-01-26 21:54:14 +00:00
|
|
|
#include "network/timeout.h"
|
2009-07-25 23:38:38 +00:00
|
|
|
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "core/auth.h"
|
|
|
|
#include "core/config.h"
|
2010-04-05 13:51:18 +00:00
|
|
|
#include "core/floodctl.h"
|
2009-07-25 23:38:38 +00:00
|
|
|
#include "core/eventid.h"
|
|
|
|
#include "core/eventqueue.h"
|
|
|
|
#include "core/netevent.h"
|
|
|
|
#include "core/hubio.h"
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "core/user.h"
|
|
|
|
#include "core/usermanager.h"
|
|
|
|
#include "core/route.h"
|
2010-06-12 00:54:53 +00:00
|
|
|
#include "core/pluginloader.h"
|
2009-07-25 18:05:27 +00:00
|
|
|
#include "core/hub.h"
|
|
|
|
#include "core/commands.h"
|
|
|
|
#include "core/inf.h"
|
|
|
|
#include "core/hubevent.h"
|
2010-06-22 14:04:33 +00:00
|
|
|
#include "core/plugininvoke.h"
|
2010-05-30 21:33:06 +00:00
|
|
|
#include "core/pluginloader.h"
|
2009-02-19 16:14:09 +00:00
|
|
|
|
2010-07-12 15:00:42 +00:00
|
|
|
|
|
|
|
|
2009-02-19 16:14:09 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* HAVE_UHUB_COMMON_H */
|
|
|
|
|
|
|
|
|
|
|
|
|