| 1 |
sysadm |
1.1 |
/*
|
| 2 |
|
|
* Copyright (C) 1998 Mark Baysinger (mbaysing@ucsd.edu)
|
| 3 |
|
|
* Copyright (C) 1998,1999 Ross Combs (rocombs@cs.nmsu.edu)
|
| 4 |
|
|
*
|
| 5 |
|
|
* This program is free software; you can redistribute it and/or
|
| 6 |
|
|
* modify it under the terms of the GNU General Public License
|
| 7 |
|
|
* as published by the Free Software Foundation; either version 2
|
| 8 |
|
|
* of the License, or (at your option) any later version.
|
| 9 |
|
|
*
|
| 10 |
|
|
* This program is distributed in the hope that it will be useful,
|
| 11 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
|
|
* GNU General Public License for more details.
|
| 14 |
|
|
*
|
| 15 |
|
|
* You should have received a copy of the GNU General Public License
|
| 16 |
|
|
* along with this program; if not, write to the Free Software
|
| 17 |
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 18 |
|
|
*/
|
| 19 |
|
|
#ifndef INCLUDED_SERVER_TYPES
|
| 20 |
|
|
#define INCLUDED_SERVER_TYPES
|
| 21 |
|
|
|
| 22 |
|
|
#ifdef SERVER_INTERNAL_ACCESS
|
| 23 |
|
|
|
| 24 |
|
|
typedef enum
|
| 25 |
|
|
{
|
| 26 |
|
|
laddr_type_bnet, /* classic battle.net service (usually on port 6112) */
|
| 27 |
|
|
laddr_type_w3route, /* warcraft 3 playgame routing (def. port 6200) */
|
| 28 |
|
|
laddr_type_irc, /* Internet Relay Chat service (port is varying; mostly on port 6667 or 7000) */
|
| 29 |
|
|
laddr_type_telnet /* telnet service (usually on port 23) */
|
| 30 |
|
|
} t_laddr_type;
|
| 31 |
|
|
|
| 32 |
|
|
|
| 33 |
|
|
/* listen address structure */
|
| 34 |
|
|
typedef struct
|
| 35 |
|
|
{
|
| 36 |
|
|
int ssocket; /* TCP listen socket */
|
| 37 |
|
|
int usocket; /* UDP socket */
|
| 38 |
|
|
t_laddr_type type;
|
| 39 |
|
|
} t_laddr_info;
|
| 40 |
|
|
|
| 41 |
|
|
#endif
|
| 42 |
|
|
|
| 43 |
|
|
extern time_t now;
|
| 44 |
|
|
|
| 45 |
|
|
#endif
|
| 46 |
|
|
|
| 47 |
|
|
|
| 48 |
|
|
/*****/
|
| 49 |
|
|
#ifndef JUST_NEED_TYPES
|
| 50 |
|
|
#ifndef INCLUDED_SERVER_PROTOS
|
| 51 |
|
|
#define INCLUDED_SERVER_PROTOS
|
| 52 |
|
|
|
| 53 |
|
|
extern unsigned int server_get_uptime(void);
|
| 54 |
|
|
extern unsigned int server_get_starttime(void);
|
| 55 |
|
|
extern void server_quit_delay(int delay);
|
| 56 |
|
|
extern void server_set_name(void);
|
| 57 |
|
|
extern char const * server_get_name(void);
|
| 58 |
|
|
extern void server_clear_name(void);
|
| 59 |
|
|
extern int server_process(void);
|
| 60 |
|
|
|
| 61 |
|
|
extern void server_quit_wraper(void);
|
| 62 |
|
|
extern void server_restart_wraper(void);
|
| 63 |
|
|
extern void server_save_wraper(void);
|
| 64 |
|
|
|
| 65 |
|
|
|
| 66 |
|
|
#endif
|
| 67 |
|
|
#endif
|