16 using namespace grafalgo;
31 string toString()
const;
32 friend ostream& operator<<(ostream& out,
const Entry& a) {
33 return out << a.toString();
41 bool valid(
int)
const;
44 int firstIface()
const;
45 int nextIface(
int)
const;
49 int getDefaultIface()
const;
50 int getFreeIface()
const;
53 bool addEntry(
int,ipa_t,ipp_t,
RateSpec&);
54 void removeEntry(
int);
55 void setDefaultIface(
int);
59 string toString()
const;
61 string entry2string(
int)
const;
69 int readEntry(istream&);
77 inline bool IfaceTable::valid(
int iface)
const {
78 return ifaces->isIn(iface);
88 inline int IfaceTable::firstIface()
const {
89 return ifaces->firstIn();
100 inline int IfaceTable::nextIface(
int iface)
const {
101 return ifaces->nextIn(iface);
111 inline int IfaceTable::getDefaultIface()
const {
119 inline int IfaceTable::getFreeIface()
const {
120 return ifaces->firstOut();
129 string s =
"IfaceTable::Entry::getEntry:: invalid interface "
130 + to_string(iface) +
"\n";
131 throw IllegalArgumentException(s);
139 inline void IfaceTable::setDefaultIface(
int iface) {
140 if (valid(iface)) defaultIf = iface;