rinetd/rinetd.h
Sam Hocevar 5d0e44c451 Support for source address binding.
This feature was independently implemented by SuSE as part of the changes in
https://build.opensuse.org/package/view_file/server:proxy/rinetd/rinetd-syslog.patch?expand=1
and as mentioned in #9, but our new configuration parser makes the change a
lot less intrusive.
2017-09-08 19:22:19 +02:00

51 lines
1.2 KiB
C

/* Copyright © 1997—1999 Thomas Boutell <boutell@boutell.com>
and Boutell.Com, Inc.
© 2003—2017 Sam Hocevar <sam@hocevar.net>
This software is released for free use under the terms of
the GNU Public License, version 2 or higher. NO WARRANTY
IS EXPRESSED OR IMPLIED. USE THIS SOFTWARE AT YOUR OWN RISK. */
#pragma once
/* Syslog feature */
#if _WIN32
# include <stdio.h>
# define syslog fprintf
# define LOG_ERR stderr
# define LOG_INFO stdout
#else
# include <syslog.h>
#endif /* _WIN32 */
/* Constants */
static int const RINETD_BUFFER_SIZE = 16384;
static int const RINETD_LISTEN_BACKLOG = 128;
static int const RINETD_DEFAULT_UDP_TIMEOUT = 72;
#define RINETD_CONFIG_FILE "/etc/rinetd.conf"
#define RINETD_PID_FILE "/var/run/rinetd.pid"
/* Global configuration */
extern Rule *allRules;
extern int allRulesCount;
extern int globalRulesCount;
extern ServerInfo *seInfo;
extern int seTotal;
extern char *logFileName;
extern char *pidLogFileName;
extern int logFormatCommon;
extern FILE *logFile;
/* Functions */
void addServer(char *bindAddress, int bindPort, int bindProto,
char *connectAddress, int connectPort, int connectProto,
int serverTimeout, char *sourceAddress);