⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linux-snoop-how-to.txt

📁 一种无线拥塞控制协议
💻 TXT
字号:


             LLL    III NNN  NN  UU   UU XX  XX
             LLL    III NNNN NN  UU   UU   XX
             LLL    III NN NNNN  UU   UU   XX
             LLLLLL III NN  NNN   UUUUU  XX   XX

        SSSSSS   NNN   NN   OOOOOO    OOOOOO   PPPPPP
       SSS   SS  NNNN  NN  OOO  OOO  OOO  OOO  PPP  PPP
        SSSS     NN NN NN  OO    OO  OO    OO  PP   PPP
          SSSS   NN  NNNN  OO    OO  OO    OO  PPPPPP
       SS   SSSS NN   NNN  OOO  OOO  OOO  OOO  PP
         SSSSS   NN    NN   OOOOOO    OOOOOO   PP
                               
                              BY
                       Indradeep Biswas
                  indradeepbiswas@hotmail.com
                               
                  Supervisor: Dr. A.L. Ananda
        Communications and Internet Research Lab (CIRL)
                      School of Computing
               National University of Singapore
                               
         A Linux implementation of the Snoop Protocol
           proposed by Dr. Hari Balakrishnan of MIT.
                               
===============================================================
                               
                      LINUX SNOOP HOW TO
                               
        Version: 0.1       Wednesday, January 21, 2004
===============================================================
                               
Table of Contents:

  1.  Introduction
  2.  Getting Linux Snoop
  3.  Installing Linux Snoop
  4.  Using Snoop
  5.  Benchmarking and Testing Snoop
  6.  Further Development and Bug reporting
                               
===============================================================


1.   INTRODUCTION
  
  1.1. What is Snoop?
     
     The Snoop Protocol was designed to eliminate the drop in TCP
     throughput due to intermittent packet loss on wireless
     networks. It shields the sender from the vagaries of the
     wireless link, without sacrificing the end-to-end semantics, or
     requiring any changes to the existing implementations of TCP.
  
  1.2. What is Linux Snoop?
     
     Linux Snoop is the implementation of the Snoop Protocol on the
     Linux platform.  Snoop has currently been implemented as a
     kernel module.  The module uses specially defined hooks in the
     kernel to interact with the flowing packets.  The kernel must
     be patched to implement these hooks.
     
     Please see Section 5.1 to find out about the Linux Snoop which
     uses the Netfilter Hooks.

  1.3. Which versions of Linux is Linux Snoop compatible with?
     
     Linux Snoop has been tested to work with 2.4.20.  It should
     work on the 2.4 kernel series.
     
     
2.   GETTING LINUX SNOOP
  
  2.1. Where do I get the latest Linux Snoop?
     
     Latest copy of Linux Snoop can be found at
     http://www.cir.nus.edu.sg/research/software/snoop/release/

  2.2. Which version should I get?
     
     As of the moment, only version 0.1 is released.  Use this
     version if you do not have Netfilter support installed in the
     kernel.
     
     The Netfilter supported version of Linux Snoop is being worked
     upon. This version can be used if you have Netfilter support.
     No patching of the kernel will be necessary for using this
     release of Linux Snoop.
     
  2.3. Where do I get more information on Snoop?
     
     You can read the two following documents which explain the
     concept of Snoop and its implementation on Linux in detail.
     http://www.cir.nus.edu.sg/research/software/snoop/snoop.html
     
     You can also visit Hari Balakrishnan's website at:
     http://nms.lcs.mit.edu/~hari/papers/snoop.html
  
  
3.   INSTALLING LINUX SNOOP
  
  3.1. Modifying the kernel
     
     Two files will be modified at the base station netsyms.c and
     ip_forward.c  The lines encapsulated in the SNOOP BEGIN-END
     comments should be added to the files. Outside the SNOOP 
     BEGIN-END, there are few lines of the actual ip_forward.c code
     given to assit you in placing the SNOOP code.
     
     File to modify: ip_forward.c
     (/usr/src/linux/net/ipv4/ip_forward.c)
     ...
     #include <net/route.h>
     
     // ================== SNOOP Initialization
     ============BEGIN
     int (* snoop_ip_forward) (struct sk_buff *);
     int (* snoop_ip_forward_finish) (struct sk_buff *);
     // ================== SNOOP Initialization
     ============END
     
     static inline int ip_forward_finish(struct sk_buff *skb)
     ...
     ...
     
     //================== SNOOP HOOK ==================BEGIN
     snoop_ip_forward_finish = ip_forward_finish;
     if (snoop_ip_forward && (*snoop_ip_forward)(skb) == -6)
     goto drop;
     //================== SNOOP HOOK =================END
     return NF_HOOK(PF_INET, NF_IP_FORWARD, skb, skb->dev,
     dev2,ip_forward_finish);
     ...
     ...
     
     File to modify: netsyms.c  ((/usr/src/linux/net/netsyms.c)
     These lines should be added to the file before the 
     "#endif  /* CONFIG_NET */" statement.
     
     extern int (* snoop_ip_forward) (struct sk_buff *);
     EXPORT_SYMBOL_NOVERS(snoop_ip_forward);
     extern int (* snoop_ip_forward_finish) (struct sk_buff *);
     EXPORT_SYMBOL_NOVERS(snoop_ip_forward_finish);
  
     
     You must compile the kernel after the modification.  To
     find how to compile the kernel, please refer to:
     http://puggy.symonds.net/~mksarav/tutorial/mks-linux-
     kernel-howto.txt
     
     
  3.2. Making the Snoop Module
     
     You can edit the parameters given in the snoop.h (the snoop
     header file) in order to customize Snoop for your needs. The
     parameters, such as maximum number of connections, maximum
     window size, connection timeout, etc. can be specified before
     the module is compiled.
     
     First run 憁ake clean

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -