INET Framework for OMNeT++/OMNEST
inet::InterfaceEntry Class Reference

Interface entry for the interface table in IInterfaceTable. More...

#include <InterfaceEntry.h>

Inheritance diagram for inet::InterfaceEntry:

Public Types

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_GENERIC_DATA, F_ISIS_DATA, F_TRILL_DATA, F_IEEE8021D_DATA
}
 

Public Member Functions

virtual void setInterfaceTable (IInterfaceTable *t)
 
virtual void setInterfaceId (int id)
 
virtual void resetInterface ()
 
 InterfaceEntry (cModule *module)
 
virtual ~InterfaceEntry ()
 
virtual std::string info () const override
 
virtual std::string detailedInfo () const override
 
virtual std::string getFullPath () const override
 
IInterfaceTablegetInterfaceTable () const
 Returns the IInterfaceTable this interface is in, or nullptr. More...
 
State getState () const
 Returns the requested state of this interface. More...
 
bool isUp () const
 Returns the combined state of the carrier and the interface requested state. More...
 
const ModuleIdAddress getModuleIdAddress () const
 
const ModulePathAddress getModulePathAddress () const
 
const L3Address getNetworkAddress () const
 
virtual void joinMulticastGroup (const L3Address &address) const
 
virtual void changeMulticastGroupMembership (const L3Address &multicastAddress, McastSourceFilterMode oldFilterMode, const std::vector< L3Address > &oldSourceList, McastSourceFilterMode newFilterMode, const std::vector< L3Address > &newSourceList)
 
Field getters. Note they are non-virtual and inline, for performance reasons.
int getInterfaceId () const
 
cModule * getInterfaceModule () const
 
int getNetworkLayerGateIndex () 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
 
double getDatarate () const
 
const MACAddressgetMacAddress () const
 
const InterfaceTokengetInterfaceToken () const
 
Field setters
virtual void setName (const char *s) override
 
virtual void setNetworkLayerGateIndex (int i)
 
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)
 
Accessing protocol-specific interface data. Note methods are non-virtual, for performance reasons.
IPv4InterfaceDataipv4Data () const
 
IPv4Address getIPv4Address () const
 
IPv6InterfaceDataipv6Data () const
 
GenericNetworkProtocolInterfaceDatagetGenericNetworkProtocolData () const
 
TRILLInterfaceData * trillData () const
 
ISISInterfaceData * isisData () const
 
Ieee8021dInterfaceDataieee8021dData () const
 
Installing protocol-specific interface data
virtual void setIPv4Data (IPv4InterfaceData *p)
 
virtual void setIPv6Data (IPv6InterfaceData *p)
 
virtual void setGenericNetworkProtocolData (GenericNetworkProtocolInterfaceData *p)
 
virtual void setTRILLInterfaceData (TRILLInterfaceData *p)
 
virtual void setISISInterfaceData (ISISInterfaceData *p)
 
virtual void setIeee8021dInterfaceData (Ieee8021dInterfaceData *p)
 
access to the cost process estimation
virtual bool setEstimateCostProcess (int, MacEstimateCostProcess *p)
 
virtual MacEstimateCostProcessgetEstimateCostProcess (int)
 

Protected Member Functions

virtual void configChanged (int fieldId)
 
virtual void stateChanged (int fieldId)
 
virtual void changed (simsignal_t signalID, int fieldId)
 

Protected Attributes

IInterfaceTableownerp = nullptr
 IInterfaceTable that contains this interface, or nullptr. More...
 
cModule * interfaceModule = nullptr
 interface module, or nullptr More...
 
int interfaceId = -1
 identifies the interface in the IInterfaceTable More...
 
int nwLayerGateIndex = -1
 index of ifIn[],ifOut[] gates to that interface (or -1 if virtual interface) More...
 
int nodeOutputGateId = -1
 id of the output gate of this host/router (or -1 if this is a virtual interface) More...
 
int nodeInputGateId = -1
 id of the input gate of this host/router (or -1 if this is a virtual interface) More...
 
int mtu = 0
 Maximum Transmission Unit (e.g. 1500 on Ethernet); 0 means infinite (i.e. never fragment) More...
 
State state = DOWN
 requested interface state, similar to Linux ifup/ifdown More...
 
bool carrier = false
 current state (up/down) of the physical layer, e.g. Ethernet cable More...
 
bool broadcast = false
 interface supports broadcast More...
 
bool multicast = false
 interface supports multicast More...
 
bool pointToPoint = false
 interface is point-to-point link More...
 
bool loopback = false
 interface is loopback interface More...
 
double datarate = 0
 data rate in bit/s More...
 
MACAddress macAddr
 link-layer address (for now, only IEEE 802 MAC addresses are supported) More...
 
InterfaceToken token
 for IPv6 stateless autoconfig (RFC 1971), interface identifier (RFC 2462) More...
 
IPv4InterfaceDataipv4data = nullptr
 IPv4-specific interface info (IPv4 address, etc) More...
 
IPv6InterfaceDataipv6data = nullptr
 IPv6-specific interface info (IPv6 addresses, etc) More...
 
GenericNetworkProtocolInterfaceDatagenericNetworkProtocolData = nullptr
 GenericNetworkProtocol-specific interface info (Address, etc) More...
 
ISISInterfaceData * isisdata = nullptr
 ISIS-specific interface info. More...
 
TRILLInterfaceData * trilldata = nullptr
 TRILL-specific interface info. More...
 
Ieee8021dInterfaceDataieee8021ddata = nullptr
 
std::vector< MacEstimateCostProcess * > estimateCostProcessArray
 

Private Member Functions

 InterfaceEntry (const InterfaceEntry &obj)
 
InterfaceEntryoperator= (const InterfaceEntry &obj)
 

Friends

class InterfaceProtocolData
 

Detailed Description

Interface entry for the interface table in IInterfaceTable.

See also
IInterfaceTable

Member Enumeration Documentation

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_GENERIC_DATA 
F_ISIS_DATA 
F_TRILL_DATA 
F_IEEE8021D_DATA 
138  {
144  };
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:140
Definition: InterfaceEntry.h:142
Definition: InterfaceEntry.h:140
Definition: InterfaceEntry.h:139
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:141
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:141
Definition: InterfaceEntry.h:141
Definition: InterfaceEntry.h:140
Definition: InterfaceEntry.h:142
Definition: InterfaceEntry.h:141
Definition: InterfaceEntry.h:142
Definition: InterfaceEntry.h:142
Definition: InterfaceEntry.h:139
Definition: InterfaceEntry.h:143
Definition: InterfaceEntry.h:140
Enumerator
UP 
DOWN 
GOING_UP 
GOING_DOWN 
103 { UP, DOWN, GOING_UP, GOING_DOWN };
Definition: InterfaceEntry.h:103
Definition: InterfaceEntry.h:103
Definition: InterfaceEntry.h:103
Definition: InterfaceEntry.h:103

Constructor & Destructor Documentation

