// $Id$ // // Copyright (C) 2007 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file \brief INet6Address inline template implementation */ #include "INet6Address.ih" // Custom includes #include #define prefix_ inline //-///////////////////////////////////////////////////////////////////////////////////////////////// #ifndef DOXYGEN template prefix_ bool senf::detail::CheckINet6Network_impl5::match(boost::uint8_t v0, boost::uint8_t v1) { return true; } template prefix_ bool senf::detail::CheckINet6Network_impl5::match(boost::uint8_t v0, boost::uint8_t v1) { return v0 & ~boost::low_bits_mask_t<8-restbits>::sig_bits == boost::uint8_t(a>>8) & ~boost::low_bits_mask_t<8-restbits>::sig_bits; } template prefix_ bool senf::detail::CheckINet6Network_impl5::match(boost::uint8_t v0, boost::uint8_t v1) { return v0 == boost::uint8_t(a>>8); } template prefix_ bool senf::detail::CheckINet6Network_impl5::match(boost::uint8_t v0, boost::uint8_t v1) { return v0 == boost::uint8_t(a>>8) && v1 & ~boost::low_bits_mask_t<8-restbits>::sig_bits == boost::uint8_t(a) & ~boost::low_bits_mask_t<8-restbits>::sig_bits; } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return CheckINet6Network_impl4::match(addr[0],addr[1]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && CheckINet6Network_impl4::match(addr[2],addr[3]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && CheckINet6Network_impl4::match(addr[4],addr[5]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && addr[4] == boost::uint8_t(a2>>8) && addr[5] == boost::uint8_t(a2) && CheckINet6Network_impl4::match(addr[6],addr[7]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && addr[4] == boost::uint8_t(a2>>8) && addr[5] == boost::uint8_t(a2) && addr[6] == boost::uint8_t(a3>>8) && addr[7] == boost::uint8_t(a3) && CheckINet6Network_impl4::match(addr[8],addr[9]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && addr[4] == boost::uint8_t(a2>>8) && addr[5] == boost::uint8_t(a2) && addr[6] == boost::uint8_t(a3>>8) && addr[7] == boost::uint8_t(a3) && addr[8] == boost::uint8_t(a4>>8) && addr[9] == boost::uint8_t(a4) && CheckINet6Network_impl4::match(addr[10],addr[11]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && addr[4] == boost::uint8_t(a2>>8) && addr[5] == boost::uint8_t(a2) && addr[6] == boost::uint8_t(a3>>8) && addr[7] == boost::uint8_t(a3) && addr[8] == boost::uint8_t(a4>>8) && addr[9] == boost::uint8_t(a4) && addr[10] == boost::uint8_t(a5>>8) && addr[11] == boost::uint8_t(a5) && CheckINet6Network_impl4::match(addr[12],addr[13]); } template prefix_ bool senf::detail::CheckINet6Network_impl3:: match(INet6Address const & addr) { return addr[0] == boost::uint8_t(a0>>8) && addr[1] == boost::uint8_t(a0) && addr[2] == boost::uint8_t(a1>>8) && addr[3] == boost::uint8_t(a1) && addr[4] == boost::uint8_t(a2>>8) && addr[5] == boost::uint8_t(a2) && addr[6] == boost::uint8_t(a3>>8) && addr[7] == boost::uint8_t(a3) && addr[8] == boost::uint8_t(a4>>8) && addr[9] == boost::uint8_t(a4) && addr[10] == boost::uint8_t(a5>>8) && addr[11] == boost::uint8_t(a5) && addr[12] == boost::uint8_t(a6>>8) && addr[13] == boost::uint8_t(a6) && CheckINet6Network_impl4::match(addr[14],addr[15]); } #endif //-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_ // Local Variables: // mode: c++ // fill-column: 100 // comment-column: 40 // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" // End: