|
/*
Copyright (c) 1999 Rafal Wojtczuk <nergal@avet.com.pl>. All rights reserved.
See the file COPYING for license details.
*/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include "nids.h"
#include "tcp.h"
#include "util.h"
void
nids_no_mem(char *func)
{
fprintf(stderr, "Out of memory in %s.\n", func);
exit(1);
}
char *
test_malloc(int x)
{
char *ret = malloc(x);
if (!ret)
nids_params.no_mem("test_malloc");
return ret;
}
#ifdef WIN32
int
#elif
inline int
#endif
before(u_int seq1, u_int seq2)
{
return ((int)(seq1 - seq2) < 0);
}
#ifdef WIN32
int
#elif
inline int
#endif
after(u_int seq1, u_int seq2)
{
return ((int)(seq2 - seq1) < 0);
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Saar, has been programing since 1997. He enjoys taking things a part and designing simple solutions to complex problems. Currently, works for Microsoft writing in a variety of languages and flavors. During the last year he is taking a closer look into mobile and web development.