亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ftpp_si.c

?? 著名的入侵檢測系統snort的最新版本的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * ftpp_si.c * * Copyright (C) 2004 Sourcefire,Inc * Steven A. Sturges <ssturges@sourcefire.com> * Daniel J. Roelker <droelker@sourcefire.com> * Marc A. Norton <mnorton@sourcefire.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.  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. * * Description: * * This file contains functions to select server configurations * and begin the FTPTelnet process. * * The Session Inspection Module interfaces with the Stream Inspection  * Module and the User Interface Module to select the appropriate  * FTPTelnet configuration and in the case of stateful inspection the * Session Inspection Module retrieves the user-data from the Stream * Module.  For stateless inspection, the Session Inspection Module uses * the same structure for use by each packet. * * The main responsibility of this module is to supply the appropriate * data structures and configurations for the rest of the FTPTelnet * process.  The module also determines what type of data is being * inspected, whether it is client, server, or neither. * * NOTES: * - 20.09.04:  Initial Development.  SAS * */#include <stdlib.h>#include <stdio.h>#include <string.h>#include "ftpp_return_codes.h"#include "ftpp_ui_config.h"#include "ftpp_ui_client_lookup.h"#include "ftpp_ui_server_lookup.h"#include "ftpp_si.h"#include "stream_api.h"#ifndef WIN32#include <ctype.h>#endif/* * Function: PortMatch(PROTO_CONF *Conf, unsigned short port) * * Purpose: Given a configuration and a port number, we decide if *          the port is in the port list. * * Arguments: PROTO_CONF    => pointer to the client or server configuration *            port          => the port number to check for * * Returns: int => 0 indicates the port is not a client/server port. *                 1 indicates the port is one of the client/server ports. * */static int PortMatch(PROTO_CONF *Conf, unsigned short port){    if(Conf->ports[port])    {        return 1;    }    return 0;}/* * Function: TelnetFreeSession(void *preproc_session) * * Purpose: This function frees the data that is associated with a session. *  * Arguments: preproc_session   => pointer to the session to free *  * Returns: None */static void TelnetFreeSession(void *preproc_session){    TELNET_SESSION *TelnetSession = preproc_session;    free(TelnetSession);}/* * Function: TelnetResetSession(TELNET_SESSION *Session) * * Purpose: This function resets all the variables that need to be *          initialized for a new Session.  I've tried to keep this to *          a minimum, so we don't have to worry about initializing big *          structures. *  * Arguments: Session         => pointer to the session to reset *  * Returns: int => return code indicating error or success * */static INLINE int TelnetResetSession(TELNET_SESSION *Session){    Session->telnet_conf = NULL;    Session->global_conf = NULL;    Session->consec_ayt = 0;    Session->encr_state = NO_STATE;    Session->event_list.stack_count = 0;    return FTPP_SUCCESS;}/* * Function: TelnetStatefulSessionInspection(Packet *p, *                              FTPTELNET_GLOBAL_CONF *GlobalConf, *                              TELNET_SESSION **TelnetSession, *                              FTPP_SI_INPUT *SiInput) * * Purpose: Initialize the session and server configurations for *          this packet/stream.  In this function, we set the Session *          pointer (which includes the correct server configuration). *          The actual processing to find which IP is the server and *          which is the client, is done in the InitServerConf() function. * * Arguments: p             => pointer to the packet/stream *            GlobalConf    => pointer to the global configuration *            Session       => double pointer to the Session structure *            SiInput       => pointer to the session information * * Returns: int => return code indicating error or success * */static int TelnetStatefulSessionInspection(SFSnortPacket *p,        FTPTELNET_GLOBAL_CONF *GlobalConf,        TELNET_SESSION **TelnetSession,        FTPP_SI_INPUT *SiInput){    TELNET_SESSION *NewSession;    /*     * First, check if there is already a session pointer.     */    if (p->stream_session_ptr)    {        *TelnetSession =            _dpd.streamAPI->get_application_data(p->stream_session_ptr, PP_TELNET);        if (*TelnetSession)            return FTPP_SUCCESS;    }    /*     * If not, create a new one, and initialize it.     */    NewSession = (TELNET_SESSION *)calloc(1, sizeof(TELNET_SESSION));    if (NewSession == NULL)    {        DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for new Telnet session\n",                                        *(_dpd.config_file), *(_dpd.config_line));    }        TelnetResetSession(NewSession);    NewSession->telnet_conf = &GlobalConf->global_telnet;    NewSession->global_conf = GlobalConf;    *TelnetSession = NewSession;    return FTPP_SUCCESS;}/* * Function: TelnetStatelessSessionInspection(Packet *p, *                              FTPTELNET_GLOBAL_CONF *GlobalConf, *                              TELNET_SESSION **TelnetSession, *                              FTPP_SI_INPUT *SiInput) * * Purpose: Initialize the session and server configurations for this *          packet/stream.  It is important to note in stateless mode that *          we assume no knowledge of the state of a connection, other *          than the knowledge that we can glean from an individual packet. *          So in essence, each packet is it's own session and there *          is no knowledge retained from one packet to another.  If you *          want to track a telnet session for real, use stateful mode. * *          In this function, we set the Session pointer (which includes *          the correct server configuration).  The actual processing to *          find which IP is the server and which is the client, is done in *          the InitServerConf() function. * * Arguments: p             => pointer to the packet/stream *            GlobalConf    => pointer to the global configuration *            Session       => double pointer to the Session structure *            SiInput       => pointer to the session information * * Returns: int => return code indicating error or success * */static int TelnetStatelessSessionInspection(SFSnortPacket *p,        FTPTELNET_GLOBAL_CONF *GlobalConf,        TELNET_SESSION **Session,        FTPP_SI_INPUT *SiInput){    static TELNET_SESSION StaticSession;    TelnetResetSession(&StaticSession);    StaticSession.telnet_conf = &GlobalConf->global_telnet;    StaticSession.global_conf = GlobalConf;    *Session = &StaticSession;    return FTPP_SUCCESS;}    /* * Function: TelnetSessionInspection(Packet *p, *                          FTPTELNET_GLOBAL_CONF *GlobalConf, *                          FTPP_SI_INPUT *SiInput, *                          int *piInspectMode) * * Purpose: The Session Inspection module selects the appropriate *          configuration for the session, and the type of inspection *          to be performed (client or server.) * *          When the Session Inspection module is in stateful mode, it *          checks to see if there is a TELNET_SESSION pointer already *          associated with the stream.  If there is, then it uses that *          session pointer, otherwise it calculates the server configuration *          using the FTP_SI_INPUT and returns a TELNET_SESSION pointer.  In *          stateful mode, this means that memory is allocated, but in *          stateless mode, the same session pointer is used for all packets *          to reduce the allocation overhead. * *          The inspection mode can be either client or server. * * Arguments: p             => pointer to the packet/stream *            GlobalConf    => pointer to the global configuration *            Session       => double pointer to the Session structure *            SiInput       => pointer to the session information *            piInspectMode => pointer for setting inspection mode * * Returns: int => return code indicating error or success * */int TelnetSessionInspection(SFSnortPacket *p, FTPTELNET_GLOBAL_CONF *GlobalConf,        FTPP_SI_INPUT *SiInput, int *piInspectMode){    TELNET_SESSION *TelnetSession;    int iRet;    int iTelnetSip;    int iTelnetDip;    iTelnetSip = PortMatch((PROTO_CONF*)&GlobalConf->global_telnet,                           SiInput->sport);    iTelnetDip = PortMatch((PROTO_CONF*)&GlobalConf->global_telnet,                           SiInput->dport);    if (iTelnetSip)    {        *piInspectMode = FTPP_SI_SERVER_MODE;    }    else if (iTelnetDip)    {        *piInspectMode = FTPP_SI_CLIENT_MODE;    }    else    {        return FTPP_INVALID_PROTO;    }    SiInput->pproto = FTPP_SI_PROTO_TELNET;    /*     * We get the server configuration and the session structure differently      * depending on what type of inspection we are doing.  In the case of      * stateful processing, we may get the session structure from the Stream     * Reassembly module (which includes the server configuration) or the      * structure will be allocated and added to the stream pointer for the     * rest of the session.     *     * In stateless mode, we just use a static variable that is contained in     * the function here.     */    if(GlobalConf->inspection_type == FTPP_UI_CONFIG_STATEFUL)    {        iRet = TelnetStatefulSessionInspection(p, GlobalConf, &TelnetSession, SiInput);        if (iRet)        {            return iRet;        }        if (p->stream_session_ptr)        {            _dpd.streamAPI->set_application_data(p->stream_session_ptr,                    PP_TELNET, TelnetSession, &TelnetFreeSession);        }        else        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清免费在线播放| 国产乱淫av一区二区三区| 国产美女视频91| 日本午夜精品一区二区三区电影| 亚洲影院免费观看| 亚洲视频一区在线| 亚洲综合成人在线| 日韩av一级片| 精东粉嫩av免费一区二区三区| 久久97超碰国产精品超碰| 激情av综合网| 成人不卡免费av| 91在线视频免费91| 欧美天堂一区二区三区| 777奇米四色成人影色区| 日韩欧美国产wwwww| 久久久精品tv| 亚洲黄色免费网站| 免费在线一区观看| 高清日韩电视剧大全免费| 91社区在线播放| 欧美精品在线视频| 久久综合久久综合久久综合| 久久精品亚洲麻豆av一区二区| 中文在线免费一区三区高中清不卡| 国产精品久线观看视频| 亚洲国产aⅴ成人精品无吗| 久久精品免费观看| 91小视频在线观看| 日韩免费一区二区三区在线播放| 国产女人aaa级久久久级 | 蜜桃av一区二区在线观看| 国产伦精品一区二区三区免费| 成人av影视在线观看| 欧美疯狂做受xxxx富婆| 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲三级视频在线观看| 久久精品999| 91成人免费在线视频| 精品国产露脸精彩对白| 一区二区三区.www| 国产1区2区3区精品美女| 欧美日韩国产成人在线免费| 久久精品人人做人人综合 | 欧美剧情片在线观看| ww久久中文字幕| 亚洲大片精品永久免费| www.色精品| 精品裸体舞一区二区三区| 亚洲精品视频一区二区| 国产伦精品一区二区三区视频青涩 | 亚洲欧美日韩一区二区三区在线观看| 免费观看在线色综合| 91九色02白丝porn| 久久九九久久九九| 狠狠色2019综合网| 欧美一区二区三区视频免费播放| 亚洲精品日产精品乱码不卡| 国产成人8x视频一区二区| 精品国精品自拍自在线| 一区二区国产盗摄色噜噜| 9i在线看片成人免费| 久久久久久毛片| 激情综合网激情| 日韩三级.com| 免费观看成人av| 欧美一区二视频| 亚洲成av人片| 欧美三级在线视频| 亚洲一二三四在线| 日本韩国一区二区三区| 日韩毛片一二三区| 91在线观看视频| 亚洲日本电影在线| 91看片淫黄大片一级| 亚洲乱码中文字幕综合| 91久久人澡人人添人人爽欧美| 国产精品美女久久福利网站 | 亚洲欧洲中文日韩久久av乱码| 国产成a人亚洲| 国产欧美视频在线观看| 丁香六月久久综合狠狠色| 国产午夜精品福利| proumb性欧美在线观看| 亚洲婷婷在线视频| 欧美三区免费完整视频在线观看| 亚洲第一av色| 日韩午夜中文字幕| 国产盗摄一区二区三区| 国产精品毛片a∨一区二区三区| www.亚洲激情.com| 亚洲电影在线播放| 欧美一区二区网站| 国产精品一区二区三区乱码| 日本一区二区成人| 在线观看一区二区视频| 五月天一区二区三区| 欧美sm美女调教| 国产91精品在线观看| 一区二区三区日韩精品视频| 欧美人伦禁忌dvd放荡欲情| 蜜臀av性久久久久蜜臀aⅴ| 久久久久久99精品| 欧美主播一区二区三区美女| 丝袜美腿亚洲一区二区图片| 久久久不卡网国产精品一区| 99re这里只有精品6| 日韩有码一区二区三区| 国产区在线观看成人精品 | 国产一区二区中文字幕| 136国产福利精品导航| 91麻豆精品国产综合久久久久久| 久久 天天综合| 18涩涩午夜精品.www| 精品精品国产高清a毛片牛牛| 91丨porny丨最新| 精一区二区三区| 一区二区三区精品| 久久色成人在线| 欧美午夜精品一区| 成人精品国产福利| 老司机精品视频在线| 一区二区三区欧美亚洲| 国产日韩欧美a| 日韩欧美一卡二卡| 欧美亚洲尤物久久| 99在线热播精品免费| 久久福利视频一区二区| 亚洲综合色视频| 国产精品久久久久久久浪潮网站| 欧美成人一区二区三区片免费| 91论坛在线播放| 国产精品一二三在| 欧美aaaaaa午夜精品| 亚洲成人免费av| 亚洲日本免费电影| 国产精品久久影院| 国产日韩综合av| 久久久久久久综合色一本| 日韩一级成人av| 91精品国产综合久久小美女| 在线国产电影不卡| 色呦呦国产精品| 色婷婷亚洲精品| 91麻豆福利精品推荐| www..com久久爱| jiyouzz国产精品久久| 丁香啪啪综合成人亚洲小说| 国产美女一区二区| 国产精品系列在线观看| 国产精品77777| 国产精品羞羞答答xxdd| 国产成人福利片| 国产成人精品网址| 成人激情电影免费在线观看| 成人免费视频caoporn| 国产麻豆成人精品| 东方欧美亚洲色图在线| 成人av网在线| 91免费版在线看| 欧美综合天天夜夜久久| 欧美日韩国产高清一区二区 | 久久亚洲精品小早川怜子| 久久午夜免费电影| 国产精品美女久久久久久久久久久 | 国产成人精品www牛牛影视| 国产麻豆一精品一av一免费| 国产精品18久久久久久久久久久久| 九九**精品视频免费播放| 国产在线国偷精品免费看| 国产河南妇女毛片精品久久久| 成人一区二区三区视频在线观看 | 亚洲国产经典视频| 亚洲欧美另类图片小说| 亚洲电影视频在线| 久久成人免费日本黄色| 国产成人av电影在线观看| 色又黄又爽网站www久久| 欧美日韩国产精品自在自线| 精品国产污污免费网站入口| 国产精品网友自拍| 亚洲国产成人高清精品| 国产最新精品精品你懂的| 99国产精品99久久久久久| 欧美日韩精品福利| 久久综合九色综合97_久久久| 自拍偷拍亚洲激情| 久久狠狠亚洲综合| 不卡电影一区二区三区| 欧美老女人在线| 国产精品久久久久久久久免费相片 | 欧美三区在线视频| 久久综合九色欧美综合狠狠 | 精品久久一区二区三区| 中文字幕一区二区在线观看| 午夜av一区二区三区| 99国内精品久久| wwww国产精品欧美| 五月婷婷欧美视频| 91蜜桃免费观看视频|