inet::InterfaceEntry::InterfaceEntry ( const InterfaceEntry obj)
private
inet::InterfaceEntry::InterfaceEntry ( cModule *  module)
71 {
73  if (!interfaceModule)
74  throw cRuntimeError("NIC module not found in the host");
75  setName(utils::stripnonalnum(interfaceModule->getFullName()).c_str());
76  state = UP;
77  carrier = true;
78  datarate = 0;
79 }
virtual void setName(const char *s) override
Definition: InterfaceEntry.h:203
State state
requested interface state, similar to Linux ifup/ifdown
Definition: InterfaceEntry.h:113
cModule * findModuleUnderContainingNode(const cModule *from)
Find the ancestor module under the node containing the given module.
Definition: ModuleAccess.cc:73
std::string stripnonalnum(const char *s)
Removes non-alphanumeric characters from the given string.
Definition: INETUtils.cc:56
bool carrier
current state (up/down) of the physical layer, e.g. Ethernet cable
Definition: InterfaceEntry.h:114
cModule * interfaceModule
interface module, or nullptr
Definition: InterfaceEntry.h:107
Definition: InterfaceEntry.h:103
double datarate
data rate in bit/s
Definition: InterfaceEntry.h:119
inet::InterfaceEntry::~InterfaceEntry ( )
virtual
82 {
84 }
virtual void resetInterface()
Definition: InterfaceEntry.cc:189

Member Function Documentation

void inet::InterfaceEntry::changed ( simsignal_t  signalID,
int  fieldId 
)
protectedvirtual

Referenced by inet::InterfaceProtocolData::changed().

182 {
183  if (ownerp) {
184  InterfaceEntryChangeDetails details(this, fieldId);
185  ownerp->interfaceChanged(signalID, &details);
186  }
187 }
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
virtual void interfaceChanged(simsignal_t signalID, const InterfaceEntryChangeDetails *details)=0
void inet::InterfaceEntry::changeMulticastGroupMembership ( const L3Address multicastAddress,
McastSourceFilterMode  oldFilterMode,
const std::vector< L3Address > &  oldSourceList,
McastSourceFilterMode  newFilterMode,
const std::vector< L3Address > &  newSourceList 
)
virtual

Referenced by inet::UDP::blockMulticastSources(), inet::UDP::joinMulticastSources(), inet::UDP::leaveMulticastGroups(), inet::UDP::leaveMulticastSources(), inet::UDP::setMulticastSourceFilter(), and inet::UDP::unblockMulticastSources().

368 {
369  switch (multicastAddress.getType()) {
370 #ifdef WITH_IPv4
371  case L3Address::IPv4: {
372  std::vector<IPv4Address> oldIPv4SourceList, newIPv4SourceList;
373  toIPv4AddressVector(oldSourceList, oldIPv4SourceList);
374  toIPv4AddressVector(newSourceList, newIPv4SourceList);
375  ipv4Data()->changeMulticastGroupMembership(multicastAddress.toIPv4(),
376  oldFilterMode, oldIPv4SourceList, newFilterMode, newIPv4SourceList);
377  break;
378  }
379 
380 #endif // ifdef WITH_IPv4
381 #ifdef WITH_IPv6
382  case L3Address::IPv6:
383  // TODO
384  throw cRuntimeError("changeMulticastGroupMembership() not implemented for type %s", L3Address::getTypeName(multicastAddress.getType()));
385  break;
386 
387 #endif // ifdef WITH_IPv6
388  case L3Address::MAC:
389  case L3Address::MODULEID:
391  // TODO
392  throw cRuntimeError("changeMulticastGroupMembership() not implemented for type %s", L3Address::getTypeName(multicastAddress.getType()));
393  break;
394 
395  default:
396  throw cRuntimeError("Unknown address type");
397  }
398 }
IPv4InterfaceData * ipv4Data() const
Definition: InterfaceEntry.h:221
Definition: L3Address.h:47
Definition: L3Address.h:49
virtual void changeMulticastGroupMembership(IPv4Address multicastAddress, McastSourceFilterMode oldFilterMode, const IPv4AddressVector &oldSourceList, McastSourceFilterMode newFilterMode, const IPv4AddressVector &newSourceList)
This method is called by sockets to register their multicast group membership changes in the interfac...
Definition: IPv4InterfaceData.cc:221
static const char * getTypeName(AddressType t)
Definition: L3Address.cc:384
Definition: L3Address.h:50
Definition: L3Address.h:48
Definition: L3Address.h:46
virtual void inet::InterfaceEntry::configChanged ( int  fieldId)
inlineprotectedvirtual
simsignal_t NF_INTERFACE_CONFIG_CHANGED
Definition: NotifierConsts.cc:51
virtual void changed(simsignal_t signalID, int fieldId)
Definition: InterfaceEntry.cc:181
std::string inet::InterfaceEntry::detailedInfo ( ) const
overridevirtual
130 {
131  std::stringstream out;
132  out << "name:" << (getName()[0] ? getName() : "*");
133  if (getNetworkLayerGateIndex() == -1)
134  out << " on:-";
135  else
136  out << " on:nwLayer.ifOut[" << getNetworkLayerGateIndex() << "]";
137  out << "MTU: " << getMTU() << " \t";
138  if (!isUp())
139  out << "DOWN ";
140  if (isBroadcast())
141  out << "BROADCAST ";
142  if (isMulticast())
143  out << "MULTICAST ";
144  if (isPointToPoint())
145  out << "POINTTOPOINT ";
146  if (isLoopback())
147  out << "LOOPBACK ";
148  out << "\n";
149  out << " macAddr:";
150  if (getMacAddress().isUnspecified())
151  out << "n/a";
152  else
153  out << getMacAddress();
154  out << "\n";
155 #ifdef WITH_IPv4
156  if (ipv4data)
157  out << " " << ipv4data->detailedInfo() << "\n";
158 #endif // ifdef WITH_IPv4
159 #ifdef WITH_IPv6
160  if (ipv6data)
161  out << " " << ipv6data->detailedInfo() << "\n";
162 #endif // ifdef WITH_IPv6
163 #ifdef WITH_GENERIC
165  out << " " << genericNetworkProtocolData->detailedInfo() << "\n";
166 #endif // ifdef WITH_GENERIC
167  if (isisdata)
168  out << " " << ((InterfaceProtocolData *)isisdata)->str() << "\n"; // Khmm...
169  if (trilldata)
170  out << " " << ((InterfaceProtocolData *)trilldata)->str() << "\n"; // Khmm...
171  if (ieee8021ddata)
172  out << " " << ((InterfaceProtocolData *)ieee8021ddata)->str() << "\n"; // Khmm...
173  return out.str();
174 }
int getMTU() const
Definition: InterfaceEntry.h:190
bool isLoopback() const
Definition: InterfaceEntry.h:195
ISISInterfaceData * isisdata
ISIS-specific interface info.
Definition: InterfaceEntry.h:126
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
bool isUp() const
Returns the combined state of the carrier and the interface requested state.
Definition: InterfaceEntry.h:177
bool isBroadcast() const
Definition: InterfaceEntry.h:192
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
virtual std::string detailedInfo() const override
Definition: GenericNetworkProtocolInterfaceData.cc:32
std::string detailedInfo() const override
Definition: IPv6InterfaceData.cc:235
Ieee8021dInterfaceData * ieee8021ddata
Definition: InterfaceEntry.h:128
virtual std::string detailedInfo() const override
Definition: IPv4InterfaceData.cc:182
const MACAddress & getMacAddress() const
Definition: InterfaceEntry.h:197
bool isMulticast() const
Definition: InterfaceEntry.h:193
bool isPointToPoint() const
Definition: InterfaceEntry.h:194
int getNetworkLayerGateIndex() const
Definition: InterfaceEntry.h:187
GenericNetworkProtocolInterfaceData * genericNetworkProtocolData
GenericNetworkProtocol-specific interface info (Address, etc)
Definition: InterfaceEntry.h:125
TRILLInterfaceData * trilldata
TRILL-specific interface info.
Definition: InterfaceEntry.h:127
double inet::InterfaceEntry::getDatarate ( ) const
inline
MacEstimateCostProcess * inet::InterfaceEntry::getEstimateCostProcess ( int  position)
virtual
322 {
323  ASSERT(position >= 0);
324  if ((size_t)position < estimateCostProcessArray.size()) {
325  return estimateCostProcessArray[position];
326  }
327  return nullptr;
328 }
std::vector< MacEstimateCostProcess * > estimateCostProcessArray
Definition: InterfaceEntry.h:129
std::string inet::InterfaceEntry::getFullPath ( ) const
overridevirtual
GenericNetworkProtocolInterfaceData* inet::InterfaceEntry::getGenericNetworkProtocolData ( ) const
inline
int inet::InterfaceEntry::getInterfaceId ( ) const
inline

Referenced by inet::PIMSM::addNewRouteG(), inet::PIMSM::addNewRouteSG(), inet::FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::UDP::blockMulticastSources(), inet::InterfaceTable::collectMulticastGroups(), 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::Ieee80211CanvasVisualizer::createIeee80211Visualization(), inet::visualizer::InterfaceTableCanvasVisualizer::createInterfaceVisualization(), inet::IPv6NeighbourDiscovery::createRATimer(), inet::xMIPv6::createTestInitTimer(), inet::xMIPv6::createTokenEntryExpiryTimer(), inet::CloudDelayerBase::datagramForwardHook(), inet::GenericNetworkProtocol::decapsulate(), inet::IPv6::decapsulate(), inet::IPv4::decapsulate(), inet::InterfaceTable::deleteInterface(), inet::IPv6NeighbourDiscovery::determineNextHop(), inet::IPv6::determineOutputInterface(), inet::IPv6NeighbourDiscovery::fetchAdvIfEntry(), inet::xMIPv6::fetchBUTransmitIfEntry(), inet::IPv6NeighbourDiscovery::fetchRDEntry(), inet::IGMPv2::getHostInterfaceData(), inet::IGMPv3::getHostInterfaceData(), inet::visualizer::Ieee80211VisualizerBase::getIeee80211Visualization(), inet::PIMDM::getIncomingInterface(), inet::PIMSM::getIncomingInterface(), inet::PIMInterface::getInterfaceId(), inet::PIMNeighbor::getInterfaceId(), inet::RIPRouting::getInterfaceMetric(), inet::visualizer::InterfaceTableVisualizerBase::getInterfaceVisualization(), inet::IGMPv2::getRouterInterfaceData(), inet::IGMPv3::getRouterInterfaceData(), inet::xMIPv6::handleBCExpiry(), inet::xMIPv6::handleBULExpiry(), inet::IPv4::handleIncomingARPPacket(), inet::IPv4::handleIncomingDatagram(), inet::xMIPv6::handleTokenExpiry(), inet::PIMSM::IamDR(), inet::IPv6RoutingTable::initialize(), inet::LDP::initialize(), inet::IPv6NeighbourDiscovery::initiateDAD(), inet::IPv6NeighbourDiscovery::initiateRouterDiscovery(), inet::PIMSM::DownstreamInterface::isInInheritedOlist(), inet::UDP::joinMulticastSources(), inet::UDP::leaveMulticastSources(), inet::ospf::OSPFConfigReader::loadExternalRoute(), inet::ospf::OSPFConfigReader::loadHostRoute(), inet::ospf::OSPFConfigReader::loadInterfaceParameters(), inet::PIMDM::multicastPacketArrivedOnRpfInterface(), inet::PIMSM::multicastPacketForwarded(), inet::PIMDM::multicastReceiverAdded(), inet::PIMSM::multicastReceiverAdded(), inet::PIMDM::multicastReceiverRemoved(), inet::PIMSM::multicastReceiverRemoved(), inet::PIMDM::processAssert(), inet::xMIPv6::processBAMessage(), inet::DHCPServer::processDHCPMessage(), inet::PIMDM::processGraft(), inet::PIMDM::processGraftPacket(), inet::PIMDM::processJoin(), inet::PIMSM::processJoinG(), inet::PIMSM::processJoinSG(), inet::IPv6NeighbourDiscovery::processNAPacket(), inet::IPv6NeighbourDiscovery::processNSWithSpecifiedSrcAddr(), inet::PIMDM::processPrune(), inet::PIMSM::processPruneG(), inet::PIMSM::processPrunePendingTimer(), inet::PIMSM::processPruneSG(), inet::IPv6NeighbourDiscovery::processRAForRouterUpdates(), inet::IPv6NeighbourDiscovery::processRAPrefixInfo(), inet::dymo::DYMO::processRERR(), inet::IPv4::reassembleAndDeliverFinish(), inet::IPv6RoutingTable::receiveSignal(), inet::IGMPv2::receiveSignal(), inet::PIMDM::receiveSignal(), inet::RIPRouting::receiveSignal(), inet::IGMPv3::receiveSignal(), inet::PIMSM::receiveSignal(), inet::PIMDM::Route::removeDownstreamInterface(), inet::ospf::OSPFConfigReader::resolveInterfaceName(), inet::PIMSM::restartExpiryTimer(), inet::xMIPv6::returningHome(), inet::IPv6::routePacket(), inet::IPv6NeighbourDiscovery::routersUnreachabilityDetection(), inet::IPv4::routeUnicastPacket(), inet::PIMDM::rpfInterfaceHasChanged(), inet::AODVRouting::sendAODVPacket(), inet::PIMDM::sendAssertPacket(), inet::dymo::DYMO::sendDYMOPacket(), inet::RIPRouting::sendPacket(), inet::ARP::sendPacketToNIC(), 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::PIMDM::sendStateRefreshPacket(), inet::xMIPv6::sendTestInit(), inet::IGMPv2::sendToIP(), inet::DHCPServer::sendToUDP(), inet::DHCPClient::sendToUDP(), inet::IPv6NeighbourDiscovery::sendUnsolicitedNA(), inet::UDP::setMulticastSourceFilter(), inet::LMacLayer::setUpControlInfo(), inet::BMacLayer::setUpControlInfo(), inet::UDP::unblockMulticastSources(), inet::PIMDM::unroutableMulticastPacketArrived(), inet::PIMSM::unroutableMulticastPacketArrived(), and inet::PIMSM::updateDesignatedRouterAddress().

185 { return interfaceId; }
int interfaceId
identifies the interface in the IInterfaceTable
Definition: InterfaceEntry.h:108
cModule* inet::InterfaceEntry::getInterfaceModule ( ) const
inline
const InterfaceToken& inet::InterfaceEntry::getInterfaceToken ( ) const
inline

Referenced by inet::IPv6NeighbourDiscovery::assignLinkLocalAddress(), inet::IPv6RoutingTable::assignRequiredNodeAddresses(), and inet::FlatNetworkConfigurator6::configureAdvPrefixes().

198 { return token; }
InterfaceToken token
for IPv6 stateless autoconfig (RFC 1971), interface identifier (RFC 2462)
Definition: InterfaceEntry.h:121
IPv4Address inet::InterfaceEntry::getIPv4Address ( ) const
400  {
401 #ifdef WITH_IPv4
403 #else
405 #endif // ifdef WITH_IPv4
406 }
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
IPv4Address getIPAddress() const
Definition: IPv4InterfaceData.h:177
static const IPv4Address UNSPECIFIED_ADDRESS
0.0.0.0
Definition: IPv4Address.h:102
const ModuleIdAddress inet::InterfaceEntry::getModuleIdAddress ( ) const
inline

