/*
 * Copyright (c) 1996-2007, OpenFWTK Development Group
 * All rights reserved. See LICENSE.
 */

/*
 * OpenFWTK project legacy API function prototypes
 *
 * (C) Copyright 2001-2006 ArkanoiD <ark@eltex.net>
 *
 */

int	isalldigits(char *);
int	str_to_port(char *);
int	mapgid(char *);
int	mapuid(char *);
long	randomnumber();
char*	getpassword(const char *);
int	do_daemon(int);
int	peername(int,char *,char *,int);
int	hostmatch(char *,char *);
int     namatch(const char *const,const char *const);
int	nacasematch(char *,char *);
int	conn_server(char *,int,int,char *);
int conn_server_unixsock(char *srv, char *rbuf);
char*	maphostname(char *name);

/* 	Those are already defined in firewall.h

Cfg*	cfg_get(char*,Cfg*);
Cfg*	cfg_read(char*);

*/

void	cfg_free(Cfg*);
Cfg*	cfg_append(char *,Cfg *,char *);
int	enargv(char *,char **,int,char *,int);
int 	lock_fd(int);
int 	lockun_fd(int);	
int 	locktest_fd(int);
int	set_oob_notification(int);
int	daemonize();
void	hup_exit(int);
int	do_daemon(int port);
void	waitwaitwait();

#ifdef OLDBSD
typedef uint32_t socklen_t;
#endif
