syslog.h
author viric@llimona
Tue, 30 May 2006 01:16:33 +0200
changeset 54 a456a2e5fca4
parent 51 a01abd65856a
child 55 c72dbd390cf2
permissions -rw-r--r--
Updated TODO for the last release.

enum {
	MAX_STRING=255,
	TCP_LISTEN_QUEUE=10,
	MAX_CHILDS=15
};

enum etype_config
{
	FROM_UNIX,
	FROM_NPIPE,
	FROM_UDP,
	TO_UDP_HOST,
	TO_UDP_PORT,
	TCP_MANAGER,
	LOG_FILE,
	ETYPE_END
};

struct config_element
{
	enum etype_config type; /* Type of the configuration element */
	char value[MAX_STRING]; /* Value of the parameter */
};

/* Prototypes -------------------- */

/* config.c */
void init_config();
int get_config(const enum etype_config type, char * restrict value, int max);

/* signals.c */
void program_child_handler(void (*child_handler)(int));
void program_ignore_hup();
void program_handler(int signum, void (*handler)(int));

/* out_udp.c */
int init_out_udp();
int write_out_udp(const char * restrict buf, const int len);
int close_out_udp();

/* out_file.c */
int init_out_file();
int write_out_file(const char * restrict buf, const int len);
int close_out_file();

/* tcp_server.c */
int init_tcp_server();

/* childs.c */
void term_childs();
void wait_childs_die();
void child_handler(int parameter);
int child_fork();
int get_childs_alive();