Referenced by inet::InterfaceTable::findInterfaceByAddress(), and inet::L3AddressResolver::getInterfaceModuleIdAddress().

179 { return ModuleIdAddress(getInterfaceModule()->getId()); }
cModule * getInterfaceModule() const
Definition: InterfaceEntry.h:186
const ModulePathAddress inet::InterfaceEntry::getModulePathAddress ( ) const
inline

Referenced by inet::InterfaceTable::findInterfaceByAddress(), and inet::L3AddressResolver::getInterfaceModulePathAddress().

180 { return ModulePathAddress(getInterfaceModule()->getId()); }
cModule * getInterfaceModule() const
Definition: InterfaceEntry.h:186
const L3Address inet::InterfaceEntry::getNetworkAddress ( ) const

Referenced by inet::ProbabilisticBroadcast::initialize(), inet::WiseRoute::initialize(), and inet::Flood::initialize().

240 {
241 #ifdef WITH_IPv4
242  if (ipv4data)
243  return ipv4data->getIPAddress();
244 #endif // ifdef WITH_IPv4
245 #ifdef WITH_IPv6
246  if (ipv6data)
247  return ipv6data->getPreferredAddress();
248 #endif // ifdef WITH_IPv6
249 #ifdef WITH_GENERIC
252 #endif // ifdef WITH_GENERIC
253  return getModulePathAddress();
254 }
const IPv6Address & getPreferredAddress() const
Chooses a preferred address for the interface and returns it.
Definition: IPv6InterfaceData.h:562
const ModulePathAddress getModulePathAddress() const
Definition: InterfaceEntry.h:180
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
L3Address getAddress() const
Definition: GenericNetworkProtocolInterfaceData.h:60
IPv4Address getIPAddress() const
Definition: IPv4InterfaceData.h:177
GenericNetworkProtocolInterfaceData * genericNetworkProtocolData
GenericNetworkProtocol-specific interface info (Address, etc)
Definition: InterfaceEntry.h:125
int inet::InterfaceEntry::getNetworkLayerGateIndex ( ) const
inline
int inet::InterfaceEntry::getNodeInputGateId ( ) const
inline

Referenced by inet::InterfaceTable::getInterfaceByInterfaceModule(), inet::MatrixCloudDelayer::getPathOfConnectedNodeOnIfaceID(), and inet::L2NetworkConfigurator::readInterfaceConfiguration().

189 { return nodeInputGateId; }
int nodeInputGateId
id of the input gate of this host/router (or -1 if this is a virtual interface)
Definition: InterfaceEntry.h:111
State inet::InterfaceEntry::getState ( ) const
inline

Returns the requested state of this interface.

173 { return state; }
State state
requested interface state, similar to Linux ifup/ifdown
Definition: InterfaceEntry.h:113
bool inet::InterfaceEntry::hasCarrier ( ) const
inline

Referenced by inet::RSTP::receiveSignal().

191 { return carrier; }
bool carrier
current state (up/down) of the physical layer, e.g. Ethernet cable
Definition: InterfaceEntry.h:114
std::string inet::InterfaceEntry::info ( ) const
overridevirtual

Referenced by inet::IPv4NetworkConfigurator::dumpAddresses(), and inet::operator<<().

87 {
88  std::stringstream out;
89  out << (getName()[0] ? getName() : "*");
90  out << " id=" << getInterfaceId();
91  if (getNetworkLayerGateIndex() == -1)
92  out << " on:-";
93  else
94  out << " on:nwLayer.ifOut[" << getNetworkLayerGateIndex() << "]";
95  out << " MTU:" << getMTU();
96  if (!isUp())
97  out << " DOWN";
98  if (isBroadcast())
99  out << " BROADCAST";
100  if (isMulticast())
101  out << " MULTICAST";
102  if (isPointToPoint())
103  out << " POINTTOPOINT";
104  if (isLoopback())
105  out << " LOOPBACK";
106  out << " macAddr:";
107  if (getMacAddress().isUnspecified())
108  out << "n/a";
109  else
110  out << getMacAddress();
111 
112 #ifdef WITH_IPv4
113  if (ipv4data)
114  out << " " << ipv4data->info();
115 #endif // ifdef WITH_IPv4
116 #ifdef WITH_IPv6
117  if (ipv6data)
118  out << " " << ipv6data->info();
119 #endif // ifdef WITH_IPv6
120  if (isisdata)
121  out << " " << ((InterfaceProtocolData *)isisdata)->str(); // Khmm...
122  if (trilldata)
123  out << " " << ((InterfaceProtocolData *)trilldata)->str(); // Khmm...
124  if (ieee8021ddata)
125  out << " " << ((InterfaceProtocolData *)ieee8021ddata)->str(); // Khmm...
126  return out.str();
127 }
int getInterfaceId() const
Definition: InterfaceEntry.h:185
int getMTU() const
Definition: InterfaceEntry.h:190
bool isLoopback() const
Definition: InterfaceEntry.h:195
ISISInterfaceData * isisdata
ISIS-specific interface info.
Definition: InterfaceEntry.h:126
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
std::string info() const override
Definition: IPv6InterfaceData.cc:154
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
bool isUp() const
Returns the combined state of the carrier and the interface requested state.
Definition: InterfaceEntry.h:177
bool isBroadcast() const
Definition: InterfaceEntry.h:192
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
virtual std::string info() const override
Definition: IPv4InterfaceData.cc:170
Ieee8021dInterfaceData * ieee8021ddata
Definition: InterfaceEntry.h:128
const MACAddress & getMacAddress() const
Definition: InterfaceEntry.h:197
bool isMulticast() const
Definition: InterfaceEntry.h:193
bool isPointToPoint() const
Definition: InterfaceEntry.h:194
int getNetworkLayerGateIndex() const
Definition: InterfaceEntry.h:187
TRILLInterfaceData * trilldata
TRILL-specific interface info.
Definition: InterfaceEntry.h:127
IPv4InterfaceData* inet::InterfaceEntry::ipv4Data ( ) const
inline

