// $Id$ // // Copyright (C) 2007 // Fraunhofer Institute for Open Communication Systems (FOKUS) // // The contents of this file are subject to the Fraunhofer FOKUS Public License // Version 1.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // http://senf.berlios.de/license.html // // The Fraunhofer FOKUS Public License Version 1.0 is based on, // but modifies the Mozilla Public License Version 1.1. // See the full license text for the amendments. // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License // for the specific language governing rights and limitations under the License. // // The Original Code is Fraunhofer FOKUS code. // // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. // (registered association), Hansastraße 27 c, 80686 Munich, Germany. // All Rights Reserved. // // Contributor(s): // Stefan Bund /** \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: