2004-08-23 20:38:10 +00:00
|
|
|
/*
|
2009-02-13 10:55:45 +00:00
|
|
|
* Copyright (C) 2007-2009 Sourcefire, Inc.
|
|
|
|
*
|
|
|
|
* Authors: Tomasz Kojm
|
2004-08-23 20:38:10 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2007-03-31 20:31:04 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
2004-08-23 20:38:10 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2006-04-09 19:59:28 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301, USA.
|
2004-08-23 20:38:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MISC_H
|
|
|
|
#define __MISC_H
|
2009-02-12 21:14:51 +00:00
|
|
|
#include <netdb.h>
|
|
|
|
#include <netinet/in.h>
|
2009-02-12 21:29:42 +00:00
|
|
|
#include "optparser.h"
|
2006-10-29 13:41:24 +00:00
|
|
|
/* Maximum filenames under various systems - njh */
|
|
|
|
#ifndef NAME_MAX /* e.g. Linux */
|
|
|
|
# ifdef MAXNAMELEN /* e.g. Solaris */
|
|
|
|
# define NAME_MAX MAXNAMELEN
|
|
|
|
# else
|
|
|
|
# ifdef FILENAME_MAX /* e.g. SCO */
|
|
|
|
# define NAME_MAX FILENAME_MAX
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2005-01-26 14:15:04 +00:00
|
|
|
char *freshdbdir(void);
|
2008-01-22 10:42:30 +00:00
|
|
|
void print_version(const char *dbdir);
|
2004-11-28 23:26:29 +00:00
|
|
|
int filecopy(const char *src, const char *dest);
|
2008-01-22 17:47:15 +00:00
|
|
|
int daemonize(void);
|
2008-08-04 10:38:24 +00:00
|
|
|
const char *get_version(void);
|
2008-08-21 20:21:43 +00:00
|
|
|
int match_regex(const char *filename, const char *pattern);
|
2009-02-12 21:14:51 +00:00
|
|
|
int cfg_tcpsock(const struct optstruct *opts, struct sockaddr_in *server, in_addr_t defaultbind);
|
2004-08-23 20:38:10 +00:00
|
|
|
#endif
|