hi_util.h

来自「snort-2.1.0入侵检测」· C头文件 代码 · 共 54 行

H
54
字号
/****  @file       hi_util.h**  **  @author     Daniel Roelker <droelker@sourcefire.com>****  @brief      HttpInspect utility functions.**  **  Contains function prototype and inline utility functions.****  NOTES:**      - Initial development.  DJR*/#ifndef __HI_UTIL_H__#define __HI_UTIL_H__#include "hi_include.h"/***  NAME**    hi_util_in_bounds::*//****  This function checks for in bounds condition on buffers.  **  **  This is very important for much of what we do here, since inspecting**  data buffers is mainly what we do.  So we always make sure that we are**  within the buffer.**  **  This checks a half-open interval with the end pointer being one char**  after the end of the buffer.**  **  @param start the start of the buffer.**  @param end   the end of the buffer.**  @param p     the pointer within the buffer**  **  @return integer**  **  @retval 1 within bounds**  @retval 0 not within bounds*/static INLINE int hi_util_in_bounds(u_char *start, u_char *end, u_char *p){    if(p >= start && p < end)    {        return 1;    }    return 0;}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?