util.c
来自「libnids w32 libnids w32 libnids w32 libn」· C语言 代码 · 共 43 行
C
43 行
/* 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 "tcp.h"#include "util.h"#include "nids.h"voidnids_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;}inline intbefore(u_int seq1, u_int seq2){ return ((int)(seq1 - seq2) < 0);}inline intafter(u_int seq1, u_int seq2){ return ((int)(seq2 - seq1) < 0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?