zoukankan      html  css  js  c++  java
  • How to build WinPacp 4.11 VS2010 + WDK 7.1 build

    How to build WinPacp 4.11 VS2010 + WDK 7.1 build

    How to build WinPacp 4.11 VS2010 + WDK 7.1 build

    1.get source
    http://www.winpcap.org

    2.build npf driver,open WDK build CMD
    cd WpcapSrc_4_1_1\winpcap\packetNtx\
    CompileDriver.bat

    Don`t try cd WpcapSrc_4_1_1\winpcap\packetNtx\driver used build npf.sys don`t start services!

    line 45
    Packet.h->Undefined Err
    /*
    #if !defined(NDIS30) && !defined(NDIS50)
    #error NDIS30 or NDIS50 should be defined
    #endif
    */


    3.build Packet.dll
    Path WpcapSrc_4_1_1\winpcap\packetNtx\Dll\Project

    Add Packet.dll project lib path
    properties->Linker->General->Additional Library Directoryes->you wdk lib path D:\WinDDK\7600.16385.1\lib\wxp\i386

    Find Packet32-Int.h file Add in the head
    /*with out HAVE_AIRPCAP_API*/
    #undef HAVE_AIRPCAP_API

    4.build libpcap
    Path WpcapSrc_4_1_1\winpcap\wpcap\libpcap\Win32\Prj

    scanner.c->2769 line

    #ifndef ANSI_CHARSET
    #include <unistd.h>
    #endif

    inet_pton.c->65 line

    /*int
    inet_pton(int af, const char *src, void *dst)
    {
    if (af != AF_INET) {
    errno = EAFNOSUPPORT;
    return -1;
    }
    return inet_aton (src, dst);
    }*/

    5.build wpcap.dll
    Path WpcapSrc_4_1_1\winpcap\wpcap\PRJ
    error LNK2001: unresolved external symbol _snprintf

    pcap-ini.h add

    #ifdef WIN32
    #define SHUT_WR SD_SEND /*!< The control code for shutdown() is different in Win32 */
    #define snprintf _snprintf /*!< The snprintf is called _snprintf() in Win32 */
    #endif

  • 相关阅读:
    PHP的资源类型
    windows 配置 apache的多个站点
    php 压缩数据存储
    php统计图类库JpGraph
    php之ThinkPHP的memcached类的修改
    linux 安装报错:pkg-config not found
    Mysql清空表(truncate)与删除表中数据(delete)的区别
    【MySQL】查看MySQL配置文件路径及相关配置
    phper
    http 同步异步请求
  • 原文地址:https://www.cnblogs.com/tangtianfly/p/2690583.html
Copyright © 2011-2022 走看看