3 * Copyright (C) 2001-2007, Eduardo Silva P.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 /* Defining TRUE and FALSE */
24 #include <sys/types.h>
30 /* Tipo de envio de datos en fdprintf(...) */
38 #define MK_TRACE(...) mk_utils_trace(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
39 #define PLUGIN_TRACE(...) mk_api->trace(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
43 int SendFile(int socket
, struct client_request
*cr
, struct request
*request
);
44 int AccessFile(struct stat file
);
45 int ExecFile(char *pathfile
);
46 int hex2int(char *pChars
);
47 char *strstr2(char *s
, char *t
);
49 mk_pointer
PutDate_string(time_t date
);
51 time_t PutDate_unix(char *date
);
53 char *get_real_string(mk_pointer req_uri
);
55 char *get_name_protocol(int remote_protocol
);
57 char *m_build_buffer(char **buffer
, unsigned long *len
, const char *format
,
60 int mk_buffer_cat(mk_pointer
* p
, char *buf1
, char *buf2
);
64 #define SYML_VAR_OFF 1
65 #define SYML_ERR_NOTFOUND 2
66 #define SYML_ERR_FORBIDDEN 3
68 int Check_symlink(const char *path
);
69 char *get_end_position(char *buf
);
71 int mk_utils_set_daemon();
72 mk_pointer
mk_utils_int2mkp(int n
);
75 void mk_utils_trace(const char *function
, char *file
, int line
, const char* format
, ...);