|
INET Framework for OMNeT++/OMNEST
|
Interface entry for the interface table in IInterfaceTable.
More...
#include <NetworkInterface.h>
|
| enum | State { UP,
DOWN,
GOING_UP,
GOING_DOWN
} |
| |
| enum | {
F_CARRIER,
F_STATE,
F_NAME,
F_NODE_IN_GATEID,
F_NODE_OUT_GATEID,
F_NETW_GATEIDX,
F_LOOPBACK,
F_BROADCAST,
F_MULTICAST,
F_POINTTOPOINT,
F_DATARATE,
F_MTU,
F_MACADDRESS,
F_TOKEN,
F_IPV4_DATA,
F_IPV6_DATA,
F_NEXTHOP_DATA,
F_ISIS_DATA,
F_TRILL_DATA,
F_IEEE8021D_DATA,
F_CLNS_DATA
} |
| |
|
| virtual void | setInterfaceId (int id) |
| |
| virtual void | resetInterface () |
| |
| | NetworkInterface () |
| |
| virtual | ~NetworkInterface () |
| |
| virtual std::string | str () const override |
| |
| virtual std::string | getInterfaceFullPath () const |
| |
| virtual bool | supportsPacketSending (cGate *gate) const override |
| | Returns true if the processor supports sending packets at the given gate. More...
|
| |
| virtual bool | supportsPacketPushing (cGate *gate) const override |
| | Returns true if the processor supports pushing packets at the given gate. More...
|
| |
| virtual bool | supportsPacketPulling (cGate *gate) const override |
| | Returns true if the processor supports pulling packets at the given gate. More...
|
| |
| virtual bool | supportsPacketPassing (cGate *gate) const override |
| | Returns true if the processor supports passing packets as a whole at the given gate. More...
|
| |
| virtual bool | supportsPacketStreaming (cGate *gate) const override |
| | Returns true if the processor supports streaming packets at the given gate. More...
|
| |
| virtual bool | canPushSomePacket (cGate *gate) const override |
| | Returns false if the packet sink is full at the given gate and no more packets can be pushed into it without raising an error. More...
|
| |
| virtual bool | canPushPacket (Packet *packet, cGate *gate) const override |
| | Returns true if the given packet can be pushed at the given gate into the packet sink without raising an error. More...
|
| |
| virtual void | pushPacket (Packet *packet, cGate *gate) override |
| | Pushes the packet into the packet sink at the given gate. More...
|
| |
| virtual void | pushPacketStart (Packet *packet, cGate *gate, bps datarate) override |
| | Starts pushing the packet into the packet sink at the given gate. More...
|
| |
| virtual void | pushPacketEnd (Packet *packet, cGate *gate) override |
| | Ends pushing the packet into the packet sink at the given gate. More...
|
| |
| virtual void | pushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength=b(0)) override |
| | Progresses pushing the packet into the packet sink at the given gate. More...
|
| |
| IInterfaceTable * | getInterfaceTable () const |
| | Returns the IInterfaceTable this interface is in, or nullptr. More...
|
| |
| State | getState () const |
| | Returns the requested state of this interface. More...
|
| |
| cChannel * | getRxTransmissionChannel () |
| |
| cChannel * | getTxTransmissionChannel () |
| |
| bool | isUp () const |
| | Returns the combined state of the carrier and the interface requested state. More...
|
| |
| bool | isDown () const |
| |
| void | setHasModuleIdAddress (bool value) |
| |
| void | setHasModulePathAddress (bool value) |
| |
| const ModuleIdAddress | getModuleIdAddress () const |
| |
| const ModulePathAddress | getModulePathAddress () const |
| |
| const L3Address | getNetworkAddress () const |
| |
| virtual bool | hasNetworkAddress (const L3Address &address) const |
| |
|
| const Protocol * | getProtocol () const |
| |
| int | getInterfaceId () const |
| |
| const char * | getInterfaceName () const |
| |
| int | getNodeOutputGateId () const |
| |
| int | getNodeInputGateId () const |
| |
| int | getMtu () const |
| |
| bool | hasCarrier () const |
| |
| bool | isBroadcast () const |
| |
| bool | isMulticast () const |
| |
| bool | isPointToPoint () const |
| |
| bool | isLoopback () const |
| |
| bool | isWired () const |
| |
| bool | isWireless () const |
| |
| double | getDatarate () const |
| |
| const MacAddress & | getMacAddress () const |
| |
| const InterfaceToken & | getInterfaceToken () const |
| |
|
| virtual void | setProtocol (const Protocol *protocol) |
| |
| virtual void | setInterfaceName (const char *s) |
| |
| virtual void | setNodeOutputGateId (int i) |
| |
| virtual void | setNodeInputGateId (int i) |
| |
| virtual void | setMtu (int m) |
| |
| virtual void | setState (State s) |
| |
| virtual void | setCarrier (bool b) |
| |
| virtual void | setBroadcast (bool b) |
| |
| virtual void | setMulticast (bool b) |
| |
| virtual void | setPointToPoint (bool b) |
| |
| virtual void | setLoopback (bool b) |
| |
| virtual void | setDatarate (double d) |
| |
| virtual void | setMacAddress (const MacAddress &addr) |
| |
| virtual void | setInterfaceToken (const InterfaceToken &t) |
| |
| bool | matchesMacAddress (const MacAddress &address) const |
| |
|
| void | addMulticastMacAddress (const MacAddress &address) |
| |
| void | removeMulticastMacAddress (const MacAddress &address) |
| |
| bool | matchesMulticastMacAddress (const MacAddress &address) const |
| |
|
| int | getNumProtocolData () const |
| | Returns the number of protocol data structures. More...
|
| |
| const InterfaceProtocolData * | getProtocolData (int index) const |
| | Returns the protocol data at the given index. More...
|
| |
| void | clearProtocolDataSet () |
| | Clears the set of protocol data objects. More...
|
| |
| template<typename T > |
| const T * | findProtocolData () const |
| | Returns the protocol data for the provided type or returns nullptr if no such protocol data is found. More...
|
| |
| template<typename T > |
| T * | findProtocolDataForUpdate () |
| | Returns the protocol data for the provided type or returns nullptr if no such protocol data is found. More...
|
| |
| template<typename T > |
| const T * | getProtocolData () const |
| | Returns the protocol data for the provided type or throws an exception if no such protocol data is found. More...
|
| |
| template<typename T > |
| T * | getProtocolDataForUpdate () |
| | Returns the protocol data for the provided type or throws an exception if no such protocol data is found. More...
|
| |
| template<typename T > |
| T * | addProtocolData () |
| | Returns a newly added protocol data for the provided type, or throws an exception if such a protocol data is already present. More...
|
| |
| template<typename T > |
| T * | addProtocolDataIfAbsent () |
| | Returns a newly added protocol data for the provided type if absent, or returns the protocol data that is already present. More...
|
| |
| template<typename T > |
| T * | removeProtocolData () |
| | Removes the protocol data for the provided type, or throws an exception if no such protocol data is found. More...
|
| |
| template<typename T > |
| T * | removeProtocolDataIfPresent () |
| | Removes the protocol data for the provided type if present, or returns nullptr if no such protocol data is found. More...
|
| |
|
| Ipv4Address | getIpv4Address () const |
| |
| Ipv4Address | getIpv4Netmask () const |
| |
| virtual void | joinMulticastGroup (const L3Address &address) |
| |
| virtual void | changeMulticastGroupMembership (const L3Address &multicastAddress, McastSourceFilterMode oldFilterMode, const std::vector< L3Address > &oldSourceList, McastSourceFilterMode newFilterMode, const std::vector< L3Address > &newSourceList) |
| |
|
|
| virtual bool | setEstimateCostProcess (int, MacEstimateCostProcess *p) |
| |
| virtual MacEstimateCostProcess * | getEstimateCostProcess (int) |
| |
| virtual bool | handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override |
| | Perform one stage of a lifecycle operation. More...
|
| |
| virtual void | handleStartOperation (LifecycleOperation *operation) |
| |
| virtual void | handleStopOperation (LifecycleOperation *operation) |
| |
| virtual void | handleCrashOperation (LifecycleOperation *operation) |
| |
| virtual | ~IPacketProcessor () |
| |
| virtual | ~IPassivePacketSink () |
| |
| virtual | ~ILifecycle () |
| |
|
| virtual void | configChanged (int fieldId) |
| |
| virtual void | stateChanged (int fieldId) |
| |
| virtual void | changed (simsignal_t signalID, int fieldId) |
| |
| virtual int | numInitStages () const override |
| |
| virtual void | initialize (int stage) override |
| |
| virtual void | handleParameterChange (const char *name) override |
| |
| virtual void | refreshDisplay () const override |
| |
| virtual void | updateDisplayString () const override |
| |
| virtual const char * | resolveDirective (char directive) const override |
| |
| virtual void | receiveSignal (cComponent *source, simsignal_t signal, cObject *obj, cObject *details) override |
| |
| virtual cGate * | createGateObject (cGate::Type type) override |
| |
| virtual double | computeDatarate () const |
| |
| virtual bool | computeCarrier () const |
| |
| virtual std::string | getFullPath () const override |
| |
| virtual const char * | getName () const override |
| |
| virtual void | arrived (cMessage *message, cGate *gate, const SendOptions &options, simtime_t time) override |
| |
| virtual void | handlePacketProcessed (Packet *packet) |
| |
| virtual void | checkPacketOperationSupport (cGate *gate) const |
| |
| virtual void | checkPacketOperationSupport (cGate *startGate, cGate *endGate) const |
| |
| virtual void | animate (Packet *packet, cGate *gate, const SendOptions &sendOptions, Action action) const |
| |
| virtual void | animatePacket (Packet *packet, cGate *gate, Action action) const |
| |
| virtual void | animatePacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId, Action action) const |
| |
| virtual void | animatePacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions, Action action) const |
| |
| virtual void | animatePacketEnd (Packet *packet, cGate *gate, long transmissionId, Action action) const |
| |
| virtual void | animatePacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions, Action action) const |
| |
| virtual void | animatePacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId, Action action) const |
| |
| virtual void | animatePacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions, Action action) const |
| |
| virtual void | pushOrSendPacket (Packet *packet, cGate *gate, IPassivePacketSink *consumer) |
| |
| virtual void | pushOrSendPacketStart (Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, int transmissionId) |
| |
| virtual void | pushOrSendPacketEnd (Packet *packet, cGate *gate, IPassivePacketSink *consumer, int transmissionId) |
| |
| virtual void | pushOrSendPacketProgress (Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, b position, b extraProcessableLength, int transmissionId) |
| |
| virtual void | animatePush (Packet *packet, cGate *gate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePushPacket (Packet *packet, cGate *gate) const |
| |
| virtual void | animatePushPacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId) const |
| |
| virtual void | animatePushPacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePushPacketEnd (Packet *packet, cGate *gate, long transmissionId) const |
| |
| virtual void | animatePushPacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId) const |
| |
| virtual void | animatePushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions) const |
| |
| virtual void | animatePull (Packet *packet, cGate *gate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePullPacket (Packet *packet, cGate *gate) const |
| |
| virtual void | animatePullPacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId) const |
| |
| virtual void | animatePullPacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePullPacketEnd (Packet *packet, cGate *gate, long transmissionId) const |
| |
| virtual void | animatePullPacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions) const |
| |
| virtual void | animatePullPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId) const |
| |
| virtual void | animatePullPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions) const |
| |
| virtual void | dropPacket (Packet *packet, PacketDropReason reason, int limit=-1) |
| |
Interface entry for the interface table in IInterfaceTable.
- See also
- IInterfaceTable
◆ anonymous enum
| Enumerator |
|---|
| F_CARRIER | |
| F_STATE | |
| F_NAME | |
| F_NODE_IN_GATEID | |
| F_NODE_OUT_GATEID | |
| F_NETW_GATEIDX | |
| F_LOOPBACK | |
| F_BROADCAST | |
| F_MULTICAST | |
| F_POINTTOPOINT | |
| F_DATARATE | |
| F_MTU | |
| F_MACADDRESS | |
| F_TOKEN | |
| F_IPV4_DATA | |
| F_IPV6_DATA | |
| F_NEXTHOP_DATA | |
| F_ISIS_DATA | |
| F_TRILL_DATA | |
| F_IEEE8021D_DATA | |
| F_CLNS_DATA | |
◆ State
| Enumerator |
|---|
| UP | |
| DOWN | |
| GOING_UP | |
| GOING_DOWN | |
◆ NetworkInterface() [1/2]
◆ NetworkInterface() [2/2]
| inet::NetworkInterface::NetworkInterface |
( |
| ) |
|
◆ ~NetworkInterface()
| inet::NetworkInterface::~NetworkInterface |
( |
| ) |
|
|
virtual |
◆ addMulticastMacAddress()
| void inet::NetworkInterface::addMulticastMacAddress |
( |
const MacAddress & |
address | ) |
|
416 throw cRuntimeError(
"Multicast MacAddress already added: '%s'", address.str().c_str());
◆ addProtocolData()
template<typename T >
| T* inet::NetworkInterface::addProtocolData |
( |
| ) |
|
|
inline |
◆ addProtocolDataIfAbsent()
template<typename T >
| T* inet::NetworkInterface::addProtocolDataIfAbsent |
( |
| ) |
|
|
inline |
Returns a newly added protocol data for the provided type if absent, or returns the protocol data that is already present.
341 if (ipd->ownerp !=
this) {
◆ arrived()
| void inet::NetworkInterface::arrived |
( |
cMessage * |
message, |
|
|
cGate * |
gate, |
|
|
const SendOptions & |
options, |
|
|
simtime_t |
time |
|
) |
| |
|
overrideprotectedvirtual |
179 auto packet = check_and_cast<Packet *>(message);
182 cModule::arrived(message, gate, options, time);
◆ canPushPacket()
| virtual bool inet::NetworkInterface::canPushPacket |
( |
Packet * |
packet, |
|
|
cGate * |
gate |
|
) |
| const |
|
inlineoverridevirtual |
Returns true if the given packet can be pushed at the given gate into the packet sink without raising an error.
The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing packets.
Implements inet::queueing::IPassivePacketSink.
◆ canPushSomePacket()
| virtual bool inet::NetworkInterface::canPushSomePacket |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns false if the packet sink is full at the given gate and no more packets can be pushed into it without raising an error.
The gate must be a valid gate of this module and it must support pushing packets.
Implements inet::queueing::IPassivePacketSink.
◆ changed()
| void inet::NetworkInterface::changed |
( |
simsignal_t |
signalID, |
|
|
int |
fieldId |
|
) |
| |
|
protectedvirtual |
◆ changeMulticastGroupMembership()
562 switch (multicastAddress.getType()) {
563 #ifdef INET_WITH_IPv4
565 std::vector<Ipv4Address> oldIPv4SourceList, newIPv4SourceList;
566 toIpv4AddressVector(oldSourceList, oldIPv4SourceList);
567 toIpv4AddressVector(newSourceList, newIPv4SourceList);
568 getProtocolDataForUpdate<Ipv4InterfaceData>()->changeMulticastGroupMembership(multicastAddress.toIpv4(),
569 oldFilterMode, oldIPv4SourceList, newFilterMode, newIPv4SourceList);
573 #endif // ifdef INET_WITH_IPv4
574 #ifdef INET_WITH_IPv6
577 throw cRuntimeError(
"changeMulticastGroupMembership() not implemented for type %s",
L3Address::getTypeName(multicastAddress.getType()));
580 #endif // ifdef INET_WITH_IPv6
585 throw cRuntimeError(
"changeMulticastGroupMembership() not implemented for type %s",
L3Address::getTypeName(multicastAddress.getType()));
589 throw cRuntimeError(
"Unknown address type");
Referenced by inet::Udp::blockMulticastSources(), inet::Udp::joinMulticastSources(), inet::Udp::leaveMulticastGroups(), inet::Udp::leaveMulticastSources(), inet::Udp::setMulticastSourceFilter(), and inet::Udp::unblockMulticastSources().
◆ clearProtocolDataSet()
| void inet::NetworkInterface::clearProtocolDataSet |
( |
| ) |
|
Clears the set of protocol data objects.
97 for (
int i = 0; i < n; i++)
100 for (
int i = 0; i < n; i++)
◆ computeCarrier()
| bool inet::NetworkInterface::computeCarrier |
( |
| ) |
const |
|
protectedvirtual |
◆ computeDatarate()
| double inet::NetworkInterface::computeDatarate |
( |
| ) |
const |
|
protectedvirtual |
334 double moduleDatarate = 0;
335 if (hasPar(
"bitrate"))
336 moduleDatarate = par(
"bitrate");
337 double channelDatarate = 0;
340 if (moduleDatarate != 0 && channelDatarate != 0 && moduleDatarate != channelDatarate)
341 throw cRuntimeError(
"Wired network interface datarate is set on both the network interface module and on the corresponding transmission channel and the two values are different");
342 return moduleDatarate != 0 ? moduleDatarate : channelDatarate;
Referenced by handleParameterChange(), initialize(), and receiveSignal().
◆ configChanged()
| virtual void inet::NetworkInterface::configChanged |
( |
int |
fieldId | ) |
|
|
inlineprotectedvirtual |
◆ createGateObject()
| virtual cGate* inet::NetworkInterface::createGateObject |
( |
cGate::Type |
type | ) |
|
|
inlineoverrideprotectedvirtual |
◆ findProtocolData()
template<typename T >
| const T* inet::NetworkInterface::findProtocolData |
( |
| ) |
const |
|
inline |
Returns the protocol data for the provided type or returns nullptr if no such protocol data is found.
Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::InterfaceTable::collectMulticastGroups(), inet::Ipv4RoutingTable::configureRouterId(), inet::InterfaceTable::findInterfaceByAddress(), inet::PingApp::getAllAddresses(), inet::L3AddressResolver::getInterfaceIpv6Address(), inet::L3AddressResolver::getInterfaceModuleIdAddress(), inet::L3AddressResolver::getInterfaceModulePathAddress(), inet::Ipv6AddressType::getLinkLocalAddress(), inet::Gpsr::getSelfAddress(), inet::GlobalArp::initialize(), inet::Igmpv2::initialize(), inet::ospfv2::Router::isDirectRoute(), inet::StpTester::isForwarding(), inet::Ieee8021dRelay::isForwardingInterface(), inet::ospfv3::Ospfv3Process::isInInterfaceTable(), inet::InterfaceTable::isNeighborAddress(), inet::ospfv3::Ospfv3Area::originateIntraAreaPrefixLSA(), inet::ospfv3::Ospfv3Area::originateNetIntraAreaPrefixLSA(), inet::RoutingTableParser::parseInterfaces(), inet::Icmp::possiblyLocalBroadcast(), inet::sctp::SctpAssociation::processInitArrived(), inet::Ldp::rebuildFecList(), inet::GlobalArp::receiveSignal(), inet::RoutingTableRecorder::recordInterfaceChange(), inet::sctp::SctpAssociation::sendInit(), inet::NextHopRoute::str(), inet::InterfaceTable::updateLinkDisplayString(), inet::Ipv4RoutingTable::updateNetmaskRoutes(), and inet::Ieee8021dRelay::updatePeerAddress().
◆ findProtocolDataForUpdate()
template<typename T >
| T* inet::NetworkInterface::findProtocolDataForUpdate |
( |
| ) |
|
|
inline |
◆ getDatarate()
| double inet::NetworkInterface::getDatarate |
( |
| ) |
const |
|
inline |
◆ getEstimateCostProcess()
514 ASSERT(position >= 0);
◆ getFullPath()
| virtual std::string inet::NetworkInterface::getFullPath |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
179 {
return cModule::getFullPath(); }
◆ getInterfaceFullPath()
| std::string inet::NetworkInterface::getInterfaceFullPath |
( |
| ) |
const |
|
virtual |
Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::assignAddresses(), inet::Ipv4NetworkConfigurator::collectCompatibleInterfaces(), inet::InterfaceTable::discoverConnectingGates(), inet::Ipv4NetworkConfigurator::dumpLinks(), inet::ospfv2::Ospfv2ConfigReader::findMatchingConfig(), inet::NetworkConfiguratorBase::Interface::getFullPath(), inet::L2NetworkConfigurator::InterfaceInfo::getFullPath(), inet::L3NetworkConfiguratorBase::InterfaceInfo::getFullPath(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), inet::Ipv4::preroutingFinish(), and inet::PcapngWriter::writeInterface().
◆ getInterfaceId()
| int inet::NetworkInterface::getInterfaceId |
( |
| ) |
const |
|
inline |
Referenced by inet::PimSm::addNewRouteG(), inet::PimSm::addNewRouteSG(), inet::Ipv6FlatNetworkConfigurator::addOwnAdvPrefixRoutes(), inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::Ipv4::arpResolutionCompleted(), inet::Udp::blockMulticastSources(), inet::InterfaceTable::collectMulticastGroups(), inet::Ipv6FlatNetworkConfigurator::configureAdvPrefixes(), inet::Ipv6RoutingTable::configureInterfaceForIpv6(), inet::xMIPv6::createAndSendBAMessage(), inet::xMIPv6::createAndSendBRRMessage(), inet::xMIPv6::createAndSendBUMessage(), inet::Ipv6NeighbourDiscovery::createAndSendNsPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRaPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRsPacket(), inet::xMIPv6::createBCEntryExpiryTimer(), inet::xMIPv6::createBRRTimer(), inet::xMIPv6::createBULEntryExpiryTimer(), inet::xMIPv6::createBUTimer(), inet::visualizer::Ieee80211OsgVisualizer::createIeee80211Visualization(), inet::visualizer::Ieee80211CanvasVisualizer::createIeee80211Visualization(), inet::visualizer::InterfaceTableOsgVisualizer::createInterfaceVisualization(), inet::visualizer::InterfaceTableCanvasVisualizer::createInterfaceVisualization(), inet::Ipv6NeighbourDiscovery::createRaTimer(), inet::xMIPv6::createTestInitTimer(), inet::xMIPv6::createTokenEntryExpiryTimer(), inet::Ipv4::datagramLocalOut(), inet::NextHopForwarding::decapsulate(), inet::bgp::BgpRouter::decisionProcess(), inet::PacketReceiverBase::decodePacket(), inet::InterfaceTable::deleteInterface(), inet::Ipv6NeighbourDiscovery::determineNextHop(), inet::Ipv6::determineOutputInterface(), inet::Ipv6NeighbourDiscovery::fetchAdvIfEntry(), inet::xMIPv6::fetchBUTransmitIfEntry(), inet::Ipv6NeighbourDiscovery::fetchRdEntry(), inet::Ipv4::forwardMulticastPacket(), inet::Igmpv2::getHostInterfaceData(), inet::Igmpv3::getHostInterfaceData(), inet::visualizer::Ieee80211VisualizerBase::getIeee80211Visualization(), inet::PimDm::getIncomingInterface(), inet::PimSm::getIncomingInterface(), inet::PimInterface::getInterfaceId(), inet::PimNeighbor::getInterfaceId(), inet::Rip::getInterfaceMetric(), inet::visualizer::InterfaceTableVisualizerBase::getInterfaceVisualization(), inet::ospfv2::Router::getPreferredEntry(), inet::Igmpv2::getRouterInterfaceData(), inet::Igmpv3::getRouterInterfaceData(), inet::ospfv2::Router::getRoutesToASBoundaryRouter(), inet::xMIPv6::handleBCExpiry(), inet::xMIPv6::handleBULExpiry(), inet::ospfv2::Ospfv2::handleInterfaceDown(), inet::EthernetCutthroughSource::handleMessage(), inet::Dsdv::handleMessageWhenUp(), inet::MessageDispatcher::handleRegisterInterface(), inet::Dsdv::handleSelfMessage(), inet::Ieee8022LlcSocketIo::handleStartOperation(), inet::xMIPv6::handleTokenExpiry(), inet::ospfv2::Router::hasRouteToASBoundaryRouter(), inet::PimSm::IamDR(), inet::TunLoopbackApp::initialize(), inet::TunnelApp::initialize(), inet::Ipv6RoutingTable::initialize(), inet::Ldp::initialize(), inet::Ipv6NeighbourDiscovery::initiateDad(), inet::Ipv6NeighbourDiscovery::initiateRouterDiscovery(), inet::Udp::joinMulticastSources(), inet::Udp::leaveMulticastSources(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaces6Config(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfacesConfig(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Networks(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcesses6Config(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcessesConfig(), inet::ospfv2::Ospfv2ConfigReader::loadInterfaceParameters(), inet::ospfv2::Ospfv2ConfigReader::loadLoopbackParameters(), inet::PimSm::multicastPacketForwarded(), inet::PimDm::multicastReceiverAdded(), inet::PimSm::multicastReceiverAdded(), inet::PimDm::multicastReceiverRemoved(), inet::PimSm::multicastReceiverRemoved(), inet::ospfv3::Ospfv3Interface::Ospfv3Interface(), inet::Ipv4::preroutingFinish(), inet::Arp::processArpPacket(), inet::PimDm::processAssert(), inet::DhcpServer::processDhcpMessage(), inet::PimDm::processGraftPacket(), inet::eigrp::EigrpIpv4Pdm::processIfaceStateChange(), inet::eigrp::EigrpIpv6Pdm::processIfaceStateChange(), inet::PimSm::processJoinG(), inet::PimSm::processJoinSG(), inet::Mpls::processMplsPacketFromL2(), inet::Ipv6NeighbourDiscovery::processNaPacket(), inet::Ipv6NeighbourDiscovery::processNsWithSpecifiedSrcAddr(), inet::PimSm::processPruneG(), inet::PimSm::processPruneSG(), inet::Ipv6NeighbourDiscovery::processRaForRouterUpdates(), inet::Ipv6NeighbourDiscovery::processRaPrefixInfo(), inet::dymo::Dymo::processRerr(), inet::EthernetCutthroughSource::pushPacketEnd(), inet::Ipv4::reassembleAndDeliverFinish(), inet::eigrp::EigrpIpv6Pdm::receiveSignal(), inet::Gptp::receiveSignal(), inet::Rip::receiveSignal(), inet::Ipv6RoutingTable::receiveSignal(), inet::PimDm::receiveSignal(), inet::Igmpv2::receiveSignal(), inet::PimSm::receiveSignal(), inet::Igmpv3::receiveSignal(), inet::eigrp::EigrpIpv4Pdm::receiveSignal(), inet::PimSm::restartExpiryTimer(), inet::xMIPv6::returningHome(), inet::Ipv4::routeLocalBroadcastPacket(), inet::Ipv6::routePacket(), inet::Ipv4::routeUnicastPacket(), inet::PimDm::rpfInterfaceHasChanged(), inet::Arp::sendArpGratuitous(), inet::Arp::sendArpProbe(), inet::Arp::sendArpRequest(), inet::PimDm::sendAssertPacket(), inet::NextHopForwarding::sendDatagramToOutput(), inet::Ipv6::sendDatagramToOutput(), inet::NetworkProtocolBase::sendDown(), inet::dymo::Dymo::sendDymoPacket(), inet::bgp::BgpSession::sendKeepAliveMessage(), inet::bgp::BgpSession::sendOpenMessage(), inet::EthernetSocket::sendOut(), inet::Ieee8021qSocket::sendOut(), inet::RelayInterfaceSelector::sendPacket(), inet::MacRelayUnitBase::sendPacket(), inet::ospfv3::Ospfv3Process::sendPacket(), inet::Rip::sendPacket(), inet::xMIPv6::sendPeriodicBRR(), inet::PimSm::sendPIMAssert(), inet::PimSm::sendPIMJoin(), inet::PimSm::sendPIMPrune(), inet::PimSm::sendPIMRegisterNull(), inet::PimSm::sendPIMRegisterStop(), inet::Igmpv3::sendQueryToIP(), inet::Igmpv3::sendReportToIP(), inet::Ipv6NeighbourDiscovery::sendSolicitedNa(), inet::xMIPv6::sendTestInit(), inet::Igmpv2::sendToIP(), inet::DhcpServer::sendToUDP(), inet::DhcpClient::sendToUdp(), inet::Ipv6NeighbourDiscovery::sendUnsolicitedNa(), inet::bgp::BgpSession::sendUpdateMessage(), inet::Udp::setMulticastSourceFilter(), inet::UdpSocketIo::setSocketOptions(), inet::UdpBasicApp::setSocketOptions(), inet::Rip::startRIPRouting(), str(), inet::Udp::unblockMulticastSources(), inet::PimDm::unroutableMulticastPacketArrived(), inet::PimSm::unroutableMulticastPacketArrived(), inet::PimSm::updateDesignatedRouterAddress(), and inet::MacRelayUnitBase::updatePeerAddress().
◆ getInterfaceName()
| const char* inet::NetworkInterface::getInterfaceName |
( |
| ) |
const |
|
inline |
Referenced by inet::InterfaceTable::addInterface(), inet::Arp::addressRecognized(), inet::DhcpClient::bindLease(), inet::DhcpClient::chooseInterface(), inet::RsvpTe::commitResv(), inet::Igmpv3::configureInterface(), inet::Gpsr::configureInterfaces(), inet::dymo::Dymo::configureInterfaces(), inet::PimInterfaceTable::createInterface(), inet::InterfaceTable::deleteInterface(), inet::Ipv4::determineOutgoingInterfaceForMulticastDatagram(), inet::Ipv4NetworkConfigurator::dumpConfig(), inet::eigrp::EigrpInterface::EigrpInterface(), inet::MacForwardingTableConfigurator::extendConfiguration(), inet::Ipv4FlatNetworkConfigurator::fillRoutingTables(), inet::Ldp::findInterfaceFromPeerAddr(), inet::ospfv2::Ospfv2ConfigReader::findMatchingConfig(), inet::Ipv4::forwardMulticastPacket(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), getInterfaceFullPath(), inet::Ipv4Route::getInterfaceName(), inet::L3NetworkConfiguratorBase::getWirelessId(), inet::ospfv3::Ospfv3Splitter::handleMessage(), inet::NextHopForwarding::handlePacketFromNetwork(), inet::Ted::initializeTED(), inet::bgp::BgpConfigReader::isInInterfaceTable(), inet::L3NetworkConfiguratorBase::isWirelessInterface(), inet::ospfv2::Ospfv2ConfigReader::loadInterfaceParameters(), inet::ospfv2::Ospfv2ConfigReader::loadLoopbackParameters(), inet::Ldp::locateNextHop(), inet::L3NetworkConfiguratorBase::InterfaceMatcher::matches(), inet::PimSm::multicastReceiverAdded(), inet::PimDm::multicastReceiverRemoved(), inet::PimSm::multicastReceiverRemoved(), inet::Igmpv3::multicastSourceListChanged(), inet::Ipv4::preroutingFinish(), inet::Ipv4RoutingTable::printMulticastRoutingTable(), inet::Ipv4RoutingTable::printRoutingTable(), inet::PimDm::processAssertPacket(), inet::PimDm::processAssertTimer(), inet::PimBase::processHelloPacket(), inet::Igmpv3::processHostGeneralQueryTimer(), inet::Igmpv3::processHostGroupQueryTimer(), inet::Igmpv2::processHostGroupTimer(), inet::PimSm::processJoinG(), inet::PimSm::processJoinSG(), inet::Igmpv2::processLeave(), inet::Igmpv2::processLeaveTimer(), inet::Mpls::processMplsPacketFromL2(), inet::PimSm::processPruneG(), inet::PimSm::processPruneSG(), inet::Igmpv2::processQuery(), inet::Igmpv3::processQuery(), inet::Igmpv2::processQueryTimer(), inet::Ipv6NeighbourDiscovery::processRaPrefixInfoForAddrAutoConf(), inet::Igmpv3::processReport(), inet::Igmpv2::processRexmtTimer(), inet::Igmpv3::processRouterGeneralQueryTimer(), inet::Igmpv3::processRouterGroupTimer(), inet::Igmpv3::processRouterSourceTimer(), inet::Igmpv2::processV2Report(), inet::L2NetworkConfigurator::readInterfaceConfiguration(), inet::Ipv4NetworkConfigurator::readInterfaceConfiguration(), inet::Ipv4NetworkConfigurator::readMulticastGroupConfiguration(), inet::RoutingTableRecorder::recordInterfaceChange(), inet::Arp::resolveL3Address(), inet::NextHopForwarding::routePacket(), inet::Ipv4::routeUnicastPacket(), inet::Ipv4::routeUnicastPacketFinish(), inet::PimDm::rpfInterfaceHasChanged(), inet::PimDm::sendAssertPacket(), inet::NextHopForwarding::sendDatagramToOutput(), inet::Igmpv3::sendGroupReport(), inet::PimBase::sendHelloPacket(), inet::bgp::BgpSession::sendKeepAliveMessage(), inet::Igmpv2::sendLeave(), inet::bgp::BgpSession::sendOpenMessage(), inet::PimSm::sendPIMAssert(), inet::Igmpv2::sendQuery(), inet::Igmpv2::sendReport(), inet::Rip::sendRIPRequest(), inet::bgp::BgpSession::sendUpdateMessage(), inet::Dsdv::start(), inet::Igmpv2::startHostTimer(), inet::PimNeighbor::str(), inet::NextHopRoute::str(), inet::RipRoute::str(), inet::Ipv6Route::str(), inet::Ipv4MulticastRoute::str(), str(), inet::DhcpClient::unbindLease(), and inet::PcapngWriter::writeInterface().
◆ getInterfaceTable()
Returns the IInterfaceTable this interface is in, or nullptr.
Referenced by inet::Ipv4InterfaceData::changeMulticastGroupMembership(), inet::L3AddressResolver::findHostWithMacAddress(), inet::Ipv4NetworkConfigurator::findInterfaceOnLinkByNode(), inet::L3NetworkConfiguratorBase::getWirelessId(), inet::Ipv6InterfaceData::joinMulticastGroup(), inet::Ipv6InterfaceData::leaveMulticastGroup(), inet::InterfaceMatcher::linkContainsMatchingHost(), inet::Ipv4NetworkConfigurator::linkContainsMatchingHostExcept(), inet::InterfaceMatcher::Selector::matches(), inet::L3NetworkConfiguratorBase::InterfaceMatcher::matches(), inet::Ipv4NetworkConfigurator::readInterfaceConfiguration(), and inet::Ipv4NetworkConfigurator::readMulticastGroupConfiguration().
◆ getInterfaceToken()
| const InterfaceToken& inet::NetworkInterface::getInterfaceToken |
( |
| ) |
const |
|
inline |
◆ getIpv4Address()
| Ipv4Address inet::NetworkInterface::getIpv4Address |
( |
| ) |
const |
◆ getIpv4Netmask()
| Ipv4Address inet::NetworkInterface::getIpv4Netmask |
( |
| ) |
const |
◆ getMacAddress()
| const MacAddress& inet::NetworkInterface::getMacAddress |
( |
| ) |
const |
|
inline |
Referenced by inet::NextHopRoutingTable::configureInterface(), inet::Ipv6NeighbourDiscovery::createAndSendNsPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRaPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRsPacket(), inet::InterfaceTable::findInterfaceByAddress(), inet::L3AddressResolver::findInterfaceWithMacAddress(), inet::L3AddressResolver::getInterfaceMacAddress(), inet::VirtualTunnel::handleMessage(), inet::Ieee8021dRelay::handleStartOperation(), inet::DhcpClient::handleStartOperation(), hasNetworkAddress(), inet::VirtualTunnel::initialize(), initialize(), inet::EthernetEncapsulation::processPacketFromHigherLayer(), inet::Arp::resolveMacAddressForArpReply(), inet::Arp::sendArpRequest(), inet::Ipv4::sendDatagramToOutput(), inet::Ipv6NeighbourDiscovery::sendSolicitedNa(), inet::Ipv6NeighbourDiscovery::sendUnsolicitedNa(), and str().
◆ getModuleIdAddress()
◆ getModulePathAddress()
◆ getMtu()
| int inet::NetworkInterface::getMtu |
( |
| ) |
const |
|
inline |
Referenced by inet::L3NetworkConfiguratorBase::computeWiredLinkWeight(), inet::L3NetworkConfiguratorBase::computeWirelessLinkWeight(), inet::eigrp::EigrpInterface::EigrpInterface(), inet::Ipv6::fragmentAndSend(), inet::Ipv4::fragmentAndSend(), inet::ospfv3::Ospfv3Interface::getInterfaceMTU(), inet::sctp::SctpAssociation::pmStartPathManagement(), inet::rtp::Rtp::resolveMTU(), inet::sctp::SctpPathVariables::SctpPathVariables(), inet::NextHopForwarding::sendDatagramToOutput(), inet::Rip::sendRoutes(), inet::ospfv2::Ospfv2Interface::setIfIndex(), and str().
◆ getName()
| virtual const char* inet::NetworkInterface::getName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
180 {
return cModule::getName(); }
◆ getNetworkAddress()
| const L3Address inet::NetworkInterface::getNetworkAddress |
( |
| ) |
const |
430 #ifdef INET_WITH_IPv4
431 if (
auto ipv4data = findProtocolData<Ipv4InterfaceData>())
432 return ipv4data->getIPAddress();
433 #endif // ifdef INET_WITH_IPv4
434 #ifdef INET_WITH_IPv6
435 if (
auto ipv6data = findProtocolData<Ipv6InterfaceData>())
436 return ipv6data->getPreferredAddress();
437 #endif // ifdef INET_WITH_IPv6
438 #ifdef INET_WITH_NEXTHOP
439 if (
auto nextHopData = findProtocolData<NextHopInterfaceData>())
440 return nextHopData->getAddress();
441 #endif // ifdef INET_WITH_NEXTHOP
Referenced by resolveDirective().
◆ getNodeInputGateId()
| int inet::NetworkInterface::getNodeInputGateId |
( |
| ) |
const |
|
inline |
◆ getNodeOutputGateId()
| int inet::NetworkInterface::getNodeOutputGateId |
( |
| ) |
const |
|
inline |
Referenced by inet::L3AddressResolver::addressOf(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::L2NetworkConfigurator::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::InterfaceTable::findInterfaceByInterfaceModule(), inet::ospfv2::Ospfv2ConfigReader::findMatchingConfig(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), inet::visualizer::InterfaceTableVisualizerBase::getOutputGate(), inet::MatrixCloudDelayer::getPathOfConnectedNodeOnIfaceID(), inet::Ted::initializeTED(), inet::InterfaceMatcher::linkContainsMatchingHost(), and inet::InterfaceTable::updateLinkDisplayString().
◆ getNumProtocolData()
| int inet::NetworkInterface::getNumProtocolData |
( |
| ) |
const |
|
inline |
Returns the number of protocol data structures.
◆ getProtocol()
| const Protocol* inet::NetworkInterface::getProtocol |
( |
| ) |
const |
|
inline |
◆ getProtocolData() [1/2]
template<typename T >
| const T* inet::NetworkInterface::getProtocolData |
( |
| ) |
const |
|
inline |
Returns the protocol data for the provided type or throws an exception if no such protocol data is found.
◆ getProtocolData() [2/2]
Returns the protocol data at the given index.
Referenced by inet::Ipv6FlatNetworkConfigurator::addOwnAdvPrefixRoutes(), inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv6NeighbourDiscovery::assignLinkLocalAddress(), inet::xMIPv6::cancelEntries(), inet::DhcpClient::chooseInterface(), inet::NextHopRoutingTable::configureRouterId(), inet::xMIPv6::createAndSendBRRMessage(), inet::xMIPv6::createAndSendBUMessage(), inet::Ipv6NeighbourDiscovery::createAndSendRaPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRsPacket(), inet::xMIPv6::createBUTimer(), inet::xMIPv6::createDeregisterBUTimer(), inet::bgp::BgpRouter::createEbgpSession(), inet::Ipv6NeighbourDiscovery::createRaTimer(), inet::xMIPv6::createTestInitTimer(), inet::Ipv6Tunneling::decapsulateDatagram(), inet::ospfv3::Ospfv3Interface::detailedInfo(), inet::Ipv4NetworkConfigurator::dumpConfig(), inet::RsvpTe::evalNextHopInterface(), inet::Ipv4RoutingTable::findInterfaceByLocalBroadcastAddress(), inet::bgp::BgpConfigReader::findMyAS(), inet::Ipv4::forwardMulticastPacket(), inet::Ipv6::fragmentAndSend(), inet::Ipv6::fragmentPostRouting(), inet::Ipv4::fragmentPostRouting(), inet::StpBase::getPortInterfaceData(), inet::xMIPv6::handleBULExpiry(), inet::Dsdv::handleMessageWhenUp(), inet::Dsdv::handleSelfMessage(), inet::DhcpServer::handleStartOperation(), inet::xMIPv6::handleTokenExpiry(), inet::PimSm::IamDR(), inet::Ipv6RoutingTable::initialize(), inet::Ipv6NeighbourDiscovery::initialize(), inet::Ted::initializeTED(), inet::Ipv6NeighbourDiscovery::initiateAddressResolution(), inet::Ipv6NeighbourDiscovery::initiateDad(), inet::xMIPv6::initiateMipv6Protocol(), inet::Ipv6NeighbourDiscovery::initiateNeighbourUnreachabilityDetection(), inet::Ipv6NeighbourDiscovery::initiateRouterDiscovery(), inet::BindingUpdateList::isCareOfTokenAvailable(), inet::eigrp::EigrpDeviceConfigurator::isEigrpInterface(), inet::BindingUpdateList::isHomeTokenAvailable(), inet::bgp::BgpConfigReader::isInInterfaceTable(), inet::ospfv3::Ospfv3Process::isInInterfaceTable6(), inet::Ipv6RoutingTable::isLocalAddress(), inet::Ipv4RoutingTable::isLocalBroadcastAddress(), inet::Ipv4RoutingTable::isLocalMulticastAddress(), inet::bgp::BgpRouter::listenConnectionFromPeer(), inet::Ipv6NeighbourDiscovery::makeTentativeAddressPermanent(), inet::bgp::BgpRouter::openTCPConnectionToPeer(), inet::ospfv3::Ospfv3Area::originateIntraAreaPrefixLSA(), inet::ospfv3::Ospfv3Interface::originateLinkLSA(), inet::ospfv3::Ospfv3Area::originateNetIntraAreaPrefixLSA(), inet::ospfv3::Ospfv3Interface::Ospfv3Interface(), inet::Ipv4::preroutingFinish(), inet::Ipv4RoutingTable::printRoutingTable(), inet::Arp::processArpPacket(), inet::Ipv6NeighbourDiscovery::processArTimeout(), inet::PimDm::processAssert(), inet::xMIPv6::processCoTMessage(), inet::Ipv6NeighbourDiscovery::processDadTimeout(), inet::DhcpServer::processDhcpMessage(), inet::PimDm::processGraftPacket(), inet::xMIPv6::processHoTMessage(), inet::PimSm::processJoinG(), inet::PimSm::processJoinSG(), inet::Ipv6NeighbourDiscovery::processNaForIncompleteNceState(), inet::Ipv6NeighbourDiscovery::processNaForOtherNceStates(), inet::Ipv6NeighbourDiscovery::processNaPacket(), inet::Ipv6NeighbourDiscovery::processNsPacket(), inet::Ipv6NeighbourDiscovery::processNudTimeout(), inet::PimSm::processPruneG(), inet::PimSm::processPruneSG(), inet::Igmpv3::processQuery(), inet::Ipv6NeighbourDiscovery::processRaForRouterUpdates(), inet::Ipv6NeighbourDiscovery::processRaPacket(), inet::Ipv6NeighbourDiscovery::processRaPrefixInfoForAddrAutoConf(), inet::Ipv6NeighbourDiscovery::processRdTimeout(), inet::Ipv6NeighbourDiscovery::processRsPacket(), inet::GlobalArp::receiveSignal(), inet::BindingUpdateList::recentlySentCOTI(), inet::BindingUpdateList::recentlySentHOTI(), inet::xMIPv6::resetBUIfEntry(), inet::Ipv4::resolveNextHopMacAddress(), inet::xMIPv6::returningHome(), inet::Ipv4::routeLocalBroadcastPacket(), inet::NextHopForwarding::routePacket(), inet::DhcpServer::sendAck(), inet::Arp::sendArpRequest(), inet::DhcpServer::sendNak(), inet::DhcpServer::sendOffer(), inet::ospfv3::Ospfv3Process::sendPacket(), inet::xMIPv6::sendPeriodicBU(), inet::Ipv6NeighbourDiscovery::sendPeriodicRa(), inet::Ipv6NeighbourDiscovery::sendSolicitedNa(), inet::xMIPv6::sendTestInit(), inet::Ipv6NeighbourDiscovery::sendUnsolicitedNa(), inet::ospfv2::Ospfv2Interface::setIfIndex(), inet::xMIPv6::triggerRouteOptimization(), inet::PimDm::unroutableMulticastPacketArrived(), inet::PimSm::updateDesignatedRouterAddress(), inet::bgp::BgpRouter::updateSendProcess(), and inet::xMIPv6::validateCoTMessage().
◆ getProtocolDataForUpdate()
template<typename T >
| T* inet::NetworkInterface::getProtocolDataForUpdate |
( |
| ) |
|
|
inline |
Returns the protocol data for the provided type or throws an exception if no such protocol data is found.
Referenced by inet::Udp::addMulticastAddressToInterface(), inet::Ipv4FlatNetworkConfigurator::assignAddresses(), inet::Ipv6NeighbourDiscovery::assignLinkLocalAddress(), inet::Ipv6RoutingTable::assignRequiredNodeAddresses(), inet::DhcpClient::bindLease(), inet::ospfv3::Ospfv3InterfaceState::changeState(), inet::L2NetworkConfigurator::configureInterface(), inet::Ipv4NetworkConfigurator::configureInterface(), inet::Ipv6RoutingTable::configureInterfaceFromXml(), inet::Ipv4RoutingTable::configureRouterId(), inet::Ipv6NeighbourDiscovery::createRaTimer(), inet::eigrp::EigrpIpv4Pdm::disableInterface(), inet::eigrp::EigrpIpv6Pdm::disableInterface(), inet::eigrp::EigrpIpv4Pdm::enableInterface(), inet::StpBase::getPortInterfaceDataForUpdate(), inet::PimBase::handleStartOperation(), inet::Igmpv3::initialize(), inet::Ipv6NeighbourDiscovery::initiateDad(), inet::ospfv2::Ospfv2ConfigReader::joinMulticastGroups(), inet::Ipv6NeighbourDiscovery::makeTentativeAddressPermanent(), inet::ospfv3::Ospfv3Splitter::parseConfig(), inet::ospfv3::Ospfv3Process::parseConfig(), inet::RoutingTableParser::parseInterfaces(), inet::RoutingTableParser::parseMulticastGroups(), inet::Icmpv6::processEchoRequest(), inet::Igmpv2::processLeaveTimer(), inet::Ipv6NeighbourDiscovery::processRaForRouterUpdates(), inet::Ipv6NeighbourDiscovery::processRaPacket(), inet::Ipv6NeighbourDiscovery::processRaPrefixInfoForAddrAutoConf(), inet::Igmpv3::processReport(), inet::Igmpv3::processRouterGroupTimer(), inet::Igmpv3::processRouterSourceTimer(), inet::Igmpv2::processV2Report(), inet::eigrp::EigrpIpv4Pdm::setPassive(), inet::eigrp::EigrpIpv6Pdm::setPassive(), inet::HostAutoConfigurator::setupNetworkLayer(), inet::Dsdv::start(), and inet::DhcpClient::unbindLease().
◆ getRxTransmissionChannel()
| cChannel* inet::NetworkInterface::getRxTransmissionChannel |
( |
| ) |
|
|
inline |
◆ getState()
| State inet::NetworkInterface::getState |
( |
| ) |
const |
|
inline |
Returns the requested state of this interface.
◆ getTxTransmissionChannel()
| cChannel* inet::NetworkInterface::getTxTransmissionChannel |
( |
| ) |
|
|
inline |
◆ handleCrashOperation()
◆ handleOperationStage()
Perform one stage of a lifecycle operation.
Processing may be done entirely within this method, or may be a longer process that involves nonzero simulation time or several events, and is triggered by this method call.
Return value: true = "done"; false = "not yet done, will invoke
doneCallback when done"
Implements inet::ILifecycle.
634 int stage = operation->getCurrentStage();
635 if (
dynamic_cast<ModuleStartOperation *
>(operation)) {
641 else if (
dynamic_cast<ModuleStopOperation *
>(operation)) {
647 else if (
dynamic_cast<ModuleCrashOperation *
>(operation)) {
654 throw cRuntimeError(
"unaccepted Lifecycle operation: (%s)%s", operation->getClassName(), operation->getName());
◆ handleParameterChange()
| void inet::NetworkInterface::handleParameterChange |
( |
const char * |
name | ) |
|
|
overrideprotectedvirtual |
295 if (name !=
nullptr && !strcmp(name,
"bitrate"))
◆ handleStartOperation()
◆ handleStopOperation()
◆ hasCarrier()
| bool inet::NetworkInterface::hasCarrier |
( |
| ) |
const |
|
inline |
◆ hasNetworkAddress()
| bool inet::NetworkInterface::hasNetworkAddress |
( |
const L3Address & |
address | ) |
const |
|
virtual |
451 switch(address.getType()) {
456 #ifdef INET_WITH_IPv4
457 auto ipv4data = findProtocolData<Ipv4InterfaceData>();
458 return ipv4data !=
nullptr && ipv4data->getIPAddress() == address.toIpv4();
461 #endif // ifdef INET_WITH_IPv4
464 #ifdef INET_WITH_IPv6
465 auto ipv6data = findProtocolData<Ipv6InterfaceData>();
466 return ipv6data !=
nullptr && ipv6data->hasAddress(address.toIpv6());
469 #endif // ifdef INET_WITH_IPv6
475 #ifdef INET_WITH_NEXTHOP
476 auto nextHopData = findProtocolData<NextHopInterfaceData>();
477 if (nextHopData !=
nullptr && nextHopData->getAddress() == address)
479 #endif // ifdef INET_WITH_NEXTHOP
485 #ifdef INET_WITH_NEXTHOP
486 auto nextHopData = findProtocolData<NextHopInterfaceData>();
487 if (nextHopData !=
nullptr && nextHopData->getAddress() == address)
489 #endif // ifdef INET_WITH_NEXTHOP
◆ initialize()
| void inet::NetworkInterface::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
Reimplemented from inet::queueing::PacketProcessorBase.
Reimplemented in inet::ExtInterface, and inet::EthernetCutthroughInterface.
109 subscribe(POST_MODEL_CHANGE,
this);
110 if (hasGate(
"phys$i")) {
111 rxIn = gate(
"phys$i")->getPathEndGate();
116 if (hasGate(
"phys$o")) {
117 txOut = gate(
"phys$o")->getPathStartGate();
138 NodeStatus *nodeStatus = node ? check_and_cast_nullable<NodeStatus *>(node->getSubmodule(
"status")) : nullptr;
145 if (hasPar(
"protocol")) {
146 const char *protocolName = par(
"protocol");
147 if (*protocolName !=
'\0')
150 if (hasPar(
"address")) {
151 const char *address = par(
"address");
152 if (!strcmp(address,
"auto")) {
160 if (hasPar(
"broadcast"))
162 if (hasPar(
"multicast"))
166 if (hasPar(
"pointToPoint"))
Referenced by inet::EthernetCutthroughInterface::initialize().
◆ isBroadcast()
| bool inet::NetworkInterface::isBroadcast |
( |
| ) |
const |
|
inline |
◆ isDown()
| bool inet::NetworkInterface::isDown |
( |
| ) |
const |
|
inline |
◆ isLoopback()
| bool inet::NetworkInterface::isLoopback |
( |
| ) |
const |
|
inline |
Referenced by inet::Ipv4FlatNetworkConfigurator::addDefaultRoutes(), inet::Ipv6FlatNetworkConfigurator::addOwnAdvPrefixRoutes(), inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::Ipv4FlatNetworkConfigurator::assignAddresses(), inet::Ipv6NeighbourDiscovery::assignLinkLocalAddress(), inet::Ipv6RoutingTable::assignRequiredNodeAddresses(), inet::StpBase::chooseInterface(), inet::DhcpServer::chooseInterface(), inet::DhcpClient::chooseInterface(), inet::Ipv6FlatNetworkConfigurator::configureAdvPrefixes(), inet::Ipv6RoutingTable::configureInterfaceForIpv6(), inet::PimInterfaceTable::configureInterfaces(), inet::NextHopRoutingTable::configureRouterId(), inet::Ipv4RoutingTable::configureRouterId(), inet::Ipv4::datagramLocalOut(), inet::L3NetworkConfiguratorBase::determineGatewayForLink(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractWirelessNeighbors(), inet::PingApp::getAllAddresses(), inet::L3AddressResolver::getIpv4AddressFrom(), inet::L3AddressResolver::getIpv6AddressFrom(), inet::L3AddressResolver::getMacAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), inet::L3AddressResolver::getModulePathAddressFrom(), inet::Gpsr::getSelfAddress(), inet::GlobalArp::initialize(), inet::Ipv6RoutingTable::initialize(), inet::Ipv6NeighbourDiscovery::initialize(), inet::Ted::initializeTED(), inet::xMIPv6::initiateMipv6Protocol(), inet::ospfv2::Router::isDirectRoute(), inet::RelayInterfaceSelector::isForwardingInterface(), inet::MacRelayUnitBase::isForwardingInterface(), inet::Rip::isLocalInterfaceRoute(), inet::Rip::isLoopbackInterfaceRoute(), inet::bgp::BgpRouter::isRouteExcluded(), inet::ospfv2::Ospfv2ConfigReader::loadConfigFromXML(), inet::Ipv6NeighbourDiscovery::makeTentativeAddressPermanent(), inet::ospfv3::Ospfv3Process::parseConfig(), inet::Ipv4NodeConfigurator::prepareInterface(), inet::Ipv4::preroutingFinish(), inet::ospfv2::Ospfv2::receiveSignal(), inet::GlobalArp::receiveSignal(), inet::PimInterfaceTable::receiveSignal(), inet::Rip::receiveSignal(), inet::RipNetworkInterface::RipNetworkInterface(), inet::NextHopForwarding::routeMulticastPacket(), inet::Ipv6::routeMulticastPacket(), inet::NetworkProtocolBase::sendDown(), inet::HostAutoConfigurator::setupNetworkLayer(), inet::Rip::startRIPRouting(), and str().
◆ isMulticast()
| bool inet::NetworkInterface::isMulticast |
( |
| ) |
const |
|
inline |
Referenced by inet::Udp::addMulticastAddressToInterface(), inet::Udp::blockMulticastSources(), inet::Ipv6RoutingTable::configureInterfaceForIpv6(), inet::PimInterfaceTable::configureInterfaces(), inet::Gpsr::configureInterfaces(), inet::dymo::Dymo::configureInterfaces(), inet::eigrp::EigrpInterface::EigrpInterface(), inet::VirtualTunnel::initialize(), inet::Ldp::initialize(), inet::Igmpv2::initialize(), inet::Igmpv3::initialize(), inet::Ipv4RoutingTable::internalAddMulticastRoute(), inet::eigrp::EigrpInterface::isMulticastAllowedOnIface(), inet::ospfv2::Ospfv2ConfigReader::joinMulticastGroups(), inet::Udp::joinMulticastGroups(), inet::Udp::joinMulticastSources(), inet::Udp::leaveMulticastGroups(), inet::Udp::leaveMulticastSources(), inet::Igmpv2::multicastGroupJoined(), inet::Igmpv2::multicastGroupLeft(), inet::Ipv4NodeConfigurator::prepareInterface(), inet::Igmpv2::processLeave(), inet::Igmpv2::processQuery(), inet::Igmpv3::processQuery(), inet::Igmpv3::processReport(), inet::Igmpv2::processV2Report(), inet::Ipv4NetworkConfigurator::readManualMulticastRouteConfiguration(), inet::ospfv2::Ospfv2::receiveSignal(), inet::PimInterfaceTable::receiveSignal(), inet::Rip::receiveSignal(), inet::Igmpv2::receiveSignal(), inet::Igmpv3::receiveSignal(), inet::RipNetworkInterface::RipNetworkInterface(), inet::Igmpv3::sendQueryToIP(), inet::Igmpv3::sendReportToIP(), inet::Igmpv2::sendToIP(), inet::Udp::setMulticastSourceFilter(), inet::Rip::startRIPRouting(), str(), and inet::Udp::unblockMulticastSources().
◆ isPointToPoint()
| bool inet::NetworkInterface::isPointToPoint |
( |
| ) |
const |
|
inline |
◆ isUp()
| bool inet::NetworkInterface::isUp |
( |
| ) |
const |
|
inline |
◆ isWired()
| bool inet::NetworkInterface::isWired |
( |
| ) |
const |
|
inline |
242 {
return rxIn !=
nullptr &&
txOut !=
nullptr; }
◆ isWireless()
| bool inet::NetworkInterface::isWireless |
( |
| ) |
const |
|
inline |
◆ joinMulticastGroup()
| void inet::NetworkInterface::joinMulticastGroup |
( |
const L3Address & |
address | ) |
|
|
virtual |
523 switch (address.getType()) {
524 #ifdef INET_WITH_IPv4
526 getProtocolDataForUpdate<Ipv4InterfaceData>()->joinMulticastGroup(address.toIpv4());
529 #endif // ifdef INET_WITH_IPv4
530 #ifdef INET_WITH_IPv6
532 getProtocolDataForUpdate<Ipv6InterfaceData>()->joinMulticastGroup(address.toIpv6());
535 #endif // ifdef INET_WITH_IPv6
536 #ifdef INET_WITH_NEXTHOP
540 getProtocolDataForUpdate<NextHopInterfaceData>()->joinMulticastGroup(address);
543 #endif // ifdef INET_WITH_NEXTHOP
545 throw cRuntimeError(
"Unknown address type");
Referenced by inet::Udp::addMulticastAddressToInterface(), inet::Gpsr::configureInterfaces(), and inet::dymo::Dymo::configureInterfaces().
◆ matchesMacAddress()
| bool inet::NetworkInterface::matchesMacAddress |
( |
const MacAddress & |
address | ) |
const |
403 return address.isBroadcast()
◆ matchesMulticastMacAddress()
| bool inet::NetworkInterface::matchesMulticastMacAddress |
( |
const MacAddress & |
address | ) |
const |
◆ numInitStages()
| virtual int inet::NetworkInterface::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ operator=()
◆ pushPacket()
| void inet::NetworkInterface::pushPacket |
( |
Packet * |
packet, |
|
|
cGate * |
gate |
|
) |
| |
|
overridevirtual |
Pushes the packet into the packet sink at the given gate.
This operation pushes the packet as a whole. The onwership of the packet is transferred to the sink.
This method is called, for example, when a packet source module pushes a packet into a queue module.
The sink must not be full at the gate. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and passing packets.
Implements inet::queueing::IPassivePacketSink.
191 EV_WARN <<
"Network interface is down, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
195 EV_WARN <<
"Network interface has no carrier, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
206 throw cRuntimeError(
"Unknown gate: %s", gate->getName());
◆ pushPacketEnd()
| void inet::NetworkInterface::pushPacketEnd |
( |
Packet * |
packet, |
|
|
cGate * |
gate |
|
) |
| |
|
overridevirtual |
Ends pushing the packet into the packet sink at the given gate.
This is a packet streaming operation. The onwership of the packet is transferred to the sink.
Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.
This method is called, for example, when a preemption supporting server module ends streaming a packet to the sink.
The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.
Implements inet::queueing::IPassivePacketSink.
Reimplemented in inet::EthernetCutthroughInterface.
240 EV_WARN <<
"Network interface is down, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
244 EV_WARN <<
"Network interface has no carrier, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
255 throw cRuntimeError(
"Unknown gate: %s", gate->getName());
Referenced by inet::EthernetCutthroughInterface::pushPacketEnd().
◆ pushPacketProgress()
| virtual void inet::NetworkInterface::pushPacketProgress |
( |
Packet * |
packet, |
|
|
cGate * |
gate, |
|
|
bps |
datarate, |
|
|
b |
position, |
|
|
b |
extraProcessableLength = b(0) |
|
) |
| |
|
inlineoverridevirtual |
Progresses pushing the packet into the packet sink at the given gate.
This is a packet streaming operation. The position specifies where the packet streaming is at the moment. The extra length parameter partially fixes the future of the packet streaming operation. The onwership of the packet is transferred to the sink.
Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.
This method is called, for example, to notify the sink about a change in the packet data when a preemption occurs.
The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.
Implements inet::queueing::IPassivePacketSink.
200 {
throw cRuntimeError(
"Invalid operation"); }
◆ pushPacketStart()
| void inet::NetworkInterface::pushPacketStart |
( |
Packet * |
packet, |
|
|
cGate * |
gate, |
|
|
bps |
datarate |
|
) |
| |
|
overridevirtual |
Starts pushing the packet into the packet sink at the given gate.
This is a packet streaming operation. The onwership of the packet is transferred to the sink.
Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.
This method is called, for example, when a preemption supporting server module starts streaming a packet to the sink.
The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.
Implements inet::queueing::IPassivePacketSink.
Reimplemented in inet::EthernetCutthroughInterface.
215 EV_WARN <<
"Network interface is down, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
219 EV_WARN <<
"Network interface has no carrier, dropping packet" <<
EV_FIELD(packet) <<
EV_ENDL;
230 throw cRuntimeError(
"Unknown gate: %s", gate->getName());
Referenced by inet::EthernetCutthroughInterface::pushPacketStart().
◆ receiveSignal()
| void inet::NetworkInterface::receiveSignal |
( |
cComponent * |
source, |
|
|
simsignal_t |
signal, |
|
|
cObject * |
obj, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
303 if (signal == POST_MODEL_CHANGE) {
304 if (
auto notification =
dynamic_cast<cPostPathCreateNotification *
>(obj)) {
305 if (
rxIn == notification->pathEndGate ||
txOut == notification->pathStartGate) {
315 else if (
auto notification =
dynamic_cast<cPostPathCutNotification *
>(obj)) {
316 if (
rxIn == notification->pathEndGate ||
txOut == notification->pathStartGate) {
322 else if (
auto notification =
dynamic_cast<cPostParameterChangeNotification *
>(obj)) {
323 auto owner = notification->par->getOwner();
◆ refreshDisplay()
| void inet::NetworkInterface::refreshDisplay |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ removeMulticastMacAddress()
| void inet::NetworkInterface::removeMulticastMacAddress |
( |
const MacAddress & |
address | ) |
|
424 throw cRuntimeError(
"Multicast MacAddress not found: '%s'", address.str().c_str());
◆ removeProtocolData()
template<typename T >
| T* inet::NetworkInterface::removeProtocolData |
( |
| ) |
|
|
inline |
Removes the protocol data for the provided type, or throws an exception if no such protocol data is found.
353 check_and_cast<InterfaceProtocolData *>(t)->ownerp =
nullptr;
◆ removeProtocolDataIfPresent()
template<typename T >
| T* inet::NetworkInterface::removeProtocolDataIfPresent |
( |
| ) |
|
|
inline |
Removes the protocol data for the provided type if present, or returns nullptr if no such protocol data is found.
364 check_and_cast<InterfaceProtocolData *>(t)->ownerp =
nullptr;
◆ resetInterface()
| void inet::NetworkInterface::resetInterface |
( |
| ) |
|
|
virtual |
◆ resolveDirective()
| const char * inet::NetworkInterface::resolveDirective |
( |
char |
directive | ) |
const |
|
overrideprotectedvirtual |
◆ setBroadcast()
| virtual void inet::NetworkInterface::setBroadcast |
( |
bool |
b | ) |
|
|
inlinevirtual |
◆ setCarrier()
| void inet::NetworkInterface::setCarrier |
( |
bool |
b | ) |
|
|
virtual |
◆ setDatarate()
| virtual void inet::NetworkInterface::setDatarate |
( |
double |
d | ) |
|
|
inlinevirtual |
◆ setEstimateCostProcess()
502 ASSERT(position >= 0);
◆ setHasModuleIdAddress()
| void inet::NetworkInterface::setHasModuleIdAddress |
( |
bool |
value | ) |
|
|
inline |
◆ setHasModulePathAddress()
| void inet::NetworkInterface::setHasModulePathAddress |
( |
bool |
value | ) |
|
|
inline |
◆ setInterfaceId()
| virtual void inet::NetworkInterface::setInterfaceId |
( |
int |
id | ) |
|
|
inlinevirtual |
◆ setInterfaceName()
| virtual void inet::NetworkInterface::setInterfaceName |
( |
const char * |
s | ) |
|
|
inlinevirtual |
◆ setInterfaceToken()
| virtual void inet::NetworkInterface::setInterfaceToken |
( |
const InterfaceToken & |
t | ) |
|
|
inlinevirtual |
◆ setLoopback()
| virtual void inet::NetworkInterface::setLoopback |
( |
bool |
b | ) |
|
|
inlinevirtual |
◆ setMacAddress()
| virtual void inet::NetworkInterface::setMacAddress |
( |
const MacAddress & |
addr | ) |
|
|
inlinevirtual |
◆ setMtu()
| virtual void inet::NetworkInterface::setMtu |
( |
int |
m | ) |
|
|
inlinevirtual |
◆ setMulticast()
| virtual void inet::NetworkInterface::setMulticast |
( |
bool |
b | ) |
|
|
inlinevirtual |
◆ setNodeInputGateId()
| virtual void inet::NetworkInterface::setNodeInputGateId |
( |
int |
i | ) |
|
|
inlinevirtual |
◆ setNodeOutputGateId()
| virtual void inet::NetworkInterface::setNodeOutputGateId |
( |
int |
i | ) |
|
|
inlinevirtual |
◆ setPointToPoint()
| virtual void inet::NetworkInterface::setPointToPoint |
( |
bool |
b | ) |
|
|
inlinevirtual |
◆ setProtocol()
| virtual void inet::NetworkInterface::setProtocol |
( |
const Protocol * |
protocol | ) |
|
|
inlinevirtual |
◆ setState()
| void inet::NetworkInterface::setState |
( |
State |
s | ) |
|
|
virtual |
◆ stateChanged()
| virtual void inet::NetworkInterface::stateChanged |
( |
int |
fieldId | ) |
|
|
inlineprotectedvirtual |
◆ str()
| std::string inet::NetworkInterface::str |
( |
| ) |
const |
|
overridevirtual |
◆ supportsPacketPassing()
| virtual bool inet::NetworkInterface::supportsPacketPassing |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns true if the processor supports passing packets as a whole at the given gate.
A passed packet is handed over from one module to another by either the standard OMNeT++ handleMessage() mechanism, or by directly calling pushPacket() or pullPacket().
For example, packets are passed as a whole to and from a queue module.
Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(pass) in the NED file.
Reimplemented from inet::queueing::PacketProcessorBase.
◆ supportsPacketPulling()
| virtual bool inet::NetworkInterface::supportsPacketPulling |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns true if the processor supports pulling packets at the given gate.
Pulling a packet is a synchronous operation that is initiated by the sink module. A pulled packet can be passed as a whole using pullPacket(), or it can be streamed from the source to the sink using pullPacketStart(), pullPacketEnd(), and pullPacketProgress().
For output gates, true means that the connected module can pull packets from this module. For input gates, true means that this module can pull packets from the connected module. For example, a packet server module can pull packets from a queue module.
Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(pull) in the NED file.
Implements inet::queueing::IPacketProcessor.
◆ supportsPacketPushing()
| virtual bool inet::NetworkInterface::supportsPacketPushing |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns true if the processor supports pushing packets at the given gate.
Pushing a packet is a synchronous operation that is initiated by the source module. A pushed packet can be passed as a whole using pushPacket(), or it can be streamed from the source to the sink using pushPacketStart(), pushPacketEnd(), and pushPacketProgress().
For output gates, true means that this module can push packets into the connected module. For input gates, true means that the connected module can push packets into this module. For example, a packet generator module can push packets into a queue module.
Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(push) in the NED file.
Implements inet::queueing::IPacketProcessor.
◆ supportsPacketSending()
| virtual bool inet::NetworkInterface::supportsPacketSending |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns true if the processor supports sending packets at the given gate.
Sending a packet is an asynchronous operation that is initiated by the source module. A sent packet is always passed as a whole using standard handleMessage().
For output gates, true means that this module can send packets into the connected module. For input gates, true means that the connected module can send packets into this module. For example, a standard OMNeT++ module can send packets to an INET packet processor module, or an INET packet processor module can send packets to a standard OMNeT++ module.
Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(send) in the NED file.
Reimplemented from inet::queueing::PacketProcessorBase.
◆ supportsPacketStreaming()
| virtual bool inet::NetworkInterface::supportsPacketStreaming |
( |
cGate * |
gate | ) |
const |
|
inlineoverridevirtual |
Returns true if the processor supports streaming packets at the given gate.
A streamed packet is handed over from one module to another using several method calls and potentially exending to a non-zero simulation duration.
For example, packets are streamed to a preemptable signal transmitter module.
Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(stream) in the NED file.
Reimplemented from inet::queueing::PacketProcessorBase.
◆ updateDisplayString()
| void inet::NetworkInterface::updateDisplayString |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ InterfaceProtocolData
◆ broadcast
| bool inet::NetworkInterface::broadcast = false |
|
protected |
◆ carrier
| bool inet::NetworkInterface::carrier = false |
|
protected |
◆ datarate
| double inet::NetworkInterface::datarate = 0 |
|
protected |
◆ estimateCostProcessArray
◆ hasModuleIdAddress
| bool inet::NetworkInterface::hasModuleIdAddress = false |
|
protected |
◆ hasModulePathAddress
| bool inet::NetworkInterface::hasModulePathAddress = false |
|
protected |
◆ interfaceId
| int inet::NetworkInterface::interfaceId = -1 |
|
protected |
◆ interfaceName
| std::string inet::NetworkInterface::interfaceName |
|
protected |
◆ interfaceTable
◆ loopback
| bool inet::NetworkInterface::loopback = false |
|
protected |
◆ macAddr
◆ mtu
| int inet::NetworkInterface::mtu = 0 |
|
protected |
Maximum Transmission Unit (e.g. 1500 on Ethernet); 0 means infinite (i.e. never fragment)
Referenced by initialize().
◆ multicast
| bool inet::NetworkInterface::multicast = false |
|
protected |
◆ multicastAddresses
| std::vector<MacAddress> inet::NetworkInterface::multicastAddresses |
|
protected |
◆ nodeInputGateId
| int inet::NetworkInterface::nodeInputGateId = -1 |
|
protected |
id of the input gate of this host/router (or -1 if this is a virtual interface)
◆ nodeOutputGateId
| int inet::NetworkInterface::nodeOutputGateId = -1 |
|
protected |
id of the output gate of this host/router (or -1 if this is a virtual interface)
◆ pointToPoint
| bool inet::NetworkInterface::pointToPoint = false |
|
protected |
interface is point-to-point link
Referenced by initialize().
◆ protocol
| const Protocol* inet::NetworkInterface::protocol = nullptr |
|
protected |
◆ protocolDataSet
| TagSet inet::NetworkInterface::protocolDataSet |
|
protected |
◆ rxIn
| cGate* inet::NetworkInterface::rxIn = nullptr |
|
protected |
◆ rxTransmissionChannel
| cChannel* inet::NetworkInterface::rxTransmissionChannel = nullptr |
|
protected |
◆ state
◆ token
for Ipv6 stateless autoconfig (RFC 1971), interface identifier (RFC 2462)
◆ txOut
| cGate* inet::NetworkInterface::txOut = nullptr |
|
protected |
◆ txTransmissionChannel
| cChannel* inet::NetworkInterface::txTransmissionChannel = nullptr |
|
protected |
◆ upperLayerIn
| cGate* inet::NetworkInterface::upperLayerIn = nullptr |
|
protected |
◆ upperLayerInConsumer
◆ upperLayerOut
| cGate* inet::NetworkInterface::upperLayerOut = nullptr |
|
protected |
◆ upperLayerOutConsumer
The documentation for this class was generated from the following files:
cModule * findContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:31
compose< Wb, pow< m, -2 > > T
Definition: Units.h:951
void layoutSubmodulesWithoutGates(cModule *module, int dimensionIndex, double moduleSpacing)
Definition: SubmoduleLayout.cc:24
INET_API InitStage INITSTAGE_LAST
Operations that no other initializations can depend on, e.g.
@ F_STATE
Definition: NetworkInterface.h:146
@ MODULEID
Definition: L3Address.h:40
virtual void pushOrSendPacket(Packet *packet, cGate *gate, IPassivePacketSink *consumer)
Definition: PacketProcessorBase.cc:126
@ F_DATARATE
Definition: NetworkInterface.h:149
@ F_IPV4_DATA
Definition: NetworkInterface.h:150
const ModuleIdAddress getModuleIdAddress() const
Definition: NetworkInterface.h:224
int mtu
Maximum Transmission Unit (e.g. 1500 on Ethernet); 0 means infinite (i.e. never fragment)
Definition: NetworkInterface.h:110
const MacAddress & getMacAddress() const
Definition: NetworkInterface.h:245
virtual void setCarrier(bool b)
Definition: NetworkInterface.cc:622
const L3Address getNetworkAddress() const
Definition: NetworkInterface.cc:428
virtual void resetInterface()
Definition: NetworkInterface.cc:396
static const Protocol * getProtocol(int id)
Definition: Protocol.cc:50
virtual void setMulticast(bool b)
Definition: NetworkInterface.h:259
bool isBroadcast() const
Definition: NetworkInterface.h:238
@ DOWN
Definition: NetworkInterface.h:92
virtual void setInterfaceName(const char *s)
Definition: NetworkInterface.h:252
int nodeOutputGateId
id of the output gate of this host/router (or -1 if this is a virtual interface)
Definition: NetworkInterface.h:108
@ NONE
Definition: L3Address.h:34
const T * findTag() const
Returns the tag for the provided type, or returns nullptr if no such tag is present.
Definition: TagSet.h:134
@ F_TRILL_DATA
Definition: NetworkInterface.h:150
@ F_POINTTOPOINT
Definition: NetworkInterface.h:148
queueing::IPassivePacketSink * upperLayerOutConsumer
Definition: NetworkInterface.h:102
cChannel * rxTransmissionChannel
Definition: NetworkInterface.h:99
std::string str() const
Definition: L3Address.cc:88
@ F_MACADDRESS
Definition: NetworkInterface.h:149
@ GOING_UP
Definition: NetworkInterface.h:92
const char * getInterfaceName() const
Definition: NetworkInterface.h:233
bool isWireless() const
Definition: NetworkInterface.h:243
virtual std::string getFullPath() const override
Definition: NetworkInterface.h:179
@ F_ISIS_DATA
Definition: NetworkInterface.h:150
T * getTagForUpdate()
Returns the tag of the provided type for update, or throws an exception if no such tag is present.
Definition: TagSet.h:159
std::vector< T >::iterator find(std::vector< T > &v, const Tk &a)
Definition: stlutils.h:44
virtual void setBroadcast(bool b)
Definition: NetworkInterface.h:258
cGate * rxIn
Definition: NetworkInterface.h:97
TagSet protocolDataSet
Definition: NetworkInterface.h:124
int getMtu() const
Definition: NetworkInterface.h:236
@ F_NODE_OUT_GATEID
Definition: NetworkInterface.h:147
bool hasModulePathAddress
Definition: NetworkInterface.h:118
bool isWired() const
Definition: NetworkInterface.h:242
virtual void updateDisplayString() const override
Definition: NetworkInterface.cc:263
@ IPv4
Definition: L3Address.h:35
int interfaceId
identifies the interface in the IInterfaceTable
Definition: NetworkInterface.h:106
@ MODULEPATH
Definition: L3Address.h:39
State getState() const
Returns the requested state of this interface.
Definition: NetworkInterface.h:210
bool pointToPoint
interface is point-to-point link
Definition: NetworkInterface.h:115
@ F_LOOPBACK
Definition: NetworkInterface.h:148
bool isLoopback() const
Definition: NetworkInterface.h:241
virtual cGate * createGateObject(cGate::Type type) override
Definition: NetworkInterface.h:166
virtual void setMacAddress(const MacAddress &addr)
Definition: NetworkInterface.h:263
ModuleRefByPar< IInterfaceTable > interfaceTable
IInterfaceTable that contains this interface, or nullptr.
Definition: NetworkInterface.h:105
bool multicast
interface supports multicast
Definition: NetworkInterface.h:114
INET_API InitStage INITSTAGE_NETWORK_INTERFACE_CONFIGURATION
Initialization of network interfaces includes:
bool broadcast
interface supports broadcast
Definition: NetworkInterface.h:113
virtual double computeDatarate() const
Definition: NetworkInterface.cc:332
std::string str() const
Converts address to a hex string.
Definition: MacAddress.cc:111
const ModulePathAddress getModulePathAddress() const
Definition: NetworkInterface.h:225
@ F_CARRIER
Definition: NetworkInterface.h:146
virtual void handleCrashOperation(LifecycleOperation *operation)
Definition: NetworkInterface.cc:672
value< double, units::s > s
Definition: Units.h:1235
cObject * getTag(int index) const
Returns the tag at the given index.
Definition: TagSet.h:122
static MacAddress generateAutoAddress()
Generates a unique address which begins with 0a:aa and ends in a unique suffix.
Definition: MacAddress.cc:133
int getInterfaceId() const
Definition: NetworkInterface.h:232
@ F_NETW_GATEIDX
Definition: NetworkInterface.h:147
bool hasModuleIdAddress
Definition: NetworkInterface.h:117
#define EV_FIELD(...)
Definition: INETDefs.h:112
T * removeTagIfPresent()
Removes the tag for the provided type if present, or returns nullptr if no such tag is present.
Definition: TagSet.h:198
virtual void setState(State s)
Definition: NetworkInterface.cc:611
std::string stripnonalnum(const char *s)
Removes non-alphanumeric characters from the given string.
Definition: INETUtils.cc:98
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
virtual void setInterfaceToken(const InterfaceToken &t)
Definition: NetworkInterface.h:264
T * findTagForUpdate()
Returns the tag of the provided type for update, or returns nullptr if no such tag is present.
Definition: TagSet.h:142
InterfaceToken formInterfaceIdentifier() const
Create interface identifier (IEEE EUI-64) which can be used by IPv6 stateless address autoconfigurati...
Definition: MacAddress.cc:126
removed type
Definition: IUdp-gates.txt:7
T * addTagIfAbsent()
Returns a newly added tag for the provided type if absent, or returns the tag that is already present...
Definition: TagSet.h:178
std::vector< MacEstimateCostProcess * > estimateCostProcessArray
Definition: NetworkInterface.h:125
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:54
virtual void configChanged(int fieldId)
Definition: NetworkInterface.h:155
@ F_MULTICAST
Definition: NetworkInterface.h:148
virtual void stateChanged(int fieldId)
Definition: NetworkInterface.h:156
virtual void dropPacket(Packet *packet, PacketDropReason reason, int limit=-1)
Definition: PacketProcessorBase.cc:390
simsignal_t interfaceStateChangedSignal
Definition: Simsignals.cc:32
bool carrier
presence of the physical or virtual carrier
Definition: NetworkInterface.h:112
std::vector< MacAddress > multicastAddresses
Definition: NetworkInterface.h:122
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ F_NAME
Definition: NetworkInterface.h:147
@ F_IPV6_DATA
Definition: NetworkInterface.h:150
virtual void pushOrSendPacketEnd(Packet *packet, cGate *gate, IPassivePacketSink *consumer, int transmissionId)
Definition: PacketProcessorBase.cc:154
@ F_IEEE8021D_DATA
Definition: NetworkInterface.h:150
static const char * getTypeName(AddressType t)
Definition: L3Address.cc:389
virtual void changed(simsignal_t signalID, int fieldId)
Definition: NetworkInterface.cc:388
value< int64_t, units::b > b
Definition: Units.h:1241
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
@ F_BROADCAST
Definition: NetworkInterface.h:148
virtual void handleStartOperation(LifecycleOperation *operation)
Definition: NetworkInterface.cc:658
int nodeInputGateId
id of the input gate of this host/router (or -1 if this is a virtual interface)
Definition: NetworkInterface.h:109
cObject * removeTag(int index)
Definition: TagSet.cc:91
InterfaceToken token
for Ipv6 stateless autoconfig (RFC 1971), interface identifier (RFC 2462)
Definition: NetworkInterface.h:121
bool isMulticast() const
Definition: NetworkInterface.h:239
@ STAGE_CRASH
Definition: ModuleOperations.h:76
bool isDown() const
Definition: NetworkInterface.h:220
bool isUnspecified() const
Returns true if all address bytes are zero.
Definition: MacAddress.h:136
@ IPv6
Definition: L3Address.h:36
@ NO_CARRIER
Definition: Simsignals_m.h:73
@ F_TOKEN
Definition: NetworkInterface.h:149
bool isPointToPoint() const
Definition: NetworkInterface.h:240
@ UP
Definition: NodeStatus.h:28
cGate * txOut
Definition: NetworkInterface.h:98
@ INTERFACE_DOWN
Definition: Simsignals_m.h:72
virtual void setPointToPoint(bool b)
Definition: NetworkInterface.h:260
@ F_NEXTHOP_DATA
Definition: NetworkInterface.h:150
static const Ipv4Address UNSPECIFIED_ADDRESS
0.0.0.0
Definition: Ipv4Address.h:91
#define Enter_Method(...)
Definition: SelfDoc.h:71
bool hasCarrier() const
Definition: NetworkInterface.h:237
@ MAC
Definition: L3Address.h:38
double datarate
data rate in bit/s
Definition: NetworkInterface.h:119
@ F_MTU
Definition: NetworkInterface.h:149
virtual void pushOrSendPacketStart(Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, int transmissionId)
Definition: PacketProcessorBase.cc:136
void clearTags()
Clears the set of tags.
Definition: TagSet.cc:104
void registerInterface(const NetworkInterface &interface, cGate *in, cGate *out)
Definition: IInterfaceRegistrationListener.cc:12
virtual void setDatarate(double d)
Definition: NetworkInterface.h:262
cGate * upperLayerIn
Definition: NetworkInterface.h:95
const Protocol * protocol
Definition: NetworkInterface.h:104
bool loopback
interface is loopback interface
Definition: NetworkInterface.h:116
MacAddress macAddr
link-layer address (for now, only IEEE 802 MAC addresses are supported)
Definition: NetworkInterface.h:120
value< double, units::m > m
Definition: Units.h:1233
virtual void setInterfaceId(int id)
Definition: NetworkInterface.h:175
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:28
@ F_CLNS_DATA
Definition: NetworkInterface.h:150
virtual void setMtu(int m)
Definition: NetworkInterface.h:255
virtual std::string str() const override
Definition: NetworkInterface.cc:356
bool matchesMulticastMacAddress(const MacAddress &address) const
Definition: NetworkInterface.cc:408
simsignal_t interfaceConfigChangedSignal
Definition: Simsignals.cc:33
#define EV_ENDL
Definition: INETDefs.h:114
cChannel * txTransmissionChannel
Definition: NetworkInterface.h:100
@ GOING_DOWN
Definition: NetworkInterface.h:92
virtual bool computeCarrier() const
Definition: NetworkInterface.cc:345
State state
requested interface state, similar to Linux ifup/ifdown
Definition: NetworkInterface.h:111
cGate * upperLayerOut
Definition: NetworkInterface.h:96
@ F_NODE_IN_GATEID
Definition: NetworkInterface.h:147
queueing::IPassivePacketSink * upperLayerInConsumer
Definition: NetworkInterface.h:101
int getNumTags() const
Returns the number of tags.
Definition: TagSet.h:117
std::string interfaceName
Definition: NetworkInterface.h:107
virtual void handleStopOperation(LifecycleOperation *operation)
Definition: NetworkInterface.cc:665
void addTag(cObject *tag)
Definition: TagSet.cc:83
@ UP
Definition: NetworkInterface.h:92
friend class InterfaceProtocolData
Definition: NetworkInterface.h:89