File src/tcpipmodel/BSDRouter.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.
//


import
    "BSDStack";

//
// Represents a router with a BSD network stack.
//
module BSDRouter
    gates:
        out: out[];
        in: in[];
    submodules:
        bsdstack: BSDStack;
            gatesizes:
                out[sizeof(out)],
                in[sizeof(in)];
            display: "p=83,72;i=block/layer";
    connections nocheck:
        for i=0..sizeof(out)-1 do
            in[i] --> bsdstack.in[i] display "m=s";
            out[i] <-- bsdstack.out[i] display "m=s";
        endfor;
endmodule