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


//
// Encapsulates the BSD TCP/IP stack.
//
// You can use the stack via a special socket interface.
// This interface resembles a normal socket interface but
// is based on OMNeT++ messages, i.e. instead of function
// calls you have to use a corresponding message, e.g.
// Socket_socket, Socket_bind, Socket_listen, Socket_close,
// Socket_accept, Socket_connect, Socket_recv and Socket_select.
//
// Module parameters (use "auto" for defaults):
//
// ip:
//  - this assigns the IP address to the interfaces of a host
//    the interface addresses must be separated by white space,
//    each interface can have multiple addresses which
//    must be separated by a comma (no space)
//
// startup:
//  - this parameter sets an offset of the system startup
//    in ticks. Otherwise every host would have exactly the
//    same clocks and timers
//
// bsd_tcprexmtthresh:
//  - how many duplicated ACKs should trigger a retransmit
//
// bsd_log_in_vain:
//  - logs all accepted connections
//
// bsd_blackhole:
//  - determines whether a RST packet should be sent if a
//    connection is not accepted
//
// bsd_tcp_delack_enabled:
//  - activates delayed ACKs (generate ACKs for every 2nd segment)
//
// bsd_drop_synfin:
// - drop TCP packets with SYN+FIN set
//
// bsd_tcp_do_rfc3042:
//  - activates limited transmit option according to RFC 3042
//
// bsd_tcp_do_rfc3390:
//  - activates increasing the initial window size according to RFC 3390
//    (approx. to 4k bytes)
//
// bsd_path_mtu_discovery:
//  - activates MTU-Path-Discovery
//
// bsd_tcp_do_rfc1323:
//  - activates High-Performance TCP extension according to RFC1323
//
// bsd_tcp_do_rfc1644:
//  - activates TCP extensions for transactions (T/TCP) according to RFC1644
//
// bsd_ss_fltsz:
//  - number of packets that are sent at slow start
//
// bsd_ss_fltsz_local:
//  - same as bsd_ss_fltsz but for local networks
//
// bsd_tcp_do_newreno:
//  - activates New Reno algorithm according to RFC 2582
//
// bsd_ipforwarding:
//  - enables forwarding of packets between interfaces (routing),
//    i.e., this turns a host into a router
//
// bsd_ipsendredirects:
//  - send ICMP redirects if required
//
// drop_packet_on_biterror:
//  - if a host receives a packet with the bit error flag set,
//    it is dropped (comparable to a MAC CRC error). This is
//    useful if you have channels with a bit error probability >0
//
// showtraffic:
//  - shows incoming or outgoing traffic on standard output
//    please use the following values:
//    <pre>
//       0 : don't show any traffic
//       1 : outgoing_IP
//       2 : incoming_IP
//       4 : outgoing_ARP
//       8 : incoming_ARP
//      16 : outgoing_ICMP
//      32 : incoming_ICMP
//      64 : outgoing_TCP
//     128 : incoming_TCP
//      85 : outgoing traffic
//     170 : incoming traffic
//     255 : show all traffic
//    </pre>
//
// Example output for TCP packets:
//
// <pre>
// <-Test1.host1[0]   2.040140 [3014837199...3014837199) (0 @0 win 57344 <SYN> MSS 1460 WSF 0 TS 227 0
// ->Test1.host1[0]   2.200873 [1492145195...1492145195) (0 @3014837200 win 57344 <SYN,ACK> MSS 1460 WSF 0 TS 220 227
// </pre>
//
// In order:
//   - <- denotes a transmission event (packet sent from node)
//   - -> denotes a receive event (packet received by node)
//   - module name
//   - simulation time
//   - sequence number (bytes) of contained data
//   - @expected sequence number (ACKed reception of all data up to,
//     but not including this seq no)
//   - win "window size" current window size
//   - <TCP flags>, e.g. SYN, ACK, RST, PUSH and so on
//   - MSS "maximum segment size"
//   - WSF window scaling factor
//   - TS time stamp
//
// Hosts can currently have interfaces of type Ethernet or Point-to-Point.
//
//
simple BSDStack
    parameters:
        route : string,
        ip : string,
        bsd_tcprexmtthresh : string,
        bsd_log_in_vain : string,
        bsd_blackhole : string,
        bsd_tcp_delack_enabled : string,
        bsd_drop_synfin : string,
        bsd_tcp_do_rfc3042 : string,
        bsd_tcp_do_rfc3390 : string,
        bsd_path_mtu_discovery : string,
        bsd_tcp_do_rfc1323 : string,
        bsd_tcp_do_rfc1644 : string,
        bsd_ss_fltsz : string,
        bsd_ss_fltsz_local : string,
        bsd_tcp_do_newreno : string,
        bsd_ipforwarding : string,
        bsd_ipsendredirects : string,
        startup : numeric,
        showtraffic : numeric,
        drop_packet_on_biterror:bool;

    gates:
        out: out[];
        in: in[];
        in: from_app;
        out: to_app;
endsimple