File src/tcpipmodel/FileTransferAppl.ned

Contains:

//
// (C) 2004-2005 by Institute of Telematics, University of Karlsruhe
// (C) 2006 Andras Varga
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//


//
// Application layer; demonstrates how the socket interface can be used
// to talk to BSDStack.
//
// The "dest" parameter (which is a string) specifies connections and traffic
// to be generated. The syntax:
//
// <pre>
// CONNECT <StartTime> <NumPackets> <PacketSize> <DestinationIP> <DestinationPort>
// </pre>
//  - opens TCP connection at simulation time <StartTime> to
//    <DestinationIP>:<DestinationPort>, and sends <NumPacket> packets of
//    size <PacketSize>.
//
// <pre>
// LISTEN <AcceptTime> <NumPackets> <PacketSize> <ListenPort>
// </pre>
//  - at <AcceptTime> it starts to listens for incoming TCP connections
//    at port <ListenPort>, and if a connection is accepted it sends
//    <NumPackets> packets of size <PacketSize>.
//
// The parameter may contain several of such statements concatenated.
//
// Examples:
// <pre>
// **.dest="CONNECT 2 100 1000 192.166.0.2 2000 "
// **.dest="LISTEN 1.5 1 1000 2000 "
// </pre>
//
simple FileTransferAppl
    parameters:
        dest : string; // specifies connections and traffic (see above)
    gates:
        out: out;
        in: in;
endsimple