diff -urN ns-2.1b9/Makefile.in ns-allinone-2.1b9/ns-2.1b9/Makefile.in --- ns-2.1b9/Makefile.in Mon Mar 18 17:39:26 2002 +++ ns-allinone-2.1b9/ns-2.1b9/Makefile.in Fri Jul 12 15:06:41 2002 @@ -18,7 +18,6 @@ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/Makefile.in,v 1.245 2002/03/15 19:01:01 ddutta Exp $ (LBL) - # # Various configurable paths (remember to edit Makefile.in, not Makefile) # @@ -254,8 +253,10 @@ pushback/logging-data-struct.o \ pushback/rate-estimator.o \ pushback/pushback-queue.o pushback/pushback.o \ - common/parentnode.o trace/basetrace.o \ + common/parentnode.o trace/basetrace.o \ common/simulator.o asim/asim.o \ + atm/atmpvc.o atm/atmqos.o atm/atmconditioner.o atm/atmscheduler.o \ + atm/atm.o atm/aal.o atm/sar.o atm/map-ds.o \ @V_STLOBJ@ @@ -412,6 +413,7 @@ tcl/mpls/ns-mpls-simulator.tcl \ tcl/lib/ns-pushback.tcl \ tcl/lib/ns-srcrt.tcl \ + tcl/lib/ns-atm.tcl \ @V_NS_TCL_LIB_STL@ $(GEN_DIR)ns_tcl.cc: $(NS_TCL_LIB) diff -urN ns-2.1b9/atm/#atmpvc.cc# ns-allinone-2.1b9/ns-2.1b9/atm/#atmpvc.cc# --- ns-2.1b9/atm/#atmpvc.cc# Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/#atmpvc.cc# Fri Jul 12 15:06:41 2002 @@ -0,0 +1,267 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 1999 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/simulators/ns/expt/ns-sow/atm/atmnode.h,v 1.0 2000/06/19 17:35:09 sow Exp $ + * + * Contributed by Sowmya Manjanatha, Dept. of Computer Science, UNH, June 2000 + */ + +#include "atmpvc.h" + + +PVC::PVC(int vp, int vc, AtmTrafprm *rx, AtmTrafprm *tx) { + vpi = vp; + vci = vc; + qos = new AtmQos(rx,tx); + +} + + +int PVC::set_args(int vp, int vc, AtmTrafprm *rx, AtmTrafprm *tx) { + vpi = vp; + vci = vc; + qos = new AtmQos(rx,tx); + + return (TCL_OK); +} + + +static class pvc_dbClass : public TclClass { +public: + pvc_dbClass() : TclClass("pvc_db") {} + TclObject* create(int, const char*const*) { + return (new pvc_db); + + } +} class_pvc_db; + + +int pvc_db::command(int argc, const char*const* argv) { + Tcl& tcl = Tcl::instance(); + + if (argc == 11) { + + if (strcmp("add-pvc",argv[1]) == 0) { + + //incoming pvc + int vpi = atoi(argv[2]); + + if(vpi < 0) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[2]); + return TCL_ERROR; + } + + int vci = atoi(argv[3]); + + if(vci < 0) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[3]); + return TCL_ERROR; + } + + + AtmTrafprm *rxtp = (AtmTrafprm*)TclObject::lookup(argv[4]); + + if(rxtp == NULL) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[4]); + return TCL_ERROR; + } + + + AtmTrafprm *txtp = (AtmTrafprm*)TclObject::lookup(argv[5]); + + if(rxtp == NULL) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[5]); + return TCL_ERROR; + } + + + PVC p = PVC(vpi,vci,rxtp,txtp); + + + if (strcmp(argv[6],"map") != 0) { + tcl.resultf("PVC DATABASE::no outgoing interface to map to"); + return TCL_ERROR; + }; + + path pth; + pth.incoming_pvc = p; + + //outgoing pvc + + vpi = atoi(argv[7]); + + if(vpi < 0) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[7]); + return TCL_ERROR; + } + + vci = atoi(argv[8]); + + if(vpi < 0) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[8]); + return TCL_ERROR; + } + + rxtp = (AtmTrafprm*)TclObject::lookup(argv[9]); + + if(rxtp == NULL) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[9]); + return TCL_ERROR; + } + + txtp = (AtmTrafprm*)TclObject::lookup(argv[10]); + + if(txtp == NULL) { + tcl.resultf("PVC DATABASE::invalid value %s",argv[10]); + return TCL_ERROR; + } + + p = PVC(vpi,vci,rxtp,txtp); + + pth.outgoing_pvc = p; + + // building the table + + if (!(conditioner->cac(pth))) { + tcl.resultf("PVC DATABASE::resource not available\n"); + return TCL_ERROR; + } + + pvc_table.push_back(pth); + return (TCL_OK); + } + } + + if (argc == 3) { + if(strcmp("attach-conditioner",argv[1]) == 0) { + conditioner = (AtmConditioner*)TclObject::lookup(argv[2]); + return TCL_OK; + } + } + + return (TclObject::command(argc,argv)); +} + + +PVC *pvc_db::get_outgoing_pvc(int vpi, int vci) { + + for(unsigned int i=0; i < pvc_table.size(); i++) { + int vp = pvc_table[i].incoming_pvc.get_vpi(); + int vc = pvc_table[i].incoming_pvc.get_vci(); + if((vp == vpi) && (vc == vci)) + return &(pvc_table[i].outgoing_pvc); + } + return (PVC*)NULL; +} + +PVC *pvc_db::get_corresponding_outgoing_pvc(int vpi, int vci) { + + for(unsigned int i=0; i < pvc_table.size(); i++) { + int vp = pvc_table[i].outgoing_pvc.get_vpi(); + int vc = pvc_table[i].outgoing_pvc.get_vci(); + + if((vp == vpi) && (vc == vci)) + return &(pvc_table[i].outgoing_pvc); + } + return (PVC*)NULL; +} + +PVC *pvc_db::get_incoming_pvc(int vpi, int vci) { + + for(unsigned int i=0; i < pvc_table.size(); i++) { + int vp = pvc_table[i].incoming_pvc.get_vpi(); + int vc = pvc_table[i].incoming_pvc.get_vci(); + if((vp == vpi) && (vc == vci)) + return &(pvc_table[i].incoming_pvc); + } + return (PVC*)NULL; +} + + + +AtmQos *pvc_db::incoming_qos_lookup(int vpi, int vci) { + + AtmQos *q; + + for(unsigned int i=0; i < pvc_table.size(); i++) { + int vp = pvc_table[i].incoming_pvc.get_vpi(); + int vc = pvc_table[i].incoming_pvc.get_vci(); + + if((vp == vpi) && (vc == vci)) { + q = pvc_table[i].incoming_pvc.get_qos(); + return q; + } + + } + + return (AtmQos *)NULL; +} + +AtmQos *pvc_db::outgoing_qos_lookup(int vpi, int vci) { + + + for(unsigned int i=0; i < pvc_table.size(); i++) { + int vp = pvc_table[i].outgoing_pvc.get_vpi(); + int vc = pvc_table[i].outgoing_pvc.get_vci(); + + if((vp == vpi) && (vc == vci)) + return pvc_table[i].outgoing_pvc.get_qos(); + + } + + return (AtmQos *)NULL; +} + +path *pvc_db::get_corresponding_table_entry(int vpi, int vci) { + + for(unsigned int i=0; i < pvc_table.size(); i++) { + + int vp = pvc_table[i].outgoing_pvc.get_vpi(); + int vc = pvc_table[i].outgoing_pvc.get_vci(); + + if((vpi == vp) && (vci == vc)) + return (path *)(&(pvc_table[i])); + } + + return (path *)NULL; +} + +double pvc_db::get_total_input_rate() { + + double sum = 0.0; + + for (unsigned int i=0; i < pvc_table.size(); i++) + sum += pvc_table[i].input_rate; + + return sum; +} diff -urN ns-2.1b9/atm/CHANGES ns-allinone-2.1b9/ns-2.1b9/atm/CHANGES --- ns-2.1b9/atm/CHANGES Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/CHANGES Fri Jul 12 15:06:41 2002 @@ -0,0 +1,18 @@ +From the main ns-2.1b7 branch, these files were modified: + +1) classifier.cc +2) trace.cc +3) ttl.cc +4) classifier.h +5) packet.h +6) Makefile +7) tcl/lib/ns-default.tcl +8) tcl/lib/ns-lib.tcl +9) tcl/lib/ns-packet.tcl + +tcl/lib now also contains a new file "ns-atm.tcl". + + +All other required ATM files are in the "atm" directory. + + diff -urN ns-2.1b9/atm/README ns-allinone-2.1b9/ns-2.1b9/atm/README --- ns-2.1b9/atm/README Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README Fri Jul 12 15:06:41 2002 @@ -0,0 +1,25 @@ +Steps for compiling the ATM simulator +------------------------------------- + +I have assumed here that tcl8.3.2/tk8.3.2, otcl version 6, tclcl version 10 +are all previously installed on your current directory. + +1) Untar and unzip the ns-2.1b7 version on to this directory. + tar xvzf ns-2.1b7.tar.gz + +2) Then cp your atm patch to the directory you have ns-2.1b7 directory. + Untar and unzip the patch + tar xvzf ns-2.1b7-atm-patch.tgz + +3)cd into ns-2.1b7 + +4)A simple + + ./configure + make + make install + + should get you going. If not, check all your paths for the TCL, OTCL + and TCLCL. + + Read the installation instructions from the NS home page for more details. diff -urN ns-2.1b9/atm/README.aux ns-allinone-2.1b9/ns-2.1b9/atm/README.aux --- ns-2.1b9/atm/README.aux Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README.aux Fri Jul 12 15:06:41 2002 @@ -0,0 +1,5 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}08/18/2000}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Changes made to the existing NS Source:}{1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}08/29/2000}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Changes made to existing NS Source}{3}} Binary files ns-2.1b9/atm/README.dvi and ns-allinone-2.1b9/ns-2.1b9/atm/README.dvi differ diff -urN ns-2.1b9/atm/README.log ns-allinone-2.1b9/ns-2.1b9/atm/README.log --- ns-2.1b9/atm/README.log Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README.log Fri Jul 12 15:06:41 2002 @@ -0,0 +1,110 @@ +This is TeX, Version 3.14159 (Web2C 7.3.1) (format=latex 2000.3.7) 29 AUG 2000 11:22 +**README.tex +(README.tex +LaTeX2e <1998/12/01> patch level 1 +Babel and hyphenation patterns for american, french, german, ngerman, i +talian, nohyphenation, loaded. +(/usr/share/texmf/tex/latex/base/article.cls +Document Class: article 1999/01/07 v1.4a Standard LaTeX document class +(/usr/share/texmf/tex/latex/base/size12.clo +File: size12.clo 1999/01/07 v1.4a Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texmf/tex/generic/misc/psfig.sty +\@unused=\write3 +\ps@stream=\read1 +\p@intvaluex=\dimen103 +\p@intvaluey=\dimen104 + +psfig/tex 1.10-dvips +) (/usr/share/texmf/tex/latex/graphics/graphics.sty +Package: graphics 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texmf/tex/latex/graphics/trig.sty +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) +(/usr/share/texmf/tex/latex/config/graphics.cfg) +Package graphics Info: Driver file: dvips.def on input line 80. + +(/usr/share/texmf/tex/latex/graphics/dvips.def +File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR) +)) (README.aux) +\openout1 = `README.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16. +LaTeX Font Info: ... okay on input line 16. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 16. +LaTeX Font Info: ... okay on input line 16. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 16. +LaTeX Font Info: ... okay on input line 16. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 16. +LaTeX Font Info: ... okay on input line 16. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 16. +LaTeX Font Info: ... okay on input line 16. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 16. +LaTeX Font Info: ... okay on input line 16. + +Underfull \hbox (badness 10000) in paragraph at lines 27--32 + + [] + +LaTeX Font Info: Try loading font information for OMS+cmr on input line 41. +(/usr/share/texmf/tex/latex/base/omscmr.fd +File: omscmr.fd 1998/03/27 v2.5g Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41. + +Underfull \hbox (badness 10000) in paragraph at lines 52--56 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 52--56 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 63--74 + + [] + +[1 + +] +Underfull \hbox (badness 10000) in paragraph at lines 75--76 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 92--103 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 104--109 + + [] + +[2] [3] [4] (README.aux) ) +Here is how much of TeX's memory you used: + 658 strings out of 10898 + 6896 string characters out of 96882 + 56580 words of memory out of 263001 + 3643 multiletter control sequences out of 10000+0 + 6229 words of font info for 23 fonts, out of 400000 for 1000 + 14 hyphenation exceptions out of 1000 + 22i,4n,19p,192b,287s stack positions out of 300i,100n,500p,50000b,4000s + +Output written on README.dvi (4 pages, 7904 bytes). diff -urN ns-2.1b9/atm/README.ps ns-allinone-2.1b9/ns-2.1b9/atm/README.ps --- ns-2.1b9/atm/README.ps Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README.ps Fri Jul 12 15:06:41 2002 @@ -0,0 +1,963 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software +%%Title: README.dvi +%%Pages: 4 +%%PageOrder: Ascend +%%BoundingBox: 0 0 596 842 +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips README.dvi -o README.ps +%DVIPSParameters: dpi=600, compressed +%DVIPSSource: TeX output 2000.08.29:1122 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +TeXDict begin 39158280 55380996 1000 600 600 (README.dvi) +@start +%DVIPSBitmapFont: Fa cmtt12 12 38 +/Fa 38 126 df<00085B003EEB07C0007FEB0FE0A24814F0A26C14E0B3A2007E1307003E +14C0A20008EB01001C1E75BD33>34 D44 D<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B6C8A33>46 +D<167816F8ED01FCA21503A2ED07F8A2ED0FF0A2ED1FE0A216C0153FA2ED7F80A2EDFF00 +A24A5AA25D1403A24A5AA24A5AA24A5AA25D143FA24A5AA24AC7FCA2495AA25C1303A249 +5AA2495AA25C131FA2495AA2495AA249C8FCA25B1201A2485AA2485AA2485AA25B121FA2 +485AA2485AA248C9FCA25AA2127CA2264D7AC433>I59 +D<007FB71280A2B812C0A36C16806C1600CBFCA9003FB7FC481680B812C0A36C1680A22A +177CA933>61 D65 D<91391FE00780DAFFFC13C00103EBFF0F010F148F4914 +FF5B90387FF81F9038FFC00748497E4848487E497F485A167F485A49143F121F5B003F15 +1F5BA2127F90C8EA0F8093C7FCA25A5AAD7E7EA36DEC0F80003FED1FC0A27F121F7F000F +153F6D15806C7E167F6C6CECFF007F3A01FF8003FE6C6D485A90397FF81FF86DB55A6D5C +6D5C010391C7FC010013FCEC1FE02A3F7CBD33>67 D<91387F803C903901FFF03E0107EB +FC7E011F13FE49EBFFFE5B9038FFE07F48EB803FEC000FEA03FC00071407491303485A49 +1301121F5B123F491300A2127F90C8FC167C93C7FCA25A5AA992387FFFC092B512E0A37E +6C6E13C0923800FE00A36D1301123FA27F121F6D1303120F7F6C6C1307A26C6C130F6C6C +131F9038FF803F6CEBE0FF6DB5FC7F6D13FE010713F80101EBF07C9026007F80C7FC2B3F +7CBD33>71 D<3B7FFFC00FFFF8B56C4813FCA46C496C13F8D803F8C7EA7F00B3A290B7FC +A601F8C77EB3A53B7FFFC00FFFF8B56C4813FCA46C496C13F82E3D7EBC33>I77 +DI<003FB512FC48ECFF80B712E016F86C816C813A01FC000FFF030313 +801500EE7FC0163FEE1FE0160FA217F01607A6160F17E0A2161FEE3FC0167FEEFF801503 +030F130090B65A5E5E16E0168003FCC7FC01FCC9FCB3383FFFE0487FB57EA26C5B6C5B2C +3D7EBC33>80 D<007FB57EB612F815FE81826C812603F8007FED3FF0ED0FF815076F7E15 +01A26F7EA74B5AA215034B5A150FED3FF0EDFFE090B65A5E93C7FC5D8182D9F8007F153F +6F7E150F821507AA173E177FA416F8030313FF267FFFC014FEB538E001FF17FC81EE7FF8 +6C49EB3FF0C9EA0FC0303E7EBC33>82 D<003FB712F84816FCB8FCA43AFE000FE001A800 +7CED00F8C71500B3B3A40107B512C049804980A26D5C6D5C2E3D7EBC33>84 +D<273FFFE001B5FC486D481480B56C4814C0A26C496C14806C496C1400D801FCC7EA0FE0 +B3B3A36D141F00005EA26D143F6D5DA26D6C49C7FC6E5B6D6C485AECF00390390FFC0FFC +6DB55A6D5C6D5C6D6C1380DA1FFEC8FCEC07F8323E80BC33>I<007FB512C0B612E0A415 +C048C8FCB3B3B3ABB612C015E0A46C14C01B4D6CC433>91 D<007FB512C0B612E0A47EC7 +120FB3B3B3AB007FB5FCB6FCA46C14C01B4D7DC433>93 D<007FB612FEA2B8FCA36C15FE +A228077B7D33>95 D97 D99 D +III104 D<14E0EB03F8A2497EA36D5AA2EB00E091C8 +FCAA383FFFF8487FA47EEA0001B3AD007FB612C0B712E016F0A216E06C15C0243E78BD33 +>I107 D<02FC137E3B7FC3FF01FF80D8FF +EF01877F90B500CF7F15DF92B57E6C010F13872607FE07130301FC01FE7F9039F803FC01 +A201F013F8A401E013F0B3A53C7FFE0FFF07FF80B548018F13C0A46C486C01071380322C +80AB33>109 D<4AB4FC263FFC0713C0267FFE1F13F000FF017F7F91B5FC6CB67E6CEC07 +FEC6EBF801ECF0004A7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813FEB56C48 +13FFA26C496C13FE6C496C13FC302C7FAB33>III114 D<90381FFE0F90B5EA8F80000314FF120F5A +5AEBF007387F800190C7FC00FE147F5A153FA37E007FEC1F0001C090C7FCEA3FF8EBFFC0 +6C13FF6C14E0000314F8C680011F13FF01001480020713C0EC007FED1FE0007C140F00FE +EC07F01503A27EA27F15076D14E06D130F6DEB3FC09038FE01FF90B61280160000FD5C00 +FC14F8D8F83F13E0D8780790C7FC242E79AC33>III<3B3FFFC07FFF80486D +B512C0B500F114E0A26C01E014C06C496C13803B00FE000FE000017F495AEB3F804B5A6D +6C48C7FC90380FE07E903807F0FEECF1FC903803FBF8EB01FF6D5B5D6E5A143F6E5A143F +814A7E14FF903801FBF0ECF9F8903803F1FCEB07E0157E90380FC07F011F6D7E90383F80 +1F02007F496D7E01FE6D7E484813033B7FFFC03FFFE0B56C4813F0A46C496C13E02C2B7D +AA33>120 D123 +D125 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fb cmbx12 12 22 +/Fb 22 118 df12 D45 DII58 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007F +F84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6 +FC1307013F13F19038FFFC01000313E0000F1380381FFE00485A5B127F5B12FF5BA35DA2 +6D5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007 +D90FFCC9FC322F7DAD36>97 DIIII +104 D<137C48B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAA +EB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>II108 D<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC9138 +8F801F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D +7CAC3E>110 DI<90397FC0 +0FF8B590B57E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D +13804A15C04A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15 +C06E5B6E4913806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1F +F092C9FCADB67EA536407DAC3E>II<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE0003 +13BE6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC +2E>I<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E +00FE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C80000380 +6C15806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C14 +1FA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7C +AD2C>III E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fc cmbx12 14.4 22 +/Fc 22 121 df46 D<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3 +B3B3A6007FB712FEA52F4E76CD43>49 DI58 D<932601FFFCEC01C0047FD9FFC0 +13030307B600F81307033F03FE131F92B8EA803F0203DAE003EBC07F020F01FCC7383FF0 +FF023F01E0EC0FF94A01800203B5FC494848C9FC4901F882494982494982494982494982 +4990CA7E494883A2484983485B1B7F485B481A3FA24849181FA3485B1B0FA25AA298C7FC +5CA2B5FCAE7EA280A2F307C07EA36C7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D +187EA26D6C606D6D4C5A6D6D16036D6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C +4BC7FC6E01E0EC07FE020F01FEEC1FF80203903AFFE001FFF0020091B612C0033F93C8FC +030715FCDB007F14E0040101FCC9FC525479D261>67 D78 D<91260FFF80130791B500F85B010702FF5B011FED +C03F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F +001F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF +15F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F821303 +010082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F8 +82A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C0 +4A5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F0 +48D9007F90C8FC3C5479D24B>83 D97 D<913801FFF8021FEBFF8091B612F0010315FC010F9038C00FFE90 +3A1FFE0001FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091C7FC486F +1300705A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E140F6CEE +1F806C6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01001580 +023F49C7FC020113E033387CB63C>99 D<4DB47E0407B5FCA5EE001F1707B3A4913801FF +E0021F13FC91B6FC010315C7010F9038E03FE74990380007F7D97FFC0101B5FC49487F48 +49143F484980485B83485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D +5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F +0101ECFE0FD9003F13F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49B6FC +010715C04901817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E4817804849 +7F18C0488191C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7E +A218E06CEE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00 +D91FFEEB03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D +>I103 DI<137F497E000313E0487F +A2487FA76C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B +547BD325>I109 DI<913801FF +E0021F13FE91B612C0010315F0010F9038807FFC903A1FFC000FFED97FF86D6C7E49486D +7F48496D7F48496D7F4A147F48834890C86C7EA24883A248486F7EA3007F1880A400FF18 +C0AC007F1880A3003F18006D5DA26C5FA26C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B +6D6C495BD93FFE011F90C7FC903A0FFF807FFC6D90B55A010015C0023F91C8FC020113E0 +3A387CB643>I<90397FE003FEB590380FFF80033F13E04B13F09238FE1FF89139E1F83F +FC0003D9E3E013FEC6ECC07FECE78014EF150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7 +FCA55CB3AAB612FCA52F367CB537>114 D<903903FFF00F013FEBFE1F90B7FC120348EB +003FD80FF81307D81FE0130148487F4980127F90C87EA24881A27FA27F01F091C7FC13FC +EBFFC06C13FF15F86C14FF16C06C15F06C816C816C81C681013F1580010F15C013000207 +14E0EC003F030713F015010078EC007F00F8153F161F7E160FA27E17E07E6D141F17C07F +6DEC3F8001F8EC7F0001FEEB01FE9039FFC00FFC6DB55AD8FC1F14E0D8F807148048C601 +F8C7FC2C387CB635>I<143EA6147EA414FEA21301A313031307A2130F131F133F13FF5A +000F90B6FCB8FCA426003FFEC8FCB3A9EE07C0AB011FEC0F8080A26DEC1F0015806DEBC0 +3E6DEBF0FC6DEBFFF86D6C5B021F5B020313802A4D7ECB34>II<007FB500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A +6D4B5A6F495A6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCF +C06EEBFF806E91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F +4A486C7E4A486C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F +01076F7E49486E7E49486E7FEBFFF0B500FE49B612C0A542357EB447>120 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fd cmti12 12 35 +/Fd 35 122 df<4CB414FC040F9039C003FF80933B3F81F00783C0933B7C00781F01E04C +9038F83F03923C01F001FC3E07F003030103EB7E0F922607E007EB7C1F19FCDB0FC001F8 +14E0943A03F0F80FC0DD01E1EB0780031FD9000190C7FC5E180361153F93C7FCA2180761 +5D157EA2180F6115FE91B912F0A3DA00FCC7D81F80C7FC1401A25D183F96C8FCA214035D +A260187E14075DA218FE60140F5DA2170160141F5DA2170360143F92C7FCA21707605C14 +7EA2170F6014FE5CA24D5AA2495A95C9FC5F5C0103153E177E001CEBE038007F02FE137C +26FF07E114FC02C15C4C5AEB0F8100FE903901FC03E0D8F81F9038F007C03B701E00E00F +80D8783CD9F83ECAFCD81FF0EB3FF8D807C0EB0FE04C5A83C53C>11 +DI<160E161EA316 +3EA2163CA2167CA21678A216F8A25EA21501A25EA21503A25EA21507A25EA2007FB912E0 +BAFCA27EC8001FC9FCA2151EA2153EA2153CA2157CA21578A215F8A25DA21401A25DA214 +03A25DA21407A25D14033B3C73B64B>43 D<007FB5FCB6FCA214FEA21805789723>45 +D<120FEA3FC0127FA212FFA31380EA7F00123C0A0A76891E>II65 D67 D<91B56C49B512E0A28202009239000FFC00F107F0706E5A4A +5F15DF705D1907EC03CFDB8FF892C7FCA203875D02077F0303150EA270141EEC0F01020E +161C826F153C141E021C6E1338167F1978023C800238013F1470A27113F00278131F0270 +5E83040F130102F014F84A5E1607EFFC0313014A01035C17FE1807010314014A02FF90C8 +FCA2705B0107168F91C8138E177F18DE5B010EED3FDC18FCA2011E151F011C5EA2170F13 +3C01386F5A1378A201F81503486C5EEA07FEB500F01401A2604B447AC348>78 +DI<91B712F018FEF0FF800201903980007FE06E90C7EA1FF04AED07F818034B15FC +F001FE1403A24B15FFA21407A25DA2140FF003FE5DA2021F16FC18074B15F8180F023F16 +F0F01FE04B15C0F03F80027FED7F0018FE4BEB03FCEF0FF002FFEC7FC092B6C7FC17F892 +CAFC5BA25CA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA25CA2137FA25C49 +7EB67EA340447AC342>I83 +D<48B912F85AA2913B0007FC001FF0D807F84A130701E0010F140349160148485C90C715 +00A2001E021F15E05E121C123C0038143F4C1301007818C0127000F0147F485DA3C800FF +91C7FC93C9FCA35C5DA314035DA314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF +92CAFCA35B5CA21303A21307497E007FB612C0A25E3D446FC346>I97 +DIIIII<15FCEC03FF91390F8383809139 +3E01CFC091387C00EF4A13FF4948137F010315804948133F495A131F4A1400133F91C75A +5B167E13FE16FE1201495CA215011203495CA21503A2495CA21507A25EA2150F151F5E00 +01143F157F6C6C13FF913801DF8090387C039F90383E0F3FEB0FFCD903F090C7FC90C7FC +5DA2157EA215FEA25DA2001C495A127F48495A14074A5A485C023FC8FC00F8137E387C01 +F8381FFFE0000390C9FC2A407BAB2D>I<14FE137FA3EB01FC13001301A25CA21303A25C +A21307A25CA2130FA25CA2131FA25C157F90393F83FFC091388F81F091381E00F802387F +4948137C5C4A137EA2495A91C7FCA25B484814FE5E5BA2000314015E5BA2000714035E5B +1507000F5DA249130F5E001F1678031F1370491480A2003F023F13F0EE00E090C7FC1601 +48023E13C01603007E1680EE070000FEEC1E0FED1F1E48EC0FF80038EC03E02D467AC432 +>I<143C147E14FE1301A3EB00FC14701400AE137C48B4FC3803C780380703C0000F13E0 +120E121C13071238A21278EA700F14C0131F00F0138012E0EA003F1400A25B137EA213FE +5B12015BA212035B141E0007131C13E0A2000F133CEBC038A21478EB807014F014E0EB81 +C0EA0783EBC7803803FE00EA00F8174378C11E>I<14FE137FA3EB01FC13001301A25CA2 +1303A25CA21307A25CA2130FA25CA2131FA25C167E013F49B4FC92380783C09138000E07 +ED3C1F491370ED603F017E13E0EC01C09026FE03801380913907000E00D9FC0E90C7FC5C +00015B5C495AEBF9C03803FB8001FFC9FCA214F03807F3FCEBF07F9038E01FC06E7E000F +130781EBC003A2001F150FA20180140EA2003F151E161C010013E0A2485DA2007E157816 +7000FE01015B15F1489038007F800038021FC7FC2A467AC42D>107 +DIIIII114 DI<1470EB01F8A313035CA313075CA3130F5CA3131F5CA2007FB512E0B6FC15 +C0D8003FC7FCA25B137EA313FE5BA312015BA312035BA312075BA3120F5BA2EC0780001F +140013805C140E003F131EEB001C143C14385C6C13F0495A6C485AEB8780D807FEC7FCEA +01F81B3F78BD20>I<137C48B414072603C780EB1F80380703C0000F7F000E153F121C01 +07150012385E1278D8700F147E5C011F14FE00F05B00E05DEA003FEC0001A2495C137E15 +0313FE495CA215071201495CA2030F13380003167849ECC070A3031F13F0EE80E0153F00 +011581037F13C06DEBEF8300000101148090397C03C787903A3E0F07C70090391FFE01FE +903903F000782D2D78AB34>I<017CEE038048B4020EEB0FC02603C780013FEB1FE03807 +03C0000E7F5E001C037E130F01071607123804FE130300785DEA700F4A1501011F130100 +F001804914C012E0EA003FDA000314034C14805B137E0307140701FE1700495CA2030F5C +0001170E495CA260A24848495A60A2601201033F5C7F4B6C485A000002F713036D9039E7 +E0078090267E01C349C7FC903A1F0781F81E903A0FFF007FF8D901FCEB0FE03B2D78AB41 +>119 D<02F8133FD907FEEBFFE0903A0F0F83C0F0903A1C07C780F890393803CF030170 +13EE01E0EBFC07120101C013F8000316F00180EC01C000074AC7FC13001407485C120EC7 +FC140F5DA3141F5DA3143F92C8FCA34AEB03C01780147EA202FEEB0700121E003F5D267F +81FC130E6E5BD8FF83143CD903BE5B26FE079E5B3A7C0F1F01E03A3C1E0F83C0271FF803 +FFC7FC3907E000FC2D2D7CAB2D>I<137C48B414072603C780EB1F80380703C0000F7F00 +0E153F001C1600130712385E0078157EEA700F5C011F14FE00F0495B12E0EA003FEC0001 +5E5B137E150301FE5C5BA2150700015D5BA2150F00035D5BA2151F5EA2153F12014BC7FC +6D5B00005BEB7C0390383E0F7EEB1FFEEB03F090C712FE5DA214015D121F397F8003F0A2 +4A5A4848485A5D48131F00F049C8FC0070137E007813F8383801F0381E07C06CB4C9FCEA +01FC294078AB2F>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fe cmsy10 12 1 +/Fe 1 16 df<49B4FC010F13E0013F13F8497F48B6FC4815804815C04815E04815F0A248 +15F8A24815FCA3B712FEA96C15FCA36C15F8A26C15F0A26C15E06C15C06C15806C15006C +6C13FC6D5B010F13E0010190C7FC27277BAB32>15 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Ff cmr12 12 67 +/Ff 67 123 df<9239FFC001FC020F9038F80FFF913B3F803E3F03C0913BFC00077E07E0 +D903F890390FFC0FF0494890383FF81F4948EB7FF0495A494814E049C7FCF00FE0499139 +3FC0038049021F90C7FCAFB912F0A3C648C7D81FC0C7FCB3B2486CEC3FF0007FD9FC0FB5 +12E0A33C467EC539>11 D<4AB4FC020F13E091387F80F8903901FC001C49487FD907E013 +0F4948137F011FECFF80495A49C7FCA25B49EC7F00163E93C7FCACEE3F80B8FCA3C648C7 +FC167F163FB3B0486CEC7FC0007FD9FC1FB5FCA330467EC536>I<913801FFC0020FEBFB +8091387F803F903801FC00494813FFEB07E0EB1FC0A2495A49C7FC167F49143F5BAFB8FC +A3C648C7123FB3B2486CEC7FC0007FD9FC1FB5FCA330467EC536>I<001EEB03C0397F80 +0FF000FF131F01C013F8A201E013FCA3007F130F391E6003CC0000EB000CA401E0131C49 +1318A3000114384913300003147090C712604814E0000614C0000E130148EB038048EB07 +0048130E0060130C1E1D7DC431>34 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200 +A413E013C0A312011380120313005A1206120E5A5A5A12600B1D78C41B>39 +D<140C141C1438147014E0EB01C01303EB0780EB0F00A2131E5BA25B13F85B12015B1203 +A2485AA3485AA348C7FCA35AA2123EA2127EA4127CA312FCB3A2127CA3127EA4123EA212 +3FA27EA36C7EA36C7EA36C7EA212017F12007F13787FA27F7FA2EB0780EB03C01301EB00 +E014701438141C140C166476CA26>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA2 +1378137C133C133E131E131FA2EB0F80A3EB07C0A3EB03E0A314F0A21301A214F8A41300 +A314FCB3A214F8A31301A414F0A21303A214E0A3EB07C0A3EB0F80A3EB1F00A2131E133E +133C137C13785BA2485A485AA2485A48C7FC120E5A5A5A5A5A16647BCA26>I<14F0A280 +5CA70078EC01E000FCEC03F0B4140FD87F80EB1FE0D83FC0EB3FC03A0FF060FF003903F8 +61FC3900FC63F090383F6FC0D90FFFC7FCEB03FCEB00F0EB03FCEB0FFF90383F6FC09038 +FC63F03903F861FC390FF060FF3A3FC0F03FC0D87F80EB1FE0D8FF00EB0FF000FC140300 +78EC01E0C790C7FCA7805CA2242B7ACA31>I<16C04B7EB3AB007FBAFCBB1280A26C1900 +C8D801E0C9FCB3AB6F5A41407BB84C>I<121EEA7F8012FF13C0A213E0A3127FEA1E6012 +00A413E013C0A312011380120313005A1206120E5A5A5A12600B1D78891B>II<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A78891B>I<1618163C167C +A2167816F8A216F01501A216E01503A216C01507A21680150FA2ED1F00A2151E153EA215 +3C157CA2157815F8A25D1401A24A5AA25D1407A25D140FA292C7FC5CA2141E143EA2143C +147CA25CA25C1301A25C1303A25C1307A25C130FA291C8FC5BA2133EA2133C137CA21378 +13F8A25B1201A25B1203A2485AA25B120FA290C9FC5AA2121E123EA2123C127CA2127812 +F8A25A126026647BCA31>I<143014F013011303131F13FFB5FC13E713071200B3B3B049 +7E497E007FB6FCA3204278C131>49 D +I<49B4FC010F13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120E +ED0FF0EA0FE0486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680 +ED7F0015FE4A5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0F +E016F0ED07F816FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713 +FC00701407003015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE +0039007FFFF8010F13E0010190C7FC28447CC131>II<000615C0D807C01307 +01FCEB7F8090B612005D5D5D15E0158026063FFCC7FC90C9FCAE14FF010713C090381F01 +F090383800FC01F0137ED807C07F49EB1F8016C090C7120F000615E0C8EA07F0A316F815 +03A216FCA5123E127F487EA416F890C712075A006015F0A20070140F003015E00038EC1F +C07E001EEC3F806CEC7F006C6C13FE6C6C485A3901F807F039007FFFE0011F90C7FCEB07 +F826447BC131>II<121EEA7F80A2EAFFC0A4EA7F80 +A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2B78AA1B>58 +D<007FBAFCBB1280A26C1900CEFCB0007FBAFCBB1280A26C190041187BA44C>61 +D<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30FFA203707FED607FA203E07FEDC03F +A2020180ED801FA2DA03007F160FA20206801607A24A6D7EA34A6D7EA34A6D7EA2027081 +0260147FA202E08191B7FCA249820280C7121FA249C87F170FA20106821707A2496F7EA3 +496F7EA3496F7EA201788313F8486C83D80FFF03037FB500E0027FEBFFC0A342477DC649 +>65 DI< +DB0FFE146092B500C013E0020314F0913A0FFC01FC0191393FC0003E02FFC7EA0F83D903 +FCEC03C74948EC01E74948EC00FF4948157F4948153F4948151F49C9120F485A49160712 +0348481603A248481601A248481600A2123FA2491760127FA31900485AAE6C7EA21960A2 +123F7FA2001F18E07F000F18C0A26C6C160119806C6C160312016DEE07006C6C16066D6C +150E6D6C5D6D6C5D6D6C15786D6C5D6D6C4A5AD900FFEC0780DA3FC0011FC7FCDA0FFC13 +FC0203B512F0020014C0DB0FFEC8FC3B487BC546>II< +B912F8A3000101C0C7127F6C6C48EC07FC17011700187C183C181CA284A31806A4180704 +067FA395C7FCA4160EA2161E163E16FE91B5FCA3EC8000163E161E160EA21606A319C0A3 +F0018093C7FCA41803A21900A260A260A2181EA2183E187EEF01FE170748486C147FB95A +A33A447CC342>IIIII< +B612F8A3000101E0C9FC6C6C5A5CB3B31830A418701860A518E0A3EF01C0A217031707A2 +170F173F177FEE01FF48486C011F1380B9FCA334447CC33D>76 DIIIIII<49B41303010FEBE007013F13F89039FE00FE0FD801F8 +131FD807E0EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A3 +7E82A27EA26C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15 +C0013F14F0010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F +17E000C0150FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8 +F9F0495AD8F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536 +>I<003FB912F8A3903BF0001FF8001F01806D481303003EC7150048187C0078183CA200 +70181CA30060180CA5481806A5C81600B3B3A54B7EED7FFE49B77EA33F447DC346>III97 DII<167FED3FFFA31501 +8182B3EC7F80903803FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B +000F81485AA2485AA2127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C +6C6C9038077F806C6C010E13C0013F011C13FE90380FC0F8903803FFE09026007F001300 +2F467DC436>IIIIII<143C14FFA24913 +80A46D1300A2143C91C7FCADEC7F80EB3FFFA31300147F143FB3B3AA123E127F39FF807F +00A2147EA25C6C485A383C01F06C485A3807FF80D801FEC7FC195785C21E>IIII<3901FC01FE00FF903807 +FFC091381E07F091383801F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA2 +5BA35BB3A8486CECFF80B5D8F83F13FEA32F2C7DAB36>II<3901FC03FC00FF90380FFF8091383C07E091387001F83A07FDE000FE00 +030180137FD801FFEC3F8091C7EA1FC04915E049140F17F0160717F8160317FCA3EE01FE +ABEE03FCA3EE07F8A217F0160F6D15E0EE1FC06D143F17806EEB7E00D9FDC05B9039FCF0 +03F891383C0FE091381FFF80DA03FCC7FC91C9FCAE487EB512F8A32F3F7DAB36>I<9138 +7F8003903903FFE00790380FE07890393F801C0F90387E000E496D5AD803F8EB039F0007 +EC01BF4914FF48487F121F5B003F81A2485AA348C8FCAB6C7EA3123F7F121F6D5C120F6D +5B12076C6C5B6C6C497E6C6C130E013F131C90380FC0F8903803FFE09038007F0091C7FC +AEEEFF80033F13FEA32F3F7DAB33>I<3903F803F000FFEB1FFCEC3C3EEC707F0007EBE0 +FF3803F9C000015B13FBEC007E153C01FF13005BA45BB3A748B4FCB512FEA3202C7DAB26 +>I<90383FE0183901FFFC383907E01F78390F0003F8001E1301481300007C1478127800 +F81438A21518A27EA27E6C6C13006C7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614 +F0011F13F81300EC0FFC140300C0EB01FE1400157E7E153EA27EA36C143C6C147C15786C +14F86CEB01F039F38003E039F1F00F8039E07FFE0038C00FF01F2E7DAC26>I<1306A513 +0EA4131EA3133E137EA213FE12011207001FB512F0B6FCA2C648C7FCB3A4150CAA017E13 +1C017F1318A26D133890381F8030ECC070903807E0E0903801FFC09038007F001E3E7EBC +26>II +IIII<003FB612E0A290 +38C0003F90C713C0003CEC7F800038ECFF00A20030495A0070495AA24A5A0060495AA24A +5A4A5AA2C7485A4AC7FC5B5C495A13075C495A131F4A1360495A495AA249C712C0485AA2 +485A485A1501485A48481303A24848EB07804848131F00FF14FF90B6FCA2232B7DAA2B> +I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fg cmbx12 17.28 17 +/Fg 17 86 df<19F0F001F8F003FCA3180719F8180FA219F0181F19E0183FA219C0187F +198018FFA219005F601703A260170760170FA260171F60173FA260177F6017FFA295C7FC +5E5F1603A25F16075F160FA25F161F5F163FA25F167F5F16FFA294C8FC5D5E1503A25E15 +075E150FA25E151F5EA2153F5E157FA25E15FF93C9FC5CA25D14035D1407A25D140F5D14 +1FA25D143F5D147FA25D14FF92CAFC5BA25C13035C1307A25C130F5C131FA25C133F5C13 +7FA25C13FF91CBFC5AA25B12035B1207A25B120F5B121FA25B123F5B127FA25B12FF90CC +FCA3127E123C3E9077EB51>47 DI<16F04B7E1507151F153FEC01FF1407147F +010FB5FCB7FCA41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>I<913801FFF8 +021FEBFFC091B612F8010315FF010F16C0013F8290267FFC0114F89027FFE0003F7F4890 +C7000F7F48486E7FD807F86E148048486E14C048486E14E048486F13F001FC17F8486C81 +6D17FC6E80B56C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5DEA01F0CA14FE +A34D13FCA219F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B604C13804C90 +C7FC4C5A4C5A4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F4A5B4A48C8FC +4A5A4A48157E4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD90FC0150749B8 +FC5B5B90B9FC5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92383FFF800203B5 +12FC021FECFF80027F15E049B712F849D9F0077F010F90C76C7ED91FFCEC1FFFD93FF06E +7F494802037F494882717F484980854890C9127FA24884183FA25A80A380806E157F6E5E +14FE6E7E6F4A5A6C14F003FC495B03FF495B6C1580DCE0075B6CDBF80F90C7FC9338FE1F +FE6C9238FF7FF84D5A6D16C06D5E6D4BC8FC6D6F7E6D16E00101826D16FC023F814A8149 +B87E010783498390263FFE3F8190267FFC0F819026FFF003814849C6FC48496D80484913 +1F4890C7000780160148486E1580003F163F49150F007F7014C0491501717E8400FF835B +8484A384A21A80A27F007F1900607F003F606D160F001F606D4C5A6C6D153F6C6D4B5A6C +01F04B5A6C01FC02035B6C01FF021F5B6D9027F001FFFEC7FC6D90B65A010F16F001035E +010093C8FC020F14F8DA007F90C9FC426079DD51>56 DI65 D68 +DI73 +D76 +DII<94381FFFE0 +0407B67E043F15F04BB712FE030FEEFFC0033FD9FC0014F092B500C0010F13FC020349C7 +000113FF4A01F86E6C7F021F496F13E04A01C0030F7F4A496F7F91B5C96C7F0103497013 +FF494970804B834949717F49874949717F49874B8390B586484A717FA24891CB6C7FA248 +1D804A84481DC0A348497214E0A3481DF0A34A85481DF8A5B51CFCB06C1DF8A36E96B5FC +A36C1DF0A46C6D4E14E0A36C1DC06E606C1D80A26C6E4D1400A26C6E4D5BA26C6E4D5BA2 +6D6D4D5B6D636D6D4D5B6F94B5FC6D636D6D4C5C6D6D4C91C7FC6D6E4B5B6D02E0031F5B +023F6D4B13F06E01FC92B55A6E01FF02035C020302C0010F91C8FC020002FC90B512FC03 +3F90B712F0030F17C0030394C9FCDB007F15F804071580DC001F01E0CAFC666677E379> +I83 D<001FBEFCA64849C79126E0000F14 +8002E0180091C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181FA4 +007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>II E +%EndDVIPSBitmapFont +end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%PaperSize: A4 + +%%EndSetup +%%Page: 1 1 +1 0 bop 821 548 a Fg(A)-13 b(TM)53 b(SIMULA)-13 b(TION)54 +b(MODULE)1899 739 y Ff(b)m(y)1503 907 y(So)m(wm)m(y)m(a)33 +b(Manjanatha)941 1074 y(CNR)m(G,)g(Univ)m(ersit)m(y)g(of)f(New)i +(Hampshire,)e(Durham)0 1407 y Fg(1)161 b(08/18/2000)0 +1626 y Ff(This)40 b(\014le)g(con)m(tains)h(the)f(information)d(ab)s +(out)j(the)h(c)m(hanges)g(made)f(in)m(to)g(NS)g(2.1b6)g(to)g(enable)g +(A)-8 b(TM)0 1747 y(sim)m(ulation.)38 b(The)27 b(A)-8 +b(TM)27 b(sim)m(ulator)c(w)m(as)k(added)f(on)g(to)g(NS)g(in)f(order)g +(to)h(aid)f(our)g(researc)m(h)j(on)d(Mapping)0 1867 y(IP)33 +b(Di\013Serv)e(to)h(A)-8 b(TM)32 b(QoS.)g(Therefore,)i(only)d(those)i +(features)g(of)e(A)-8 b(TM)33 b(that)f(w)m(ere)h(required)g(for)e(our)0 +1987 y(researc)m(h)j(w)m(as)g(added.)146 2228 y(These)h(w)m(ere)f(the)f +(features)g(that)f(w)m(ere)i(necessary)h(for)d(our)h(researc)m(h:)119 +2456 y(1.)49 b(An)33 b(in)m(terface)f(to)h(add)f(and)h(delete)g(an)f(A) +-8 b(TM)34 b(PV)m(C)f(on)g(a)f(No)s(de.)119 2660 y(2.)49 +b(A)33 b(PV)m(C)g(database)g(on)g(the)g(No)s(de)f(con\014gured)i(as)f +(an)f(A)-8 b(TM)34 b(switc)m(h.)119 2863 y(3.)49 b(In)33 +b(order)f(to)h(con\014gure)g(a)f(No)s(de)h(as)g(a)f(switc)m(h,)360 +3092 y Fe(\017)48 b Ff(an)37 b(atmconditioner)d(w)m(as)k(added)f(on)g +(to)f(the)h(no)s(de)g(\(basically)d(in)i(b)s(et)m(w)m(een)j(an)d +(incoming)458 3212 y(link)c(and)h(the)g(no)s(de\).)360 +3374 y Fe(\017)48 b Ff(an)33 b(atmsc)m(heduler)g(w)m(as)g(added)h(on)e +(to)g(the)h(outgoing)e(link)h(of)g(the)h(atm)e(switc)m(h.)119 +3602 y(4.)49 b(AAL5)34 b(capabilit)m(y)e(on)i(ev)m(ery)i(no)s(de)f +(acting)e(as)h(an)g(edge.)49 b(\(this)34 b(is)g(not)g(required)h(on)f +(the)g(switc)m(h)244 3723 y(since)f(segmen)m(tation)f(and)h(reassem)m +(bly)g(do)s(es)g(not)f(happ)s(en)h(on)g(the)g(switc)m(h\).)146 +3951 y Fd(Ple)-5 b(ase)35 b(note)g(that)g(this)g(se)-5 +b(ction)34 b(only)h(explains)f(the)h(changes)f(made)g(to)h(the)g(C++)g +(c)-5 b(o)g(de)34 b(under)h(the)0 4071 y(main)k(NS)h(dir)-5 +b(e)g(ctory.)60 b(A)n(l)5 b(l)40 b(the)g(OTcl)f(additions)g(wer)-5 +b(e)39 b(adde)-5 b(d)39 b(on)g(a)h(di\013er)-5 b(ent)39 +b(\014le)h(ns-atm.tcl)f(under)0 4192 y(tcl/lib)34 b(sub)-5 +b(dir)g(e)g(ctory.)45 b(Ple)-5 b(ase)34 b(se)-5 b(e)35 +b(ns-atm.tcl)f(for)h(al)5 b(l)34 b(the)h(OTcl)f(changes.)0 +4721 y Fc(1.1)135 b(Changes)46 b(made)f(to)h(the)f(existing)h(NS)f +(Source:)0 4906 y Ff(The)33 b("atm")d(sub)s(directory)j(under)g(NS)f +(con)m(tains)g(all)e(the)i(new)h(\014les)f(that)g(w)m(ere)h(added)g +(for)e(adding)h(the)0 5026 y(A)-8 b(TM)33 b(sim)m(ulation)d(facilit)m +(y)-8 b(.)0 5255 y Fb(classi\014er.cc/h:)48 b Ff(Classi\014er)23 +b(is)f(the)h(place)g(where)h(the)f(outgoing)f(pac)m(k)m(et)i(from)e(a)g +(No)s(de)h(is)f(con)m(v)m(erted)j(to)244 5375 y(A)-8 +b(TM)30 b(PDU's.)43 b(The)30 b("recv")g(metho)s(d)f(forw)m(ards)h(pac)m +(k)m(et)h(if)d(the)i(next)g(target)f(is)g(IP-based)h(or)f(cell)244 +5495 y(if)g(the)h(next)h(target)f(is)f(A)-8 b(TM)31 b(based.)44 +b(Therefore,)31 b(I)g(added)f(a)g(C++)g(metho)s(d)g("aal5)p +3387 5495 30 4 v 33 w(pro)s(cessing")1926 5797 y(1)p +eop +%%Page: 2 2 +2 1 bop 244 548 a Ff(in)m(to)31 b(the)h(Classi\014er)f(so)h(that)f(a)g +(pac)m(k)m(et)i(can)f(b)s(e)g(segmen)m(ted)g(b)s(efore)g(b)s(eing)f +(sen)m(t)h(to)g(the)f(destina-)244 668 y(tion.)56 b(Note)37 +b(that,)h(if)e(the)h(No)s(de)g(on)g(to)g(whic)m(h)g(the)h(Classi\014er) +f(is)f(attac)m(hed)i(is)f(the)g(destination)244 789 y(no)s(de)k(or)g(A) +-8 b(TM)42 b(Switc)m(h)g(itself,)g(then)g(a)f("recv")h(metho)s(d)e +(that)h(accepts)i(Cells)e(is)f(required)i(on)244 909 +y(the)36 b(Classi\014er.)52 b(If)36 b(the)g(No)s(de)f(turns)i(out)e(to) +g(b)s(e)h(the)g(destination,)f(then)h(Cells)f(are)h(sen)m(t)h(to)e(y)m +(et)244 1029 y(another)e(A)-8 b(TM)33 b(metho)s(d)f(i.e)g(the)h("re)p +1648 1029 30 4 v 35 w(assem)m(bly")g(function.)244 1312 +y(So,)f(Classi\014er)h(needs)h(three)f(di\013eren)m(t)g(functions:)334 +1660 y(1.)48 b(aal5)p 639 1660 V 34 w(segmen)m(tation)334 +1822 y(2.)g(aal5)p 639 1822 V 34 w(reassem)m(bly)334 +1984 y(3.)g(recv)34 b(metho)s(d)e(that)g(accepts)i(Cells.)0 +2213 y Fb(ob)6 b(ject.cc:)49 b Ff(The)32 b("recv")g(metho)s(d)f(that)g +(accepts)h(Cells)f(w)m(as)h(added)g(on)m(to)f(NsOb)5 +b(ject.)44 b(The)33 b("handle")244 2333 y(metho)s(d)f(w)m(as)h(c)m +(hanged)h(to)e(handle)h(cells)e(as)i(w)m(ell.)0 2536 +y Fb(connector.cc/h:)49 b Ff(The)43 b("recv",)i("send")e(and)f("drop")g +(metho)s(ds)g(that)g(accept)h(Cells)f(w)m(ere)h(added)244 +2657 y(on)m(to)32 b(Connector.)0 2860 y Fb(bi-connector.cc/h:)48 +b Ff(added)34 b("recv",sendUp,)h(sendDo)m(wn)f(metho)s(ds)e(with)g(a)h +(Cell)e(*)h(parameter.)0 3064 y Fb(trace.cc:)48 b Ff(I)43 +b(added)g(a)f(new)h(i\))f(recv)h(and)g(ii\))d(format)h(function)h(to)g +(trace)h(Cells.)72 b(This)43 b(co)s(de)f(needs)244 3184 +y(re-atten)m(tion.)73 b(I)43 b(w)m(ould)f(sa)m(y)i(it)d(should)i +(basically)e(b)s(e)i(re-written.)73 b(First,)45 b(of)d(all,)h(I)g(just) +g(put)244 3304 y(it)35 b(righ)m(t)g(no)m(w)h(so)g(that)g(when)h(I)f(ha) +m(v)m(e)h(trace-all)d(enabled,)j(atleast)e(other)h(paths)h(except)g +(for)f(the)244 3425 y(A)-8 b(TM)28 b(path)f(will)e(go)i(through.)42 +b(The)28 b(co)s(de)g(w)m(as)g(an)m(yw)m(a)m(ys)i(v)m(ery)f(messy)f(b)s +(efore)g(b)s(ecause)g(the)g("for-)244 3545 y(mat")36 +b(function)h(is)f(to)s(o)h(long.)56 b(It's)38 b(hard)f(to)g(re-use)h +(it.)57 b(Most)38 b(of)e(the)i(instructions)f(inside)g(can)244 +3665 y(b)s(e)32 b(functionized/metho)s(dized)e(so)i(that)f(new)h(trace) +g(functions)g(can)g(b)s(e)f(easily)g(built)f(using)h(only)244 +3786 y(those)36 b(smaller)d(functions)j(for)f(e.g.)52 +b(\(let)35 b(us)h(sa)m(y)-8 b(,)37 b(w)m(e)g(ha)m(v)m(e)f(one)g(for)f +(\015ags,)i(one)e(for)g(source/dest)244 3906 y(addresses)g(etc.\))44 +b(that)32 b(they)i(require.)244 4188 y(Re:)77 b(A)-8 +b(TM,)50 b(I)g(should)f(\014gure)h(out)f(the)h(trace)g(data)f(required) +h(b)m(y)g(most)f(A)-8 b(TM)50 b(sim)m(ulations)244 4309 +y(and)c(then)h(dump)f(them.)83 b(Righ)m(t)45 b(no)m(w,)51 +b(the)46 b(only)g(sp)s(eci\014c)h(A)-8 b(TM)46 b(stu\013)h(are)f(VPI,)h +(V)m(CI)g(and)244 4429 y(t)m(yp)s(e="atm".)c(Probably)-8 +b(,)32 b(the)h(ECN)g(bit)f(sen)m(t)i(during)e(congestion)g(b)m(y)h(A)-8 +b(TM)34 b(can)e(b)s(e)h(sp)s(eci\014ed)244 4550 y(in)e(place)h(of)g +(the)g(existing)g(FLA)m(GS.)g(Also,)g(a)g(new)h(\015ag)f(for)f(BRM)i +(and)f(FRM)g(cells)f(can)i(b)s(e)f(gen-)244 4670 y(erated.)244 +4952 y(Note)e(:)42 b(I)29 b(ha)m(v)m(e)i(also)e(incorp)s(orated)g(the)h +(DequeT)-8 b(race)31 b(recv)g(metho)s(d.)42 b(This)29 +b(needs)j(mo)s(di\014cation)244 5073 y(as)h(w)m(ell.)0 +5276 y Fb(queue.cc:)50 b Ff(New)33 b(recv,)h(enque)g(and)f(deque)h +(functions)e(for)g(the)h(main)e(queue.)0 5479 y Fb(red.cc:)49 +b Ff(New)33 b(enque)h(and)f(deque)h(functions)1926 5797 +y(2)p eop +%%Page: 3 3 +3 2 bop 0 548 a Fb(droptail.cc:)47 b Ff(New)34 b(enque)g(and)f(deque)h +(functions)0 740 y Fb(cellqueue.cc:)48 b Ff(This)35 b(is)f(a)g(new)i +(queue)g(created)f(in)f(place)g(of)h(the)g(existing)f(P)m(ac)m(k)m +(etQueue)j(class.)50 b(On)244 860 y(NS,)40 b(all)d(the)j(di\013eren)m +(t)g(queueing)g(sc)m(hemes)h(suc)m(h)g(as)f(RED,)f(DropT)-8 +b(ail)37 b(use)k(the)f(P)m(ac)m(k)m(etQueue)244 980 y(metho)s(ds.)85 +b(Basically)-8 b(,)49 b(the)e(enquing)g(and)f(dequing)h(p)s(olicies)e +(are)i(based)g(on)g(pac)m(k)m(ets)i(\(NOT)244 1101 y(b)m(ytes\))34 +b(in)e(these)i(queues.)0 1428 y Fg(2)161 b(08/29/2000)0 +1647 y Ff(As)43 b(of)f(to)s(da)m(y)-8 b(,)46 b(the)d(design)f(of)h(the) +g(AAL5)f(implemen)m(tation)e(is)i(c)m(hanged)i(on)e(the)h(A)-8 +b(TM)44 b(sim)m(ulation)0 1767 y(mo)s(dule.)49 b(As)35 +b(indicated)f(in)g(the)h(ab)s(o)m(v)m(e)g(section,)h(creating)e(a)g +(new)i(Cell)e(structure)i(impacted)e(a)g(lot)f(of)0 1887 +y(mo)s(dules)f(b)s(ecause)i(I)f(had)g(to)g(c)m(hange)h(the)f("recv",)h +("send")f(and)g("drop")g(functions)g(in)f(all)f(the)i(classes)0 +2008 y(that)c(had)h(these)g(functions.)43 b(So,)30 b(I)g(c)m(hanged)g +(the)g(desing)f(en)m(tirely)-8 b(.)42 b(A)30 b(Cell)e(is)h(basically)f +(a)h(pac)m(k)m(et)i(with)0 2128 y(\014xed)j(size.)43 +b(I)33 b(created)h(a)e(structure)i(named)154 2430 y Fa(struct)53 +b(hdr_atm)g({)0 2671 y(.)0 2791 y(.)0 2912 y(.)0 3032 +y(.)0 3152 y(.)0 3393 y(};)146 3695 y Ff(A)m(t)27 b(the)g +(classi\014er,)g(I)g(implemen)m(t)d(the)j("aal5)p 1783 +3695 30 4 v 33 w(pro)s(cessing")g(function)e(whic)m(h)i(basically)e +(calls)g(the)i(seg-)0 3816 y(men)m(tation)g(and)h(reassem)m(bly)h +(functions)f(of)f(the)i(class)f(AAL5.)42 b(In)28 b(the)h(AAL5)f(segmen) +m(tation)f(function,)0 3936 y(I)e(generate)g(n)g(n)m(um)m(b)s(er)g(of)g +(P)m(ac)m(k)m(ets)i(with)e(hdr)p 1685 3936 V 35 w(atm)f(allo)s(cated)f +(in)h(them)g(\()h(basically)e(Cells\).)40 b(F)-8 b(or,)26 +b(ease)f(of)0 4056 y(information)k(analysis)i(in)h(ob)5 +b(jects)33 b(lik)m(e)f(connectors,)h(queues)i(etc.,)e(I)f(ha)m(v)m(e)h +(also)f(allo)s(cated)e(a)i(hdr)p 3692 4056 V 35 w(cmn)0 +4177 y(in)g(all)e(the)j(P)m(ac)m(k)m(et)p 704 4177 V +38 w(Cells)f(that)g(are)h(basically)d(mirroring)g(the)j(hdr)p +2501 4177 V 35 w(cmn)g(of)f(the)h(original)c(pac)m(k)m(et.)0 +4460 y Fc(2.1)135 b(Changes)46 b(made)f(to)h(existing)g(NS)f(Source)0 +4644 y Ff(As)33 b(men)m(tioned)f(in)g(Marc)h(Greiss's)g(tutorial,)d(I)j +(added)g(a)g(\014eld)f(in)m(to)308 4826 y Fa(struct)52 +b(p_info)h({)0 5067 y(.)0 5187 y(.)0 5308 y(.)410 5428 +y(name_[PT_ATM]="atm";)364 b(//ATM)53 b(extension,)h(CNRG,)e(UNH)308 +5548 y(};)1926 5797 y Ff(3)p eop +%%Page: 4 4 +4 3 bop 146 548 a Ff(In)33 b Fd(enum)i(p)-5 b(acket)p +803 548 30 4 v 35 w(t)p Ff(,)33 b(I)g(added)g(the)g(follo)m(wing)d +(line)0 897 y Fa(enum)52 b(packet_t)i({)0 1137 y(.)0 +1258 y(.)0 1378 y(.)0 1499 y(PT_ATM)207 b(//ATM)52 b(extension,)i +(CNRG,)f(UNH)0 1739 y(};)146 2088 y Ff(T)-8 b(o)46 b(the)f +Fd(atm)h(sub)-5 b(dir)g(e)g(ctory)p Ff(,)49 b(I)c(added)h(t)m(w)m(o)g +(new)g(\014les,)i Fd(atm.h/c)-5 b(c)45 b Ff(with)f(a)h +Fd(struct)j(hdr)p 3485 2088 V 35 w(atm)d Ff(that)0 2208 +y(de\014nes)34 b(an)f(A)-8 b(TM)33 b(header.)1926 5797 +y(4)p eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff -urN ns-2.1b9/atm/README.tex ns-allinone-2.1b9/ns-2.1b9/atm/README.tex --- ns-2.1b9/atm/README.tex Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README.tex Fri Jul 12 15:06:41 2002 @@ -0,0 +1,221 @@ +\documentclass[12pt]{article} +\usepackage{psfig} +\usepackage{graphics} +%\setlength{\headheight}{0in} +%\setlength{\headsep}{0in} +\setlength{\textheight}{8.5in} +%\setlength{\footskip}{0in} +%\setlength{\footheight}{0.25in} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\textwidth}{6.5in} +\pagenumbering{arabic} +%\renewcommand{\baselinestretch}{2.0} +\pagestyle{plain} + +\begin{document} + +\begin{center} +{\Large \bf ATM SIMULATION MODULE } \\[3mm] +by\\[2mm] +Sowmya Manjanatha\\[2mm] +CNRG, University of New Hampshire, Durham\\[2mm] +\end{center} + +\section{08/18/2000} + + This file contains the information about the changes made into +NS 2.1b6 to enable ATM simulation. The ATM simulator was added on to +NS in order to aid our research on Mapping IP DiffServ to ATM QoS. +Therefore, only those features of ATM that were required for our research +was added. \\ + + These were the features that were necessary for our research: + +\begin{enumerate} +\item An interface to add and delete an ATM PVC on a Node. +\item A PVC database on the Node configured as an ATM switch. +\item In order to configure a Node as a switch, + +\begin{itemize} + \item an atmconditioner was added on to the node (basically in + between an incoming link and the node). + + \item an atmscheduler was added on to the outgoing link of + the atm switch. \end{itemize} + +\item AAL5 capability on every node acting as an edge. (this is not required on + the switch since segmentation and reassembly does not happen on the switch). + +\end{enumerate} + + {\it Please note that this section only explains the changes made to the C++ +code under the main NS directory. All the OTcl additions were added on a +different file ns-atm.tcl under tcl/lib subdirectory. Please see ns-atm.tcl +for all the OTcl changes. } \\ \\ + +\subsection{Changes made to the existing NS Source:} + + The "atm" subdirectory under NS contains all the new files that were added +for adding the ATM simulation facility. + +\begin{description} +\item [classifier.cc/h:] Classifier is the place where the outgoing packet from a Node + is converted to ATM PDU's. The "recv" method forwards packet + if the next target is IP-based or cell if the next target is + ATM based. Therefore, I added a C++ method "aal5\_processing" + into the Classifier so that a packet can be segmented before + being sent to the destination. Note that, if the Node on + to which the Classifier is attached is the destination node + or ATM Switch itself, then a "recv" method that accepts Cells + is required on the Classifier. If the Node turns out to be + the destination, then Cells are sent to yet another ATM method + i.e the "re\_assembly" function. \\ + + So, Classifier needs three different functions: \\ + + \begin{enumerate} + + \item aal5\_segmentation + \item aal5\_reassembly + \item recv method that accepts Cells. + \end{enumerate} + +\item [object.cc:] The "recv" method that accepts Cells was added onto NsObject. + The "handle" method was changed to handle cells as well. + +\item [connector.cc/h:] The "recv", "send" and "drop" methods that accept + Cells were added onto Connector. + +\item [bi-connector.cc/h:] added "recv",sendUp, sendDown methods with a Cell * parameter. + +\item [trace.cc:]I added a new i) recv and ii) format function to trace Cells. + This code needs re-attention. I would say it should basically + be re-written. First, of all, I just put it right now so that + when I have trace-all enabled, atleast other paths except for + the ATM path will go through. The code was anyways very messy + before because the "format" function is too long. It's hard + to re-use it. Most of the instructions inside can be + functionized/methodized so that new trace functions can be + easily built using only those smaller functions for e.g. + (let us say, we have one for flags, one for source/dest addresses etc.) + that they require. \\ + + Re: ATM, I should figure out the trace data required by most ATM + simulations and then dump them. Right now, the only specific ATM + stuff are VPI, VCI and type="atm". Probably, the ECN bit sent during + congestion by ATM can be specified in place of the existing FLAGS. + Also, a new flag for BRM and FRM cells can be generated. \\ + + Note : I have also incorporated the DequeTrace recv method. This + needs modification as well. + +\item [queue.cc:] New recv, enque and deque functions for the main queue. + +\item [red.cc:] New enque and deque functions + +\item [droptail.cc:] New enque and deque functions + +\item [cellqueue.cc:] This is a new queue created in place of the existing PacketQueue class. + On NS, all the different queueing schemes such as RED, DropTail use + the PacketQueue methods. Basically, the enquing and dequing policies + are based on packets (NOT bytes) in these queues. + + +\end{description} + +\section{08/29/2000} + + As of today, the design of the AAL5 implementation is changed on the ATM simulation +module. As indicated in the above section, creating a new Cell structure impacted a lot of +modules because I had to change the "recv", "send" and "drop" functions in all the classes +that had these functions. So, I changed the desing entirely. A Cell is basically a packet +with fixed size. I created a structure named + +\begin{verbatim} + + struct hdr_atm { + + . + . + . + . + . + + }; + +\end{verbatim} + + At the classifier, I implement the "aal5\_processing" function +which basically calls the segmentation and reassembly functions of the +class AAL5. In the AAL5 segmentation function, I generate n number of +Packets with hdr\_atm allocated in them ( basically Cells). For, ease +of information analysis in objects like connectors, queues etc., I +have also allocated a hdr\_cmn in all the Packet\_Cells that are +basically mirroring the hdr\_cmn of the original packet. + +\subsection{Changes made to existing NS Source} + + As mentioned in Marc Greiss's tutorial, I added a field into + +\begin{verbatim} + struct p_info { + + . + . + . + name_[PT_ATM]="atm"; //ATM extension, CNRG, UNH + }; +\end{verbatim} + + In {\em enum packet\_t}, I added the following line + +\begin{verbatim} + + enum packet_t { + + . + . + . + PT_ATM //ATM extension, CNRG, UNH + + }; + +\end{verbatim} + + + To the {\em atm subdirectory}, I added two new files, {\em atm.h/cc} +with a {\em struct hdr\_atm} that defines an ATM header.\\ + + +\subsubsection{Changes to classifier.cc/h} + +\begin{enumerate} + +\item Added a new function {\em aal5_segmentation} for segmenting all +Packets into ATM PDUs. + +\item Added a new function {\em aal5_reassembly} for reassembling the +incoming ATM PDUs into a frame/packet. + +\item Added a {\em bool atm} flag to indicate atm interface on a node. + +\item Added probes in {\em recv} function to figure out +any different i.e ATM treatment necessary. +\end{enumerate} + +\section{09/07/2000} + +\subsubsection{classifier.cc/h} +Added a new function {\em switching} to switch pvcs if the node on +which the classifier is installed is an atm switch. + + +\end{document} + + + + + + + diff -urN ns-2.1b9/atm/README_user.tex ns-allinone-2.1b9/ns-2.1b9/atm/README_user.tex --- ns-2.1b9/atm/README_user.tex Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README_user.tex Fri Jul 12 15:06:41 2002 @@ -0,0 +1,101 @@ +\documentclass[12pt]{article} +\usepackage{psfig} +\usepackage{graphics} +%\setlength{\headheight}{0in} +%\setlength{\headsep}{0in} +\setlength{\textheight}{8.5in} +%\setlength{\footskip}{0in} +%\setlength{\footheight}{0.25in} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\textwidth}{6.5in} +\pagenumbering{arabic} +%\renewcommand{\baselinestretch}{2.0} +\pagestyle{plain} + +\begin{document} + +\begin{center} +{\Large \bf ATM SIMULATION MODULE } \\[3mm] +by\\[2mm] +Sowmya Manjanatha\\[2mm] +CNRG, University of New Hampshire, Durham\\[2mm] +\end{center} + +\section{Configuration of an ATM Node } + + I followed Sean Murphy's DSNode configuration because that +seemed pretty simple. ATM Node can configured in two ways : + +\begin{description} +\item [Through the basic node on NS:] + + The following are the instructions to configure an ATM Node +using the basic {\em node} structure in NS. + +\begin{verbatim} + + set atms [$ns node] + + #installing ATM condtioner + set conditioner [new AtmConditioner] + $ns atmconditioner $conditioner $source_node $atms + + # adding the ATM scheduler to the outgoing link + $ns atm-duplex-link $atms $dest_node 1.5Mb 0.1ms + +\end{verbatim} + + The ATM scheduler is attached to a simple link structure and this process +is encapsulated in the {\em atm-duplex-link} and the {\em atm-simplex-link} +procedures in ns-atm.tcl. + +\item [Using the ATMNode OTcl structure:] All the functionalities described in the +instruction set of the previous case are encapsulated in the {\em ATMNode} +OTcl class defined in ns-atm.tcl + + You will just have to say: + + set atms [new ATMNode] + +\end{description} + +\section{Configuring end stations} + + The end-stations connected to either end of an ATM switch +(ATMNode) must have an ATM interface and must be able to transmit and +receive ATM PDU's instead of Packets. The conversion from Packets to +ATM PDU's are done by the ATM Adaptation Layer. The ATM simulation +module supports AAL5 layer only. Additionally, the end-stations +should possess the ability to establish and tear down Virtual Circuits +(VCs). ATM supports two different kinds of VCs, Switched Virtual +Circuits (SVC) and Permanent Virtual Circuits (PVC). SVCs are built and +torn down via signaling while PVCs are configured manually. In this +implemenation, only PVCs are supported. The AAL5 implementation on an +end-station is enabled when a PVC is added to it. This is done through +the following instruction + +\begin{verbatim} + + set rxtp [new AtmTrafprm] + + #setting required qos + $rxtp set-cbr 100 0.01 + + set txtp [new AtmTrafprm] + $txtp set-cbr 100 0.01 + + $node add-pvc + +\end{verbatim} + +\end{document} + + + + + + + + + diff -urN ns-2.1b9/atm/README~ ns-allinone-2.1b9/ns-2.1b9/atm/README~ --- ns-2.1b9/atm/README~ Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/README~ Fri Jul 12 15:06:41 2002 @@ -0,0 +1,109 @@ + +-------------------------------------------------------------------------- + ATM SIMULATION MODULE + by + Sowmya Manjanatha + CNRG, University of New Hampshire, Durham +-------------------------------------------------------------------------- + + This file contains the information about the changes made into +NS 2.1b6 to enable ATM simulation. The ATM simulator was added on to +NS in order to aid our research on Mapping IP DiffServ to ATM QoS. +Therefore, only those features of ATM that were required for our research +was added. + + These were the features that were necessary for our research: + +1. An interface to add and delete an ATM PVC on a Node. + +2. A PVC database on the Node configured as an ATM switch. + +3. In order to configure a Node as a switch, + + - an atmconditioner was added on to the node (basically in between + an incoming link and the node). + + - an atmscheduler was added on to the outgoing link of the atm switch. + +4. AAL5 capability on every node acting as an edge. (this is not required on + the switch since segmentation and reassembly does not happen on the switch). + + + Please note that this section only explains the changes made to the C++ +code under the main NS directory. All the OTcl additions were added on a +different file ns-atm.tcl under tcl/lib subdirectory. Please see ns-atm.tcl +for all the OTcl changes. + + The "atm" subdirectory under NS contains all the new files that were added +for adding the ATM simulation facility. + +CHANGES MADE TO THE EXISTING NS CODE: +------------------------------------ + +classifier.cc/h : Classifier is the place where the outgoing packet from a Node + is converted to ATM PDU's. The "recv" method forwards packet + if the next target is IP-based or cell if the next target is + ATM based. Therefore, I added a C++ method "aal5_processing" + into the Classifier so that a packet can be segmented before + being sent to the destination. Note that, if the Node on + to which the Classifier is attached is the destination node + or ATM Switch itself, then a "recv" method that accepts Cells + is required on the Classifier. If the Node turns out to be + the destination, then Cells are sent to yet another ATM method + i.e the "re_assembly" function. + + So, Classifier needs three different functions: + + 1) aal5_segmentation + 2) aal5_reassembly + 3) recv method that accepts Cells. + + +object.cc/h : The "recv" method that accepts Cells was added onto NsObject. + The "handle" method was changed to handle cells as well. + +connector.cc/h : The "recv", "send" and "drop" methods that accept + Cells were added onto Connector. + +bi-connector.cc/h : added "recv",sendUp, sendDown methods with a Cell * parameter. + +trace.cc : I added a new i) recv and ii) format function to trace Cells. + This code needs re-attention. I would say it should basically + be re-written. First, of all, I just put it right now so that + when I have trace-all enabled, atleast other paths except for + the ATM path will go through. The code was anyways very messy + before because the "format" function is too long. It's hard + to re-use it. Most of the instructions inside can be + functionized/methodized so that new trace functions can be + easily built using only those smaller functions for e.g. + (let us say, we have one for flags, one for source/dest addresses etc.) + that they require. + + Re: ATM, I should figure out the trace data required by most ATM + simulations and then dump them. Right now, the only specific ATM + stuff are VPI, VCI and type="atm". Probably, the ECN bit sent during + congestion by ATM can be specified in place of the existing FLAGS. + Also, a new flag for BRM and FRM cells can be generated. + + Note : I have also incorporated the DequeTrace recv method. This + needs modification as well. + +queue.cc : New recv, enque and deque functions for the main queue. + +red.cc : New enque and deque functions + +droptail.cc : New enque and deque functions + +cellqueue.cc : This is a new queue created in place of the existing PacketQueue class. + On NS, all the different queueing schemes such as RED, DropTail use + the PacketQueue methods. Basically, the enquing and dequing policies + are based on packets (NOT bytes) in these queues. + + + + + + + + + diff -urN ns-2.1b9/atm/aal.cc ns-allinone-2.1b9/ns-2.1b9/atm/aal.cc --- ns-2.1b9/atm/aal.cc Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/aal.cc Fri Jul 12 16:22:13 2002 @@ -0,0 +1,294 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 2000 Regents of the University of New Hampshire. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/cell.h,v 1.0 2000/08/15 10:37 sow Exp $ + * + * Contributed by Sowmya Manjanatha, Dept. of Computer Science, UNH, August 2000 + */ + +#include "aal.h" +#include "ip.h" +#include +#include +#include + +static class AAL5Class : public TclClass { +public: + AAL5Class() : TclClass("AAL5") {} + TclObject* create(int, const char*const*) { + return (new AAL5()); + + } +} class_aal5; + + + +Packet **AAL5::segment(Packet *p) { + + int size = hdr_cmn::access(p)->size_ + 8; + + aal_uid = 0; + int x = size % 48; + size += (48 - x); + + reassembly->tx_cell_cnt = size/48; + Packet *cell[2000]; + + for (int i = 0; i < reassembly->tx_cell_cnt; i++) { + cell[i] = Packet::alloc(); + hdr_atm *atmh = hdr_atm::access(cell[i]); + atmh->packet = p; + initpkt(cell[i]); + atmh->vpi = reassembly->vpi; + atmh->vci = reassembly->vci; + + strcpy(atmh->switcher_,""); + cell[i]->set_atm(); + + if (i == (reassembly->tx_cell_cnt - 1)) { + atmh->type = LAST_CELL; + } + else + atmh->type = 0; + } + + return cell; + +} + +int AAL5::command(int argc, const char*const* argv) { + + return (TclObject::command(argc,argv)); + +} + +void AAL5::set_parameters(Reassembly *r, string type) { + + reassembly = r; + aal_type_ = type; +} + +void AAL5::initpkt(Packet *p) +{ + // char buffer[20]; + + hdr_cmn* ch = hdr_cmn::access(p); + hdr_atm *atmh = hdr_atm::access(p); + hdr_ip *iph = hdr_ip::access(p); + + hdr_ip *orig = hdr_ip::access(atmh->packet); + + + ch->uid() = aal_uid++; + + ch->ptype() = PT_ATM; + ch->size() = CELLSIZE; + + double local_time = Scheduler::instance().clock(); + + ch->timestamp() = (u_int32_t)(SAMPLERATE * local_time); + ch->iface() = UNKN_IFACE.value(); // from packet.h (agent is local) + ch->direction() = hdr_cmn::NONE; + ch->ref_count() = 0; /* reference count */ + ch->error() = 0; /* pkt not corrupt to start with */ + + //required to find path of simulation + iph->ttl() = 1000000; + iph->saddr() = orig->saddr(); + iph->sport() = orig->sport(); + iph->daddr() = orig->daddr(); + iph->dport() = orig->dport(); + + +} + +void AAL5::increment() { + + reassembly->tx_cell_cnt++; + +} + +void AAL5::rx_increment() { + + reassembly->rx_cell_cnt++; + +} + +bool AAL5::cellcount_matches() { + + if(reassembly->tx_cell_cnt == reassembly->rx_cell_cnt) + return true; + + return false; +} + + +Packet *AAL5::build_frm(Packet *orig) { + + + hdr_atm *temp = hdr_atm::access(orig); + //general elements of an ATM packet (Cell) + Packet *p = Packet::alloc(); + hdr_atm *atmh = hdr_atm::access(p); + atmh->packet = orig; + initpkt(p); + atmh->vpi = reassembly->vpi; + atmh->vci = reassembly->vci; + atmh->type = 6; //indicates RM cell + p->set_atm(); + atmh->packet = temp->packet; + + //parameters specific to FRM cell + + string rm = string("00000001"); //protocol identifier for ABR + + //Message type, length = 1 octet + (rm).append("0"); //DIR = 0 for frm + (rm).append("0"); //cell generated by a source + (rm).append("0"); //CI bit by source + (rm).append("0"); //NI initial + (rm).append("x"); //Req/ACK unused + (rm).append("xxx"); //reserved + + + //ECR + char buf[16]; + sprintf(buf,"%d", reassembly->txtp->pcr); + string s((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + + //CCR + + sprintf(buf,"%d",reassembly->txtp->acr); + s = string((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + + //MCR + + sprintf(buf,"%d",reassembly->txtp->mcr); + s = string((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + // qlength - unused in ABR + s = string(32,'x'); + (rm).append(s); + + //seq # unused in ABR + (rm).append(s); + + //Reserved bits + s = string(246,'x'); + (rm).append(s); + + //CRC + s = string(10,'1'); + (rm).append(s); + + // assign payload + + // printf("atmh->payload = 0x%x, length = %d\n",atmh->payload,(atmh->payload).length()); + + atmh->payload = new string(rm); + //atmh->payload.resize(atmh->payload.length() + rm.length()); + //(atmh->payload).assign(rm); + + return p; + +} + +void AAL5::adjust_source_rate (Packet *rm) { + + hdr_atm *atmh = hdr_atm::access(rm); + + string *s = atmh->payload; + AtmTrafprm *t = reassembly->txtp; + int ecr = atoi((atmh->payload->substr(16,16)).c_str()); + + + if ((s->at(10) == '0') && (s->at(11) == '0')) { + double temp = min((double)t->pcr, t->acr + (t->rif * t->pcr)); + double temp1 = min((double)ecr,temp); + t->acr = (int)(max((double)t->mcr, temp1)); + } + + else if ((s->at(10) == '1') && (s->at(11) == '0')) + t->acr = max(t->mcr, (int)min((double)ecr,t->acr * (1 - t->rdf))); + + else if ((s->at(10) == '0') && (s->at(11) == '1')) + t->acr = max(t->mcr, min(ecr,t->acr)); + + else if ((s->at(10) == '1') && (s->at(11) == '1')) + t->acr = max(t->mcr,(int)min((double)ecr,t->acr * (1 - t->rdf))); +} + + +int AAL5::allowable_cell_cnt() { + + Tcl &tcl = Tcl::instance(); + + AtmTrafprm *t = reassembly->txtp; + double pt = prev_time; + double curr_time = Scheduler::instance().clock(); + + if (prev_time > curr_time) + tcl.resultf("Scheduler is running backwards in time\n"); + + prev_time = curr_time; + return (int)((curr_time - pt) * t->acr); +} + +void AAL5::reverse_addresses_for_brm(Packet *p) { + + + hdr_ip *iph = hdr_ip::access(p); + hdr_ip *orig = iph; + + printf("AAL5::src = %d, dst = %d\n", iph->saddr(),iph->daddr()); + + int temp_addr = orig->saddr(); + int temp_port = orig->sport(); + + iph->saddr() = orig->daddr(); + iph->sport() = orig->dport(); + iph->daddr() = temp_addr; + iph->dport() = temp_port; + + printf("AAL5::new src = %d, new dst = %d\n", iph->saddr(),iph->daddr()); +} + + diff -urN ns-2.1b9/atm/aal.cc~ ns-allinone-2.1b9/ns-2.1b9/atm/aal.cc~ --- ns-2.1b9/atm/aal.cc~ Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/aal.cc~ Fri Jul 12 15:06:41 2002 @@ -0,0 +1,294 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 2000 Regents of the University of New Hampshire. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/cell.h,v 1.0 2000/08/15 10:37 sow Exp $ + * + * Contributed by Sowmya Manjanatha, Dept. of Computer Science, UNH, August 2000 + */ + +#include "aal.h" +#include "ip.h" +#include +#include +#include + +static class AAL5Class : public TclClass { +public: + AAL5Class() : TclClass("AAL5") {} + TclObject* create(int, const char*const*) { + return (new AAL5()); + + } +} class_aal5; + + + +Packet **AAL5::segment(Packet *p) { + + int size = hdr_cmn::access(p)->size_ + 8; + + aal_uid = 0; + int x = size % 48; + size += (48 - x); + + reassembly->tx_cell_cnt = size/48; + Packet *cell[2000]; + + for (int i = 0; i < reassembly->tx_cell_cnt; i++) { + cell[i] = Packet::alloc(); + hdr_atm *atmh = hdr_atm::access(cell[i]); + atmh->packet = p; + initpkt(cell[i]); + atmh->vpi = reassembly->vpi; + atmh->vci = reassembly->vci; + + strcpy(atmh->switcher_,""); + cell[i]->set_atm(); + + if (i == (reassembly->tx_cell_cnt - 1)) { + atmh->type = LAST_CELL; + } + else + atmh->type = 0; + } + + return cell; + +} + +int AAL5::command(int argc, const char*const* argv) { + + return (TclObject::command(argc,argv)); + +} + +void AAL5::set_parameters(Reassembly *r, string type) { + + reassembly = r; + aal_type_ = type; +} + +void AAL5::initpkt(Packet *p) +{ + char buffer[20]; + + hdr_cmn* ch = hdr_cmn::access(p); + hdr_atm *atmh = hdr_atm::access(p); + hdr_ip *iph = hdr_ip::access(p); + + hdr_ip *orig = hdr_ip::access(atmh->packet); + + + ch->uid() = aal_uid++; + + ch->ptype() = PT_ATM; + ch->size() = CELLSIZE; + + double local_time = Scheduler::instance().clock(); + + ch->timestamp() = (u_int32_t)(SAMPLERATE * local_time); + ch->iface() = UNKN_IFACE.value(); // from packet.h (agent is local) + ch->direction() = hdr_cmn::NONE; + ch->ref_count() = 0; /* reference count */ + ch->error() = 0; /* pkt not corrupt to start with */ + + //required to find path of simulation + iph->ttl() = 1000000; + iph->saddr() = orig->saddr(); + iph->sport() = orig->sport(); + iph->daddr() = orig->daddr(); + iph->dport() = orig->dport(); + + +} + +void AAL5::increment() { + + reassembly->tx_cell_cnt++; + +} + +void AAL5::rx_increment() { + + reassembly->rx_cell_cnt++; + +} + +bool AAL5::cellcount_matches() { + + if(reassembly->tx_cell_cnt == reassembly->rx_cell_cnt) + return true; + + return false; +} + + +Packet *AAL5::build_frm(Packet *orig) { + + + hdr_atm *temp = hdr_atm::access(orig); + //general elements of an ATM packet (Cell) + Packet *p = Packet::alloc(); + hdr_atm *atmh = hdr_atm::access(p); + atmh->packet = orig; + initpkt(p); + atmh->vpi = reassembly->vpi; + atmh->vci = reassembly->vci; + atmh->type = 6; //indicates RM cell + p->set_atm(); + atmh->packet = temp->packet; + + //parameters specific to FRM cell + + string rm = string("00000001"); //protocol identifier for ABR + + //Message type, length = 1 octet + (rm).append("0"); //DIR = 0 for frm + (rm).append("0"); //cell generated by a source + (rm).append("0"); //CI bit by source + (rm).append("0"); //NI initial + (rm).append("x"); //Req/ACK unused + (rm).append("xxx"); //reserved + + + //ECR + char buf[16]; + sprintf(buf,"%d", reassembly->txtp->pcr); + string s((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + + //CCR + + sprintf(buf,"%d",reassembly->txtp->acr); + s = string((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + + //MCR + + sprintf(buf,"%d",reassembly->txtp->mcr); + s = string((16 - strlen(buf)),'0'); + (rm).append(s); + (rm).append(buf); + + // qlength - unused in ABR + s = string(32,'x'); + (rm).append(s); + + //seq # unused in ABR + (rm).append(s); + + //Reserved bits + s = string(246,'x'); + (rm).append(s); + + //CRC + s = string(10,'1'); + (rm).append(s); + + // assign payload + + // printf("atmh->payload = 0x%x, length = %d\n",atmh->payload,(atmh->payload).length()); + + atmh->payload = new string(rm); + //atmh->payload.resize(atmh->payload.length() + rm.length()); + //(atmh->payload).assign(rm); + + return p; + +} + +void AAL5::adjust_source_rate (Packet *rm) { + + hdr_atm *atmh = hdr_atm::access(rm); + + string *s = atmh->payload; + AtmTrafprm *t = reassembly->txtp; + int ecr = atoi((atmh->payload->substr(16,16)).c_str()); + + + if ((s->at(10) == '0') && (s->at(11) == '0')) { + double temp = min((double)t->pcr, t->acr + (t->rif * t->pcr)); + double temp1 = min((double)ecr,temp); + t->acr = (int)(max((double)t->mcr, temp1)); + } + + else if ((s->at(10) == '1') && (s->at(11) == '0')) + t->acr = max(t->mcr, (int)min((double)ecr,t->acr * (1 - t->rdf))); + + else if ((s->at(10) == '0') && (s->at(11) == '1')) + t->acr = max(t->mcr, min(ecr,t->acr)); + + else if ((s->at(10) == '1') && (s->at(11) == '1')) + t->acr = max(t->mcr,(int)min((double)ecr,t->acr * (1 - t->rdf))); +} + + +int AAL5::allowable_cell_cnt() { + + Tcl &tcl = Tcl::instance(); + + AtmTrafprm *t = reassembly->txtp; + double pt = prev_time; + double curr_time = Scheduler::instance().clock(); + + if (prev_time > curr_time) + tcl.resultf("Scheduler is running backwards in time\n"); + + prev_time = curr_time; + return (int)((curr_time - pt) * t->acr); +} + +void AAL5::reverse_addresses_for_brm(Packet *p) { + + + hdr_ip *iph = hdr_ip::access(p); + hdr_ip *orig = iph; + + printf("AAL5::src = %d, dst = %d\n", iph->saddr(),iph->daddr()); + + int temp_addr = orig->saddr(); + int temp_port = orig->sport(); + + iph->saddr() = orig->daddr(); + iph->sport() = orig->dport(); + iph->daddr() = temp_addr; + iph->dport() = temp_port; + + printf("AAL5::new src = %d, new dst = %d\n", iph->saddr(),iph->daddr()); +} + + diff -urN ns-2.1b9/atm/aal.h ns-allinone-2.1b9/ns-2.1b9/atm/aal.h --- ns-2.1b9/atm/aal.h Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/aal.h Fri Jul 12 16:14:26 2002 @@ -0,0 +1,105 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 2000 Regents of the University of New Hampshire. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/cell.h,v 1.0 2000/07/22 22:46 sow Exp $ + * + * Contributed by Sowmya Manjanatha, Dept. of Computer Science, UNH, July 2000 + */ + +#ifndef __aal_h__ +#define __aal_h__ + +#include "agent.h" +#include "packet.h" +#include "atm.h" +#include "atmqos.h" +#include +#include +#include +// #include "general.h" + +#define SAMPLERATE 8000 + +class AAL5 : public TclObject { + +public: + AAL5() : prev_time(0.0), aal_uid(0) {reassembly = new Reassembly;} + ~AAL5() { delete reassembly; } + Packet **segment(Packet *p); + void initpkt(Packet *p); + void set_parameters(Reassembly *r,string); + // int is_member(int,int); + void increment(); + void rx_increment(); + bool cellcount_matches(); + Reassembly get_reassembly() { return *reassembly; } + Packet *build_frm(Packet *); // ABR only + void adjust_source_rate(Packet *); // ABR only + vector get_abr_buffer() { return abr_buffer; } + int allowable_cell_cnt(); + void store_in_abr_buffer(Packet *p) { abr_buffer.push_back(p); } + void set_efci() { efci = true; } + bool get_efci() { return efci; } + void reverse_addresses_for_brm(Packet *); + string aal_type() { return aal_type_;} + int abr_buffer_size() { return abr_buffer.size(); } + Packet *pop_abr() { + Packet *p; + + if (abr_buffer.size() > 0) { + p = (Packet *)(*abr_buffer.begin()); + abr_buffer.erase(abr_buffer.begin()); + return p; + } + + return (Packet *)NULL; + } + +protected: + int command(int argc, const char*const* argv); + +private: + Reassembly *reassembly; + double prev_time; + vector abr_buffer; + bool efci; + int aal_uid; + string aal_type_; + +}; + + +#endif + + + diff -urN ns-2.1b9/atm/atm.cc ns-allinone-2.1b9/ns-2.1b9/atm/atm.cc --- ns-2.1b9/atm/atm.cc Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/atm.cc Fri Jul 12 15:06:41 2002 @@ -0,0 +1,70 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 2000 Regents of the University of New Hampshire. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/cell.h,v 1.0 2000/08/28 07:19 sow Exp $ + * + * Contributed by Sowmya Manjanatha, CNRG, University of New Hampshire, August 2000 + */ + +#include +#include "atm.h" + + +int hdr_atm::offset_; + +static class ATMHeaderClass : public PacketHeaderClass { +public: + ATMHeaderClass() : PacketHeaderClass("PacketHeader/ATM", + sizeof(hdr_atm)) { + bind_offset(&hdr_atm::offset_); + } +} class_atmhdr; + + + + + + + + + + + + + + + + + + + diff -urN ns-2.1b9/atm/atm.h ns-allinone-2.1b9/ns-2.1b9/atm/atm.h --- ns-2.1b9/atm/atm.h Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/atm.h Fri Jul 12 15:06:41 2002 @@ -0,0 +1,88 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ +/* + * Copyright (c) 2000 Regents of the University of New Hampshire. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/cell.h,v 1.0 2000/08/28 07:14 sow Exp $ + * + * Contributed by Sowmya Manjanatha, CNRG, University of New Hampshire, August 2000 + */ + +#ifndef __atm_h__ +#define __atm_h__ + +#include +#include "config.h" +#include "packet.h" +#include "general.h" + +#define CELLSIZE 53 +#define BYTE 8 +#define EFCI 2 +#define EFCI_LAST_CELL 3 +#define EFCI_LAST_UNKNOWN 7 +#define EFCI_FIVE 5 +#define LAST_CELL 1 +#define ATM_NONE 0 +#define ATM_FOUR 4 +#define ATM_RM 6 + + +struct hdr_atm { + int gfc; + int vpi; + int vci; + int type; + bool clp; + int hec; + string *payload; + + static int offset_; + inline static int &offset() { return offset_; } + inline static hdr_atm* access(Packet *p) { + return (hdr_atm*) p->access(offset_); + } + + Packet *packet; /* packet before segmentation */ + + Packet *get_packet() { return packet; } /* original packet : before segmentation */ + void set_packet(Packet *p) { packet = p;} + char switcher_[20]; +}; + +#endif + + + + + + + diff -urN ns-2.1b9/atm/atmconditioner.cc ns-allinone-2.1b9/ns-2.1b9/atm/atmconditioner.cc --- ns-2.1b9/atm/atmconditioner.cc Wed Dec 31 19:00:00 1969 +++ ns-allinone-2.1b9/ns-2.1b9/atm/atmconditioner.cc Fri Jul 12 15:06:41 2002 @@ -0,0 +1,636 @@ +/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ + +/* + * Copyright (c) 1999 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the MASH Research + * Group at the University of California Berkeley. + * 4. Neither the name of the University nor of the Research Group may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /opt/src/mash/repository/vint/ns-2/atmnode.h,v 1.0 2000/06/19 17:35:09 sow Exp $ + * + * Contributed by Sowmya Manjanatha, Dept. of Computer Science, UNH, August 2000 + */ + +#include "atmconditioner.h" +#include "atmpvc.h" +#include "ip.h" + +static class AtmConditionerClass : public TclClass { +public: + AtmConditionerClass() : TclClass("AtmConditioner") {} + TclObject* create(int, const char*const*) { + return (new AtmConditioner); + + } +} class_atmconditioner; + + +AtmConditioner::AtmConditioner():qos(0),bucketsize(50000),available_bucket(50000),buffer_limit(50000) +{ + bucketlimit = 1000; + + tx_cells = 0; + rx_cells = 0; + drops = 0; + non_cfm = 0; +} + + +int AtmConditioner::command(int argc, const char*const* argv) { + + + if (argc == 2) { + if (strcmp (argv[1], "conditioner_statistics") == 0) { + printf(" %8d %12d %5d %5d \n",rx_cells,tx_cells,drops,non_cfm); + + return TCL_OK; + } + } + + + if (argc == 3) { + + if (strcmp("set-profile",argv[1]) == 0) { + return TCL_OK; + } + + if (strcmp("add-pvc_dbase",argv[1]) == 0) { + pvc_dbase = (pvc_db *) TclObject::lookup(argv[2]); + return TCL_OK; + } + + if (strcmp("total_service_rate_", argv[1]) == 0) { + total_service_rate = atof(argv[2]); + available_service_rate = total_service_rate; + printf("AtmConditioner::cac, avail service rate = %e\n", available_service_rate); + + if(total_service_rate < 0) + return TCL_ERROR; + return TCL_OK; + } + } + + return (Connector::command(argc,argv)); +} + +/* This is where the cell first enters into the ATM Network. + Well, this is because the traffic entering is conditioned + upfront given to the fact that the AtmConditioner is installed + between a link and a node. */ + + +void AtmConditioner::recv(Packet *p, Handler *h) { + + int idx; + + /* Here I follow a strict allocation procedure. + If traffic is conforming, I allocate, else I drop */ + + hdr_atm *atmh = hdr_atm::access(p); + + AtmQos *qos = classify(p); + + rx_cells++; + + if (qos == NULL) { + printf("AtmConditioner :: qos is NULL, dropping packet\n"); + drops++; + drop(p); + } + + + else + { + switch (qos->get_rxtp()->traffic_class) { + + case CBR: + case rt_VBR: + case nrt_VBR: + // store_cell(p); + usage_parameter_control(p,h); + + break; + case GFR: + gfr_upc(p,h); + case ABR: + case UBR: + // traffic_shaping(p,h,(double)1/bucketrate); + + // printf("AtmConditioner:: sending packet to target, vpi/vci = %d/%d, type = %d\n",atmh->vpi,atmh->vci,atmh->type); + tx_cells++; + target_->recv(p,h); + break; + } + + } +} + +/* here again, I haven't worried about incoming PVC or rxtps. + I haven't the slightest idea where to find information re: + their significance. */ + +void AtmConditioner::usage_parameter_control(Packet *p,Handler *h) { + + Tcl &tcl = Tcl::instance(); + double T; + bool conforms; + int type; + + AtmQos *qos = classify(p); + + if (qos == NULL) { + drops++; + drop(p); + return; + } + + type = qos->get_rxtp()->traffic_class; + + + switch (type) { + + case CBR: + { + int pcr = qos->get_rxtp()->pcr; + T = (double) (1.0/(double)pcr); + + conforms = gcra(T,qos->get_rxtp()->cdvt, qos); + upc_helper(conforms,p,h); + + } + break; + + case rt_VBR: + case nrt_VBR: + { + double Ts = (double)(1.0/(double)(qos->get_rxtp()->scr)); + T = (double) (1.0/(double)(qos->get_rxtp()->pcr)); + double tau_s = qos->get_rxtp()->cdvt; + int mbs = qos->get_rxtp()->mbs; + + double tau = (mbs - 1)*(Ts - T); + conforms = gcra(Ts,(tau+tau_s),qos); + upc_helper(conforms,p,h); + } + break; + default: + tcl.resultf("invalid service category %d\n",type); + break; + + + } + + +} + +bool AtmConditioner::gcra(double T, double tau, AtmQos *qos) { + + + double tat = qos->get_rxtp()->tat; + + /* the first cell on the connection */ + if (tat == -1) { + qos->get_rxtp()->tat = Scheduler::instance().clock() + T; + return true; + } + + double temp = Scheduler::instance().clock(); + + + /* conforming */ + if (temp >= tat) { + qos->get_rxtp()->tat += T; + return true; + } + + else if ((temp < tat) && (tat <= (temp+tau))) { + qos->get_rxtp()->tat = temp+T; + return true; + } + + else if (temp < (tat - tau)) { + non_cfm++; + return false; + } + + return false; +} + + + + +/* iat stands for interarrival time */ +// void AtmConditioner::traffic_shaping(Packet *p, Handler *h, double iat) { + +// update_tokens(iat); + + /* actual shaping function */ + + /* if the bucketsize > 0 and buffer is not empty, + the bucket must have been updated in this run of + traffic shaping function */ + +// if (bucketsize > 0) { + +/* if (buffer.size() > 0) { + + do { + bucketsize--; + printf("AtmConditioner: %s sending packet to target\n",name()); + target_->recv(buffer.front(),h); + } while ((buffer.size() > 0) && (bucketsize > 0)); + + } */ + /* sufficient time to collect another token might + have elapsed after the while loop */ + +/* if (bucketsize > 0) { + printf("AtmConditioner: %s sending packet to target\n",name()); + target_->recv(p,h); + bucketsize--; + } else { + if (buffer_limit >= buffer.size()) + { + printf("AtmConditioner::dropping, time = %e\n", Scheduler::instance().clock()); + drop(p); + } + else + buffer.push_back(p); + } + + } + + else { + + if (buffer_limit >= buffer.size()) { + printf("AtmConditioner::dropping packet, time = %e\n", Scheduler::instance().clock()); + drop(p); + } + else + buffer.push_back(p); + } + + } */ + +/* connection admission control */ +bool AtmConditioner::cac(path pth, int linknum) { + + AtmTrafprm *txtp = pth.outgoing