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

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

?? ftpp_si.c

?? 著名的入侵檢測系統snort的最新版本的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
 * 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: FtpSession    => pointer to the session to reset *            first         => indicator whether this is a new conf *  * Returns: int => return code indicating error or success * */static INLINE int FTPResetSession(FTP_SESSION *FtpSession, int first){    FtpSession->server.response.pipeline_req = 0;    FtpSession->server.response.state = 0;    FtpSession->client.request.pipeline_req = 0;    FtpSession->client.state = 0;    FtpSession->client_conf = NULL;    FtpSession->server_conf = NULL;    FtpSession->global_conf = NULL;    FtpSession->encr_state = NO_STATE;    IP_CLEAR(FtpSession->clientIP);    FtpSession->clientPort = 0;    IP_CLEAR(FtpSession->serverIP);    FtpSession->serverPort = 0;    FtpSession->data_chan_state = NO_STATE;    FtpSession->data_chan_index = -1;    FtpSession->data_xfer_index = -1;    FtpSession->event_list.stack_count = 0;    return FTPP_SUCCESS;}/* * Function: FTPStatefulSessionInspection(Packet *p, *                          FTPTELNET_GLOBAL_CONF *GlobalConf, *                          FTP_SESSION **FtpSession, *                          FTPP_SI_INPUT *SiInput, int *piInspectMode) * * 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/Session *            GlobalConf        => pointer to the global configuration *            Session           => double pointer to the Session structure *            SiInput           => pointer to the session information *            piInspectMode     => pointer so the inspection mode can be set * * Returns: int => return code indicating error or success * */static int FTPStatefulSessionInspection(SFSnortPacket *p,        FTPTELNET_GLOBAL_CONF *GlobalConf,        FTP_SESSION **FtpSession,        FTPP_SI_INPUT *SiInput, int *piInspectMode){    FTP_CLIENT_PROTO_CONF *ClientConf;    FTP_SERVER_PROTO_CONF *ServerConf;    int iRet;    FTP_SESSION *NewSession;    /*     * First, check if there is already a session pointer.     */    if (p->stream_session_ptr)    {        *FtpSession =            _dpd.streamAPI->get_application_data(p->stream_session_ptr, PP_FTPTELNET);        if (*FtpSession)        {            if (SiInput->pdir != FTPP_SI_NO_MODE)                *piInspectMode = SiInput->pdir;            else                *piInspectMode = FTPGetPacketDir(p);            return FTPP_SUCCESS;        }    }    /*     * If not, create a new one, and initialize it.     */    iRet = FTPInitConf(p, GlobalConf, &ClientConf, &ServerConf, SiInput, piInspectMode);    if (iRet)    {        return iRet;    }    if (*piInspectMode)    {        NewSession = (FTP_SESSION *)calloc(1, sizeof(FTP_SESSION));        if (NewSession == NULL)        {            DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for new FTP session\n",                                            *(_dpd.config_file), *(_dpd.config_line));        }        FTPResetSession(NewSession, 1);        NewSession->client_conf = ClientConf;        NewSession->server_conf = ServerConf;        NewSession->global_conf = GlobalConf;        *FtpSession = NewSession;        return FTPP_SUCCESS;    }    return FTPP_INVALID_PROTO;}/* * Function: FTPStatelessSessionInspection(Packet *p, *                          FTPTELNET_GLOBAL_CONF *GlobalConf, *                          FTP_SESSION **FtpSession, *                          FTPP_SI_INPUT *SiInput, int *piInspectMode) * * 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 an FTP 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/Session *            GlobalConf        => pointer to the global configuration *            Session           => double pointer to the Session structure *            SiInput           => pointer to the session information *            piInspectMode     => pointer so the inspection mode can be set * * Returns: int => return code indicating error or success * */static FTP_SESSION StaticSession;static int first = 1;static int FTPStatelessSessionInspection(SFSnortPacket *p,        FTPTELNET_GLOBAL_CONF *GlobalConf,        FTP_SESSION **FtpSession,        FTPP_SI_INPUT *SiInput, int *piInspectMode){    FTP_CLIENT_PROTO_CONF *ClientConf;    FTP_SERVER_PROTO_CONF *ServerConf;    int iRet;    FTPResetSession(&StaticSession, first);    if (first)        first = 0;    iRet = FTPInitConf(p, GlobalConf, &ClientConf, &ServerConf, SiInput, piInspectMode);    if (iRet)    {        return iRet;    }        StaticSession.client_conf = ClientConf;    StaticSession.server_conf = ServerConf;    StaticSession.global_conf = GlobalConf;    *FtpSession = &StaticSession;    return FTPP_SUCCESS;}    /* * Function: FTPSessionInspection(Packet *p, *                          FTPTELNET_GLOBAL_CONF *GlobalConf, *                          FTPP_SI_INPUT *SiInput, int *piInspectMode) * * Purpose: The Session Inspection module selects the appropriate client *          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 FTP_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 FTP_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/Session *            GlobalConf        => pointer to the global configuration *            SiInput           => pointer to the session information *            piInspectMode     => pointer so the inspection mode can be set * * Returns: int => return code indicating error or success * */int FTPSessionInspection(SFSnortPacket *p, FTPTELNET_GLOBAL_CONF *GlobalConf,        FTPP_SI_INPUT *SiInput, int *piInspectMode){    int iRet;    FTP_SESSION *FtpSession;    /*     * 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 = FTPStatefulSessionInspection(p, GlobalConf, &FtpSession, SiInput, piInspectMode);        if (iRet)        {            return iRet;        }        if (p->stream_session_ptr)        {            SiInput->pproto = FTPP_SI_PROTO_FTP;            _dpd.streamAPI->set_application_data(p->stream_session_ptr,                    PP_FTPTELNET, FtpSession, &FTPFreeSession);        }        else        {            /* Uh, can't create the session info */            /* Free session data, to avoid memory leak */            FTPFreeSession(FtpSession);            SiInput->pproto = FTPP_SI_PROTO_UNKNOWN;            return FTPP_NONFATAL_ERR;        }    }    else    {        /*         * Assume stateless processing otherwise         */        iRet = FTPStatelessSessionInspection(p, GlobalConf, &FtpSession, SiInput, piInspectMode);        if (iRet)        {            return iRet;        }        if (p->stream_session_ptr)        {            SiInput->pproto = FTPP_SI_PROTO_FTP;            /* Set the free function pointer to NULL,             * since this is a static one */            _dpd.streamAPI->set_application_data(p->stream_session_ptr,                    PP_FTPTELNET, FtpSession, NULL);        }        else        {            /* Uh, can't create the session info */            return FTPP_NONFATAL_ERR;        }    }    return FTPP_SUCCESS;}/* * Function: ftpp_si_determine_proto(Packet *p, *                          FTPTELNET_GLOBAL_CONF *GlobalConf, *                          FTPP_SI_INPUT *SiInput, int *piInspectMode) * * Purpose: The Protocol Determination module determines whether this is *          an FTP or telnet request.  If this is an FTP request, it sets *          the FTP Session data and inspection mode. * *          The inspection mode can be either client or server. * * Arguments: p                 => pointer to the Packet/Session *            GlobalConf        => pointer to the global configuration *            SiInput           => pointer to the session information *            piInspectMode     => pointer so the inspection mode can be set * * Returns: int => return code indicating error or success * */int ftpp_si_determine_proto(SFSnortPacket *p, FTPTELNET_GLOBAL_CONF *GlobalConf,        FTPP_SI_INPUT *SiInput, int *piInspectMode){    /* Default to no FTP or Telnet case */    SiInput->pproto = FTPP_SI_PROTO_UNKNOWN;    *piInspectMode = FTPP_SI_NO_MODE;    TelnetSessionInspection(p, GlobalConf, SiInput, piInspectMode);    if (SiInput->pproto == FTPP_SI_PROTO_TELNET)        return FTPP_SUCCESS;    FTPSessionInspection(p, GlobalConf, SiInput, piInspectMode);    if (SiInput->pproto == FTPP_SI_PROTO_FTP)        return FTPP_SUCCESS;    return FTPP_INVALID_PROTO;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区在线| 国产亲近乱来精品视频| 不卡的电视剧免费网站有什么| 国产视频在线观看一区二区三区 | 国内精品久久久久影院色| 亚洲乱码国产乱码精品精可以看 | 欧美优质美女网站| 国产高清在线观看免费不卡| 亚洲欧美国产三级| 久久久蜜桃精品| 制服.丝袜.亚洲.另类.中文 | 美女一区二区在线观看| **欧美大码日韩| 欧美成人vps| 欧美最新大片在线看| 国产成人av电影| 久久 天天综合| 蜜臀久久久99精品久久久久久| 亚洲一区二区三区中文字幕在线| 国产精品短视频| 久久久国际精品| 久久久久久久久伊人| 欧美美女喷水视频| 在线观看亚洲一区| 欧美色爱综合网| 欧美少妇xxx| 欧美乱妇15p| 欧美日韩一区视频| 4hu四虎永久在线影院成人| 色国产精品一区在线观看| 一本一道久久a久久精品| 色综合久久中文字幕| www.亚洲激情.com| 成人黄色国产精品网站大全在线免费观看| 极品美女销魂一区二区三区免费| 麻豆精品一区二区综合av| 精品制服美女丁香| 国产不卡视频一区二区三区| 国产jizzjizz一区二区| 国产传媒欧美日韩成人| av综合在线播放| 精品污污网站免费看| 日韩午夜av一区| 精品少妇一区二区三区免费观看| 精品99一区二区| 国产亚洲欧美色| 国产精品乱人伦| 亚洲最大色网站| 精品午夜久久福利影院| 色狠狠综合天天综合综合| 欧美一区二区三区日韩| 国产日本一区二区| 亚洲视频精选在线| 蜜桃一区二区三区在线| 成人免费不卡视频| 91精品国产欧美一区二区| 国产精品久久久久毛片软件| 久久国内精品自在自线400部| 欧美亚男人的天堂| 国产福利91精品一区| 在线看国产日韩| 国产精品美女久久久久高潮| 天堂成人国产精品一区| 在线看国产日韩| 成人欧美一区二区三区黑人麻豆| 精品在线播放免费| 制服丝袜av成人在线看| 亚洲一二三四区| 91在线观看视频| 自拍偷拍亚洲欧美日韩| 成人小视频免费观看| 国产网站一区二区| 国产精品白丝av| 国产欧美一区二区三区鸳鸯浴| 精品亚洲porn| 亚洲色图欧洲色图| 玉米视频成人免费看| 久久电影网站中文字幕| 色老汉av一区二区三区| 亚洲精品国久久99热| 日本高清不卡aⅴ免费网站| 欧美国产成人精品| 国产不卡视频在线播放| 中文幕一区二区三区久久蜜桃| 激情文学综合网| 欧美激情一区二区三区不卡| 9人人澡人人爽人人精品| 亚洲日本一区二区三区| 99久久久国产精品免费蜜臀| 亚洲人午夜精品天堂一二香蕉| 在线观看一区二区精品视频| 日韩av一区二区三区| 久久精品一区蜜桃臀影院| 色噜噜狠狠色综合中国| 美腿丝袜亚洲综合| 国产午夜精品久久久久久免费视 | 亚洲精品中文字幕乱码三区| 欧美日韩亚洲综合在线| 亚洲电影第三页| 久久久久九九视频| 成人va在线观看| 无码av中文一区二区三区桃花岛| 久久久国产精品不卡| 欧美日韩一区高清| 丁香另类激情小说| 亚洲mv在线观看| 国产精品久久久久久久岛一牛影视| 欧美日韩激情一区二区三区| 国产麻豆成人传媒免费观看| 丝袜a∨在线一区二区三区不卡| 国产午夜精品美女毛片视频| 欧美日韩另类一区| 国产精品综合久久| 三级成人在线视频| 亚洲免费资源在线播放| 国产精品久久久久四虎| 久久色成人在线| 日韩午夜精品视频| 欧美性受xxxx| 在线观看免费一区| 在线观看免费一区| 欧美日韩一区不卡| 欧美日韩在线播放一区| 日韩美女一区二区三区| 欧美日韩国产高清一区二区| 欧美三级一区二区| 欧美亚洲国产怡红院影院| 在线观看成人小视频| 欧美日产国产精品| 欧美高清激情brazzers| 555www色欧美视频| 精品三级av在线| 国产精品嫩草99a| 亚洲欧美视频在线观看| 亚洲三级电影全部在线观看高清| 国产精品久久久久久久久晋中| 中文字幕第一区二区| 亚洲乱码精品一二三四区日韩在线| 一区二区在线观看视频| 综合久久给合久久狠狠狠97色| 亚洲人成影院在线观看| 一区二区高清在线| 日日夜夜免费精品| 狠狠色丁香婷婷综合| 国产福利精品导航| 日本韩国一区二区| 91精品福利在线一区二区三区| 日韩欧美123| 一个色妞综合视频在线观看| 五月婷婷激情综合网| 国产精品一区二区三区网站| 99久久精品免费| 8x福利精品第一导航| 亚洲国产精品传媒在线观看| 石原莉奈一区二区三区在线观看| 国产自产高清不卡| 91搞黄在线观看| 久久伊人蜜桃av一区二区| 亚洲精品视频在线观看网站| 精品一区免费av| 欧美亚洲国产bt| 亚洲国产精品ⅴa在线观看| 午夜精品久久久久久久99樱桃| 成人免费观看av| 久久久久久久久久美女| 日韩黄色一级片| av资源站一区| 国产亚洲精品7777| 久久99久久99精品免视看婷婷| 欧美丰满少妇xxxxx高潮对白| 国产精品久久久久一区二区三区 | www.日韩大片| 国产精品久久777777| 成人精品高清在线| 国产日韩欧美综合在线| 国产精品一二一区| 久久这里只有精品6| 精品一区二区三区免费播放| 日韩一级在线观看| 国产一区二区三区综合 | 欧美一区二区三区性视频| 日本系列欧美系列| ww亚洲ww在线观看国产| 国产99精品视频| 一区二区三区91| 欧美日韩精品电影| 日本最新不卡在线| 精品久久久三级丝袜| 国产精品99久久久久久久女警| 国产欧美精品区一区二区三区 | 欧美剧情片在线观看| 美女性感视频久久| 国产偷国产偷亚洲高清人白洁| 国产激情91久久精品导航 | 成人精品高清在线| 一二三四社区欧美黄| 日韩久久免费av| 成人性生交大片免费| 视频在线观看国产精品| 久久亚洲精华国产精华液 |