All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
byteswap.hpp
Go to the documentation of this file.
//
// Copyright 2010-2011 Ettus Research LLC
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
//
#ifndef INCLUDED_UHD_UTILS_BYTESWAP_HPP
#define INCLUDED_UHD_UTILS_BYTESWAP_HPP
#include <uhd/config.hpp>
#include <boost/cstdint.hpp>
namespace uhd{
boost::uint16_t byteswap(boost::uint16_t);
boost::uint32_t byteswap(boost::uint32_t);
boost::uint64_t byteswap(boost::uint64_t);
template<typename T> T ntohx(T);
template<typename T> T htonx(T);
template<typename T> T wtohx(T);
template<typename T> T htowx(T);
} //namespace uhd
#include <uhd/utils/byteswap.ipp>
#endif /* INCLUDED_UHD_UTILS_BYTESWAP_HPP */