Logo Search packages:      
Sourcecode: nagcon version File versions  Download package

utils.h

/*
 * Copyright (C) 2006 Folkert van Heusden <folkert@vanheusden.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * 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
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

void * mymalloc(int size, char *what);
void * myrealloc(void *oldp, int newsize, char *what);
char * mystrdup(char *in);
char * mtstrndup(char *in, int len);
void myfree(void *p, char *what);
ssize_t WRITE(int fd, char *whereto, size_t len);
int get_filesize(char *filename);
time_t get_filechanged(char *filename);
void resolve_host(char *host, struct sockaddr_in *addr);
int connect_to(char *hoststr);

#define incopy(a)       *((struct in_addr *)a)

#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))

Generated by  Doxygen 1.6.0   Back to index