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

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

?? ftpp_ui_client_lookup.c

?? 著名的入侵檢測系統snort的最新版本的源碼
?? C
字號:
/* * ftpp_ui_client_lookup.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 access the CLIENT_LOOKUP structure. * * We wrap the access to CLIENT_LOOKUP so changing the lookup algorithms * are more modular and independent.  This is the only file that would need * to be changed to change the algorithmic lookup. * * NOTES: * - 16.09.04:  Initial Development.  SAS * */#include <stdlib.h>#include <stdio.h>#include <string.h>#include "ftpp_util_kmap.h"#include "ftpp_ui_config.h"#include "ftpp_return_codes.h"#include "snort_ftptelnet.h"/* * Function: ftpp_ui_client_lookup_init(CLIENT_LOOKUP **ClientLookup) * * Purpose: Initialize the client_lookup structure. * *          We need to initialize the client_lookup structure for *          the FTP client configuration.  Don't want a NULL pointer *          flying around, when we have to look for FTP clients. * * Arguments: ClientLookup      => pointer to the pointer of the client *                                 lookup structure. * * Returns: int => return code indicating error or success * */int ftpp_ui_client_lookup_init(CLIENT_LOOKUP **ClientLookup){    *ClientLookup = KMapNew((KMapUserFreeFunc)FTPTelnetCleanupFTPClientConf);     if(*ClientLookup == NULL)    {        return FTPP_MEM_ALLOC_FAIL;    }    return FTPP_SUCCESS;}/* * Function: ftpp_ui_client_lookup_cleanup(CLIENT_LOOKUP **ClientLookup) * * Purpose: Free the client_lookup structure. *          We need to free the client_lookup structure. * * Arguments: ClientLookup  => pointer to the pointer of the client *                             lookup structure. * * Returns: int => return code indicating error or success * */int ftpp_ui_client_lookup_cleanup(CLIENT_LOOKUP **ClientLookup){    KMAP *km;    if (ClientLookup == NULL)        return FTPP_INVALID_ARG;    km = *ClientLookup;    if (km)    {        KMapDelete(km);        *ClientLookup = NULL;    }    return FTPP_SUCCESS;}/* * Function: ftpp_ui_client_lookup_add(CLIENT_LOOKUP *ClientLookup, *                                 char *ip, int len,  *                                 FTP_CLIENT_PROTO_CONF *ClientConf) *  * Purpose: Add a client configuration to the list. *          We add these keys like you would normally think to add *          them, because on low endian machines the least significant *          byte is compared first.  This is what we want to compare *          IPs backward, doesn't work on high endian machines, but oh *          well.  Our platform is Intel. * * Arguments: ClientLookup => a pointer to the lookup structure *            IP           => the ftp client address *            len          => Length of the address  *            ClientConf   => a pointer to the client configuration structure * * Returns: int => return code indicating error or success * */int ftpp_ui_client_lookup_add(CLIENT_LOOKUP *ClientLookup, unsigned long Ip,                            FTP_CLIENT_PROTO_CONF *ClientConf){    int iRet;    if(!ClientLookup || !ClientConf)    {        return FTPP_INVALID_ARG;    }    iRet = KMapAdd(ClientLookup, (void *)&Ip, 4, (void *)ClientConf);    if (iRet)    {        /*         * This means the key has already been added.         */        if(iRet == 1)        {            return FTPP_NONFATAL_ERR;        }        else        {            return FTPP_MEM_ALLOC_FAIL;        }    }    return FTPP_SUCCESS;}/* * Function: ftpp_ui_client_lookup_find(CLIENT_LOOKUP *ClientLookup, *                                  char *ip, int len, *                                  int *iError) * * Purpose: Find a client configuration given a IP. *          We look up a client configuration given an IP and *          return a pointer to that client configuration if found. * * Arguments: ClientLookup => a pointer to the lookup structure *            IP           => the ftp client address *            len          => Length of the address  *            iError       => a pointer to an error code * * Returns: int => return code indicating error or success * * Returns: FTP_CLIENT_PROTO_CONF* => Pointer to client configuration *                           structure matching IP if found, NULL otherwise. * */FTP_CLIENT_PROTO_CONF *ftpp_ui_client_lookup_find(CLIENT_LOOKUP *ClientLookup,                                             ip_p Ip, int *iError){    FTP_CLIENT_PROTO_CONF *ClientConf = NULL;    if(!iError)    {        return NULL;    }    if(!ClientLookup)    {        *iError = FTPP_INVALID_ARG;        return NULL;    }    *iError = FTPP_SUCCESS;    /* TODO: change this to use a quick find of IP/mask */#ifdef SUP_IP6    ClientConf = (FTP_CLIENT_PROTO_CONF *)KMapFind(ClientLookup,(void *)Ip,4);#else    ClientConf = (FTP_CLIENT_PROTO_CONF *)KMapFind(ClientLookup,(void *)&Ip,4);#endif    if (!ClientConf)    {        *iError = FTPP_NOT_FOUND;    }    return ClientConf;}/* * Function: ftpp_ui_client_lookup_first(CLIENT_LOOKUP *ClientLookup, *                                   int *iError) * * Purpose: This lookups the first client configuration, so we can *          iterate through the configurations. * * Arguments: ClientLookup  => pointer to the client lookup structure *            iError        => pointer to the integer to set for errors * * Returns: FTP_CLIENT_PROTO_CONF* => Pointer to first client configuration *                             structure * */FTP_CLIENT_PROTO_CONF *ftpp_ui_client_lookup_first(CLIENT_LOOKUP *ClientLookup,                                            int *iError){    FTP_CLIENT_PROTO_CONF *ClientConf;    if(!iError)    {        return NULL;    }    if(!ClientLookup)    {        *iError = FTPP_INVALID_ARG;        return NULL;    }    *iError = FTPP_SUCCESS;    ClientConf = (FTP_CLIENT_PROTO_CONF *)KMapFindFirst(ClientLookup);    if (!ClientConf)    {        *iError = FTPP_NOT_FOUND;    }    return ClientConf;}/* * Function: ftpp_ui_client_lookup_next(CLIENT_LOOKUP *ClientLookup, *                                  int *iError) * * Iterates to the next configuration, like a list it just returns * the next config in the config list. * * Purpose: This lookups the next client configuration, so we can *          iterate through the configurations. * * Arguments: ClientLookup  => pointer to the client lookup structure *            iError        => pointer to the integer to set for errors * * Returns: FTP_CLIENT_PROTO_CONF*  => Pointer to next client configuration *                             structure * */FTP_CLIENT_PROTO_CONF *ftpp_ui_client_lookup_next(CLIENT_LOOKUP *ClientLookup,                                           int *iError){    FTP_CLIENT_PROTO_CONF *ClientConf;    if(!iError)    {        return NULL;    }    if(!ClientLookup)    {        *iError = FTPP_INVALID_ARG;        return NULL;    }    *iError = FTPP_SUCCESS;    ClientConf = (FTP_CLIENT_PROTO_CONF *)KMapFindNext(ClientLookup);    if (!ClientConf)    {        *iError = FTPP_NOT_FOUND;    }    return ClientConf;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九九热在线视频观看这里只有精品| 亚洲一二三四区不卡| 欧美一二三四区在线| 欧美日韩一区二区三区在线看| 99vv1com这只有精品| 91麻豆.com| 日本福利一区二区| 欧美日韩高清不卡| 在线成人免费视频| 欧美一区二区三级| 日韩精品最新网址| 国产午夜亚洲精品理论片色戒| 久久久久久久av麻豆果冻| 国产欧美精品在线观看| 国产精品亲子乱子伦xxxx裸| 亚洲三级在线观看| 偷拍与自拍一区| 精品影院一区二区久久久| 国产精品一区二区在线播放| 99国产欧美另类久久久精品| 精品久久久影院| 欧美—级在线免费片| 日韩毛片在线免费观看| 亚洲一区国产视频| 国产中文字幕精品| 99精品偷自拍| 欧美一区二区三区免费观看视频| 日韩欧美国产小视频| 亚洲日本va午夜在线影院| 亚洲成人自拍一区| 狠狠色丁香九九婷婷综合五月| 99久久伊人网影院| 91.xcao| 亚洲国产成人一区二区三区| 香蕉乱码成人久久天堂爱免费| 国产一区亚洲一区| 在线一区二区观看| 国产日韩三级在线| 日本成人在线不卡视频| 91蝌蚪porny| 精品日韩欧美一区二区| 亚洲中国最大av网站| 国产成人高清视频| 欧美一区二区三区视频免费| 成人免费一区二区三区视频| 国产麻豆日韩欧美久久| 欧美日韩免费观看一区二区三区 | 日韩中文字幕区一区有砖一区| 精品一区二区三区视频| 欧美性受xxxx黑人xyx| 国产精品久久久久久久久免费桃花 | 欧洲精品中文字幕| 久久久蜜桃精品| 欧美96一区二区免费视频| 色一情一伦一子一伦一区| 欧美韩国日本一区| 精品中文字幕一区二区| 欧美日韩精品一区视频| 亚洲精品免费一二三区| 不卡视频在线观看| 欧美国产一区在线| 国产福利精品一区| 久久综合九色综合欧美亚洲| 美女精品一区二区| 欧美电影在哪看比较好| 亚洲一区二区三区中文字幕在线| 色综合色狠狠综合色| 国产精品久久久久久久久久久免费看 | 久久免费视频一区| 久久99久久久久| 日韩亚洲欧美高清| 日本成人中文字幕在线视频| 欧美午夜在线一二页| 亚洲一区二区中文在线| 欧美性三三影院| 亚洲不卡av一区二区三区| 精品视频在线视频| 五月开心婷婷久久| 911精品产国品一二三产区| 日韩国产精品91| 欧美一区在线视频| 免费欧美在线视频| 久久综合网色—综合色88| 国产一区二区三区免费观看| 久久久噜噜噜久久人人看 | 国产精品区一区二区三区| 国产成人av电影| 亚洲色图一区二区三区| 在线观看日韩国产| 亚洲成人精品一区二区| 欧美一区二区三区小说| 国产在线国偷精品免费看| 久久久久国产精品麻豆| 成人av影视在线观看| 亚洲男人天堂一区| 这里是久久伊人| 国产福利精品一区| 一区二区三国产精华液| 欧美一区二区人人喊爽| 国产成人自拍网| 亚洲一区二区av电影| 久久这里只有精品6| 99久久精品99国产精品| 视频一区二区国产| 国产欧美日韩久久| 欧美午夜精品免费| 国产一二三精品| 一区二区三区欧美视频| 久久久久国色av免费看影院| 色哟哟精品一区| 国产一区二区三区在线观看免费| 亚洲欧美视频在线观看| 26uuu精品一区二区| 欧美亚洲动漫精品| 国产乱码精品一品二品| 天天亚洲美女在线视频| 亚洲欧洲色图综合| 日韩美女视频一区二区在线观看| 91热门视频在线观看| 激情综合网天天干| 亚洲一区二区三区四区的| 国产清纯在线一区二区www| 欧美乱妇23p| 在线亚洲欧美专区二区| 国产精品中文字幕日韩精品| 日韩av一二三| 亚洲狠狠爱一区二区三区| 国产日产欧美一区| 欧美xxx久久| 欧美日韩国产高清一区| 色国产综合视频| 99麻豆久久久国产精品免费优播| 玖玖九九国产精品| 丝袜美腿亚洲一区| 亚洲一区二区三区自拍| 亚洲欧美区自拍先锋| 国产欧美日韩综合精品一区二区| 日韩一区二区精品葵司在线| 欧美精选一区二区| 欧美午夜精品电影| 在线观看www91| 97se亚洲国产综合在线| 成人18精品视频| 风间由美中文字幕在线看视频国产欧美| 免费精品视频最新在线| 日本午夜一本久久久综合| 亚洲电影在线播放| 亚洲精品免费视频| 亚洲一区免费观看| 一区二区欧美国产| 首页综合国产亚洲丝袜| 亚洲成人先锋电影| 日韩有码一区二区三区| 日韩黄色免费电影| 欧美aaaaaa午夜精品| 激情久久五月天| 国产精选一区二区三区| 国产**成人网毛片九色 | 在线免费观看一区| 色88888久久久久久影院野外| 99国产欧美另类久久久精品| 色综合久久中文综合久久97| 欧美性猛交xxxxxx富婆| 欧美福利电影网| 久久综合色8888| 国产精品久久网站| 亚洲国产色一区| 狠狠色丁香婷综合久久| 懂色av中文一区二区三区 | 欧美日韩一区二区三区四区五区| 91福利国产成人精品照片| 欧美日韩一区二区三区四区| 日韩欧美你懂的| 久久久久久久久久久久电影| ...av二区三区久久精品| 午夜精品久久久久久久99樱桃| 理论电影国产精品| 成av人片一区二区| 欧美色综合网站| 久久噜噜亚洲综合| 亚洲精品高清在线观看| 美国毛片一区二区| 成人黄色免费短视频| 欧美一区三区二区| 国产精品进线69影院| 偷拍一区二区三区| 成人精品视频一区二区三区| 欧美精品 日韩| 中文字幕日韩一区| 蜜桃视频在线一区| 色偷偷88欧美精品久久久| 精品久久久久99| ㊣最新国产の精品bt伙计久久| 日本视频一区二区| 色天天综合久久久久综合片| www日韩大片| 亚洲va欧美va人人爽| 99麻豆久久久国产精品免费优播| 精品国产一区二区三区久久影院 | 亚洲自拍都市欧美小说|