zoukankan      html  css  js  c++  java
  • FC4 下ns2.28的安装 (zz)


    原文:http://www.netforum.com.cn/forum_posts.asp?TID=6188

    作者:roger1218

    今天升级到FC4,不过对gcc4.0有所耳闻,果然编译报错
    在google上遍寻其踪迹,结果有牛人已经解决此问题,特有补丁
    http://www.ececs.uc.edu/~cdmc/ucbt/src/ns228-gcc40.patch
    将其放在ns-allinone目录之外,运行patch -p0 < ns228-gcc40.patch 即可搞定,再运行./install不再有错

    ns228-gcc40.patch:

    diff -ru ns-allinone-2.28.orig/nam-1.11/agent.h ns-allinone-2.28/nam-1.11/agent.h
    --- ns-allinone-
    2.28.orig/nam-1.11/agent.h    2001-06-15 21:53:10.000000000 -0400
    +++ ns-allinone-
    2.28/nam-1.11/agent.h    2005-10-07 21:51:57.000000000 -0400
    @@ -
    70,7 +70,7 @@
       inline double width()  {return width_
    ;}
       inline double height() {return height_;}
       virtual void findClosestCornertoPoint(double x, double y, 
    -               double &corner_x
    , double &corner_y) const = NULL; 
    +               double &corner_x, double &corner_y) const = 0; 
       virtual void place(double x, double y);
       void label(const char* name, int anchor);
       void color(const char* name);
    diff -ru ns-allinone-2.28.orig/ns-2.28/diffusion3/filter_core/filter_core.hh ns-allinone-2.28/ns-2.28/diffusion3/filter_core/filter_core.hh
    --- ns-allinone-
    2.28.orig/ns-2.28/diffusion3/filter_core/filter_core.hh    2005-01-19 13:23:21.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/diffusion3/filter_core/filter_core.hh    2005-10-07 21:51:57.000000000 -0400
    @@ -
    99,6 +99,7 @@
     class DiffusionCoreAgent
    ;
     class HashEntry;
     class NeighborEntry;
    +class DiffRoutingAgent;
     
     typedef list<NeighborEntry *> NeighborList
    ;
     typedef list<Tcl_HashEntry *> HashList;
    diff -ru ns-allinone-2.28.orig/ns-2.28/diffusion3/lib/nr/nr.hh ns-allinone-2.28/ns-2.28/diffusion3/lib/nr/nr.hh
    --- ns-allinone-
    2.28.orig/ns-2.28/diffusion3/lib/nr/nr.hh    2005-01-19 13:23:21.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/diffusion3/lib/nr/nr.hh    2005-10-07 21:51:57.000000000 -0400
    @@ -
    43,7 +43,8 @@
     typedef signed int int32_t
    ;
     #endif
     typedef signed short int16_t
    ;
    -#if defined (sparc)
    +// #if defined (sparc)
    +#if defined (__SVR4) && defined (__sun)
     typedef char int8_t
    ;
     #else
     // Conflicts with system declaration of int8_t in Solaris
    diff -ru ns-allinone-
    2.28.orig/ns-2.28/queue/cbq.cc ns-allinone-2.28/ns-2.28/queue/cbq.cc
    --- ns-allinone-
    2.28.orig/ns-2.28/queue/cbq.cc    2005-01-25 17:38:47.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/queue/cbq.cc    2005-10-07 21:51:57.000000000 -0400
    @@ -
    87,6 +87,9 @@
     #define    LEAF_LEVEL    
    1    /* level# for leaves */
     #define    POWEROFTWO    
    16
     
    +class CBQueue
    ;
    +class WRR_CBQueue;
    +
     class CBQClass : public Connector {
     public:
         friend class CBQueue
    ;
    diff -ru ns-allinone-2.28.orig/ns-2.28/tora/tora_neighbor.h ns-allinone-2.28/ns-2.28/tora/tora_neighbor.h
    --- ns-allinone-
    2.28.orig/ns-2.28/tora/tora_neighbor.h    2005-01-19 13:23:53.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/tora/tora_neighbor.h    2005-10-07 21:51:57.000000000 -0400
    @@ -
    48,6 +48,8 @@
     }
    ;
     
     
    +class toraAgent
    ;
    +
     class TORANeighbor {
         friend class TORADest
    ;
         friend class toraAgent;
    diff -ru ns-allinone-2.28.orig/ns-2.28/xcp/xcpq.cc ns-allinone-2.28/ns-2.28/xcp/xcpq.cc
    --- ns-allinone-
    2.28.orig/ns-2.28/xcp/xcpq.cc    2005-02-03 13:29:20.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/xcp/xcpq.cc    2005-10-07 21:51:57.000000000 -0400
    @@ -
    33,6 +33,15 @@
     } class_droptail_xcpq
    ;
     
     
    +const double     XCPQueue::ALPHA_          
    = 0.4;
    +const double     XCPQueue::BETA_           = 0.226;
    +const double     XCPQueue::GAMMA_          = 0.1;
    +const double     XCPQueue::XCP_MAX_INTERVAL= 1.0;
    +const double     XCPQueue::XCP_MIN_INTERVAL= .001;
    +
    +const double   XCPQueue::BWIDTH 
    = 0.01;
    +
    +
     XCPQueue::XCPQueue(): queue_timer_(NULL)
    , 
                   estimation_control_timer_(NULL)
    ,
                   rtt_timer_(NULL)
    , effective_rtt_(0.0),
    diff -ru ns-allinone-
    2.28.orig/ns-2.28/xcp/xcpq.h ns-allinone-2.28/ns-2.28/xcp/xcpq.h
    --- ns-allinone-
    2.28.orig/ns-2.28/xcp/xcpq.h    2005-02-03 13:29:20.000000000 -0500
    +++ ns-allinone-
    2.28/ns-2.28/xcp/xcpq.h    2005-10-07 21:51:57.000000000 -0400
    @@ -
    113,11 +113,11 @@
         XCPTimer*        rtt_timer_
    ;
         double           link_capacity_bps_;
     
    -    static const double    ALPHA_        
    = 0.4;
    -    static const double    BETA_        = 0.226;
    -    static const double    GAMMA_        = 0.1;
    -    static const double    XCP_MAX_INTERVAL= 1.0;
    -    static const double    XCP_MIN_INTERVAL= .001;
    +    static const double    ALPHA_        ;
    +    static const double    BETA_        ;
    +    static const double    GAMMA_        ;
    +    static const double    XCP_MAX_INTERVAL;
    +    static const double    XCP_MIN_INTERVAL;
     
         double          Te_
    ;       // control interval
         double          Tq_;    
    @@ -141,7 +141,7 @@
         double            b_
    [BSIZE];
         double            t_[BSIZE];
         int            maxb_;
    -    static const double    BWIDTH = 0.01;
    +    static const double    BWIDTH;
         int            min_queue_ci_;
         int            max_queue_ci_;
       

    版权所有,欢迎转载
  • 相关阅读:
    终端操作各插件安装配置
    浅谈CSRF攻击方式
    教你突破基于HTTP_REFERER的防盗链的方法
    HTTP Referer简介
    如何利用百度蜘蛛referer找到报错页面入口?
    Flex 布局教程:语法
    HTTP 状态码
    RESTful API 设计最佳实践
    Javascript原型和原型链
    JS判断是什么设备是什么浏览器-主要用移动页面开发
  • 原文地址:https://www.cnblogs.com/xiaotie/p/270859.html
Copyright © 2011-2022 走看看