• Main Page
  • Classes
  • Files
  • File List

/Users/yzchen/ns/ns-allinone-2.33/ns-2.33/apps/sctp_app1.h

00001 /* -*-  Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
00002 /*
00003  * Protocol Engineering Lab, U of Delaware
00004  * Janardhan Iyengar   <iyengar@@cis,udel,edu>
00005  *
00006  * This SCTP test application is a modified version of the telnet code
00007  * developed by the University of California. The original copyright is below.
00008  */
00009 /*
00010  * Copyright (c) 1997 Regents of the University of California.
00011  * All rights reserved.
00012  *
00013  * Redistribution and use in source and binary forms, with or without
00014  * modification, are permitted provided that the following conditions
00015  * are met:
00016  * 1. Redistributions of source code must retain the above copyright
00017  *    notice, this list of conditions and the following disclaimer.
00018  * 2. Redistributions in binary form must reproduce the above copyright
00019  *    notice, this list of conditions and the following disclaimer in the
00020  *    documentation and/or other materials provided with the distribution.
00021  * 3. All advertising materials mentioning features or use of this software
00022  *    must display the following acknowledgement:
00023  *      This product includes software developed by the Daedalus Research
00024  *      Group at the University of California Berkeley.
00025  * 4. Neither the name of the University nor of the Laboratory may be used
00026  *    to endorse or promote products derived from this software without
00027  *    specific prior written permission.
00028  *
00029  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00030  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00031  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00032  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00033  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00034  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00035  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00036  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00037  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00038  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00039  * SUCH DAMAGE.
00040  *
00041  */
00042 #ifndef ns_sctp_app1_h
00043 #define ns_sctp_app1_h
00044 
00045 #include "timer-handler.h"
00046 #include "app.h"
00047 
00048 class SctpAgent;
00049 class SctpApp1;
00050 
00051 class SctpApp1Timer : public TimerHandler {
00052  public:
00053         SctpApp1Timer(SctpApp1* t) : TimerHandler(), t_(t) {}
00054         inline virtual void expire(Event*);
00055  protected:
00056         SctpApp1* t_;
00057 };
00058 
00059 
00060 class SctpApp1 : public Application {
00061  public:
00062         SctpApp1();
00063         void timeout();
00064  protected:
00065         void start();
00066         void stop();
00067         inline double next();
00068 
00069         int running_;
00070         SctpApp1Timer timer_;
00071 
00072         /* tcl bindable variables
00073          */
00074         double interval_;
00075         int numUnreliable;
00076         int numStreams;
00077         int reliability;
00078 };
00079 
00080 #endif

Generated on Tue Aug 10 2010 16:16:06 for ns-2.33 by  doxygen 1.7.1