43 vector<RMTPort* > ret;
46 if(table[pa.
domain].entries.find(pa.
addr) != table[pa.
domain].entries.end()){
47 ret.push_back(table[pa.
domain].entries[pa.
addr]);
56 std::ostringstream os;
58 os << this->getName()<<endl;
59 for(
FWDTableIt tIt = table.begin(); tIt != table.end(); tIt++){
60 os <<
"\t Domain : \"" <<tIt->first<<
"\""<<endl;
61 for(
s2PortIt qIt = tIt->second.entries.begin();
62 qIt != tIt->second.entries.end();
64 os <<
"\t\t->(" << qIt->first <<
" , "<<qIt->second->getFullPath()<<
")" <<endl;
73 domains.push_back(domain);
77 table[domain].len =
split(domain,
'.').size();
81 for(
sListIt it = domains.begin(); it!= domains.end(); it++){
87 domains.push_back(domain);
93 table[domain].entries[addr] = port;
96 table[domain].entries.erase(addr);
100 for(
sListIt it = domains.begin(); it!= domains.end(); it++){
102 unsigned short len = table[*it].len;
103 vector<string> sep =
split(addr,
'.');
104 if(sep.size() <= len) {
105 return pAddr(*it,
"");
107 return pAddr(*it, sep[len]);
111 return pAddr(
"", addr);
118 if(par(
"printAtEnd").boolValue()){
119 EV << toString() <<endl;
s2Port::iterator s2PortIt
std::string getQoSId() const
Getter of selected QoS-cube identifier.
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
bool isPrefix(std::string prefix, std::string s)
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
virtual ConnectionId & getConnId()
FWDTable::iterator FWDTableIt
vector< RMTPort * > lookup(const PDU *pdu)
void remove(const string &domain, const string &addr)
virtual Address & getDstAddr()
pAddr parseAddr(const string &addr)
void removeDomain(const string &domain)
void addDomain(const string &domain)
const std::string & getName() const
Gets APN string name representation.
Address class holds IPC Process identification.
void insert(const string &domain, const string &addr, RMTPort *port)
Register_Class(DomainTable)