Referenced by inet::UDP::addMulticastAddressToInterface(), inet::FlatNetworkConfigurator::assignAddresses(), inet::DHCPClient::bindLease(), inet::DHCPClient::chooseInterface(), inet::InterfaceTable::collectMulticastGroups(), inet::IPv4NetworkConfigurator::configureInterface(), inet::IPv4RoutingTable::configureRouterId(), inet::IPv4NetworkConfigurator::createInterfaceInfo(), inet::bgp::BGPRouting::createSession(), inet::sctp::SCTPNatHook::datagramForwardHook(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::RSVP::evalNextHopInterface(), inet::L3AddressResolver::findHostWithAddress(), inet::InterfaceTable::findInterfaceByAddress(), inet::IPv4RoutingTable::findInterfaceByLocalBroadcastAddress(), inet::bgp::BGPRouting::findMyAS(), inet::IPv4::forwardMulticastPacket(), inet::IPv4::fragmentAndSend(), inet::PingApp::getAllAddresses(), inet::IPv4RoutingTable::getInterfaceByAddress(), inet::L3AddressResolver::getInterfaceIPv4Address(), inet::PIMBase::handleNodeStart(), inet::PIMSM::IamDR(), inet::IPv4Route::info(), inet::LinkStateRouting::initialize(), inet::GlobalARP::initialize(), inet::IGMPv3::initialize(), inet::TED::initializeTED(), inet::bgp::BGPRouting::isInInterfaceTable(), inet::IPv4RoutingTable::isLocalBroadcastAddress(), inet::IPv4RoutingTable::isLocalMulticastAddress(), inet::InterfaceTable::isNeighborAddress(), inet::ospf::OSPFConfigReader::joinMulticastGroups(), inet::PIMDM::multicastPacketArrivedOnNonRpfInterface(), inet::PIMSM::multicastPacketArrivedOnNonRpfInterface(), inet::bgp::BGPRouting::openTCPConnectionToPeer(), inet::RoutingTableParser::parseInterfaces(), inet::RoutingTableParser::parseMulticastGroups(), inet::ICMP::possiblyLocalBroadcast(), inet::IPv4NodeConfigurator::prepareInterface(), inet::IPv4::preroutingFinish(), inet::IPv4RoutingTable::printRoutingTable(), inet::PIMDM::processAssert(), inet::PIMSM::processAssertG(), inet::PIMSM::processAssertSG(), inet::DHCPServer::processDHCPMessage(), inet::PIMDM::processGraftAckPacket(), inet::PIMDM::processGraftPacket(), inet::sctp::SCTPAssociation::processInitArrived(), inet::PIMDM::processJoin(), inet::PIMSM::processJoinG(), inet::PIMSM::processJoinSG(), inet::IGMPv2::processLeaveTimer(), inet::PIMDM::processPrune(), inet::PIMSM::processPruneG(), inet::PIMSM::processPrunePendingTimer(), inet::PIMSM::processPruneSG(), inet::IGMPv3::processQuery(), inet::IGMPv3::processReport(), inet::IGMPv3::processRouterGroupTimer(), inet::IGMPv3::processRouterSourceTimer(), inet::PIMDM::processStateRefreshTimer(), inet::IGMPv2::processV2Report(), inet::LDP::rebuildFecList(), inet::RoutingTableRecorder::recordInterfaceChange(), inet::IPv4::resolveNextHopMacAddress(), inet::DHCPServer::sendACK(), inet::ARP::sendARPRequest(), inet::IPv4::sendDatagramToOutput(), inet::sctp::SCTPAssociation::sendInit(), inet::DHCPServer::sendNAK(), inet::DHCPServer::sendOffer(), inet::ospf::Interface::setIfIndex(), inet::HostAutoConfigurator::setupNetworkLayer(), inet::DHCPServer::startApp(), inet::DHCPClient::unbindLease(), inet::PIMDM::unroutableMulticastPacketArrived(), inet::PIMSM::updateDesignatedRouterAddress(), inet::InterfaceTable::updateLinkDisplayString(), inet::IPv4RoutingTable::updateNetmaskRoutes(), and inet::bgp::BGPRouting::updateSendProcess().

221 { return ipv4data; }
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
IPv6InterfaceData* inet::InterfaceEntry::ipv6Data ( ) const
inline

Referenced by inet::UDP::addMulticastAddressToInterface(), inet::FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::IPv6NeighbourDiscovery::assignLinkLocalAddress(), inet::IPv6RoutingTable::assignRequiredNodeAddresses(), inet::xMIPv6::cancelEntries(), inet::FlatNetworkConfigurator6::configureAdvPrefixes(), inet::IPv6RoutingTable::configureInterfaceFromXML(), inet::xMIPv6::createAndSendBRRMessage(), inet::xMIPv6::createAndSendBUMessage(), inet::IPv6NeighbourDiscovery::createAndSendRAPacket(), inet::IPv6NeighbourDiscovery::createAndSendRSPacket(), inet::xMIPv6::createBUTimer(), inet::xMIPv6::createDeregisterBUTimer(), inet::IPv6NeighbourDiscovery::createRATimer(), inet::xMIPv6::createTestInitTimer(), inet::IPv6Tunneling::decapsulateDatagram(), inet::IPv6::endService(), inet::L3AddressResolver::findHostWithAddress(), inet::InterfaceTable::findInterfaceByAddress(), inet::IPv6::fragmentAndSend(), inet::PingApp::getAllAddresses(), inet::IPv6RoutingTable::getHomeAddress(), inet::IPv6RoutingTable::getInterfaceByAddress(), inet::L3AddressResolver::getInterfaceIPv6Address(), inet::L3AddressResolver::getIPv6AddressFrom(), inet::IPv6AddressType::getLinkLocalAddress(), inet::GPSR::getSelfAddress(), inet::xMIPv6::handleBULExpiry(), inet::xMIPv6::handleTokenExpiry(), inet::IPv6RoutingTable::initialize(), inet::IPv6NeighbourDiscovery::initialize(), inet::IPv6NeighbourDiscovery::initiateAddressResolution(), inet::IPv6NeighbourDiscovery::initiateDAD(), inet::xMIPv6::initiateMIPv6Protocol(), inet::IPv6NeighbourDiscovery::initiateNeighbourUnreachabilityDetection(), inet::IPv6NeighbourDiscovery::initiateRouterDiscovery(), inet::BindingUpdateList::isCareOfTokenAvailable(), inet::IPv6RoutingTable::isHomeAddress(), inet::BindingUpdateList::isHomeTokenAvailable(), inet::IPv6RoutingTable::isLocalAddress(), inet::InterfaceTable::isNeighborAddress(), inet::IPv6RoutingTable::isOnLinkAddress(), inet::IPv6NeighbourDiscovery::makeTentativeAddressPermanent(), inet::IPv6NeighbourDiscovery::processARTimeout(), inet::xMIPv6::processBAMessage(), inet::xMIPv6::processCoTMessage(), inet::IPv6NeighbourDiscovery::processDADTimeout(), inet::xMIPv6::processHoTMessage(), inet::sctp::SCTPAssociation::processInitArrived(), inet::IPv6NeighbourDiscovery::processNAForIncompleteNCEState(), inet::IPv6NeighbourDiscovery::processNAForOtherNCEStates(), inet::IPv6NeighbourDiscovery::processNAPacket(), inet::IPv6NeighbourDiscovery::processNSPacket(), inet::IPv6NeighbourDiscovery::processRAForRouterUpdates(), inet::IPv6NeighbourDiscovery::processRAPacket(), inet::IPv6NeighbourDiscovery::processRAPrefixInfo(), inet::IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf(), inet::IPv6NeighbourDiscovery::processRDTimeout(), inet::IPv6NeighbourDiscovery::processRSPacket(), inet::BindingUpdateList::recentlySentCOTI(), inet::BindingUpdateList::recentlySentHOTI(), inet::xMIPv6::resetBUIfEntry(), inet::IPv6::resolveMACAddressAndSendPacket(), inet::xMIPv6::returningHome(), inet::sctp::SCTPAssociation::sendInit(), inet::xMIPv6::sendPeriodicBU(), inet::IPv6NeighbourDiscovery::sendPeriodicRA(), inet::IPv6NeighbourDiscovery::sendSolicitedNA(), inet::xMIPv6::sendTestInit(), inet::IPv6NeighbourDiscovery::sendUnsolicitedNA(), inet::xMIPv6::triggerRouteOptimization(), inet::InterfaceTable::updateLinkDisplayString(), inet::xMIPv6::validateBAck(), and inet::xMIPv6::validateCoTMessage().

223 { return ipv6data; }
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
ISISInterfaceData* inet::InterfaceEntry::isisData ( ) const
inline
226 { return isisdata; }
ISISInterfaceData * isisdata
ISIS-specific interface info.
Definition: InterfaceEntry.h:126
bool inet::InterfaceEntry::isLoopback ( ) const
inline

Referenced by inet::FlatNetworkConfigurator::addDefaultRoutes(), inet::FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::GenericNetworkConfigurator::addStaticRoutes(), inet::IPv4NetworkConfigurator::addStaticRoutes(), inet::FlatNetworkConfigurator::assignAddresses(), inet::IPv6NeighbourDiscovery::assignLinkLocalAddress(), inet::IPv6RoutingTable::assignRequiredNodeAddresses(), inet::STPBase::chooseInterface(), inet::Ieee8021dRelay::chooseInterface(), inet::DHCPServer::chooseInterface(), inet::DHCPClient::chooseInterface(), inet::FlatNetworkConfigurator6::configureAdvPrefixes(), inet::IPv6RoutingTable::configureInterfaceForIPv6(), inet::PIMInterfaceTable::configureInterfaces(), inet::RIPRouting::configureInterfaces(), inet::GenericRoutingTable::configureRouterId(), inet::IPv4RoutingTable::configureRouterId(), inet::IPv4::datagramLocalOut(), inet::NetworkConfiguratorBase::determineGatewayForLink(), inet::NetworkInfo::dumpRoutingInfo(), inet::NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::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::RIPRouting::isLocalInterfaceRoute(), inet::RIPRouting::isLoopbackInterfaceRoute(), inet::IPv6NeighbourDiscovery::makeTentativeAddressPermanent(), inet::IPv4NodeConfigurator::prepareInterface(), inet::IPv4::preroutingFinish(), inet::PIMInterfaceTable::receiveSignal(), inet::RIPRouting::receiveSignal(), inet::RIPInterfaceEntry::RIPInterfaceEntry(), inet::GenericNetworkProtocol::routeMulticastPacket(), inet::IPv6::routeMulticastPacket(), inet::NetworkProtocolBase::sendDown(), and inet::HostAutoConfigurator::setupNetworkLayer().

195 { return loopback; }
bool loopback
interface is loopback interface
Definition: InterfaceEntry.h:118
bool inet::InterfaceEntry::isMulticast ( ) const
inline

Referenced by inet::UDP::addMulticastAddressToInterface(), inet::UDP::blockMulticastSources(), inet::IPv4RoutingTable::configureInterfaceForIPv4(), inet::IPv6RoutingTable::configureInterfaceForIPv6(), inet::PIMInterfaceTable::configureInterfaces(), inet::GPSR::configureInterfaces(), inet::dymo::DYMO::configureInterfaces(), inet::RIPRouting::configureInterfaces(), inet::IGMPv2::initialize(), inet::LDP::initialize(), inet::IGMPv3::initialize(), inet::IPv4RoutingTable::internalAddMulticastRoute(), inet::ospf::OSPFConfigReader::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::PIMInterfaceTable::receiveSignal(), inet::IGMPv2::receiveSignal(), inet::RIPRouting::receiveSignal(), inet::IGMPv3::receiveSignal(), inet::RIPInterfaceEntry::RIPInterfaceEntry(), inet::IGMPv3::sendQueryToIP(), inet::IGMPv3::sendReportToIP(), inet::IGMPv2::sendToIP(), inet::UDP::setMulticastSourceFilter(), and inet::UDP::unblockMulticastSources().

193 { return multicast; }
bool multicast
interface supports multicast
Definition: InterfaceEntry.h:116
bool inet::InterfaceEntry::isPointToPoint ( ) const
inline

Referenced by inet::IPv6NeighbourDiscovery::processIPv6Datagram(), and inet::IPv6::resolveMACAddressAndSendPacket().

194 { return pointToPoint; }
bool pointToPoint
interface is point-to-point link
Definition: InterfaceEntry.h:117
bool inet::InterfaceEntry::isUp ( ) const
inline

Returns the combined state of the carrier and the interface requested state.

Referenced by inet::IPv6RoutingTable::receiveSignal(), inet::RIPRouting::receiveSignal(), and inet::PIMDM::rpfInterfaceHasChanged().

177 { return getState() == UP && hasCarrier(); }
bool hasCarrier() const
Definition: InterfaceEntry.h:191
Definition: InterfaceEntry.h:103
State getState() const
Returns the requested state of this interface.
Definition: InterfaceEntry.h:173
void inet::InterfaceEntry::joinMulticastGroup ( const L3Address address) const
virtual

Referenced by inet::UDP::addMulticastAddressToInterface(), inet::GPSR::configureInterfaces(), and inet::dymo::DYMO::configureInterfaces().

331 {
332  switch (address.getType()) {
333 #ifdef WITH_IPv4
334  case L3Address::IPv4:
335  ipv4Data()->joinMulticastGroup(address.toIPv4());
336  break;
337 
338 #endif // ifdef WITH_IPv4
339 #ifdef WITH_IPv6
340  case L3Address::IPv6:
341  ipv6Data()->joinMulticastGroup(address.toIPv6());
342  break;
343 
344 #endif // ifdef WITH_IPv6
345 #ifdef WITH_GENERIC
346  case L3Address::MAC:
347  case L3Address::MODULEID:
350  break;
351 
352 #endif // ifdef WITH_GENERIC
353  default:
354  throw cRuntimeError("Unknown address type");
355  }
356 }
IPv4InterfaceData * ipv4Data() const
Definition: InterfaceEntry.h:221
Definition: L3Address.h:47
virtual void joinMulticastGroup(const IPv4Address &multicastAddress)
Definition: IPv4InterfaceData.cc:205
GenericNetworkProtocolInterfaceData * getGenericNetworkProtocolData() const
Definition: InterfaceEntry.h:224
Definition: L3Address.h:49
virtual void joinMulticastGroup(L3Address address)
Definition: GenericNetworkProtocolInterfaceData.h:70
Definition: L3Address.h:50
IPv6InterfaceData * ipv6Data() const
Definition: InterfaceEntry.h:223
Definition: L3Address.h:48
Definition: L3Address.h:46
virtual void joinMulticastGroup(const IPv6Address &multicastAddress)
Definition: IPv6InterfaceData.cc:459
InterfaceEntry& inet::InterfaceEntry::operator= ( const InterfaceEntry obj)
private
void inet::InterfaceEntry::resetInterface ( )
virtual
190 {
191 #ifdef WITH_IPv4
192  if (ipv4data && ipv4data->ownerp == this)
193  delete ipv4data;
194  ipv4data = nullptr;
195 #else // ifdef WITH_IPv4
196  if (ipv4data)
197  throw cRuntimeError(this, "Model error: ipv4data filled, but INET was compiled without IPv4 support");
198 #endif // ifdef WITH_IPv4
199 #ifdef WITH_IPv6
200  if (ipv6data && ipv6data->ownerp == this)
201  delete ipv6data;
202  ipv6data = nullptr;
203 #else // ifdef WITH_IPv6
204  if (ipv6data)
205  throw cRuntimeError(this, "Model error: ipv6data filled, but INET was compiled without IPv6 support");
206 #endif // ifdef WITH_IPv6
207 #ifdef WITH_GENERIC
210  genericNetworkProtocolData = nullptr;
211 #else // ifdef WITH_GENERIC
213  throw cRuntimeError(this, "Model error: genericNetworkProtocolData filled, but INET was compiled without Generic Network Layer support");
214 #endif // ifdef WITH_GENERIC
215  if (isisdata && ((InterfaceProtocolData *)isisdata)->ownerp == this)
217  isisdata = nullptr;
218  if (trilldata && ((InterfaceProtocolData *)trilldata)->ownerp == this)
220  trilldata = nullptr;
223  ieee8021ddata = nullptr;
224 }
ISISInterfaceData * isisdata
ISIS-specific interface info.
Definition: InterfaceEntry.h:126
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
InterfaceEntry * ownerp
Definition: InterfaceEntry.h:65
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
Ieee8021dInterfaceData * ieee8021ddata
Definition: InterfaceEntry.h:128
GenericNetworkProtocolInterfaceData * genericNetworkProtocolData
GenericNetworkProtocol-specific interface info (Address, etc)
Definition: InterfaceEntry.h:125
TRILLInterfaceData * trilldata
TRILL-specific interface info.
Definition: InterfaceEntry.h:127
virtual void inet::InterfaceEntry::setBroadcast ( bool  b)
inlinevirtual
virtual void inet::InterfaceEntry::setCarrier ( bool  b)
inlinevirtual

Referenced by inet::PPP::createInterfaceEntry(), inet::EtherMACBase::readChannelParameters(), and inet::PPP::refreshOutGateConnection().

209 { if (carrier != b) { carrier = b; stateChanged(F_CARRIER); } }
virtual void stateChanged(int fieldId)
Definition: InterfaceEntry.h:149
bool carrier
current state (up/down) of the physical layer, e.g. Ethernet cable
Definition: InterfaceEntry.h:114
Definition: InterfaceEntry.h:139
value< double, units::m > b
Definition: Units.h:1054
virtual void inet::InterfaceEntry::setDatarate ( double  d)
inlinevirtual
bool inet::InterfaceEntry::setEstimateCostProcess ( int  position,
MacEstimateCostProcess p 
)
virtual
310 {
311  ASSERT(position >= 0);
312  if (estimateCostProcessArray.size() <= (size_t)position) {
313  estimateCostProcessArray.resize(position + 1, nullptr);
314  }
315  if (estimateCostProcessArray[position] != nullptr)
316  return false;
317  estimateCostProcessArray[position] = p;
318  return true;
319 }
std::vector< MacEstimateCostProcess * > estimateCostProcessArray
Definition: InterfaceEntry.h:129
void inet::InterfaceEntry::setGenericNetworkProtocolData ( GenericNetworkProtocolInterfaceData p)
virtual

Referenced by inet::GenericRoutingTable::configureInterface().

227 {
228 #ifdef WITH_GENERIC
232  p->ownerp = this;
234 #else // ifdef WITH_GENERIC
235  throw cRuntimeError(this, "setGenericNetworkProtocolData(): INET was compiled without Generic Network Layer support");
236 #endif // ifdef WITH_GENERIC
237 }
Definition: InterfaceEntry.h:143
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
InterfaceEntry * ownerp
Definition: InterfaceEntry.h:65
GenericNetworkProtocolInterfaceData * genericNetworkProtocolData
GenericNetworkProtocol-specific interface info (Address, etc)
Definition: InterfaceEntry.h:125
void inet::InterfaceEntry::setIeee8021dInterfaceData ( Ieee8021dInterfaceData p)
virtual

Referenced by inet::L2NodeConfigurator::prepareInterface().

301 {
302  if (ieee8021ddata && ((InterfaceProtocolData *)ieee8021ddata)->ownerp == this) // Khmm...
303  delete (InterfaceProtocolData *)ieee8021ddata; // Khmm...
304  ieee8021ddata = p;
305  ((InterfaceProtocolData *)p)->ownerp = this; // Khmm...
307 }
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
Definition: InterfaceEntry.h:143
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
InterfaceEntry * ownerp
Definition: InterfaceEntry.h:65
Ieee8021dInterfaceData * ieee8021ddata
Definition: InterfaceEntry.h:128
virtual void inet::InterfaceEntry::setInterfaceId ( int  id)
inlinevirtual

Referenced by inet::InterfaceTable::addInterface().

155 { interfaceId = id; }
int interfaceId
identifies the interface in the IInterfaceTable
Definition: InterfaceEntry.h:108
uint16_t id
Definition: TCP_NSC.cc:85
virtual void inet::InterfaceEntry::setInterfaceTable ( IInterfaceTable t)
inlinevirtual

Referenced by inet::InterfaceTable::addInterface().

154 { ownerp = t; }
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
virtual void inet::InterfaceEntry::setInterfaceToken ( const InterfaceToken t)
inlinevirtual
void inet::InterfaceEntry::setIPv4Data ( IPv4InterfaceData p)
virtual

Referenced by inet::IPv4RoutingTable::configureInterfaceForIPv4(), inet::IPv4RoutingTable::configureLoopbackForIPv4(), and inet::IPv4NodeConfigurator::prepareInterface().

257 {
258 #ifdef WITH_IPv4
259  if (ipv4data && ipv4data->ownerp == this)
260  delete ipv4data;
261  ipv4data = p;
262  p->ownerp = this;
264 #else // ifdef WITH_IPv4
265  throw cRuntimeError(this, "setIPv4Data(): INET was compiled without IPv4 support");
266 #endif // ifdef WITH_IPv4
267 }
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
InterfaceEntry * ownerp
Definition: InterfaceEntry.h:65
IPv4InterfaceData * ipv4data
IPv4-specific interface info (IPv4 address, etc)
Definition: InterfaceEntry.h:123
Definition: InterfaceEntry.h:143
void inet::InterfaceEntry::setIPv6Data ( IPv6InterfaceData p)
virtual

Referenced by inet::IPv6RoutingTable::configureInterfaceForIPv6().

270 {
271 #ifdef WITH_IPv6
272  if (ipv6data && ipv6data->ownerp == this)
273  delete ipv6data;
274  ipv6data = p;
275  p->ownerp = this;
277 #else // ifdef WITH_IPv6
278  throw cRuntimeError(this, "setIPv6Data(): INET was compiled without IPv6 support");
279 #endif // ifdef WITH_IPv6
280 }
Definition: InterfaceEntry.h:143
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
IPv6InterfaceData * ipv6data
IPv6-specific interface info (IPv6 addresses, etc)
Definition: InterfaceEntry.h:124
InterfaceEntry * ownerp
Definition: InterfaceEntry.h:65
void inet::InterfaceEntry::setISISInterfaceData ( ISISInterfaceData *  p)
virtual
292 {
293  if (isisdata && ((InterfaceProtocolData *)isisdata)->ownerp == this) // Khmm...
294  delete (InterfaceProtocolData *)isisdata; // Khmm...
295  isisdata = p;
296  ((InterfaceProtocolData *)p)->ownerp = this; // Khmm...
298 }
ISISInterfaceData * isisdata
ISIS-specific interface info.
Definition: InterfaceEntry.h:126
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
Definition: InterfaceEntry.h:143
virtual void inet::InterfaceEntry::setLoopback ( bool  b)
inlinevirtual

Referenced by inet::Loopback::createInterfaceEntry().

213 { if (loopback != b) { loopback = b; configChanged(F_LOOPBACK); } }
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
Definition: InterfaceEntry.h:141
bool loopback
interface is loopback interface
Definition: InterfaceEntry.h:118
value< double, units::m > b
Definition: Units.h:1054
virtual void inet::InterfaceEntry::setMACAddress ( const MACAddress addr)
inlinevirtual

Referenced by inet::IdealMac::createInterfaceEntry(), inet::ieee80211::Ieee80211Mac::createInterfaceEntry(), inet::LMacLayer::createInterfaceEntry(), inet::CsmaCaMac::createInterfaceEntry(), inet::BMacLayer::createInterfaceEntry(), inet::EtherMACBase::createInterfaceEntry(), and inet::CSMA::createInterfaceEntry().

215 { if (macAddr != addr) { macAddr = addr; configChanged(F_MACADDRESS); } }
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
MACAddress macAddr
link-layer address (for now, only IEEE 802 MAC addresses are supported)
Definition: InterfaceEntry.h:120
Definition: InterfaceEntry.h:142
virtual void inet::InterfaceEntry::setName ( const char *  s)
inlineoverridevirtual
203 { cNamedObject::setName(s); configChanged(F_NAME); }
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
Definition: InterfaceEntry.h:140
value< double, units::s > s
Definition: Units.h:1049
virtual void inet::InterfaceEntry::setNetworkLayerGateIndex ( int  i)
inlinevirtual

Referenced by inet::InterfaceTable::discoverConnectingGates().

Definition: InterfaceEntry.h:140
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
int nwLayerGateIndex
index of ifIn[],ifOut[] gates to that interface (or -1 if virtual interface)
Definition: InterfaceEntry.h:109
virtual void inet::InterfaceEntry::setNodeInputGateId ( int  i)
inlinevirtual

Referenced by inet::InterfaceTable::discoverConnectingGates().

virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
int nodeInputGateId
id of the input gate of this host/router (or -1 if this is a virtual interface)
Definition: InterfaceEntry.h:111
Definition: InterfaceEntry.h:140
virtual void inet::InterfaceEntry::setNodeOutputGateId ( int  i)
inlinevirtual

Referenced by inet::InterfaceTable::discoverConnectingGates().

Definition: InterfaceEntry.h:140
int nodeOutputGateId
id of the output gate of this host/router (or -1 if this is a virtual interface)
Definition: InterfaceEntry.h:110
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
virtual void inet::InterfaceEntry::setPointToPoint ( bool  b)
inlinevirtual

Referenced by inet::ExtInterface::createInterfaceEntry(), inet::ieee80211::Ieee80211Mac::createInterfaceEntry(), inet::PPP::createInterfaceEntry(), inet::CsmaCaMac::createInterfaceEntry(), and inet::RoutingTableParser::parseInterfaces().

Definition: InterfaceEntry.h:141
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
bool pointToPoint
interface is point-to-point link
Definition: InterfaceEntry.h:117
value< double, units::m > b
Definition: Units.h:1054
virtual void inet::InterfaceEntry::setState ( State  s)
inlinevirtual
208 { if (state != s) { state = s; stateChanged(F_STATE); } }
virtual void stateChanged(int fieldId)
Definition: InterfaceEntry.h:149
Definition: InterfaceEntry.h:139
State state
requested interface state, similar to Linux ifup/ifdown
Definition: InterfaceEntry.h:113
value< double, units::s > s
Definition: Units.h:1049
void inet::InterfaceEntry::setTRILLInterfaceData ( TRILLInterfaceData *  p)
virtual
283 {
284  if (trilldata && ((InterfaceProtocolData *)trilldata)->ownerp == this) // Khmm...
285  delete (InterfaceProtocolData *)trilldata; // Khmm...
286  trilldata = p;
287  ((InterfaceProtocolData *)p)->ownerp = this; // Khmm...
289 }
Definition: InterfaceEntry.h:143
IInterfaceTable * ownerp
IInterfaceTable that contains this interface, or nullptr.
Definition: InterfaceEntry.h:106
friend class InterfaceProtocolData
Definition: InterfaceEntry.h:100
virtual void configChanged(int fieldId)
Definition: InterfaceEntry.h:148
TRILLInterfaceData * trilldata
TRILL-specific interface info.
Definition: InterfaceEntry.h:127
virtual void inet::InterfaceEntry::stateChanged ( int  fieldId)
inlineprotectedvirtual
149 { changed(NF_INTERFACE_STATE_CHANGED, fieldId); }
virtual void changed(simsignal_t signalID, int fieldId)
Definition: InterfaceEntry.cc:181
simsignal_t NF_INTERFACE_STATE_CHANGED
Definition: NotifierConsts.cc:50
TRILLInterfaceData* inet::InterfaceEntry::trillData ( ) const
inline
225 { return trilldata; }
TRILLInterfaceData * trilldata
TRILL-specific interface info.
Definition: InterfaceEntry.h:127

Friends And Related Function Documentation

friend class InterfaceProtocolData
friend

Member Data Documentation

bool inet::InterfaceEntry::broadcast = false
protected

interface supports broadcast

bool inet::InterfaceEntry::carrier = false
protected

current state (up/down) of the physical layer, e.g. Ethernet cable

double inet::InterfaceEntry::datarate = 0
protected

data rate in bit/s

std::vector<MacEstimateCostProcess *> inet::InterfaceEntry::estimateCostProcessArray
protected
GenericNetworkProtocolInterfaceData* inet::InterfaceEntry::genericNetworkProtocolData = nullptr
protected

GenericNetworkProtocol-specific interface info (Address, etc)

Ieee8021dInterfaceData* inet::InterfaceEntry::ieee8021ddata = nullptr
protected
int inet::InterfaceEntry::interfaceId = -1
protected

identifies the interface in the IInterfaceTable

cModule* inet::InterfaceEntry::interfaceModule = nullptr
protected

interface module, or nullptr

IPv4InterfaceData* inet::InterfaceEntry::ipv4data = nullptr
protected

IPv4-specific interface info (IPv4 address, etc)

IPv6InterfaceData* inet::InterfaceEntry::ipv6data = nullptr
protected

IPv6-specific interface info (IPv6 addresses, etc)

ISISInterfaceData* inet::InterfaceEntry::isisdata = nullptr
protected

ISIS-specific interface info.

bool inet::InterfaceEntry::loopback = false
protected

interface is loopback interface

MACAddress inet::InterfaceEntry::macAddr
protected

link-layer address (for now, only IEEE 802 MAC addresses are supported)

int inet::InterfaceEntry::mtu = 0
protected

Maximum Transmission Unit (e.g. 1500 on Ethernet); 0 means infinite (i.e. never fragment)

bool inet::InterfaceEntry::multicast = false
protected

interface supports multicast

int inet::InterfaceEntry::nodeInputGateId = -1
protected

id of the input gate of this host/router (or -1 if this is a virtual interface)

int inet::InterfaceEntry::nodeOutputGateId = -1
protected

id of the output gate of this host/router (or -1 if this is a virtual interface)

int inet::InterfaceEntry::nwLayerGateIndex = -1
protected

index of ifIn[],ifOut[] gates to that interface (or -1 if virtual interface)

IInterfaceTable* inet::InterfaceEntry::ownerp = nullptr
protected

IInterfaceTable that contains this interface, or nullptr.

bool inet::InterfaceEntry::pointToPoint = false
protected

interface is point-to-point link

State inet::InterfaceEntry::state = DOWN
protected

requested interface state, similar to Linux ifup/ifdown

InterfaceToken inet::InterfaceEntry::token
protected

for IPv6 stateless autoconfig (RFC 1971), interface identifier (RFC 2462)

TRILLInterfaceData* inet::InterfaceEntry::trilldata = nullptr
protected

TRILL-specific interface info.


The documentation for this class was generated from the following files: