NED File src/inet/applications/generic/IpvxTrafSink.ned
Name | Type | Description |
---|---|---|
IpvxTrafSink | simple module |
Consumes and prints packets received from the IP module. Compatible with both Ipv4 and Ipv6. |
Source code
// // Copyright (C) 2004 Andras Varga // Copyright (C) 2000 Institut fuer Telematik, Universitaet Karlsruhe // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, see <http://www.gnu.org/licenses/>. // package inet.applications.generic; // // Consumes and prints packets received from the IP module. // Compatible with both ~Ipv4 and ~Ipv6. // simple IpvxTrafSink like IIpvxTrafficGenerator { parameters: int protocol; // value for IPv4, IPv6 protocol field, accepts only between 143 and 254 @lifecycleSupport; @display("i=block/sink"); @signal[packetReceived](type=inet::Packet); @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none); gates: input ipIn @labels(Ipv4ControlInfo/up,Ipv6ControlInfo/up); output ipOut @labels(Ipv4ControlInfo/down,Ipv6ControlInfo/down); }