7b304dee |
/* |
c442ca9c |
* Copyright (C) 2013-2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2007-2013 Sourcefire, Inc. |
086eab5c |
*
* Authors: Tomasz Kojm |
7b304dee |
*
* This program is free software; you can redistribute it and/or modify |
bb34cb31 |
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. |
7b304dee |
*
* 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 |
48b7b4a7 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA. |
7b304dee |
*/
#ifndef __MISC_H
#define __MISC_H |
4cd80898 |
#ifndef _WIN32 |
c23331be |
#include <sys/types.h> |
7a997ac9 |
#include <netdb.h>
#include <netinet/in.h> |
4cd80898 |
#endif |
8efbf4a0 |
#include "platform.h" |
40331c57 |
#include "optparser.h" |
53725d8c |
/* 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
|
b68375fd |
#ifdef HAVE_SYSTEMD
# include <systemd/sd-daemon.h>
#else
# define sd_listen_fds(u) 0
# define SD_LISTEN_FDS_START 3
# define sd_is_socket(f, a, s, l) 1
#endif
|
bfd89d7c |
#include <limits.h>
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
|
98ce643b |
char *freshdbdir(void); |
0aa3ba06 |
void print_version(const char *dbdir); |
bca0b679 |
int check_flevel(void); |
c2b6681b |
const char *filelist(const struct optstruct *opts, int *err); |
63abd169 |
int filecopy(const char *src, const char *dest); |
587d344b |
int daemonize(void); |
add738d2 |
const char *get_version(void); |
5cd3f734 |
int match_regex(const char *filename, const char *pattern); |
11195c0b |
int cli_is_abspath(const char *path); |
4dccd075 |
unsigned int countlines(const char *filename); |
11195c0b |
|
7b304dee |
#endif |