Changes between Version 14 and Version 15 of Old/Libmac


Ignore:
Timestamp:
Jun 18, 2006, 11:07:29 PM (18 years ago)
Author:
kishore
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/Libmac

    v14 v15  
    6262==== Design choice I: Implement the emulator in user-space, in a modular manner ====
    6363
    64 Keeping these requirements in mind, a decision was made to implement this emulator framework in user-space, in a modular fashion, built from the ground up so that the lowest module of the framework will communicate with the network device drivers. The figure below gives the general idea behind the framework.
     64Keeping these requirements in mind, a decision was made to implement this emulator framework in user-space, in a modular fashion, built from the ground up so that the lowest module of the framework will communicate with the network device drivers. The figure below gives the general idea behind the framework. Protocol Modules (PM) at each level will provide implementations of the existing protocol stack (for e.g. TCP/IP). The framework will also allow a plug-and-play feature so that newer protocols can be tested and compared with existing ones
    6565
    6666[[Image(p1.jpg)]] [[BR]]
     67
     68The goal is to provide implementations of existing protocol stacks (for e.g. TCP/IP), together with their source code, and allow for newer protocols to be developed and integrated into this framework in a plug-and-play manner (we are in fact, replicating the design of simulators here, which also provide implementations and source code of existing protocol stacks). This should allow protocol developers, at any layer, to concentrate on the performance of their protocol rather than the performance of particular lower or higher layer protocol implementations, since the same implementations will be used by all users.
     69
     70==== Design choice II: Use publicly available source code in order to speed up implementation ====
     71
     72To speed up the implementation and not rewrite software that already exists, an implicit design choice made was to re-use as much of the public domain source code as possible in order to speed up implementation of this framework.
     73
     74==== Design choice III: Implement all modules in the framework as shared libraries that provide APIs ====
     75
     76Given the plug-and-play requirement of the framework, in addition to the modularity requirement, a decision was made to implement each module as a shared library. Since shared libraries are linked at run-time instead of compile-time, they have the following advantages:
     77 * All programs using the library need not be recompiled whenever a change is made.
     78 * Each task shares the same memory space for the shared library. Thus, even if there are N programs using the library, there needs to be only one copy in main memory. In other words, not linking in the code into every task can save a lot of disk space.
     79 * Less pages need to be in the main memory, cutting down paging and reducing the overall memory footprint.
    6780
    6881The architecture diagram is shown below - Libmac uses open-source libraries [http://www.tcpdump.org/ libpcap], for frame capture and [http://www.packetfactory.net/libnet/ libnet], for frame injection.