2006-02-02 16:24:06 +01:00
|
|
|
#ifndef _HLSWMASTER_H
|
|
|
|
#define _HLSWMASTER_H
|
|
|
|
|
2006-02-02 16:49:14 +01:00
|
|
|
#include <inttypes.h>
|
|
|
|
|
2006-02-02 16:24:06 +01:00
|
|
|
#include "list.h"
|
|
|
|
#include "netpkt.h"
|
|
|
|
|
|
|
|
struct game_server {
|
|
|
|
struct list_head list;
|
2006-02-02 16:27:19 +01:00
|
|
|
unsigned long modtime;
|
2006-02-02 16:24:06 +01:00
|
|
|
|
2006-02-02 16:49:14 +01:00
|
|
|
uint16_t gameid;
|
|
|
|
uint32_t ip;
|
|
|
|
uint16_t port1;
|
|
|
|
uint16_t port2;
|
2006-02-02 16:24:06 +01:00
|
|
|
|
2006-02-02 16:27:19 +01:00
|
|
|
} __attribute__ ((packed));
|
2006-02-02 16:24:06 +01:00
|
|
|
|
|
|
|
/* logging.c */
|
2006-02-02 16:43:41 +01:00
|
|
|
int log_init(char *logfile);
|
2006-02-02 16:24:06 +01:00
|
|
|
void log_print(const char *fmt, ... );
|
|
|
|
|
|
|
|
/* plugin.c */
|
|
|
|
int plugin_load(char *name);
|
2006-02-02 16:41:56 +01:00
|
|
|
int plugin_load_all();
|
|
|
|
int plugin_unload_all();
|
|
|
|
int plugins_scan();
|
2006-02-02 16:24:06 +01:00
|
|
|
int plugins_parse(struct net_pkt *pkt);
|
|
|
|
int plugins_gc(unsigned long timeout);
|
|
|
|
|
|
|
|
/* scanner.c */
|
2006-02-02 16:41:56 +01:00
|
|
|
int scan_init();
|
2006-02-02 16:43:41 +01:00
|
|
|
void scan_control();
|
2006-02-02 16:41:56 +01:00
|
|
|
void scan_receive();
|
2006-02-02 16:24:06 +01:00
|
|
|
|
|
|
|
/* client.c */
|
|
|
|
int client_pkt_add(struct game_server *server);
|
2006-02-02 16:41:56 +01:00
|
|
|
int client_pkt_commit();
|
|
|
|
void client_handler();
|
2006-02-02 16:24:06 +01:00
|
|
|
|
2006-02-02 16:40:20 +01:00
|
|
|
#endif /* _HLSWMASTER_H */
|