⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dce2_memory.h

📁 snort2.8.4版本
💻 H
字号:
/**************************************************************************** * Copyright (C) 2008-2008 Sourcefire,Inc * * 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.  You may not use, modify or * distribute this program under any other version of the GNU General * Public License. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ****************************************************************************  * ****************************************************************************/#ifndef _DCE2_MEMORY_H_#define _DCE2_MEMORY_H_#include "sf_types.h"/******************************************************************** * Enumerations ********************************************************************/typedef enum _DCE2_MemType{    DCE2_MEM_TYPE__CONFIG,   /* Configuration */    DCE2_MEM_TYPE__ROPTION,  /* Rule options */    DCE2_MEM_TYPE__RT,       /* Routing tables */    DCE2_MEM_TYPE__INIT,     /* Other initialization */    DCE2_MEM_TYPE__SMB_SSN,  /* SMB session data */    DCE2_MEM_TYPE__SMB_SEG,  /* SMB segmentation buffer */    DCE2_MEM_TYPE__SMB_UID,  /* SMB uid tracking */    DCE2_MEM_TYPE__SMB_TID,  /* SMB tid tracking */    DCE2_MEM_TYPE__SMB_FID,  /* SMB fid tracking */    DCE2_MEM_TYPE__SMB_UT,   /* SMB uid/tid tracking */    DCE2_MEM_TYPE__SMB_PM,   /* SMB pid/mid tracking */    DCE2_MEM_TYPE__TCP_SSN,  /* TCP session data */    DCE2_MEM_TYPE__CO_SEG,   /* TCP segmentation buffer */    DCE2_MEM_TYPE__CO_FRAG,  /* TCP fragmentation data */    DCE2_MEM_TYPE__CO_CTX,   /* TCP context tracking */    DCE2_MEM_TYPE__UDP_SSN,  /* UDP session data */    DCE2_MEM_TYPE__CL_ACT,   /* UDP activity tracking */    DCE2_MEM_TYPE__CL_FRAG,  /* UDP fragment tracking */    DCE2_MEM_TYPE__HTTP_SSN  /* HTTP session data */} DCE2_MemType;typedef enum _DCE2_MemState{    DCE2_MEM_STATE__OKAY,    DCE2_MEM_STATE__MEMCAP} DCE2_MemState;/******************************************************************** * Structures ********************************************************************/typedef struct _DCE2_Memory{    uint32_t total;    uint32_t total_max;    uint32_t rtotal;       /* Run time total */    uint32_t rtotal_max;    uint32_t config;    uint32_t config_max;    uint32_t roptions;    uint32_t roptions_max;    uint32_t rt;    uint32_t rt_max;    uint32_t init;    uint32_t init_max;    uint32_t smb_total;     /* total memory allocated for SMB */    uint32_t smb_total_max; /* max total memory allocated for SMB */    uint32_t smb_ssn;       /* amount allocated for session structures */    uint32_t smb_ssn_max;   /* max amount allocated for session structures */    uint32_t smb_seg;       /* amount allocated for segmentation buffers */    uint32_t smb_seg_max;   /* max amount allocated for segmentation buffers */    uint32_t smb_uid;       /* amount allocated for uid tracking */    uint32_t smb_uid_max;   /* max amount allocated for uid tracking */    uint32_t smb_tid;       /* amount allocated for tid tracking */    uint32_t smb_tid_max;   /* max amount allocated for tid tracking */    uint32_t smb_fid;       /* amount allocated for fid tracking */    uint32_t smb_fid_max;   /* max amount allocated for fid tracking */    uint32_t smb_ut;        /* amount allocated for uid/tid tracking */    uint32_t smb_ut_max;    /* max amount allocated for uid/tid tracking */    uint32_t smb_pm;        /* amount allocated for pid/mid tracking */    uint32_t smb_pm_max;    /* max amount allocated for pid/mid tracking */    uint32_t tcp_total;     /* total memory allocated for TCP */    uint32_t tcp_total_max; /* max total memory allocated for TCP */    uint32_t tcp_ssn;       /* amount allocated for session structures */    uint32_t tcp_ssn_max;   /* max amount allocated for session structures */    uint32_t udp_total;     /* total memory allocated for UDP */    uint32_t udp_total_max; /* max total memory allocated for UDP */    uint32_t udp_ssn;       /* amount allocated for session structures */    uint32_t udp_ssn_max;   /* max amount allocated for session structures */    uint32_t http_total;     /* total memory allocated for UDP */    uint32_t http_total_max; /* max total memory allocated for UDP */    uint32_t http_ssn;       /* amount allocated for session structures */    uint32_t http_ssn_max;   /* max amount allocated for session structures */    uint32_t co_total;     /* total memory allocated for CO */    uint32_t co_total_max; /* max total memory allocated for CO */    uint32_t co_seg;       /* amount allocated for segmentation */    uint32_t co_seg_max;   /* max amount allocated for segmentation */    uint32_t co_frag;      /* amount allocated for frag tracking */    uint32_t co_frag_max;  /* max amount allocated for frag tracking */    uint32_t co_ctx;       /* amount allocated for contexts */    uint32_t co_ctx_max;   /* max amount allocated for contexts */    uint32_t cl_total;     /* total memory allocated for CL */    uint32_t cl_total_max; /* max total memory allocated for CL */    uint32_t cl_act;       /* amount allocated for activity trackers */    uint32_t cl_act_max;   /* max amount allocated for activity trackers */    uint32_t cl_frag;      /* amount allocated for frag tracking */    uint32_t cl_frag_max;  /* max amount allocated for frag tracking */} DCE2_Memory;/******************************************************************** * ********************************************************************/void DCE2_RegMem(uint32_t, DCE2_MemType);void DCE2_UnRegMem(uint32_t, DCE2_MemType);void * DCE2_Alloc(uint32_t, DCE2_MemType);void DCE2_Free(void *, uint32_t, DCE2_MemType);void * DCE2_ReAlloc(void *, uint32_t, uint32_t, DCE2_MemType);void DCE2_FreeAll(void);void DCE2_MemInit(void);#endif   /* _DCE2_MEMORY_H_ */

⌨️ 快捷键说明

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