#include <IPv4InterfaceData.h>
Public Types | |
typedef std::vector< IPAddress > | IPAddressVector |
Public Member Functions | |
IPv4InterfaceData () | |
virtual | ~IPv4InterfaceData () |
virtual std::string | info () const |
virtual std::string | detailedInfo () const |
Getters | |
IPAddress | getIPAddress () const |
IPAddress | getNetmask () const |
int | getMetric () const |
const IPAddressVector & | getMulticastGroups () const |
Setters | |
virtual void | setIPAddress (IPAddress a) |
virtual void | setNetmask (IPAddress m) |
virtual void | setMetric (int m) |
virtual void | setMulticastGroups (const IPAddressVector &v) |
Protected Member Functions | |
void | changed1 () |
Protected Attributes | |
IPAddress | inetAddr |
IP address of interface. | |
IPAddress | netmask |
netmask | |
int | metric |
link "cost"; see e.g. MS KB article Q299540 | |
IPAddressVector | multicastGroups |
multicast groups | |
Private Member Functions | |
IPv4InterfaceData (const IPv4InterfaceData &obj) | |
IPv4InterfaceData & | operator= (const IPv4InterfaceData &obj) |
typedef std::vector<IPAddress> IPv4InterfaceData::IPAddressVector |
IPv4InterfaceData::IPv4InterfaceData | ( | const IPv4InterfaceData & | obj | ) | [private] |
IPv4InterfaceData::IPv4InterfaceData | ( | ) |
void IPv4InterfaceData::changed1 | ( | ) | [inline, protected] |
IPv4InterfaceData& IPv4InterfaceData::operator= | ( | const IPv4InterfaceData & | obj | ) | [private] |
std::string IPv4InterfaceData::info | ( | ) | const [virtual] |
00044 { 00045 std::stringstream out; 00046 out << "IP:{inet_addr:" << getIPAddress() << "/" << getNetmask().getNetmaskLength(); 00047 if (!getMulticastGroups().empty()) 00048 { 00049 out << " mcastgrps:"; 00050 for (unsigned int j=0; j<getMulticastGroups().size(); j++) 00051 if (!getMulticastGroups()[j].isUnspecified()) 00052 out << (j>0?",":"") << getMulticastGroups()[j]; 00053 } 00054 out << "}"; 00055 return out.str(); 00056 }
std::string IPv4InterfaceData::detailedInfo | ( | ) | const [virtual] |
00059 { 00060 std::stringstream out; 00061 out << "inet addr:" << getIPAddress() << "\tMask: " << getNetmask() << "\n"; 00062 00063 out << "Metric: " << getMetric() << "\n"; 00064 00065 out << "Groups:"; 00066 for (unsigned int j=0; j<getMulticastGroups().size(); j++) 00067 if (!getMulticastGroups()[j].isUnspecified()) 00068 out << " " << getMulticastGroups()[j]; 00069 out << "\n"; 00070 return out.str(); 00071 }
IPAddress IPv4InterfaceData::getIPAddress | ( | ) | const [inline] |
Referenced by NetworkConfigurator::addPointToPointPeerRoutes(), RoutingTable::configureRouterId(), detailedInfo(), RSVP::evalNextHopInterface(), RoutingTable::gatherAddresses(), IPAddressResolver::getAddressFrom(), RoutingTable::getInterfaceByAddress(), IPAddressResolver::getIPv4AddressFrom(), info(), TED::initialize(), LinkStateRouting::initialize(), RoutingTable::isLocalAddress(), SCTPAssociation::processInitArrived(), LDP::rebuildFecList(), IP::routeMulticastPacket(), IP::routePacket(), ARP::sendARPRequest(), SCTPAssociation::sendInit(), OSPF::Interface::SetIfIndex(), RSVP::setupHello(), and RoutingTable::updateNetmaskRoutes().
00066 {return inetAddr;}
IPAddress IPv4InterfaceData::getNetmask | ( | ) | const [inline] |
Referenced by detailedInfo(), info(), OSPF::Interface::SetIfIndex(), and RoutingTable::updateNetmaskRoutes().
00067 {return netmask;}
int IPv4InterfaceData::getMetric | ( | ) | const [inline] |
Referenced by detailedInfo(), TED::initialize(), and RoutingTable::updateNetmaskRoutes().
00068 {return metric;}
const IPAddressVector& IPv4InterfaceData::getMulticastGroups | ( | ) | const [inline] |
Referenced by detailedInfo(), info(), RoutingTable::isLocalMulticastAddress(), and RoutingTableParser::parseMulticastGroups().
00069 {return multicastGroups;}
virtual void IPv4InterfaceData::setIPAddress | ( | IPAddress | a | ) | [inline, virtual] |
virtual void IPv4InterfaceData::setNetmask | ( | IPAddress | m | ) | [inline, virtual] |
virtual void IPv4InterfaceData::setMetric | ( | int | m | ) | [inline, virtual] |
virtual void IPv4InterfaceData::setMulticastGroups | ( | const IPAddressVector & | v | ) | [inline, virtual] |
IPAddress IPv4InterfaceData::inetAddr [protected] |
IP address of interface.
IPAddress IPv4InterfaceData::netmask [protected] |
int IPv4InterfaceData::metric [protected] |
IPAddressVector IPv4InterfaceData::multicastGroups [protected] |
multicast groups