00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "config.hh"
00020
00021 #ifdef QOLYESTER_ENABLE_VIRTUAL
00022
00023 # ifndef QOLYESTER_SYS_VIRTUAL_INTERFACEDESC_HXX
00024 # define QOLYESTER_SYS_VIRTUAL_INTERFACEDESC_HXX 1
00025
00026 # include "interfacedesc.hh"
00027
00028 namespace olsr {
00029
00030 namespace sys {
00031
00032 namespace internal {
00033
00034 InterfaceAddress::InterfaceAddress() :
00035 _prefix(0),
00036 _scope(0),
00037 _address(),
00038 _broadcast()
00039 {}
00040
00041 InterfaceAddress::InterfaceAddress(unsigned p,
00042 unsigned char s,
00043 const address_t& a,
00044 const address_t& b) :
00045 _prefix(p),
00046 _scope(s),
00047 _address(a),
00048 _broadcast(b)
00049 {}
00050
00051 bool
00052 InterfaceAddress::operator<(const This& rhs) const {
00053 return _address < rhs._address;
00054 }
00055
00056 InterfaceAddress
00057 InterfaceAddress::make_key(const address_t& a) {
00058 This tmp = _dummy_for_find;
00059
00060 const_cast<address_t&>(tmp._address) = a;
00061 return tmp;
00062 }
00063
00064 InterfaceInfo::InterfaceInfo(const std::string&) :
00065 _name(),
00066 _index(0),
00067 _mtu(0),
00068 _addrs()
00069 {}
00070
00071 bool
00072 InterfaceInfo::operator<(const This& rhs) const {
00073 return _index < rhs._index;
00074 }
00075
00076 }
00077
00078 }
00079
00080 }
00081
00082 # endif // ! QOLYESTER_SYS_VIRTUAL_INTERFACEDESC_HXX
00083
00084 #endif // QOLYESTER_ENABLE_VIRTUAL