interfacedesc.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2003, 2004, 2005 Laboratoire de Recherche en Informatique
00002 
00003 // This file is part of Qolyester.
00004 
00005 // Qolyester is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 // Qolyester is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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     } // namespace internal
00077 
00078   } // namespace sys
00079 
00080 } // namespace olsr
00081 
00082 # endif // ! QOLYESTER_SYS_VIRTUAL_INTERFACEDESC_HXX
00083 
00084 #endif // QOLYESTER_ENABLE_VIRTUAL

Generated on Mon Sep 10 17:02:12 2007 for Qolyester daemon by  doxygen 1.5.1